11 ms·
Hmm. I see that Angular is getting aaaaalot of hate here. I really tried to understand why but have not found really valid reasons, just preferences. I have use
by ssijak 10y ago
Hmm. I see that Angular is getting aaaaalot of hate here. I really tried to understand why but have not found really valid reasons, just preferences. I have used Angular 1.x a lot and have just tried Angular 2. It really enables me (somebody who comes from primarily strong backend dev experience) to work on frontend SPA apps productively and fast.
It does not 'feel' heavyweight or that it gets in my way too much, but the contrary is true. Of course, it has it`s quirks, as every larger lib have, but it`s pluses outweigh minuses by far for me.
Preferences aside, does Angular make you less productive than other options? Do you feel that you fight the framework? Can you finish non trivial frontend apps, involving 5+ team members, 'better', with cleaner code and much faster with other options?
This are just honest questions. I wanted to start some pet project in angular2 soon, but would listen to alternatives, maybe it is a right moment to try some of them.
- danielpatrick 10y agoI've been using Angular 2 for a medium sized application that will be going into production within the next few weeks. I'm not affiliated with the Angular team at all. I started using it when this app was very much a POC last summer, just as the Angular team was finishing up the 2.0 release. I learned firsthand last summer the issues with using a framework that was still in the oven: constant updates and some dependency changes. That was no fun for some time. But I'll say now that it was worth it. (Maybe I should have started a little later, post-2.0 release). But I'm now building out a decent sized and complex application much faster than I'd ever done before. It is strongly typed, it is modular, and it has dependency injection. Oh and it's strongly typed. I can't emphasize the importance of this enough. I know you can use typescript without Angular, but that the Angular community and the docs are all in typescript make this a typescript-native framework. I'll never look at JavaScript again if I don't have to. You and your IDE and the rest of your team can know an object's Type without having to scrounge around, it's such a blissful departure from JavaScript. It definitely has a learning curve. If you're spinning up a simple web app it may or may not be for you. (...though now I use it to spin up simple web apps because I'm used to it and it's so good for that) But for anything complex that is being worked on across a team, I recommend you take the time to learn it. It's not perfect, nothing is. But it is leagues ahead of any framework I've used on the front end. And having gone to Typescript, I will never use a native JavaScript framework again.
- alttab 10y agoWhat's been your experience with browser-side debugging? The one thing that scares me about typescript is you end up debugging something you didn't write.
- danielpatrick 10y agoYes, good question. I use VS Code (with the Chrome debugger plugin) and that works like a charm. I don't debug javascript in the browser anymore. TS provides source mappings to map the compiled javascript back to the source (similar to a .dll's .pdb maybe?). It took me some time to set up the config file which proved to be a headache (because webpack was screwing with the source maps), but again once that was set up it has been a breeze to debug right in my IDE whenever I want.
- kevindqc 10y agoThat's been my experience too. Also once angular-cli seems more stable, I will probably switch to it and delete webpack (I know angular-cli uses webpack behind-the-scene, but at least I don't have to deal with it directly)
- leshow 10y agoOdd, I'm new to vscode, but I tried to set up this plugin and it was completely unusable to me. Perhaps you can describe the steps you followed? I tried installing the plugin and launching chrome with the debug flag, then setting a breakpoint in vscode. Is there something I am missing there?
- wincy 10y agoAt least in Chrome it'll pick up the mappings and let you directly debug the typescript you wrote. Worst case the javascript isn't nearly as gnarly as you'd think.
- alttab 10y agoBut then you need to be good at Typescript, React, AND Javascript to build a feature. And that's not even considering databases, server middle ware, etc.
- hamstercat 10y agoI started with Angular 1 and like it very much. Like you said, it enabled me to structure the code a certain way that made understanding it easier. I tried Aurelia since and moved on to React, and I have to say that while I still like Angular, not having to deal with state and mutability everywhere is a big boon to productivity. Whenever I code a component, I can simply think of the props (it's parameters) and the output (the HTML). That being said, Angular is still a valid option (haven't tried Angular 2, but from what I've read it's a nice upgrade over Angular 1). I'd still take React any day of the week over it, just for the simplicity it brings. Of course there are other drawbacks to using it, but nothing's perfect.
- ddito 10y agoI would suggest trying ng2 before dismissing it over experiences with ng1. I was having huge issues with ng1 with updating scope and simillar things and then I tried ng2 first for a hobby project then a bigger collab one and if theres one thing I can say it's that Google did serious damage to the project by reusing the branding for two different frameworks for both searching/googling purpouses and by reusing branding from a framework which isn't similar and has been dismissed by many already. I hear too often how people say react is better than angular without trying ng2. It's like saying python is better than c# 1.0. Maybe it is but youre not making a fair comparison
- hashkb 10y agoWhat else have you used? Having spent time in both Angular and React, I can say from experience I'm more productive and less angry while working in React. Less to learn, much simpler, yet no less powerful.
- stephenhuey 10y agoI started using Aurelia for one of our projects back in January 2016 and I find it both straightforward and powerful. I've been building web apps for 14 years and Aurelia is big on following web standards. I had used Angular for a project back in 2012 and found it very Java-esque and not so intuitive. The founder of Aurelia left the Angular 2 team because he felt they weren't choosing to follow standards. Aurelia's community is growing and has an active Gitter channel, so drop by and check it out!
- nck4222 10y agoI loved working with angular. They lost us when they released angular 2. It was complete breaking changes and the upgrade path was a nightmare. They basically were forcing users to completely rewrite their front-end if they wanted to upgrade. So the team figured if we have to rewrite our front-end, what's keeping us on angular and why would we stick with a framework that doesn't seem to have any issues forcing it's users to do complete rewrites just to use the newest version?
- zdragnar 10y agoI have built multi-10k+ line applications in angular 1, 2 and react. My personal preference is react by a mile. The concept of modules and dependency injection was nice before we had any sort of module systems, but at this point it's essentially entirely busy work, given tools like proxyquire when testing. Template compilation errors are a nice step up from 1, but those that I've seen have been very misleading and have been the cause of wasted hours debugging. Angular 2 makes extensive use of the Reflection API for metadata, which combined with the fact that angular-cli is hard-coded to perform static analysis (even if you disable AOT) is another pain point. I'm trying to build the equivalent to "react storybook" for our platform, and it's taken me about 3x the time it would have with React. With all of that said, if you need a "think-inside-the-box" tool for a large, decentralized dev team, angular can win out- there are fewer places to look for documentation, which will be nice when angulars documentation improves. I actually find that React better encourages smaller, cleaner components with fewer responsibilities, but that's also likely due to being very familiar with the redux paradigm. Finally, if you want very flexible components, react wins hands down, because components can be used as properties to other components; dynamically rendering components in angular has always had an inversion of control issue. That's been my experience; ymmv.
- danielpatrick 10y agoYou've build multi 10k+ line applications in Angular 2? It was released 5 months ago.
- danielvf 10y agoNot GP, but it's been publicly available long before that.
- zdragnar 10y agoOne in angular 2, two in 1, and another that was a maaasive project in react. Team sizes varied from 3 devs to 12 or 16 (I forget which)
- petar_prog 10y agoWith my team, we have developed using Angular 2.0 beta candidate mid-size banking application for one of the biggest swiss banks, plus complex hypothec management and transfer application which is public on the bank website. We pretty much managed to release the apps before actual Angular 2 official release, and then we upgraded apps to official versions. It was really interesting to experience and it all went really smooth but we had to use Redux (just a note). So yes, there are some of us who are doing production ready code before the actual frameworks are released. Bold move, but a smart one in our case. Apps are almost bug-free (really edge cases are minor bugs). I do have to note that we are all Full Stack Java devs who have experience in banking and complex applications for a long time, plus we focused a lot on Angular in the past, so this transition with Typescript and Angular 2 syntax was a charm for us.
- azurelogic 10y agoTry Vue.js. It's what Angular 2 could have been, if they had taken proper advantage of ES2015 and virtual DOM. Another way of looking at it: Angular 1 and React had a baby, and they named it Vue.js. Vue has HTML templates like Angular and virtual DOM like React. It is faster than both of them. It has a smaller file size than both of them. It has a clever single file component concept that makes developing components much easier. It uses a one-way data flow concept like React+Flux. Vue even has it's own competitor to redux/mobX called Vuex, and what makes it easier is that Vue is cognizant of Vuex's existence. There are really solid dev tools for Chrome as well (Vue and Vuex are aware of the dev tools as well). I run a dev meetup, and I had planned to give a talk there on Angular 2. I even gave talks on JS tooling a year ago and TS last summer in preparation. Instead, I gave a talk on Vue this month, and people loved it. Here are the slides if you want to check it out (there are even embedded Vue apps!): https://azurelogic.github.io/vue-js-2.x-talk/#/ https://azurelogic.github.io/vue-js-2.x-talk/#/
- boredpudding 10y agoThanks to this comment I'm looking at it now. The only thing I hate is 'v-for="todo in todos"' as an html attribute. I would personally prefer a mustache-like syntax. Other than that, this looks awesome. Time to develop a todo app.
- ng12 10y agoWhy are HTML templates a good thing? It's hands down my least favorite part of Vue.
- catenthusiast 10y agoYou don't even have to know use them. You can use render functions or JSX like React.
- VertigoJenny 10y agoIt makes integration with existing code trivial. Vue's HTML templates can be neatly integrated into pretty much anything without a struggle compared to tools that make assumptions about your build chain and what you are working with. To use Vue, you could include it with a <script> tag and suddenly your existing HTML can be rapidly extended. Or you could get way more involved and use webpack, JSX and such if you wanted to. To not have HTML templates means you need to do something more invasive to retrofit client-side templating into place. It's personally why I don't bother with libraries that don't offer similar, because I don't always have total control over what I am working on and I still need to get work done.
- daliwali 10y agoThere is probably a non-trivial amount of astroturfing here, but also software developers are people too, and people get dogmatic about their opinions. I probably won't ever use Angular unless I find myself desperate for work and can't find anything else. The problem I see inherent in frameworks is that they are all dogmatic about their opinions, and thus criticism of frameworks often do boil down to "I don't agree with their opinion", sometimes with rationalizations mixed in. Preferences aside, Angular is objectively one of, if not the most, heaviest frameworks for web front-ends. It is not just a matter of bandwidth to the end user, but also a lot of magic under the hood that developers have to deal with. Consider the Java mindset that may have inspired Angular, people don't want to deal with that level of verbosity and enterprise mentality. Unfortunately, there are increasingly few employment options if you want to use anything other than React or Angular. So rather than framing this argument in terms of framework hate, consider it a problem that lots of developers are forced to use these frameworks in order to be more like easily replaceable cogs in a machine, or be unemployed.
- throwasehasdwi 10y agogiven that both frameworks are open source I highly doubt any astroturfing on either side. I think what you're seeing is a bunch of developers riled up :)
- daliwali 10y agoHow ironic is that comment coming from a throwaway account... Given that both frameworks are products of multi-billion-dollar corporations, used mostly in commercial applications, and keep a fair number of people employed, I think it's a bit more than just getting riled up.
- deleted 10y ago[deleted]
- shadowmint 10y agoI can only speak from personal experience, but I've worked on 2 SPA angular apps that were both a nightmare. The react apps I've worked on have been much more successful; we haven't had to throw the whole thing away (unlike one of those angular ones...) I'm sure other people have had other experiences, but after two terrible experiences, the questions I would ask are: - Why would I bother looking at angular again? - What has significantly changed in the last year to reduce the complexity, increase the component ecosystem or increase the quality and quantity of the documentation? If you can't answer either of those with meaningful answers, I don't see any reason, given the other alternatives to angular that are around, to try using it again.
- mstijak 10y agoI would recommend CxJS as an alternative. It has the best mix of Angular and React features such as JSX based view, two-way data-binding, controllers. On top of that, a large collection of widgets and charts is included out of the box and we're soon to release a Material Design based theme. https://cxjs.io/examples https://cxjs.io/examples Disclaimer: It's a commercial product and I'm the lead developer.
- Touche 10y agoI still need a good reason why I need DI built into a framework and the following is not sufficient: SomeClass.SomeDep = MockDep; In other words, inject through static properties. I do this with normal classes to test models and the like with no issues. No DI container necessary.
- tomelders 10y agoI've got experience with Angular 1, 2, React+Redux, with teams of 5+ For me, the real problems in web app development are 1. State management 2. Side effects 3. View layer performance Angular pales by comparison to things like React+Redux which were born out of necessity, and as such, tackle those issues with laser like focus. Angular doesn't feel like it was born out of necessity, but out of some desire to just build a framework. As such, it's complicated and magical feels clumsy by comparison. When combined with things like Immutable, Sagas, and ReSelect, the Redux/React style of architecture (feel free to swap out Redux or React for whatever you prefer) is so much more practical and useful compared to Angular. I don't know what it is that makes Angular popular with back end developers, but they seem to be Angular's biggest supporters. I consider my self full stack, but front end first, and I've noticed that people like me tend to favour libraries over frameworks. There's obviously something that is informing each groups opinions on this matter, but I don't know what it is.
- kevindqc 10y ago>When combined with things like Immutable, Sagas, and ReSelect, the Redux/React style of architecture (feel free to swap out Redux or React for whatever you prefer) is so much more practical and useful compared to Angular. You can use all that with angular 2. I am. Redux -> @ngrx/store Immutable -> same Sagas -> @ngrx/effects ReSelect -> same Example here: https://github.com/ngrx/example-app https://github.com/ngrx/example-app
- andrei_says_ 10y agoPlease take a look at Vue.js. I'm being redundant, intentionally. There's something about it -- feels clean and minimal, works really well with my ruby- and rails- influenced mind, organizes my thinking about an app and makes it easy to have things in their right places, at a correct level of abstraction, effortlessly. My reaction after encountering vuejs was one of relief -- finally seeing an option I resonate with, a vision driven by someone whose thinking is aligned with my desire to avoid confusion, complexity and frustration. The free screencasts at laracasts and egghead.io are quick and fantastic. https://laracasts.com/series/learn-vue-2-step-by-step https://laracasts.com/series/learn-vue-2-step-by-step
- smdz 10y agoAngular 1 was great. It was first of its kind. And it was just a bit complex - but not too much. Ng2 felt too different. Ng1 to Ng2 made me look outside and there was React gaining ground - perfect timing. In its original state React is so much simpler than Angular. But then React with just the basics can make you create bad code - that's what happened to me. React with best practices - is hard to digest. So I went back to Ng2 - soon enough I was craving to go back to React. Suddenly I started hating Angular2 (but loved TypeScript). I spent time learning React best practices - that require some patience. But one thing I brought on from Ng2 was TypeScript. TS makes you a lot more productive. Now React and TS is not a widely accepted combination - but its very productive as your app grows.
- Syntaf 10y agoI wrote https://www.smsforecast.com https://www.smsforecast.com using Angular2 and personally love the changes made from 1.X, I'm happy to see 4.0 come out along with it's bug fixes and features. 1.X felt messy, but writing web apps in Angular > 2 feels really clean when done right.
- boubiyeah 10y agoAngular is a huge framework with a very OO style written by java devs. You have to learn many things to be productive with it, including a really weird string templating language. The most funny thing probably is the typescript sale pitch (I use and like typescript) where you actually don't beneficiate from typescript at all with half of angular (string templates means no type checking or intelliSense on component names, model properties, component apis, etc) It's also pretty fat and not exactly performant. It's simply a no-no on mobile. Its niche use case seems to be backend developers who know OO well, FP not so much, developing low/average quality back-office apps quickly without having to care about what's going on behind the scene. The angular core devs always favor magic and shortcuts over simplicity. Its API surface is enormous, so have fun keeping up with the versions. It's optimized to get started quickly and be decently productive as long as you only use the core directives. It's not terrible, but it's just not good if you care about the UX and maintainability of your app.
- lenkite 10y agoThe ionic developers are using angular 2. http://ionicframework.com/docs/v2/intro/installation/ http://ionicframework.com/docs/v2/intro/installation/ . So it it isn't a 'no-no' on mobile as you put it. Angular 2 AOT produces very lean JS.