Live data from Hacker News

Angular 2 – Best Practises

blog.budacode.com

21–30 of 94 posts

Re: Angular 2 – Best Practises

#21
post #13

Can someone recommend me good resources to learn (start with) angular 2? I am totally new, I am learning node after JS and after that, I would like to introduce myself to angular. I have some experience on JSF but I suppose it is completely different.

Angular 2's own tutorial is a nice start: https://angular.io/docs/js/latest/tutorial/ .

I second that. I was able to go from the tutorial to building a couple of small apps on my own, painlessly.

Super nice IMO

Re: Angular 2 – Best Practises

#22

I've been using ng2 for a few Ionic 2 Projects recently and its fantastic. Rxjs is an absolute must - it allows amazingly precise code to manage mutation. The way everything is a component is great. I can write a frontend app in a couple of days using Ionic 2. I'm so productive. Edit: Why the downvote?

Yes! ng2 + typescript is phenomenal, and makes ionic2 a pleasure to use. What you get for the amount of time you put in is much more satisfying than with ng1. Fun!

Re: Angular 2 – Best Practises

#23
post #10
post #4

Could someone tell me one-or-more reasons to choose Angular for a new project, now that the React ecosystem is mature enough to compete with it? As I feel that from a conceptual/architectural point of view Angular is simply on a loosing path. https://www.google.com/trends/explore#q=angular%20tutorial%2...

My impression is that a lot of "mature" (aka boring old) companies like Angular 1 and the sound of Angular 2 over React. For a number of reasons: - In general Java and C# programmers like it. - It is made by Google (perceived as more "mature", business like) rather than Facebook (young kids). - It takes a lot of inspiration from server side development with its dependency injection and general terminology. - And Type…

> My impression is that a lot of "mature" (aka boring old) companies like Angular 1 and the sound of Angular 2 over React.

React has been around for a while, but it is still only a library. Angular 1 and 2 are frameworks. Also Angular 2 is a complete rewrite and not even in final release. I'm not sure how that is boring or old.

As with Angular 1, Angular 2 aims to be opinionated, so it should be clearer how to do things than with React. Especially now with the move to components, Angular should be easier do more with, without as much confusion. And Angular 2 is much faster, if you do it right, which was one of the reasons Angular 1 was left for React.

React is fine for what it is. It's somewhat "matured" for a few years and is not a bad decision if you go with it.

I don't think that you should just jump on the latest JS bandwagon, but Angular 2 is more than just "for mature companies" and "similar to Java and C#".

Really, the only frustration we've had with Angular 2 so far has been that it has been changing so quickly, but it's starting to settle down now.

Re: Angular 2 – Best Practises

#24
post #10
post #4

Could someone tell me one-or-more reasons to choose Angular for a new project, now that the React ecosystem is mature enough to compete with it? As I feel that from a conceptual/architectural point of view Angular is simply on a loosing path. https://www.google.com/trends/explore#q=angular%20tutorial%2...

My impression is that a lot of "mature" (aka boring old) companies like Angular 1 and the sound of Angular 2 over React. For a number of reasons: - In general Java and C# programmers like it. - It is made by Google (perceived as more "mature", business like) rather than Facebook (young kids). - It takes a lot of inspiration from server side development with its dependency injection and general terminology. - And Type…

> - And TypeScript is very similar to Java and C#.

react and typescript go hand in hand, now that typescript has .jsx support (as .tsx files)

Re: Angular 2 – Best Practises

#25
post #4

Could someone tell me one-or-more reasons to choose Angular for a new project, now that the React ecosystem is mature enough to compete with it? As I feel that from a conceptual/architectural point of view Angular is simply on a loosing path. https://www.google.com/trends/explore#q=angular%20tutorial%2...

https://www.google.com/trends/explore#q=react.js%2C%20angula...

Re: Angular 2 – Best Practises

#26
For what it's worth, Google's engineering director for Angular has said that Angular 1 was a framework -- "something you could just drop into a web page and get going". Angular 2 was supposed to be a "platform of capabilities."

"We're still doing the framework, but we're improving our ability to handle different languages. Our plan is to have versions that will work with many server-side technologies, from Java to Python... We would like to work to make Angular future-proof. As we have new releases for Angular, it would be nice if we could give just an upgrade script, so on every release, it would be stress-free."

http://thenewstack.io/google-preps-angular-2-final-release/

Re: Angular 2 – Best Practises

#27

Earlier quoted context omitted.

If you run that some trends report - but with "Angular 2" - that shows a much higher uptake: https://www.google.com/trends/explore#q=angular%20tutorial%2...

The takeaway of course is that most of those probably want to pick up Angular 2 because they used Angular. I made a conscious switch from Angular to React because React (and the flux pattern) really did reinvent how web components are built and it's incredibly intuitive. I simply don't see the same innovation in Angular 2 apart from 'we made Angular more modern'

I'm learning front end dev for the first time, and I chose React - it didn't make sense to learn angular when react borrows so much from html that I can apply some concepts more directly.

Re: Angular 2 – Best Practises

#28
post #20

Earlier quoted context omitted.

One specific reason I am personally choosing Angular 2, is that the Ionic2 Framework also uses Angular 2 [0]. So I can re-use code from my front end website on my native mobile apps for the new startup I'm launching. Much less code = quicker time to MVP, and lower cost of development. [0] http://blog.ionic.io/angular-2-ionic/

Have you tried React with React Native[0]? [0] https://facebook.github.io/react-native/

BTW to parent, one big advantage of react-native over ionic is that it's not a wrapped web app, but a javascript/react app that compiles to an actual native app.

The performance difference and development experience (no silly css hacks) is very noticeable.

Re: Angular 2 – Best Practises

#29
Well there are 2 advantages to angular (1 or 2) over react:

1. It has effortless two way binding, which makes apps that allow mutating the same state from a lot of places easy and simple to make (though one could argue harder to maintain)

2. It uses a template rather then a precompiler (such as jsx) which has two advatages- since its html it makes cooperating with designers and the design process itself easier and it means you can use strings for modularity (for example saving a templatr in the database etc.)

Re: Angular 2 – Best Practises

#30
post #20

Earlier quoted context omitted.

One specific reason I am personally choosing Angular 2, is that the Ionic2 Framework also uses Angular 2 [0]. So I can re-use code from my front end website on my native mobile apps for the new startup I'm launching. Much less code = quicker time to MVP, and lower cost of development. [0] http://blog.ionic.io/angular-2-ionic/

Have you tried React with React Native[0]? [0] https://facebook.github.io/react-native/

In my experience code-share between React and React Native is extremely difficult as your UI code is so significantly different with native components and what not.

At least with Angular/Ionic you can directly share UI code between the two as its all HTML and CSS.

Still, I really enjoy working with React and React Native because I it's one API and mental model to learn.

Post reply on HN