Better HN
topnewbestaskshowjobs
Log inSign up

marknutter

6,558 karma · joined Oct 7, 2009 (17y ago) · 2,641 submissions

Submissions

comment 11y ago · link · parent

If you look closer at them you'll notice most of those rants are "feels wrong" type rants that could be levied at almost any framework the author doesn't particularly like. The only solid complaint he has is a performance test which, again, both Angular and Ember perform poorly on, and in the same breath he admits these issues are easily mitigated but laments that they aren't mitigated by default. He uses it as an opportunity to praise Backbone which further fits his "large frameworks are bad" premise which is what the article should have been titled. But hey, based on how quickly this article shot to the top of Hacker News it appears his more link-baity title was effective.

comment 11y ago · link · parent

Angular's dependency injection is very similar to AMD modules. In fact, the syntax is barely distinguishable. So if you have an issue with Angular's dependency injection, you likely have issues with AMD and perhaps javascript modules in general. I much prefer having my dependencies injected in a modular way than having to pollute the global namespace with every library and component I pull in.

comment 11y ago · link · parent

This article is ranting about single-page applications written with javascript frameworks. The word "Angular" was thrown as click-bait because it's the latest whipping-boy. From what I read there isn't a single valid complaint that's specific to Angular.

comment 11y ago · link · parent

Samsung is kind of the king of rushing half baked ideas to market in an effort to beat everyone else to the "Next Big Thing" to the point where it's actually their slogan.

comment 11y ago · link · parent

How then do you propose we assign value to things?

comment 11y ago · link · parent

There are currently many 3rd party cases that provide exactly what you're asking for.

comment 11y ago · link · parent

Surveys don't provide perfect information. People may say they want better battery life because that's the only thing they can think about their phones that could get better. 10 years ago if you asked people what they wanted in cell phones they would have said "smaller, thinner flip phones please". Very few people would have asked for a smart phone that was was easy to use and with no physical keyboard. In other words, asking customers what they want is often a terrible way to figure out what to build next.

Also, the type of person willing to respond to a survey like this is likely already an outlier and more prone to running into the limits of what their battery will allow them to do.

If people truly wanted better battery life they would buy huge cases with big batteries built into them. I know very few people who own one of them.

comment 11y ago · link · parent

So what you want is more thickness, but not too much more thickness. Just the right amount of added thickness for extra battery life. I think it's probably time the industry moved onto more important problems.

comment 11y ago · link · parent

But you can literally buy cases today that add additional thickness and provide extra battery capacity. Have you bought one, and if not, why? Perhaps you like your thin phone after all?

comment 11y ago · link · parent

But what if you forget to charge it at the end of the second day? Maybe what you need isn't a better battery but something that reminds you to charge your phone at night?

comment 11y ago · link · parent

Take everything away from the computer that makes the average person excited about using the computer?

comment 11y ago · link · parent

What percentage of people don't/can't charge their phone every night? And of those who don't/can't, what percentage of them aren't satisfied with the myriad external battery cases and on-the-go-chargers available for smart phones. I challenge the assumption that the majority of people are asking for better batteries. I think it's like people asking Ford for a faster horse.

comment 11y ago · link · parent

I'm actually not sure what I prefer, to be honest. I am hoping web components show up in IE and Safari soon so we can start using them but for now I'm not sure which tech to fully invest in. The good news is they are all awesome in their own unique ways and it's sometimes easy to lose sight of that with all the flame wars.

comment 11y ago · link · parent

> But why should it be? The goal of building web sites and apps isn't to use the latest shiny new technologies.

I agree that it shouldn't be, but I don't agree that it's possible for it not to be, mainly because browsers are constantly changing and improving and assumptions older frameworks had become irrelevant over a long enough time period (certainly over 5 years). This is precisely the reason why Angular is having to make such drastic re-write - they're trying to align better with Web Components and other ECMA6 features that are coming down the pipeline.

I hate to stereotype but often people who complain about the volatility of web development tools and frameworks are people who are traditionally server-side developers who have enjoyed a relatively stable deploy target for periods much longer than 5 years. Trust me, I wish it was the same for front-end development.

> And if we're talking about app-style development, why should someone who invests significant time and resources to build, say, an intranet app to automate some function in their business not expect that app to still work five years from now?

Because building desktop style applications using old web technologies is really freaking hard. If it wasn't, we there wouldn't be such a huge deluge of web frameworks to help do it.

> This is why standards and stability are important, and it's why "living standards" are a pile of [expletive deleted], and it's why it's a bad thing that some browsers currently have very rapid release cycles with an obvious emphasis on adding new shiny things at the expense of maintaining support for older technologies, and it's why you shouldn't build anything you might need to maintain for more than a year or two with the JS framework du jour.

I can't really disagree with you here and that's why I find React so compelling because they're kind of saying "fuck you" to the standards committees and building something they know works whether or not the promises of ECMA6 and HTML5 come to fruition.

