7 ms·
Angular 2 is great, just look at all the features you get: WebWorker, Server-Side Rendering, mobile, progressive web application, Lazy loading support, Router,
by gdi2290 10y ago
Angular 2 is great, just look at all the features you get: WebWorker, Server-Side Rendering, mobile, progressive web application, Lazy loading support, Router, Material Components, Precompile your app. Tree-Shaking support, fast rendering, CLI, and TypeScript. The framework is backed by Google and Microsoft
- mda 10y agoAnd Dart :)
- kimshibal 10y agoYou don't need all that to create SPA app. it's bloated framework.
- gdi2290 10y agohaving the option to precompile your framework to 20kb file size which is smaller than some libraries feels like a great feature
- Bahamut 10y agoJust a note, that 20kb also includes the dependencies, such as the reflect metadata polyfill, zone.js polyfill, and an ES6 shim such as core.js. Once static template compilation lands (think of it like the JSX compiler), it will get even smaller. Angular 2 is shaping up to be a framework like no other out there in its capabilities.
- _alexander_ 10y ago20kb? Really? On last week I built NG2 application(rc.4) with one component and size was over 500kb, with all dependencies which needed to run it. Maybe @angular/core weight 20kb, but in order to run real world application need add many dependencies. rxjs, zoom.js, shims, and so on..
- Bahamut 10y agoIt's possible using smart techniques (standard minification/gzipping, Google Closure/Rollup, etc.).
- vladimir-y 10y agoI heard they are going to reduce final app size by doing smart analyzing of used features and getting not used stuff out of the final build. But I might be wrong.
- lloyd-christmas 10y agoWe have 75-100 components along with all the angular pieces, polyfills, and ngrx/rxjs. It's 250kb with a minimal build process. I haven't even started digging into any optimization/build tools. I think you're doing something wrong.
- rubber_duck 10y agoYou don't need to use all of that just because it's there and having it there is more reliable than having to cobble together your own, at least in a corporate setting. I actually find it surprising that this is a Google project, if you just gave me the code/docs and didn't tell me what project it is I would have guessed this came from Microsoft (feels much more WPF/Silverlight like than GWT/Closure, hell it even uses Rx which came out of MS)
- epimetheus 10y agoAngular 2 uses Typscript which did come out of Microsoft.
- pbreit 10y agoCan you suggest an alternative?
- skolos 10y agovue.js https://vuejs.org/ https://vuejs.org/ Edit: I used NG1 a lot and liked it. But after trying NG2 I felt it to be really too complex for small to medium projects. Vue.js is what I hoped NG2 to become.
- talmand 10y agoIf an alternative is not named, does that change the value of the opinion in any way?
- pbreit 10y agoI was just wondering what the author had in mind. But now that you ask, yes I think it does. Without a suggestion the opinion is pretty much worthless.
- RussianCow 10y agoYou really think we shouldn't criticize things if better alternatives don't currently exist? The fact that someone hasn't come up with a better approach doesn't imply that the status quo is the best possible solution.
- ghurtado 10y agoAbsolutely. Here's an example: Human mortality sucks. However, since there is no alternative, complaining about it is an exercise in futility.
- komali2 10y agoJavascript?
- ghurtado 10y agoSo Angular is not made with Javascript then? Do you not write Javascript when you use it? That's a bit like saying that the alternative to a roof is shingles.
- andys627 10y agoI wonder where the happy medium is. Setting up React/Redux/React-redux/react-router/react-redux-router/react-redux-router-thunk/webpack-hot-module-oh-my-god-what-am-i-doing takes forever.
- thereact 10y agocreate-react-app is their official attempt at a happy medium that basically does bare minimum basic configuration to start building React apps with the latest tools: https://facebook.github.io/react/blog/2016/07/22/create-apps-with-no-configuration.html https://facebook.github.io/react/blog/2016/07/22/create-apps... HN Discussion link: https://news.ycombinator.com/item?id=12144371 https://news.ycombinator.com/item?id=12144371
- ng12 10y agoYou don't need all of that from scratch. You can just build React components, and when it comes time to add a store or a router the only thing you need to change are the glue components that bind things together. I think it works out nicely -- the dev process is as composable as the app itself.
- nightski 10y agoYea I've noticed that. The react community likes to focus on examples involving a sign up form with 3 fields where you "really don't need all of that". Except that is not what most of us SPA devs are building. We need most of that.
- shados 10y agoEither you need all of that, and the time to set it up is absolutely insignificant compared to the lifetime of the project. Or you don't need all of that. It's very, very rarely a different situation.
- msane 10y agoIs that really an argument? that you don't need to write it at the beginning? you still have to do it...
- vladimir-y 10y agoEven if you don't need it for a one app you might get a need for the another app and it's fine that all that stuff is coming as an entire framework from the one team, which means that all listed features will work smoothly being put in a single app. So no need to find and integrate scattered over the interned 3-rd party libraries. I agree that Angular is more for the large (you can say enterprise) projects.
- msane 10y agoWhat exactly do you not need? What does "single page app" mean to you? The term is not a description of the amount of features.
- wwweston 10y agoThe funny thing about lists of features is that they tend to create their own focus illusion. Here's what I want to know: 1) Are the various abstractions surrounding those things reasonably legible? Or are we back to talking about Factory Service Providers again or otherwise importing other bits of pattern hell idioms into a language where there's always been easier ways to get things done? 1a) What did they do to make scope legibility better? (Assuming we still have the same scoping concept) 2) Do the abstractions leak? Angular 1.x abstractions leak like hell. Even if you're not concerned about performance, you have to be careful about snakes breaking out from under them and providing unexpected behavior, if you are concerned about performance you'd better have a detailed understanding about how the digest cycle works and it's utterly laughable that people thought this was a reasonable tradeoff for two-way data binding. 3) Is the tooling better? Some versions of Batarang were just straight up broken. Given that Angular 2 isn't really stable yet, I have my doubts these questions can have clear answers, but happy to receive surprise illumination. (At the moment, though, still avoiding applying to work at anywhere that lists Angular as a requirement. There's going to be technical debt and likely enough an ongoing technical decision making deficit at anywhere that does.)
- davidw 10y agoAngular is absolutely off in its own world of Factory Service Providers. It all feels way too abstract and way too much "it's own thing" that is quite separate from the world of HTML and Javascript.
- yogthos 10y agoJust like Angular 1 was backed by Google. It boggles my mind that people are still falling for the "backed by Google" thing, after Google has shown time and again that it loves to abandon products.