6 ms·
Angular ng-is ng-very ng-opinionated and requires a ton of boilerplate knowledge. It requires typescript knowledge, and I've noticed that (finally!) a lot of de
by 734129837261 7y ago
Angular ng-is ng-very ng-opinionated and requires a ton of boilerplate knowledge. It requires typescript knowledge, and I've noticed that (finally!) a lot of developers are realising that typescript actually doesn't make life easier at all.
React, on the other hand, is a very intuitive library instead of an all-encompassing framework. You can easily setup a React application in a few seconds and get started, adding whatever you want as you go.
The JSX syntax is infinitely more intuitive compared to the Angular way of doing things. Which also gets me to the point of Angular having a specific way of doing things, "the Angular way".
With React there's less thinking required to get things done. The learning curve is steep (as in: you pick up the knowledge quicker) because the amount of information to take in is relatively low.
Angular takes months to master. It's very opinionated. And it requires typescript.
I for one hate typescript with the passion of a thousand suns. I know it very well because I have to if I want to keep my job, but it's so freaking unnecessary...
- hackerbabz 7y agoWhy do you typescript so much?
- gherkinnn 7y agoWhat’s with all the TS hate?
- bakuninsbart 7y agoIn my experience, people who have been experts on JS before TypeScript became a thing hate it. - It doesn't give them any advantages, while severely limiting their options and workflow. For newer developers with background in other languages it is quite nice though.
- gherkinnn 7y agoI understand “limiting options and workflow” as “limiting the stupid amounts of yolo that JS allows”. TS shows you just how bad JS can be without very, very diligent processes to keep it in check.
- jillesvangurp 7y agoFor developers coming from other languages, typescript and the tool support in VS Code is what makes frontend engineering tolerable these days. A big difference with just a few years ago. I insist on it in most projects I'm responsible for. I see no good technical reasons not to use it at this point.
- Aeolun 7y agoI mean, if you really want to, you can configure it to be just JS with .ts file extensions :P
- jillesvangurp 7y agoWell, strict mode is a thing of course. But yes definitely have seen a bit too much code with the any type.
- Zarel 7y agoI was an expert on JS way before TypeScript. I was kind of slow to adopt it because "the type hints are optimized away and can't even be used to boost runtime performance", but when I did start using it, I loved it and wish I had earlier. The linked article says the vast majority love TypeScript, too. I think the real dividing line is probably that people who haven't had to maintain a large project hate TypeScript. (Which is still weird to me, because you can just turn off `no-implicit-any` and get all the benefits without drawbacks.)
- gherkinnn 7y agoGood point. I too only saw the point after being burnt by a large JS application.
- hacker_9 7y agoTypescript doesn't make things easier, and react is intuitive? You know April fool's is still a few months away right?
- 734129837261 7y agoTypeScript slows down a project. Nobody seems to ever point out what benefits it supposedly offers. My claim: TypeScript offers no benefit. Ever. That's 2 years of fulltime TS experience talking and 18 years of fulltime JavaScript experience, on top of a whole bunch of full stack (Java and .Net with C#) experience. I think the popularity of TS is going to decline. And I think it's only popular because of the influx of backend developers coming into the frontend. Additionally, because "everybody does it so it must be professional so I should like it". As for React, well, great argument, I guess?
- the_gipsy 7y ago> TypeScript slows down a project. Nobody seems to ever point out what benefits it supposedly offers. Types slow you down a bit at the start, but speed you up forever after that. Untyped projects are fast to whip out, but slow piles of undefined behavior forever on. Oh and add unit tests, without types, and all you have is a checksum. > And I think it's only popular because of the influx of backend developers coming into the frontend. That's not the only reason why it's popular.
- hacker_9 7y agoSlows down what? Compile times? By a small amount sure, but with the incremental compilation we're talking maybe a few tens of seconds max. Any longer and you need to look at improving your build dependencies for better parallelism, and upgrading your hardware. Development time? Types reduce mental overhead and abstraction for the developer, speeding up development. Run time? Variables with types that stay static execute faster in JS engines. Types keep code maintainable, and protect against any accidentally implicit conversions (rife in JS). Types still exist whether you define them or not, so being explicit gives the maintainer of your code much less mental overhead when working with your code. Knowing the contract that a function follows allows them to skip over any assumptions and know exactly what the code is meant to do. Break the contract, get a compile time error. Anyone can write code, writing maintainable code is the real challenge. In my own 20 years experience this is always what separates the wheat from the chaff.
- tannhaeuser 7y agoJust the other day I had a look at a friend's customer Angular project. My eyes! I knew Angular from past experiences, but once again it stuck out to me that Angular devs tastelessly found it necessary to equip HTML with additional meta-syntax such as parens and asterisk as part of attribute names. Now I can get that some people dislike markup languages (SGML/XML), but going in there and invent a whole new syntax on top when SGML already has plenty (arguably even too much already, to the point that W3C found it necessary to invent the XML subset of SGML) just tells me Angular is made by people full of Java-ish MVC world-views but complete lack of awareness of prior art and established practices in the field. A similar thing is happening with HypeScript: bending a weakly-typed language to fit an outdated and obsolete OOP mindset when JavaScript has eg closures for modularizing event handling.
- tashoecraft 7y agoI probably wouldn't go around discrediting a large group of extremely knowledgeable devs with extensive experience. My opinion is generally, if I see something a ton of people have spent countless hours building and I think it's stupid, I should atleast think about why. Angular uses parens to bind to existing element classes, so if you use an html element, and it has a src field, you want to pass a string just do the normal src="string" you want to pass something from javascript [src]="variable". Boom, you just learned the biggest part of angular template syntax, congrats. This allows for using any existing element, or newly developed elements, web components, without worry about clashing, (jsx class...). I do agree they went a little to heavy with OOP thinking, it's a weird balance between the functional reactive pushed by rxjs, and a more classic OOP line of thinking. I believe Angular will move more towards a functional way of developing as the team is coming off of the rendering refactor, ivy, and the community is working on the functional reactive component.