Live data from Hacker News

Angular 2 Beta released

angularjs.blogspot.com

211–220 of 273 posts

Re: Angular 2 Beta released

#211

Congratulations to the Angular 2 team on shipping before Christmas. The estimate was originally somewhere around early 2016, so this is a huge deal for them to get this out before the year was up. Unfortunately, Angular 2 launched into beta too late. In the amount of time that Angular 2 has taken to get to beta, ReactJS has slaughtered the front-end market share (in a good way) and completely taken developers by stor…

> ReactJS has slaughtered the front-end market share (in a good way) and completely taken develo Do you have a citation for that? I still see tons of user land projects using angular 1.

As expected, since angular 1 came out much earlier, and have the same hype React has had for the last 2 years then.

But checking from HN, blog postings, job announcements, team posts, new turorials (video, books), etc, React seems to be winning now.

Re: Angular 2 Beta released

#212
post #156

Earlier quoted context omitted.

I just checked Datanyze which crawls the Alexa 1m and more to see which services & libraries websites are using. They've detected 234,003 sites using Angular and 2,069 using React.

I think Angular is more accessible than React. I don't think React will be adopted as much by non-engineers. React is usually used alongside significant tooling like babel and webpack/browserify and some flux library. It's probably more complex. You can't just drop some js script file in your HTML document and go with that. I say that as someone who thinks React is the future of JavaScript development and there's no…

>I think Angular is more accessible than React. I don't think React will be adopted as much by non-engineers.

Both are meant for engineers, if by that you mean developers.

Re: Angular 2 Beta released

#214
post #86
post #69

I'm curious what Angular 2 is like for developers who normally write React? I hear 2 is a lot better than 1, but I'm still turned off by the amount of Angular-specific terminology, whereas most of React terminology is not necessarily React-specific.

Never understood why people liked React so much. I don't know why, but mixing javascript and HTML just looks... gross.

Your end product has both HTML and JS so there's no way around mixing them somehow at some point. You could do it by keeping them separate and linking between them by means of CSS classes and magic strings in HTML templates. Or you can generate the HTML using JS functions. JSX just gives that latter option a pretty syntax.

If you don't like mixing logic into HTML you're free to create dumb components that only contain as much logic as you would want to put in a template. Such a component would accept properties and output a representation of the resulting HTML. A smarter component that does not generate HTML will provide the logic required for the template to function. That approach actually encouraged and is the right way to do React.

The bonus of this whole generate-HTML-representation-with-functions thing is that you pass around native JS values instead of stringified values and magic strings. Want to provide an onClick callback? Pass a callback. Not some magic string that represents a key which holds the callback in some object defined by framework-specific convention. No, you just pass a raw javascript function that will be run on click.

This might seem like a trivial distinction, but it's the difference between writing native JS vs writing magic framework code. I vastly prefer the former.

Re: Angular 2 Beta released

#215
post #200

Earlier quoted context omitted.

I just checked Datanyze which crawls the Alexa 1m and more to see which services & libraries websites are using. They've detected 234,003 sites using Angular and 2,069 using React.

Angular is popular among developers who make products for the kind of person who would install the Alexa toolbar.

That comment reeks of sour grapes.

Re: Angular 2 Beta released

#216
post #132
post #95

Earlier quoted context omitted.

Then what do you use?

React providing a mustache-like format (like ractive.js uses) would be great - more familiar than JSX and less clumsy than createElement(). Edit response to person below (rate limit): there's no 'problem', just that mustache is still more familiar. Moving JSX into a different file doesn't change that.

JSX/createElement is not just syntax sugar though. It avoids the whole step of parsing the template. Because JSX is JS code, you can pass native JS values to it including callbacks. Whereas anything you could pass to mustache-style templates will be stringified.

So for example in case of parsed templates, to pass a callback to onClick you'd need to define a convention on how you're going to locate the callback by a given string (since you can't pass the function itself, you need to pass some "name" of that function). Whatever logic that will be, the result will not feel like React anymore because you're back to typical framework-specific template magic instead of using plain JS.

Re: Angular 2 Beta released

#217
post #86
post #69

I'm curious what Angular 2 is like for developers who normally write React? I hear 2 is a lot better than 1, but I'm still turned off by the amount of Angular-specific terminology, whereas most of React terminology is not necessarily React-specific.

Never understood why people liked React so much. I don't know why, but mixing javascript and HTML just looks... gross.

I know. But PHP took off because they were mixing code and HTML, not despite of it. Same same, but different, I guess.

Re: Angular 2 Beta released

#218
post #54
post #46

Uh did Angular not get the memo that people hate the new syntax and typescript? This is how you turn the most popular javascript MVC framework to nothing.

If only typescript was written by facebook or google then people wouldn't hate it.

People hate Dart, written by Google, for same reason: it is better to stick to single language, for better ecosystem, than to fragment it. I, personally, just ignoring Dart, CoffeeScript, TypeScript, etc. Life is short.

Re: Angular 2 Beta released

#219

I've just started working on an app using Angular 2 and Ionic 2.: 1. TypeScript - It's really nice to be able to use a typed version of JS, although it does feel like I'm writing C# sometimes! It supports lambda syntax / ES6 which is great. 2. Annotations seem a bit clunky, not really sure what the point of them is. 3. Absolutely love the functional reactive / RxJS stuff they've incorporated - it's going to make it V…

> $scope.apply anyone?

    _.defer(scope.apply...
...re typescript, i feel like if i'm gonna use a not-script of some sort, it might as well be clojurescript or something else that's like a really-srsly-not-js rather than js-but-prettier (coffee) or js-plus-a-paradigm-grab-bag (my totally uninformed take on type)

Re: Angular 2 Beta released

#220
post #86
post #69

I'm curious what Angular 2 is like for developers who normally write React? I hear 2 is a lot better than 1, but I'm still turned off by the amount of Angular-specific terminology, whereas most of React terminology is not necessarily React-specific.

Never understood why people liked React so much. I don't know why, but mixing javascript and HTML just looks... gross.

Mixing of logic and presentation is bad for application, but so don't use tag in your code, because it will be hard for _designer_ to change appearance of hardcoded page.

React mixes logic and structure, which causes no harm, because both are written and maintained by same developer.

Post reply on HN