r/javascript • • Apr 05 '16

Vue.js, the real Angular 2.0

https://medium.com/@brett.marshall/vue-js-the-real-angular-2-0-62744490cb99#.m7hsrwxrt
2 Upvotes

16 comments sorted by

9

u/placidified Apr 05 '16

How is Vue.js the real Angular 2 ? There was no real argumentation in the article other than that Vue reminded the author of Angular.

Also TypeScript isn't a requirement to use React at all.

1

u/rk06 Apr 05 '16 edited Apr 05 '16

TypeScript isn't a requirement to use React at all.

I think author confused jsx with typescript or something.

How is Vue.js the real Angular 2 ?

vue uses angular 1 like syntax, but is more intuitive and concise. that's why author calls it real angular 2. ofcourse it is just a metaphor, not fact

1

u/brianvaughn Apr 05 '16

It isn't a requirement to use Angular either, although there are some strong reasons to consider doing so. I'd guess the author of this article probably wouldn't benefit much on small for-fun projects but as a project and team grow larger, static analysis tools like Flow/TypeScript/Closure can be really useful.

-5

u/rk06 Apr 05 '16 edited Apr 05 '16

that's like saying jsx is not a requirement for react.

yes, you can use angular 2 without typescript, but most of devs will use typescript over javascript?

but as a project and team grow larger, static analysis tools like Flow/TypeScript/Closure can be really useful.

no doubt. but that's a trade-off between barrier of entry vs power. ideally we would want lower entry barrier with more power. but entry barrier increases with power.

Vue is a library, hence, choses lower entry barrier while angular is a framework, hence choses more power.

3

u/brianvaughn Apr 05 '16

JSX is just syntactic sugar. It's definitely not a requirement. Your project is probably easier to read if you use it though. So I guess static analysis and JSX are related in that they both help with maintainability.

The only additional barrier to entry for JSX is that you'll need a build tool in your pipeline to convert it to JavaScript- same with TypeScript. Neither adds that much complexity, and since TypeScript (like Flow and Closure - and JSX for that matter) interops with vanilla JS, you can gradually wade into it if you choose.

Maybe OP sees it as kind of a "straw that broke the camel's back" sort of thing.

-4

u/rk06 Apr 05 '16 edited Apr 05 '16

Neither adds that much complexity

how much complexity they add is very subjective. for a newbie, anything extra to learn is same as added complexity.

JSX is just syntactic sugar. It's definitely not a requirement.

I didn't say it was a requirement. I just said that typescript is as required for angualr as jsx is required for react.

0

u/[deleted] Apr 05 '16

[deleted]

4

u/vivainio Apr 05 '16

In practice, most newer ones do.

1

u/joshmanders Full Snack Developer Apr 05 '16

Transpiling for future JavaScript isn't quite the same as transpiling for TypeScript which will ALWAYS need transpiling.

1

u/vivainio Apr 05 '16

It is quite the same today, however. Also, e.g. JSX is quite popular and those folks will be transpiling forever

1

u/metric152 Apr 05 '16

ng2 is verbose but it's also pretty powerful. I have zero experience with vue.js but I have a feeling once you need to start doing really in depth stuff it will be harder in vue because of it's lightweight nature.

1

u/rk06 Apr 06 '16

I have a feeling once you need to start doing really in depth stuff it will be harder in vue because of it's lightweight nature.

it is a common misconception. vue can be used for large SPA

the key point here is for vue is a progressive framework. if you want a router, you need to add vue-router library, if you want redux, then add vuex, if you want something not available in vue's ecosystem, then use a npm library.

while angular comes with its router and other facilities which you can use directly though may not need in some cases. while vue comes with minimal stuff, you need every time and rest has to be installed separately.

1

u/rk06 Apr 06 '16

if truth be told, real problem of angular 2 is not that it is verbose. but that it is needlessly verbose. aurelia, famously, is as powerful as ng2 but is quite minimal and less intrusive. moreover, it is widely known that rob -- creator of aurelia-- raised those issues with angular team before he started aurelia.

2

u/phpdevster Apr 05 '16

Fucking hell that Angular 2 setup is grotesque....

Angular 2 looks like it will be sitting squarely in enterprise-land while most sites will find an easier time getting stuff done in Vue.

2

u/NeuroXc Apr 05 '16

I'm still using Angular 1 for new projects because I feel like Angular 2 just introduces more stuff that I need to remember, half of which is boilerplate. Plus, the size of Angular 2's vendor code is absurd, even in the latest betas. Adding in RxJS, which Angular 2 strongly pushes on you, only exacerbates both of these issues.

1

u/wishinghand Apr 05 '16

Doesn't Angular 1 and 2 provide a full MVC? Is Vue not just the view, similar to React?

0

u/[deleted] Apr 05 '16

[deleted]

1

u/rk06 Apr 06 '16

js is actually xml, not html. though i personally believe jsx is not hard. it is simply different from html. when people say jsx is weird they clearly forget that html is weird for newcomers as well.