> A lot of front-end devs today make building simple user interfaces to access databases seem awfully complicated. Every time I read articles like this one I become more convinced that most of that complexity is of their own making. They talk down to old school developers who put most of the logic on the back end, or who build interactions using jQuery, but sites written 5 years ago using those technologies still work and can still be maintained just fine. I wouldn't bet on that being true for anything built with a framework like Angular or React today.

I'm guessing you're not a front-end developer so forgive me if I'm wrong, but what you're saying is absurd. It is hard. Much harder, in fact, than building an iOS or Android App which rely on sane frameworks built by single entities to function perfectly within one sandboxed environment. Web applications like Google Docs are every bit as sophisticated as native mobile apps but must be built without the benefit of native performance and monolithic, corporate-sponsored SDKs. Putting "most of the logic on the backend" isn't a viable solution for native mobile apps, why would it be a viable solution for desktop-style web apps?

Just step back for a moment and compare the functionality you get from a framework like Angular or Ember to the functionality you get with the iOS or Android SDK and you will see they are all solving generally the same problem in the same way. The only difference is that there are far more choices of frameworks on the Web (which is both a curse and a blessing).

comment 11y ago · link · parent

> Who said anything about jQuery or Backbone?

Well, if you're not using jQuery or Backbone at the very least to build SPA's, then that just adds weight to my argument.

> About the complexity part, I am referring to the number of concepts one must be familiar with in order to produce a working Angular app. I mean read TFA: part of it breaks down the three varieties of directives you need to know in order to do a thing.

I agree wholeheartedly that Angular has far too many bizarrely named concepts (transclusion being the worst offender), but if you don't put pressure on yourself to learn a framework inside-out in order to use it then you can save yourself a lot of initial pain. Simply using Angular's templating and two-way binding system and nothing more (no directives, services, etc) saves you from having to write an incredible amount of boilerplate DOM manipulation code. As you start to learn more about the different features Angular offers you will agree that most of them were necessary evolutions of the framework. Because it evolved over time, it has become a bit bloated as frameworks often do so the rewrite should be a welcome change.

> whenever you need to output a URL to the view, you get to go hunting for the docs for $sce and figure out your exact use case just so you can spit out the damn URL.

This is a built in security measure that you can easily override by providing a blacklist of URLs. Unless you're keen on coming up with your own sanitization logic, $sce is a very nice feature.

comment 11y ago · link · parent

