4 ms·
Most fameworks deal only with the view (wether it is databiding , components , reactive programming ect... ) routing and the ajax stuff. The problem is that ar
by camus2 13y ago
Most fameworks deal only with the view (wether it is databiding , components , reactive programming ect... ) routing and the ajax stuff.
The problem is that architecturing a large scale js client is not that different from a Java one or a C++ one.
If one needs undo/redos you still need to know how to implement a memento and a command system. Does working with JSON blobs in Angular really help in that case ? or do you still need some kind of model with methods ? "But angular does data-binding why should I need a model class?..." that's the trap.
A few years ago ExtJS was seen as "THE" framework needed to develop large scale js clients.Now dev say it's AngularJS ,Ember or Backbone, tomorrow it will be something else. I feel for people migrating from ExtJS to AngularJS for instance , it basically means rewriting all the code.
The lesson I learned is not to use anything bloated or to use it to target a specific issue,while keeping the core of my codebase totally decoupled from framework X or Z. That's what devs do on the server ,right?, they dont write huge controllers but delegate most of the job to services that are framework independent,so they can have the same business logic for a website, a console app or an api.
That's why I think this article is good, as it doesnt target framework X or Y, but talks about a more generic approach to js application architecturing.
- macspoofing 13y ago>The lesson I learned is not to use anything bloated or to use it to target a specific issue,while keeping the core of my codebase totally decoupled from framework X or Z That's a bad lesson. JavaScript, on it's own, does not give you enough to write proper large-scale applications. You will have to commit to some framework, whether one your wrote yourself or one you got from somewhere else. And this isn't just a JavaScript issue. Even better designed languages (Java, C++, C#) will require some sort of framework to augment their language constructs, in specific cases and when working with code of a certain size. Packages and classes are just not enough sometimes. >I feel for people migrating from ExtJS to AngularJS for instance , it basically means rewriting all the code. Then don't do it. There's nothing wrong with having a code-base in ExtJS in a world in which Angular is popular. If ExtJS is doing its job and your software is doing what it's supposed to, why would you migrate to Angular? Why would you rewrite anything? Because Angular is more popular? So what?! You may have 100k lines of working, battle-tested code, 3 developers have been working on for several years. No sane person would just throw that away with a rewrite.
- jksmith 13y agoThe framework is a modern blessing/curse. Since you mentioned other languages, I've written plenty of revenue generating software with just libraries. I'm about to write a fairly large REST back end in golang and I have high confidence that I won't need a framework to pull that off.