Live data from Hacker News

Angular 2 – Best Practises

blog.budacode.com

71–80 of 94 posts

Re: Angular 2 – Best Practises

#71
After having gone around the SPA framework circuit, I'm back to using jQuery, routing with PathJS, and templating with Jade (compiled using a Browserify transform). It's just so much simpler to understand. No magic, and I have yet to run into any problems. If I needed more complex model stuff, maybe I would throw in Backbone.

I know these tools don't keep your code organized, but it doesn't prevent you from organizing it either. And I really do hate all the levels of indirection the monolithic SPA frameworks seem to throw in your face.

PathJS: https://github.com/mtrpcic/pathjs

Jadeify: https://github.com/domenic/jadeify

Re: Angular 2 – Best Practises

#72
post #67
post #42

Earlier quoted context omitted.

I've found it more straightforward to transition to Angular over from a more server-side setup gradually. The template language is at least in the same general area as template languages for Django, Rails, etc. The general tooling process is pretty simple, no need to convince people of the merits of JSX. Architecturally speaking many people still like separating presentation from business logic. Angular has a lot of…

You separate your presentation from your business logic in React. What React gives you that Angular doesn't is the ability to separate your presentational logic from your business logic. Angular makes you put presentational logic in with your business logic because presentational logic simply cannot be expressed with the templating format. I would argue that a distinction that you make yourself, based on your applica…

All the React stuff is starting to sound a bit to me like "MongoDB is web-scale"

Re: Angular 2 – Best Practises

#73
post #41

Earlier quoted context omitted.

BTW to parent, one big advantage of react-native over ionic is that it's not a wrapped web app, but a javascript/react app that compiles to an actual native app. The performance difference and development experience (no silly css hacks) is very noticeable.

Not to nitpick, but I don't believe react native "compiles" to a native app. The evaluation of the JS in JavaScript Core is passed of to native code to layout native views. The interactions are then posted back into jscore. So while closer to native compiled code performance, it's still a bit different.

Fair enough, I'm afraid I didn't explain it properly

Re: Angular 2 – Best Practises

#74
post #20

Earlier quoted context omitted.

Have you tried React with React Native[0]? [0] https://facebook.github.io/react-native/

In my experience code-share between React and React Native is extremely difficult as your UI code is so significantly different with native components and what not. At least with Angular/Ionic you can directly share UI code between the two as its all HTML and CSS. Still, I really enjoy working with React and React Native because I it's one API and mental model to learn.

Have you tried it recently? I don't think I've had this problem with recent versions.

Re: Angular 2 – Best Practises

#75
I'm going to get flamed for this, but I deeply regret the hours I put into learning Angular.

I'm still disappointed that Angular 2 is such a sharp departure from Angular 1 and certain aspects of Angular 2 development, e.g. the fact there is still multiple CLIs, the fact that "compiling to Dart" is still a thing, and the fact that it's still unreleased give me no confidence to build anything in Angular. I can't help but feel that with any library, less is more, and that Angular 2 is already trying to do way too much. IMO Angular 2 should be a Typescript-only library with one CLI and one way to manage your files (among other changes made in the name of simplicity).

All this being said, I hope I'm terribly terribly wrong, and Angular 2 becomes the super-simple-way-to-create-great-UIs that the authors intended that the whole community can follow along. This article however, made me ask myself if that will ever happen.

Re: Angular 2 – Best Practises

#76
post #13

Earlier quoted context omitted.

Angular 2's own tutorial is a nice start: https://angular.io/docs/js/latest/tutorial/ .

Am I supposed to bite the bullet and just use/learn typescript? "This chapter is not yet available in JavaScript. We recommend reading the TypeScript version."

Honestly? Yes. We support ES5 but strongly recommend using Typescript with Angular2. Do you use ES6? If so, you already know how to use Typescript.

Re: Angular 2 – Best Practises

#77

I'm going to get flamed for this, but I deeply regret the hours I put into learning Angular. I'm still disappointed that Angular 2 is such a sharp departure from Angular 1 and certain aspects of Angular 2 development, e.g. the fact there is still multiple CLIs, the fact that "compiling to Dart" is still a thing, and the fact that it's still unreleased give me no confidence to build anything in Angular. I can't help b…

It has been given the enterprise treatment. Enterprise devs love big.

Re: Angular 2 – Best Practises

#78
post #13

Earlier quoted context omitted.

Angular 2's own tutorial is a nice start: https://angular.io/docs/js/latest/tutorial/ .

Am I supposed to bite the bullet and just use/learn typescript? "This chapter is not yet available in JavaScript. We recommend reading the TypeScript version."

[deleted]

Re: Angular 2 – Best Practises

#79

After having gone around the SPA framework circuit, I'm back to using jQuery, routing with PathJS, and templating with Jade (compiled using a Browserify transform). It's just so much simpler to understand. No magic, and I have yet to run into any problems. If I needed more complex model stuff, maybe I would throw in Backbone. I know these tools don't keep your code organized, but it doesn't prevent you from organizin…

I've done the same. In production, I've used jQuery, Dojo, and ExtJS. On side projects, I've used React, Clojurescript, and Angular 1. I don't like any of them. I'm back to using pjax.

Re: Angular 2 – Best Practises

#80
post #79

After having gone around the SPA framework circuit, I'm back to using jQuery, routing with PathJS, and templating with Jade (compiled using a Browserify transform). It's just so much simpler to understand. No magic, and I have yet to run into any problems. If I needed more complex model stuff, maybe I would throw in Backbone. I know these tools don't keep your code organized, but it doesn't prevent you from organizin…

I've done the same. In production, I've used jQuery, Dojo, and ExtJS. On side projects, I've used React, Clojurescript, and Angular 1. I don't like any of them. I'm back to using pjax.

pjax doesn't get enough love on HN :) Recently I got to use a pjax clone called smoothstate which splits up the pjax change event in just the right places to get fancy transitions going. Really enjoying it too!

Smoothstate: https://github.com/miguel-perez/smoothState.js

You can see how i used it at http://zviwaldman.com when you click any link.

Post reply on HN