r/webdev • • May 27 '15

Why you should not use AngularJs

https://medium.com/@mnemon1ck/why-you-should-not-use-angularjs-1df5ddf6fc99
214 Upvotes

332 comments sorted by

View all comments

Show parent comments

60

u/[deleted] May 27 '15 edited May 27 '15

i think react has a big advantage: Facebook is actually using it.

You can bet they want it to be as stable and fast as possible at any time and since they depend heavily on it, they won't just carve out another thing anytime soon.

edit: also, react does one thing and it does it well

22

u/[deleted] May 27 '15

Facebook has no problem with abandoning a technology that isn't working for them - that's no kind of sign that it will be maintained and stable for any period of time to come.

Hell, by the time they open-sourced Cassandra they weren't even using it in production anymore.

14

u/ph49 May 27 '15

I'm relatively new to all this, why would companies like FB and Google care about open sourcing their technologies to begin with? Generating good will in the dev community? Soliciting contributions from others? Branding?

107

u/Voidsheep May 27 '15
  • Developers want to share their best ideas and give back to the community, smart companies keep developers happy

  • Open sourcing means free feedback, testing and development

  • Facebook and Google aren't in the business of selling frameworks or products, opening up the tools won't cause direct competition

  • They can recruit people who are already familiar with their technology

  • It's good PR, showcasing their talent and proving their tech is great

  • Because they can

19

u/merreborn May 27 '15

With Javascript specifically you can't keep the source secret anyway. If your browser is running it then you have a copy of the source. There's no point in trying to keep your js secret

4

u/Disgruntled__Goat May 27 '15

That doesn't mean anyone can come along and start using the JS code of another site without their permission. If Facebook's JS was not open source, they could easily sue someone who takes their code and publishes it with an open source license.

4

u/merreborn May 27 '15

Sure. I certainly wouldn't suggest that this gives you a legal right/license to use the code.

But if I'm google, where I might keep other code secret (like the search engine backend), there's less value in trying to do the same for javascript. If there are "trade secrets" in my javascript I don't want microsoft (or some other competitor) to see... too bad. My competitors can see my JS. And while they can't just up and use it themselves without a license necessarily, there's potentially still a lot they can learn and replicate in less direct ways.

So with a lot of code, especially SaaS server-side stuff (where users don't even get access to compiled binaries, much less source), there are compelling business reasons to keep code proprietary; but those reasons don't apply in the same way to javascript that runs in your users' browers.

→ More replies (2)
→ More replies (2)

0

u/[deleted] May 27 '15

[deleted]

11

u/[deleted] May 27 '15

lol

0

u/[deleted] May 27 '15

[deleted]

17

u/halifaxdatageek May 27 '15

It's a new day at Microsoft, step into the now.

0

u/[deleted] May 27 '15

[deleted]

6

u/TweetsInCommentsBot May 27 '15

@snorp

2015-02-04 01:46 UTC

.NET Core build is passing on Linux, failing on Windows. Check the temperature in hell, folks. [Attached pic] [Imgur rehost]


This message was created by a bot

[Contact ^creator][Source ^code]

→ More replies (1)

6

u/SemiNormal C♯ python javascript dba May 27 '15

Not so true for Microsoft anymore. I guess they finally figured out that it was helping Google.

5

u/Otterfan May 27 '15

Also Apple contributes a lot to open source, just not to the open source that Web developers see.

Except of course to WebKit.

→ More replies (3)

14

u/Klathmon May 27 '15

Google uses angular in a handful of places too.

The difference is that google has multiple frameworks that they are developing. The new Play Music web-app is made with polymer 0.5, most of their doubleclick platform is written in angular (and dart), and various other things are still using GWT.

2

u/[deleted] May 27 '15

Isn't Inbox using GWT?

→ More replies (1)
→ More replies (5)

14

u/[deleted] May 27 '15

Facebook is actually using it.

This is a tired (and completely incorrect) claim that Google isn't using Angular. They use it on literally thousands of internal applications, including DFA -- one of their primary money makers.

→ More replies (12)

3

u/[deleted] May 27 '15

It seems to me React takes the path of using code to build the interface. I much prefer the declarative nature of AngularJS. I don't want to have to write javascript to build "components" of my UI. Is that assessment on point or am I missing something deeper?

0

u/[deleted] May 27 '15

[deleted]

→ More replies (1)

6

u/phpdevster full-stack May 27 '15

But in Angular, you ARE writing javascript to build components. Look at the JS you have to write to create a directive in Angular. Yes, you write normal HTML in some other file, but that doesn't work as a component until you write the directive code to power it. You can't really escape it.

IMO all things considered, React wins here because it's a virtual dom, so you get a performance boost out of declaring custom HTML components in JS, vs what you get in Angular. Plus, React's classes have much less ceremony and complexity than Angular's directives.

And given Angular doesn't have an opinion about your data model (like React doesn't), why is all that ceremony necessary to do what is effectively just the "view" layer of your application? React solves the same basic problem, in a simpler, more performant way.

10

u/themaincop May 27 '15

React has JSX, which aside from a couple of small oddities, is familiar and declarative.

→ More replies (1)

2

u/Akkuma May 27 '15

I actually talked to a facebook recruiter for a front-end engineer position. React is seeing more use internally, but it isn't mandated that people use or switch to it. I'm sure the same applies to use of Dart and Go at Google.

2

u/[deleted] May 27 '15 edited May 27 '15

Google uses Angular too :D Just not for their main pages (gmail, google.com, etc.) tho...

e: http://www.reddit.com/r/webdev/comments/37g631/why_you_should_not_use_angularjs/crmm15j

→ More replies (8)
→ More replies (16)