I would like (need) to develop a graphical user interface library that remains simple, clean and lightweight. I will then need it to modify a SPA on which I will work, that using the HTML5 canvas element. What I'm interested in adding will be items such as, canvas obviously, buttons, sliders, navbar / sidebar, menus etc. I don't know where to start, how to set up the work, how to structure the library. how should I proceed?
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (4)
At some point, I made a simple class
component
class, it had ael
property. and some methods to add and remove other components. some components usedunderscore
templates to create compex internal structure. when creating components and removing components, you would register and remove event handler. It was an electron app, but for a single page application, I would love to use page.js for routing.However, I think today, the js community want to build apps more in a declarative way as in todays modern frameworks like vue, react, angular.
I really enjoied studying cito.js. It is a virtual dom library and its source is short in a single file.
disclaimer: I am good with frontend, but mostly work on the backend and always keep my mind open for new ideas. Developing your own framework, is maybe not the most productive, but you will learn a lot and can have lots of fun.
Why don't you start from an existing ui library and see how they have it setup ? Is there a reason you are not using an existing one ?
good idea! I don't want to use an existing one because I need a small, functional and simple library that does those few things I need.. and I would like to try my hand at doing it
Which SPA are you using ?
create-react-library can be a good starting point with React