4 ms·
I don't think Angular can be fixed, without throwing out everything in 1.x. What's wrong: 1. UIs are complex. Angular tries to solve this by attaching a lot o
by jeswin 12y ago
I don't think Angular can be fixed, without throwing out everything in 1.x.
What's wrong:
1. UIs are complex. Angular tries to solve this by attaching a lot of programming capability into its templating language. That makes the template itself very complex, which is the situation with Angular right now. Instead of injecting some programming capability into html-like templating, a better way would be to insert templating into a full programming language. Example, JSX.
2. One of the great things about the evolving JS ecosystem (as seen in say, the npm registry) is that components and libraries are tiny, and usually they do only one thing. While there are a few disadvantages to this, it also gives incredible flexibility. From my experience it reduces risk (because components are smaller and better understood) and makes it possible to adopt newer ideas/tech faster (because you could incrementally add small components). Angular on the other hand, tried to do too much.
3. Frameworks should enable users to re-use what they already know, instead of making them go through dozens of pages of documentation. Learning Angular takes as much time as learning JavaScript. We should encourage libraries which take advantage of what programmers already know, so that they can spend time working on features instead of learning the framework.
- ep103 12y agoI don't necessarily disagree with any of your points, but 2.0 is doing the exact opposite on all three points. The front end UIs are now _more_ complex, does _more_, and requires more Angular tie in.
- Bahamut 12y agoThe general idea behind directives is still there in 2.0. JSX does come with one fatal flaw in order to accomplish what it does - it requires extra build tooling from the get go, which makes it that much more difficult for junior developers to pick it up, along with the assault of other technologies, code structure, and paradigms they have to pick up at the same time. The beauty of the declarative direction of Angular is that it still is just regular old HTML. I do agree with #2, and it is a large part of why Angular is changing so drastically with 2.0 - part of this can be evidenced in 1.x with components being split into official optional modules (ngRoute, ngSanitize, ngAnimate, ngTouch, etc.). I somewhat agree with #3 - I feel like in order to properly use any framework, there is no way around combing through documentation and the source code. I have found that true with most libraries I have used. Angular's documentation at least has the benefit of being very thorough compared to most at least. I do disagree that libraries should only use what programmers already know though - we should be pursuing how to best foster productivity in the long term, and sometimes this means exploring new patterns.
- colinramsay 12y agoI think JSX can be used by doing nothing more than including the JSX transformer via a script tag.
- Bahamut 12y agoYou're correct, but it is not recommended to use that in production.
- TheAceOfHearts 12y agoOf course not, but if you're working in a small development environment it's great :P.
- rdtsc 12y ago> JSX does come with one fatal flaw in order to accomplish what it does - it requires extra build tooling from the get go, which makes it that much more difficult for junior developers to pick it up, along with the assault of other technologies, code structure, and paradigms they have to pick up at the same time. However if they managed to understand directives, digest cycles, dependency injection, MVVM, angular services, $scope, controllers (confession: as an amateur I haven't been able too), handling JSX build step doesn't seem like a stumbling block.
- cmdkeen 12y agoIf #1 was a concern they wouldn't be pushing AtScript. Angular has already conceded that extra build steps are a good thing, so why not add JSX into the mix as well.
- Bahamut 12y agoFor the record, that is one thing I don't like about 2.0 - I rather have less required build tools. Frontend development is getting quite complex, and I fear that it makes it harder to build up competent developers in the long term - it's already hard enough to teach friends trying to learn about everything else in development. I am fine working with this sort of tooling myself, but it is more of a concern coming from a lead/senior engineer viewpoint.
- aikah 12y ago> Frameworks should enable users to re-use what they already know Frameworks are DSLs.You have to learn its API and its architecture.
- cmdkeen 12y agoThe other big thing, as a Knockout user, is the massive difference between observables and Angular's digest cycle. Choosing a slightly cleaner syntax over having a dependency graph strikes me as an absolute folly - and leads to bind once as a UI construct rather than letting my view model dictate whether something is a constant or a variable (or a function).