John hey this is Aaron Forman... We met at a VSIP clinic a few years back. You help me out with some of my code structure back then.... ANYWAY...
So i want to move an application built in angular 1.3 to using an approach that will allow me to ECMA6 / Angular 1.4 then perform a transpile to ECMA5 so it works in all the current browsers. So using classes instead of controllers, using 'this' instead of $scope, etc.... so that i am coding for both ECMA6 and Angular 2.0. Making the transition to Angular 2.0 much faster.
I assume, knowing you, that you are probably already working on an example of an existing Angular 1.3 / 1.4 application and demonstrating how you would convert that using the latest methodologies to easy the conversion into ECMA6 and Angular 2.0...
When you going to present that to the world???
+1
+1
What I gather from #313 this repo is only for Angular 1.x. I'm also very interested in a 2.0 style guide. :)
its coming
I can't wait
:+1:
Any tentative date John?
Angular 2 isn't even out yet...
It'll be a while ... a guide needs time to let things work themselves out. Otherwise its apt to lead in the wrong direction.
I'll also be putting a migration guide and a set of typescript guidance out in some format
Hi John,
First of all thanks for your apps. I've enjoined watching your YouTube presentation as well. Another think I loved is your generator-hottowel app. I am new to angular and for the last 2 weeks or so I've been studying anything I could get my hands on. I think there would be great if you could post an angular boilerplate having a similar design patterns as generator-hottowel. I am interested in both small and large application and it seams in many cases, angular is the way to go. Personally, I had start some apps over and over just for getting a proper app structure and to be frank, your app is one of the nicest I've seen so far. Thanks again. C
john i know TypeScript is cool and saves time...but to be honest this is a microsoft product and they almost always start a new product line and eventually drop it. I fear investing time and energy into TypeScript to find out that they are trashing it. What are your feelings on that? basically what i am saying is it worth just writing straight ECMA5 / ECMA6 instead of taking the risk... sounds like you are all in on TypeScript? I hate that Microsoft is involved...
There may be other reasons to resist TypeScript but I think your reasons are not well grounded.
First, Microsoft's track record on product lifetimes is remarkably better than any of its rivals. Even when they cease further development of a product, they continue to support it for many years (10 years is a reasonable minimum); compare that with Apple or Google.
Second, TS is open source and cross platform and It's been developed in the open where anyone can see and contribute to its design, content, progress, and road map .
Third, Google's Angular team abandoned their own JS-superset-language effort in favor of TypeScript ... which is about as significant an endorsement as you could want.
Fourth, TS code transpiles to ES5 (or ES6 ... your choice) with your comments intact; walk away from TS and "all you lose" is the design-time support (type checking, intellisense, refactoring, ...) ... which is no worse than taking the paranoid route of coding directly in ES5/6 from the start. Seems like a can't lose proposition to me.
Caution is prudent; your "hate" strikes me as both and immature and unproductive response to a technology company's involvement whether it be Microsoft's or any other company's.
@wardbell excellent post, thanks for sharing :+1:
Points 2 and 3 are the main reasons why I have some faith. But we are going to be rewriting an application that contains around 150 pages. Costs are in the 600+ thousand mark. I think it is important to be somewhat cautious. When dealing with the many issues with Microsoft stack that we have over the years and their lack of immediate response to those issues is really frustrating. I absolutely love the open source JavaScript community. I dont think I am the only one that believes that this community is a lot more agile than Microsoft. Guys and girls on material design team or angular team put Microsoft to shame. They are simply amazing. I know that your company is a .net shop in part and have income depending on them I get it. But there a lot of us that are sort of done with them.
I think we're going way off course here.
@daw451-duplicate I'm not sure why you think I am "all in" in TypeScript. You have to make your own call on where to head and you appear to be leaning away from TypeScript. Just reading your comments I think you have already made up your mind and I encourage you, if you feel that strongly, to stick with plain JS. This is a question about angst for MSFT disguised as a question about choosing TS vs JS.
Don't kid yourself with all these companies and OSS to keep things around forever. Everyone has a track record for abandoning something at some point. And the folks at Microsoft, I assure you, are just as awesome as the folks at Google. I know many of them well.
@wardbell has some great points, all of which I agree with. His shop is multi platform and he has vast experience in the pure Web world. Take his advice to heart: you will find few people as experienced and thoughtful as Ward.
So back to your question ... TS or JS? If your team is cool with JS and you feel comfy there, there is no problem staying there. In fact, I think ES5 is fine for experienced JS devs. TS offers, to me, a better chance to find issues during dev before running the code through both its checks and tooling. These are great and can help a great deal. Are they needed? No. Will your product be better? It depends on your team and experience. For a large team getting comfy with JS coming from static languages, TS can help smooth that transition. In the end, you have JS. If you want to back off TS later, just take the JS and run. No harm. So there is literally no risk at all.
Another route is to take your JS and renamed the file to *.ts. Why? Because even without typing any TS syntax, you get some advantages due to tooling and implicit typing.
Another route is to go ES6 and transpile to ES5. Another route is to stay ES5. If you start with JS you can always sprinkle in some TS as you go, too.
The point is you have choices. There are pros and cons to each, All of these are about productivity and code quality (less bugs, less risk). TS may help to fail faster, uncovering issues sooner. That's the value. But if you dont go there you can still have a very successful project.
@daw451-duplicate You ask a good question: TS or JS? My advice is to choose what you and your team are comfy with and move along. There's room for all of these options.
Thanks John exactly what I was looking for. Superb answer.
good luck, its a fun adventure we are on :)
+1 waiting excitedly for the Using AngularJS 1.* "The Angular 2.0 Way" ™ guideline
+1 OSOM! Can't wait for it!
+1
:+1:
:+1:
:+1:
:+1:
+1
+1
+1 I'm seriously psyched right now!
Me too :) ... Angular 2 is pretty awesome and some good patterns are already forming
Thrilled!!!
can you give us a sneak peek of angular 2 styleguide ?
like for example. a setter n getter.
+1
Does it change much?
+1
Would be awesome to see it coming from the amazing @johnpapa skills
A2 guide is now in the angular.io repo
Is it this? https://angular.io/docs/ts/latest/guide/
Or something/somewhere else
This one here, I think: https://angular.io/docs/ts/latest/guide/style-guide.html
yep
I wonder if there any plans to extend the style guide to deal with Angular2 libraries as well. I'm especially interested in a library naming convention, such as "ng2-..." or "angular2-..." (or similar).
@dominique-mueller I like your suggestion, for the record we need to leave a namespace dedicated to the core/standard library(like ng2-... or angular2-...) and have user namespace for custom plugins/library to have something that is appropriate.