Live data from Hacker News

Angular 2 Core

docs.google.com

131–140 of 279 posts

Re: Angular 2 Core

#131
post #32
post #17

Angular 1 developers should see this as an opportunity to abandon Angular and move on to React. React is by far and away the best the market has to offer right now. From my perspective client-side applications are a solved problem thanks to React.

I remember when I looked into React that I was basically writing HTML templates into javascript code. Are there ways around doing that now with React? Because I find that to be a pretty big affront to separation of concerns

You don't have to use JSX. You can use React.DOM directly or use react-hyperscript as a shorthand method for React.DOM

Also pay attention to the new createFactory method which aims to make it easy to separate your changing HTML from the static HTML (which you would have previously used a templating library for)

My recommendation is to not use JSX ever since it breaks a lot of your tooling. The first impression people get is that "Hey this makes my code easier to read", but that is only because JSX introduces the problem that it attempts to solve.

Basically most HTML structures are 80% unchanging and 20% changing (the reason we use templates in the first place). React.DOM was a pain previously because you'd define a complicated HTML structure in Javascript, which isn't really any harder or more complex, but then you'd have all this code that was never changing distracting you from the code that was changing (i.e. your app behavior). JSX fixed this problem by turning all the static bits to html like templates do so it was visually easy to separate from your behavior code. This was the wrong solution because it's over engineered and breaks compatibility with a lot of things.

createFactory essentially allows you to "partially apply" the static parts and get a function that only needs to deal with the dynamic parts (like compiled template functions but for virtual DOM)

Anyways, check out the following links:

https://github.com/mlmorg/react-hyperscript

https://gist.github.com/sebmarkbage/d7bce729f38730399d28

Re: Angular 2 Core

#132

Earlier quoted context omitted.

> There are tons of javascript libraries that are out there And there you have your answer :) What the JS people don't seem to grasp is that I don't care how many libraries are out there. I care even less about the incompatibilities and the different release cycles of all those libraries. By now, I hope you understand that my interest in maintaining and integrating all those into a coherent system approaches zero. I…

> The front-end is just 1-10% of any serious system and yet, in the JS world, it takes 90% of the time building it and maintaining it. It just doesn't add up. Wow, I want you to come work for me for a week. The front end is what interfaces with the user - your client - the one whom is paying money. You may hate JS, but it is the tool that we use to build interaction.

You misunderstood or I didn't express myself correctly.

I don't want to underplay the importance of the front-end, or in general the interfaces and what that means for bringing value to a product.

But however you spin it it's not the core technology. You could make the same point you made, by saying the same about the marketing/sales department. Yes, it's how you bring customers and without it you'll probably fail to reach a large audience. But again, it's not the core of your product.

Also keep in mind that mobile platforms(which are quickly becoming much more important than the web) also have a user interface. Take a guess at which of the 2(web/mobiles) are more costly to develop and maintain. The web, by far. That can't happen for much longer, that's all that I'm saying.

Re: Angular 2 Core

#133

Intresting, but WHY are these approaches better. Is that adequately explained?

I think this is the problem with posting slides, and not a video. For most presentations slides are bullet points. It's like ordering a cheese burger without the burger.

Re: Angular 2 Core

#134
post #36

To everybody trying to make this into a tech fight about Angular vs. React/whatever, I've been repeating this like a mantra and even mentioned it in a talk on javascript once[0]: You can argue about the minor details of the tech stack till you turn green and blue, but Angular wins because it succeeds in the only metric that really counts. jQuery: (for reference) 5,656 commits 7 branches 122 releases 199 contributors…

I totally agree on the community point. I was thinking just yesterday how it's strange that when I think of Angular, a single person doesn't come to mind. This is probably a good thing, along the lines of the new way in which protests are developing in a decentralized way, like in Hong Kong. Maybe the model of the BDFL is finally getting superseded by the crowdsourced platform, with all the warts of that latter proce…

Except Igor Minar is pretty much that guy.

Re: Angular 2 Core

#135

I feel that Angular changes too much in HTML to be considered useful for long term projects.The new syntax is also disturbing. My ideal MVC for front end utilizes regular javascript and html tags. At most just add data-ang-click="" something like that instead of "(click)" the latter isn't even valid HTML. Sometimes I think Angular is mainly popular because it's supported by Google. If any regular developer made these…

I've been using Knockout.js and it's wonderful. Way better than Angular, which is too opinionated for me. I can read the entire source code and understand it.

Re: Angular 2 Core

#136

I think it's hilarious how javascript frameworks are beginning to resemble java frameworks. This new release is really starting to look like Spring, including annotations. The increasingly complex DI is also looking like Spring.

original author came from Java server-side background I believe, that probably explains why you see similarities.

Re: Angular 2 Core

#138
post #24

Earlier quoted context omitted.

> you'll never go back to anything else. React completely changed the way I thought about rich clients. It took me a little longer than 2 days, I went into React with an absolute hatred of anything Javascript and came out 2 weeks later loving it. There is something to be said for a library that can wash away over 10 years of built up anger for a particular technology. It's not just another revamped library thrown int…

You are absolutely right. Which is why I'm so excited about Angular2. It's the first post-React client-side framework to come along. (as opposed to React which is more of a library than a framework, although it definitely pushes the boundaries of that...)

Given the choice between two solutions capable of helping you solve a problem, why would you ever choose a framework over a library? I would never choose a framework when a library suffices.

Re: Angular 2 Core

#139

Earlier quoted context omitted.

Angular was started 5 years ago.. Node was barely a proof of concept, and the JavaScript tooling at the time was centered around jQuery.. version 2 looks to be 1-2 years away, and the changes they make are really nice. I've chosen React + Flux for my current development, but in 2-3 years may well be looking to Angular 2. There's a lot to by critical about Angular... least of which is that it's own dependency system d…

> Angular was started 5 years ago.. quoted just to remind people that Angular as we know it is older than most other single-page app frameworks - even if it only became popular a year or two ago.

Yeah I heard of Angular a long time ago, but then everyone started using it in the last year. What happened? Did they change something that all of the sudden made it popular?

Re: Angular 2 Core

#140

Earlier quoted context omitted.

There are tons of javascript libraries that are out there that offer the things you want. In most cases, they are more featureful and more stable than Angular's implementations. Router - Backbone's router, page.js etc Web service querying - simple jquery ajax calls or you could use breeze.js, pouchdb etc Unit testing - React has one built in, but you could use others too.

> There are tons of javascript libraries that are out there And there you have your answer :) What the JS people don't seem to grasp is that I don't care how many libraries are out there. I care even less about the incompatibilities and the different release cycles of all those libraries. By now, I hope you understand that my interest in maintaining and integrating all those into a coherent system approaches zero. I…

Engineering is taking all the bits and pieces out there and choosing the right ones for the problem you're trying to solve with engineering. It's not just choosing those components, but doing all the work to figure out how they should work together to solve your problem and building the pieces that bring them all together.

Using something that does all that for you is tantamount to outsourcing all the engineering work to the makers of that thing.

If you're given and entire system and just have to put the pieces together according to what the client needs, then you're basically a plumber.

Now there is nothing wrong with that, it makes good business sense, which is the justification you provide, but its not really engineering. Or if it is, it's only a small subset of the problems engineering solves.

Do you think the builders of the Golden Gate Bridge, the Hoover Dam or the Space Shuttle didn't have to think about all the bits and pieces they would need source and bring together into one coherent whole? That's engineering.

Post reply on HN