Live data from Hacker News

Angular 2 docs for ES6/7

github.com

11–20 of 62 posts

Re: Angular 2 docs for ES6/7

#11
Another sign that it's designed for enterprise Java camp: old Angular was very popular in such shops because of IoC and service factories. Now it requires java-like language on top of javascript, with type system designed primarily for autocomplete in IDE to work (even unlike Java in which type system is primarily intended to make runtime do less computations).

Re: Angular 2 docs for ES6/7

#12
Typescript is a superset of ES6 anyway, proper JS documentation(e.g MDN) does have the notion of types anyway, but basing the documentation on TS means that the types are sound and consistent along the library.

Re: Angular 2 docs for ES6/7

#13
I've been learning AngularJS 2 for around 2 weeks now, and I see why they push use of Typescript. They always have. AngularJS 2 was designed from the start to be typed. To be object-orientated. At the least be object-inspired. It makes sense to be consistent. Using a non-typed and functional-structured language for a typed and object-orientated framework is pretty dumb in my eyes.

To digress a little, AngularJS 2 has been awesome, and at times can be simpler than React. The .js and .js.map file bulk with every .ts file is stupid though.

However...

Routing in AngularJS 2.

It is bad.

Very bad.

Re: Angular 2 docs for ES6/7

#14
post #13

I've been learning AngularJS 2 for around 2 weeks now, and I see why they push use of Typescript. They always have. AngularJS 2 was designed from the start to be typed. To be object-orientated. At the least be object-inspired. It makes sense to be consistent. Using a non-typed and functional-structured language for a typed and object-orientated framework is pretty dumb in my eyes. To digress a little, AngularJS 2 has…

Have you tried ui-router for angularjs 2? Just curious.

Routing and E2E testing are my biggest concerns for transitioning our 1.x app to Angular2 -- and I haven't had time to really dig into either in detail.

https://ui-router.github.io/ng2/

Re: Angular 2 docs for ES6/7

#15
post #11

Another sign that it's designed for enterprise Java camp: old Angular was very popular in such shops because of IoC and service factories. Now it requires java-like language on top of javascript, with type system designed primarily for autocomplete in IDE to work (even unlike Java in which type system is primarily intended to make runtime do less computations).

That's a common misconception about the JVM. Although the language features allow type-erasure, the JVM actually stores the types with the data and uses tracing for optimization. This keeps the compiler output smaller and allows classes to be compiled independently.

Re: Angular 2 docs for ES6/7

#17
post #13

I've been learning AngularJS 2 for around 2 weeks now, and I see why they push use of Typescript. They always have. AngularJS 2 was designed from the start to be typed. To be object-orientated. At the least be object-inspired. It makes sense to be consistent. Using a non-typed and functional-structured language for a typed and object-orientated framework is pretty dumb in my eyes. To digress a little, AngularJS 2 has…

In your logic you equate statically typed and object oriented vs dynamically typed and functional.

Object oriented programming is by origin (Smalltalk) dynamically typed. Class based programming languages (which we really shouldnt consider typical for oop) tend to borrow all their modern type features from functional programming languages. (Think polymorphism, generics, interfaces, etc.)

Re: Angular 2 docs for ES6/7

#18
It's the attitude of the Angular 2 team that makes me glad I decided to choose Aurelia instead. Nobody seems to realise that Angular 2 exists first and foremost to meet the needs of Google's internal Green Tea team and not the public.

This is just one of many things that should make people think twice about using Angular 2. The fact the team seemingly take input from a select handful of "Google experts" to guide the framework should be an alarm bell in itself. NG2 is a monolithic and over-engineered framework backed by a company who have proven they conflict with themselves (Polymer) and deprecate popular services on a whim (Google Reader).

I personally use TypeScript in my Aurelia applications, but I think you should allow developers to write using straight-up Javascript. We're getting to the point (or if you're writing evergreen focused web applications, you're there now) where we will be able to write Javascript without a transpiler soon (for most things).

I love TypeScript, but we can't forget what it's a subset of and some have the view that Javascript doesn't need types or interfaces.

Re: Angular 2 docs for ES6/7

#19
post #11

Another sign that it's designed for enterprise Java camp: old Angular was very popular in such shops because of IoC and service factories. Now it requires java-like language on top of javascript, with type system designed primarily for autocomplete in IDE to work (even unlike Java in which type system is primarily intended to make runtime do less computations).

The angular core team from Google even has technical PM that handles business relationships. I've recently been to AngularConnect in London - from what I've gathered their future focus is also very much about ease of use. They try to establish angular-cli as the de facto toolchain by incorporating best practices from the community, similar to ember-cli. There are a lot of nice features with the new compiler infrastructure (AOT with lazy loading support from the router) and types obviously help here.

As a counter point, with ngrx/store being so popular in Angular2 land I doubt Angular2 is as friendly to the Enterprise as you make it sound. On top of Redux you have Rx, many people will have a hard time wrapping their heads around this.

Re: Angular 2 docs for ES6/7

#20
post #4

I say good. One of the next tasks I'm going to take, as soon as I get some free time, is to integrate TypeScript into our front-end and start adding in interfaces and parameter types. I'm usually working on the back-end, but get drafted into the UI-side once in a while. The number of stupid little errors caused by typos or not having decent intellisense is troubling. Compared to the level of tooling and safety I'm us…

I am sure that the clientside developers in your company will come to realize their mistake when they see your interfaces and level of tooling.

The willfull resistance to embrace practices that make development easier, more efficient, and safer is baffling.
Post reply on HN