Live data from Hacker News

Angular 2 Final Released

angular.io

321–330 of 452 posts

Re: Angular 2 Final Released

#321
post #320

Earlier quoted context omitted.

"1) Isn't it just (!isNaN(num) && isFinite(num))? I know that's pretty far from intuitive, but it's not as bad as you made it sound. That being said, i'd love an `isNumber` function at some point..." You just proved my point! A) Even if you are correct - it's terrible . This is completely ridiculous that there's no basic check for extremely common and mundane type-checking. Moreover, it's the same issue for other typ…

FFS read the code before spouting random stuff. (!isNaN('100') && isFinite('100')) Negation (!) before isNaN()

he's right...

(!isNaN('100') && isFinite('100')) === true

My check would treat '100' as a number, so if i did something like this it would break unexpectedly:

    var num = '100'
    if ((!isNaN(num) && isFinite(num)) === true) {
      console.log(num + 10)
    }
You'll get "10010" printed to the console.

Re: Angular 2 Final Released

#322
post #23

I have been using Angular 2 for 3 months now and so far have loved it (except for the breaking changes in RC series and updating each time). Glad 2.0.0 is here. Here are the few things I loved, amongst other interesting features: 1. Typescript awesomeness: You can write plain JS or give type hints in Typescript. Typescript is awesome, because it is a superset of Javascript and compiles to Javascript. (Typescript > ES…

I'm holding out for Angular 2.0.0.0

Re: Angular 2 Final Released

#323
post #189

I use Angular 2 in production since November 19, 2015 (alpha.46). Currently I've built 3 web apps (40, 60 and 20 components each), 3 mobile apps (with Ionic 2) and my employer have plans for more apps. Breaking changes during alpha stage were expected, so I didn't have issues with it. Most positive things I want to highlight: 1. Components are encapsulated and truly reusable (and without dependencies hell). 2. You do…

I haven't used Angular yet. From it's description it seems to be geared for making single page apps. Or a app with a few pages because it's good a binding data to an interface. Is this accurate? What is a good use case for Angular?

Taking the load off of your server, and making the user's PC/tablet do more work, as well as greatly simplifying the server code to focus on data flow, business logic and data integrity, rather than mixing in presentation and minor U/I workflow complications. Having much of what you give to the remote client be static/cacheable content, with minimal data such as JSON passed rather than ballooned out JSP/JSF (etc) templated HTML, helps bring down bandwidth requirements, as well as server processing.

Of course, now you have A LOT of event handling in a client app on top of your middleware / micro-services, but I feel it is a helpful separation of concerns.

I suppose in my case it helps that I would rather do more of the app in Javascript, and less in Java. YMMV, substantially - I'm pretty sure I have a minority view at work :-)

We are working on a rewrite of a largish app (for a small team, anyway) at work. We already have a second, alternate, client app for our back end for a pilot project that we can now easily tackle with the new architecture. There were very few changes required on the server, just an alternate login method to automate an initial connection to a third party app (which then runs our alternate U/I in a frame), rather than an interactive SSO form.

We have a "Few Pages App", rather than Single Page App. By design, we reload a small number of alternate pages after a longish task, just in case (e.g. - resource leaks, whether from our own mishandling, or some library) - not because of known issues, mind you, but just out of my own paranoia that I would rather plan to allow for minor errors rather than requiring perfection.

Re: Angular 2 Final Released

#324
post #320

Earlier quoted context omitted.

FFS read the code before spouting random stuff. (!isNaN('100') && isFinite('100')) Negation (!) before isNaN()

he's right... (!isNaN('100') && isFinite('100')) === true My check would treat '100' as a number, so if i did something like this it would break unexpectedly: var num = '100' if ((!isNaN(num) && isFinite(num)) === true) { console.log(num + 10) } You'll get "10010" printed to the console.

Well that's because this is checking if a value may be a valid number. It's not safely converting the value to a number. That's done after a parseFloat()

Re: Angular 2 Final Released

#325
post #2

Front end development is crazy these days. I remember on my road to learning Java EE banging my head on the wall trying to put together things like dependency management with Maven, ORM's, and all sorts of arcane concepts and patterns. It took me a long time to get to that point but now it seems all too familiar. As someone coming up to speed with frameworks like React and Angular 2 it feels like that all over again.

That's very true -- it is reminiscent of the old J2EE days 12+ years ago. But it didn't really take long back then for a consensus to emerge about how awful most of that technology was (enterprise java beans, etc) and for people to settle on more simplified, streamlined approaches. How long will it take for the momentum in the front end community to similarly shift away from these bloatware approaches?

Re: Angular 2 Final Released

#326

Rob Eisenberg and his nimble team beat Angular 2 to the punch all the way back in July when Aurelia final was released. Before considering Angular, considering checking out http://aurelia.io - easier to learn, no third party dependencies and great support. I applaud the Angular team for sticking it out, but I am afraid they released far too late to compete with the likes of React, Vue and so on.

I now have several Aurelia apps in production. I've also created an app in Angular (v1), and another using Ionic (v1) - which was great. But, I can't express how well Rob and his team executed on this project. Documentation could be a little better in a couple areas but this is a place where they've done extremely well also (contradiction I know - but, for example the cheat sheets are amazing and documentation is complete on most things but there are some classes that are still not documented well enough). If you want to develop in Aurelia - just the community on Gitter - they are extremely responsive and very helpful.

Re: Angular 2 Final Released

#327

Earlier quoted context omitted.

>and then they threw it under a bus. They didn't just do this "because." There were sound technical reasons to do so. Angular made the correct decision, in my opinion, and decided to cut its losses immediately and right the wrongs within the framework.

Well... I would argue that angular 2 is not even better than angular 1 so it will probably happen again :p It's more performant, but that's about it. It's insane, java/spring like complex for no reason.

Really? So mobile support, change detection revamp, TypeScript, the removal of $scope, and all the routing changes are all just "meh" to you?

Re: Angular 2 Final Released

#328

I use Angular 2 in production since November 19, 2015 (alpha.46). Currently I've built 3 web apps (40, 60 and 20 components each), 3 mobile apps (with Ionic 2) and my employer have plans for more apps. Breaking changes during alpha stage were expected, so I didn't have issues with it. Most positive things I want to highlight: 1. Components are encapsulated and truly reusable (and without dependencies hell). 2. You do…

Do you know of any large projects that use Angular 2? I just want see how readable the projects are.

I asked around at ng-conf earlier this year, and nobody outside of the speakers were using Angular 2. I did some proper digging again a month or two ago and still couldn't find any examples of large NG2 projects in the wild.

Not very promising...

React on the other hand, I stumbled upon looking at the source of the Wall Street Journal the other day. It is everywhere now.

Re: Angular 2 Final Released

#329
post #21

As someone who uses Angular 1 currently but would pick React for their next project, I'd love to see a list of reasons why I should use Angular 2 over React. If nothing else, Angular just stranded all their developers, while React has a huge head start on mindshare/plugins/tutorials/etc.

I like the opinionated approach of NG2 over the flexibility of React because it takes a lot of decisions off of me that i am not too interested in when building a new project. I am a full stack developer leaning more towards backend in recent years and i found setting up and finding out about best practices and "what to use" for React a bit tedious, also it changes so much. The last Flux framework i used was alt.js w…

Yup, this is a major strength of the front end frameworks. It can't be understated in my opinion.

I work daily on a large Angular app and a growing React app, and my React app, while being more pleasant to work with, is also much harder to keep standardised and clean. I'm also already experiencing perf issues because of not using immutableJS, which is quite annoying...

Re: Angular 2 Final Released

#330

Serious question : Why are SPA frameworks so popular these days? When someone asks "What should I use for web development?", It's now all about React/Angular/Ember/etc. But when I look at how are built the sites I like and visit frequently, I'd say 95% of them are not SPA, they are classic sites where the server generate each page (sometimes with one or two Ajax requests)! The Single Page pattern is great for desktop…

See my response to "alzoid" about separation of concerns and bandwidth/processing benefits.

Simplify server logic

Use less bandwidth

Post reply on HN