It is easier to use simple modules for application control
- 1 October //
- Posted in Javascript
- No Comment
We are seeing an explosion of alternatives when it comes to javascript libraries, frameworks and tools. If there’s one thing I can say about all those alternatives, especially for the popular players right now like backbonejs, emberjs or even angularjs and knockoutjs is that they seem to offer specific ways for us to write almost every part of a javascript application – at least in my opinion – .
By javascript application I mean one page, ajax / web-sockets driven web-application that relies on javascript to do all the application logic.
Recently I realized that even though I like to have a framework that helps out with some of the functionality, like the views and models from backbone, or the nice UI from twitter bootstrap, I feel a lot more confortable having just parts of those frameworks integrated in the apps that I’m building.
Why is that? Well, because with pub/sub and some views – like the ones in backbone – I have free reign over the way I control what happens on the page and I don’t have to think in terms of framework related concepts. I just think in terms of javascript specific concepts, which can be understood easier – since I already know javascript -.
Another advantage of having vanillajs modules for application control is the learning curve of new developers. If they know javascript, they just read the flow immediately.
Who cares if you use backbone to do some pub/sub, jquery on and trigger or something else? You have a pub/sub there, people see it, understand it and then follow the flow directly.
Adding a framework only seems to complicate code in this part of the applications.
How I optimize my javascript code in order to minimize it better.
- 4 December //
- Posted In Javascript
- No Comment
Having a dozen or more javascript files in a project is not something new to web application developer of today. [...]