Angular 2 Final Released
281–290 of 452 posts
Re: Angular 2 Final Released
#282I evaluated React and Angular 2 several months ago and picked React. Some of the issues I found in Angular 2: The HTML template in Angular 2 is stored in a string. This has several disadvantages: 1. Editors can't do syntax coloring. 2. Editors can't do auto-indenting. 3. Editors can't offer "intellisense" suggestions. 4. Editors can't match tags. You embed variables in this template string like this: ' {{hero.name}}…
>The HTML template in Angular 2 is stored in a string. This has several disadvantages This is patently false. Just use "templateUrl" instead of "template". This allows you to specify a file instead. This is the way I always did it in angular 1 as well. I don't really understand why style guides & general practice recommend embedding html in the javascript though. It's horrible.
Re: Angular 2 Final Released
#283Earlier quoted context omitted.
Of note, Facebook's create-react-app provides an "official' opinionated approach. https://facebook.github.io/react/blog/2016/07/22/create-apps... There's even a pull request to bring typescript into the mix. https://github.com/facebookincubator/create-react-app/pull/5...
I'm just writing a first React app, and read beforehand that it was going to be difficult to choose which libraries to use, and to get them to work together, but I haven't found that to be much of an issue in practice. create-react-app set up all the build tooling, for a router the clear recommendation is react router, and for a flux implementation the clear recommendation is Redux. It feels like there's a well defin…
Re: Angular 2 Final Released
#284Earlier quoted context omitted.
1) Isn't it just (!isNaN(num) && isFinite(num))? I know that's pretty far from intuitive, but it's not as bad as you made it sound. That being said, i'd love an `isNumber` function at some point... 2) I felt the same way for a while, but recently I was working on something where I ended up really "abusing" the prototype system, and when you actually spend the time to learn it, it's not that bad! It's different, that'…
"1) Isn't it just (!isNaN(num) && isFinite(num))? I know that's pretty far from intuitive, but it's not as bad as you made it sound. That being said, i'd love an `isNumber` function at some point..." You just proved my point! A) Even if you are correct - it's terrible . This is completely ridiculous that there's no basic check for extremely common and mundane type-checking. Moreover, it's the same issue for other typ…
2) There are aspects of prototypes that JS makes much worse (mainly the whole "this" clusterfuck), but the base is pretty sane and easy to understand. But at that point i'm not even talking about javascript any more, so I guess you are right here too.
3) I still disagree with you here. Yeah, there should be a way for the stdlib to do simple low level things (like isNumber()), but for others "one true way" isn't the best. I'd love a better stdlib, but I don't want something like Go's stdlib. I'd rather the language define a "bare minimum" and let libraries take over the rest. Now, as with anything in life this should be taken in moderation, if there are massive gains to be had by including something, then it probably should be included.
Maybe this is stockholm syndrome setting in, but I'd rather have the choice of implementation of something in-language, because there are so many different engine implementations.
4) I was more speaking of things like a python library that only runs on 2.7, or a java application that only works on 6. For the most part, those things just don't happen in javascript. Yeah, you need to not use newer features until they roll out everywhere, but once they do, you are safe in using them for a pretty damn long time. In your example, you can't use const/let right now because safari is the last big holdout here. iOS 10 was just released, and with it Safari 10. In another month, i'd feel comfortable using const/let without transpiling it, and I won't need to worry about it again.
But another benefit of multiple different implementations is they are free to optimize for different things. For example, Espruino is a JS engine that runs on microcontrollers and is EXTREMELY low power. Chakra (Edge's engine) shoots for really fast startup speed. V8 is pretty much the king in terms of raw execution speed. Contrast this with the Java way of having a million settings, knobs, options, and flags in the engine to tune the system the way you want. Yeah, you can do that, but most don't because of the complexity and risk involved. And there is only so much that you can do while having to support every option in the same engine.
Like i said earlier, i'm not sure if it's stockholm syndrome taking effect, but JS is by far my favorite language, and despite all it's flaws, issues, problems, and mistakes, it's also the language i'm most productive in. And with ES2015+ it's only getting better. (although i'm dreading the time when modules start getting into implementations, and how they conflict with current solutions, that's going to be a NIGHTMARE in just about every way).
Re: Angular 2 Final Released
#285Serious question : Why are SPA frameworks so popular these days? When someone asks "What should I use for web development?", It's now all about React/Angular/Ember/etc. But when I look at how are built the sites I like and visit frequently, I'd say 95% of them are not SPA, they are classic sites where the server generate each page (sometimes with one or two Ajax requests)! The Single Page pattern is great for desktop…
HTML5, CSS3, and Javascript have matured to the point where they are very powerful and flexible. I don't always see the point of over-complicating things with frameworks.
Re: Angular 2 Final Released
#286Rob Eisenberg and his nimble team beat Angular 2 to the punch all the way back in July when Aurelia final was released. Before considering Angular, considering checking out http://aurelia.io - easier to learn, no third party dependencies and great support. I applaud the Angular team for sticking it out, but I am afraid they released far too late to compete with the likes of React, Vue and so on.
Re: Angular 2 Final Released
#287Earlier quoted context omitted.
I'm just writing a first React app, and read beforehand that it was going to be difficult to choose which libraries to use, and to get them to work together, but I haven't found that to be much of an issue in practice. create-react-app set up all the build tooling, for a router the clear recommendation is react router, and for a flux implementation the clear recommendation is Redux. It feels like there's a well defin…
Having used TypeScript and also picked up recent projects where it is not being used, TS is definitely the way to go. The issue is that TS 1.8 doesn't support async/await in the browser until v2.0, but a ts -> babel transpile does the job nicely.
Re: Angular 2 Final Released
#288Right now, I'm considering which works best for me. Requirements: App for Android & iPhone plus Web-based app. The most complex part is a Graph with interactions (such as highlighting a specific value). It should feel snappy, although I don't make heavy use of neither gestures nor OS-related features. Ionic 2 + Angular 2 seem to be the best choice, since I can basically write the app once and release for all three pl…
Re: Angular 2 Final Released
#289I use Angular 2 in production since November 19, 2015 (alpha.46). Currently I've built 3 web apps (40, 60 and 20 components each), 3 mobile apps (with Ionic 2) and my employer have plans for more apps. Breaking changes during alpha stage were expected, so I didn't have issues with it. Most positive things I want to highlight: 1. Components are encapsulated and truly reusable (and without dependencies hell). 2. You do…
> 3. Idea of `(events)` and `[attributes]` is awesome, works really effective and makes code much more easy to read. This is encouraging. I always thought that looked aweful so it's nice to hear that it actually makes sense.
- input:
```
```
- output: ```
```
To me this seems unfinished and inelegant; note also that everything is inherently mutable, but change detection will work best when the bound input values are reassigned, but if they are instead mutated at some deeper level, Angular will have trouble tracking those changes, and may behave in weird ways, which are often tricky to debug.Re: Angular 2 Final Released
#290Earlier quoted context omitted.
I haven't used Angular yet. From it's description it seems to be geared for making single page apps. Or a app with a few pages because it's good a binding data to an interface. Is this accurate? What is a good use case for Angular?
I have used Angular in multi-page application, using Angular as a better JQuery in Spring MVC application. This setup worked well combining the best of both frameworks. Angular provided two-way binding, rendering templates (in loop), dialog box interactions, better AJAX, etc. Angular based component libraries provided calendar controls, dynamic tables, etc. Spring took care of the routing pages, handling UI requests…