It really only makes sense to compare React to Angular's Directives because they are both trying to simplify the process of creating isolated, reusable components with data binding built in. In fact, they both use in-memory representations of the DOM to track model changes, although they differ in the actual mechanisms for doing so. Angular uses "dirty-checking" which basically tracks whether or not a model has changed in any way from its previous value and it does this on a loop. It's very simple and inexpensive but can start to perform poorly when dealing with large lists of items (in the tens of thousands). React also has an in memory representation of the DOM they call the "virtual DOM" (not to be confused with Web Components' "shadow DOM") and differs from Angular in the way it employs its diffing algorithms to efficiently and surgically respond to only the elements that need to change when a model is updated. It performs better than Angular when dealing with very large collections of items but I believe Angular is as performant or better than React in the small case.

React also enforces certain restrictions by default when it comes to mutating data. While Angular encourages "two-way binding" where data can be changed by two different sources (e.g. the controller and the user changing the input field), React encourages a strict policy of one-way data passing. It is possible to restrict Angular directives to function exactly like React components, however, if you subscribe to React's core philosophies about data handling. For large applications, though, React applications get messy as they need to pass data down a very long tree of nested components. They wrote the "Flux" pattern to address this concern, but it really ends up looking like yet another version of MVC (although I like it, personally).

Where React and Angular differ dramatically is in how they handle templating. Angular's philosophy from the start was to embrace HTML and a declarative programming style. They believe HTML should be embraced and extended using "Directives" which is very much in-line with the philosophies behind the coming Web Components standard. React's team, on the other hand, challenges long-held assumptions about web development like not including markup in your code, opting instead for a framework that not only encourages it, but requires it. This is a controversial aspect of React, but it makes sense when you actually try it. Some logic is better written imperatively (like if statements, map/reduce, etc.) and it's nice having everything required to render the component in one file. It does, however, require a compilation step unless you use their imperative DOM manipulation library so in that respect Angular is far easier to get up and running with (which is part of its dramatic success).

In my mind, the only aspect where React really has a clear advantage is the ability to run server-side, which allows you to pre-render components before sending them to the client. This solves a variety of SEO and time-to-render issues single-page web applications often struggle with. The only caveat is that single-page apps don't typically need to be SEO friendly (like gmail or google docs, for instance) so it remains to be seen how important this differentiator really is. The React team admits it was really a happy side-effect of the virtual DOM and not really the main reason they built it, but it's compelling nonetheless.

One last thing I'll mention is that currently it's a very difficult time to pick a horse in front-end development world. All signs point to Web Components becoming the next big thing, but React has made a lot of people question whether or not that's the correct approach. React has not made it a stated goal of theirs to align with the Web Components specifications like the Ember and Angular teams have. I can't say whether this is incredibly wise or foolish, but again, it's compelling.

edit:

I forgot to answer your original question directly:

> Does it use the one-way-only data-binding powered by shadow DOM

It allows for both the use of one-way binding and two-way binding, which React actually does too (although React's core team discourages using two-way binding). Neither is powered by shadow DOM so I'll assume you meant virtual DOM. I kind of answered this above but to re-iterate, both frameworks build up virtual representations of the DOM in memory to better serve data-diffing, but they both chose different mechanisms for doing said diffing which is outside the scope of this post but definitely interesting to learn about. The important point to take away is that you can restrict Angular directives to function exactly the same as React components, the only functional difference being the diffing algorithms under the hood and the templating systems used.

comment 11y ago · link · parent

> I hated the time I spent with Angular 1.x and the whole thing strikes me a as a complex and painful way to build applications.

This comment baffles me. Not your cup of tea, sure, that I can understand, but complex and painful? Angular, Ember, Backbone, React, etc. are all so vastly superior to hacking together jQuery spaghetti code with imperative DOM manipulation I can't understand how anybody wouldn't be elated with the productivity gains they get from any of the modern frameworks, regardless of their syntax preferences.

comment 11y ago · link · parent

Building anything on the web and expecting it to last more than 5 years is foolish in my opinion. But yes, if your company is expecting to build an app that won't be re-written for more than 5 years then by all means do it in vanilla javascript, but you'll likely end up building a custom framework anyways.

comment 11y ago · link · parent

I'm really hoping this thread doesn't devolve into a framework flame war, but those who are interested in angular or currently using it would find this post very interesting. It clarifies a lot of the reasons why the Angular team felt that they needed to do a complete rewrite instead of incrementally improving 1.x and it also outlines a lot of the exciting new features they hope to include in 2.0. I personally appreciate their dedication to the web components specification and a desire to seamlessly co-exist with it. Atscript illuminated a lot of interesting programming concepts I'm not personally familiar with as a front-end developer and I'm intrigued by them. Definitely worth a read if you have time, Rob Eisenberg has a very extensive understanding of Angular.

comment 11y ago · link · parent

Don't take this the wrong way, but perhaps you should rethink your career choice. If tools changing and be supplanted by other tools causes you too much stress then I have unpleasant news for you - it will never stop. The good news is, it doesn't have to be stressful. If a tool you like works, use it! Don't worry about the shiny new stuff coming out, worry about being productive today, and you will find that your stress level will decrease dramatically. But above all, become comfortable with the fact that you will always be learning new things until the day you retire. You aren't flipping burgers.

comment 11y ago · link · parent

Environmentalists by definition will complain about anything that even remotely harms the environment, which is good, but not realistic when it comes to crafting policy. I wish there was more of a willingness on the part of environmentalists to pick the lesser of two evils over the short term in order to reach a larger benefit over the long term.

comment 11y ago · link · parent

I wonder if this doesn't also cause the symptoms associated with fibromyalgia. I've always been fairly skeptical about Fibromyalgia but try not to be for the same reasons it's not productive to be skeptical about clinical depression as s disease, but perhaps they are both linked to inflamation.

comment 11y ago · link · parent

> but less content per page

This is why engineers are not designers. Left up to engineers, every pixel would be crammed full of "content", all at 11px font.

comment 11y ago · link · parent

talk about missing the point. You can acknowledge that violence is on the decline while also wanting it to continue to decline. The danger in ignoring the decline is that resources will be disproportionately redirected to solving problems that aren't of any real concern (terrorism, war on drugs, etc) instead of the problems that are actually in need of solving.

comment 11y ago · link · parent

the article said we should rest on our laurels?

comment 11y ago · link · parent

If the linked article is any indication, funding needs to vastly outmatch the goal.

comment 11y ago · link · parent

I hate to say it, but this is why I don't see us going to Mars within our lifetime. At least not through NASA.

comment 11y ago · link · parent

Can you get a 4k display and use it at its full resolution for everything but gaming, and then just switch to a lower resolution for gaming when you want the higher refresh rates?

comment 11y ago · link · parent

They are only removing the V and replacing it with another V.

comment 11y ago · link · parent

> I'm not going into the "sharing links vs sharing content" debate.

That's fine, because I see no problem with sharing content either. I'd rather debate on those terms.

If you don't want information shared, don't release it to the public. If your livelihood is based on placing artificial constraints on the work of artists for profit, then maybe you should consider a career change. The middle men are becoming increasingly useless as we become more connected. Artists can raise money on their own and distribute their art for free, and they can still earn a living charging for actual physical things like merchandise and seating at venues.

1
272829
89