New Project - Angular 1.4 or 2.0 [duplicate] - angularjs

This question already has answers here:
New Project - Angular 1.4 or 2.0? [closed]
(2 answers)
Closed 6 years ago.
This is duplicate of
New Project - Angular 1.4 or 2.0? . However thats been asked 6 months back although Angular 2.0 is out now.
We are also about to start the new project with AngularJs with responsive web design to have it compatible with mobile browsers.
Which version ( 2.0 vs 1.4 ) would be recommended considering 2.0 is quite new and things may change or may not. Although I am quite keen to use 2.0 given its new features.
Your expert inputs would be appreciated.

A source for some indicators would be https://splintercode.github.io/is-angular-2-ready/ :)
So no.
On the other hand I've heard from companies clearly working with angular 2 already. Rather smaller ones.
I would compare my project timelines with the one from angular - and consider some delays as well. If your project runs more than 6 months: maybe. Depends on what features you implement and when you do that. UI related features: the later the better.
If that looks suiteable: why not.
But consider issues with the beta software. Some issues might not be easy to identify. For ex. I tried working with the new router and ran into issues with the components and controllers. If I needed that feature (a working routing) tomorrow then angular 2 would not be the best choice.
Beside angular 2 being released, some libraries and tools may need to adopt as well, which will require some time too.
And you can not realistically plan based on announcements. Sometimes features one waits for are just moved into the next release.
So it depends on how much space is for moving work around or delay some tasks. And of course how well your developers are trained to track down arising issues and identify the cause.
If you have a release date already I would not take the risk (speaking today 28th oct 2015). I would rather learn something about the business and then migrate (do a planned migration) once I understood more.
You may ask again tomorrow ;-D

Angular 1.5 is close to release (in Beta now). It will be production ready and have some great new features, like the "component" object.
https://github.com/angular/angular.js/blob/master/CHANGELOG.md
https://toddmotto.com/exploring-the-angular-1-5-component-method/
Start with Angular 1.5, write in TypeScript, follow all the latest best practices and your code will be close to being ready for Angular 2 upgrade.

Related

In 2019, how much is it necessary to migrate a site from Angularjs to another framework?

I'm a project manager of a market place and I'm trying to find solution for my concerns. For two years a ago we decided to develop market place.
In front layer we decide to use angularjs and our team professional implement front layer using AngularJS. We add dependency injection for first time to angularjs 1.3 and solve google analytic crawling in SPA website.
But when google announce On July 1, 2018 AngularJS entered a 3 year Long Term Support period. As a project manager I have a big concern because We living in 2019 and after two years whats happen for our website ?
But my biggest question is how optimistic how long can we use Angularjs?
how much migration is necessary for this framework and
Is it possible that the sites written with Angularjs are not able to work after 2021?
Google announced:
All AngularJS applications that work now, will continue to work in the future. All published versions of AngularJS, on npm, bower, CDNs, etc will continue to be available.
For more information, see
Angular Blog - Stable AngularJS and Long Term Support
AngularJS Version Support Status
It’s out of date now, and new projects should absolutely not be built using it. This isn’t to say it was ever a particularly great choice. AngularJS came out of nowhere and became popular by default, rather than because it had particularly great design. It has a difficulty curve better suited to a great roller coaster than a decent framework, and a bunch of weird architectural and terminology choices. What the hell is a $scope, anyway? And what is a directive? What does transclusion actually mean? Meaningless terms that AngularJS has created. AngularJS does some things that are fundamentally wrong, such as creating invalid attributes on HTML markup. Even Google doesn’t use Angular for their own apps, like Gmail, and there’s a reason for that.
In fairness, AngularJS was always a poor choice. Its idiosyncratic code means that unlike other frameworks, it’s not good at implementing an agnostic, javascript solution. AngularJS code looks unfamiliar to anyone not super experienced with the weird intricacies of AngularJS itself.
Thankfully, this decision is well made for you – AngularJS is now quite thoroughly dead, and only legacy projects will continue to be using it. We should be grateful for what AngularJS has given us, and respect the position it held, but we should be just as pleased that it’s gone.1
The change is only about "support" and it means, no more bug fixes and no more improvements. Other than that, everything will be the same. Although, you should consider some disaster scenarios after LTS.
I saw some posts about running AngularJS and Angular side by side and I think it can be a good solution for your problem. Since you have enough time to migrate, your team can develop new features on Angular and you can also maintain your current AngularJS. Eventually you can get rid of AngularJS depending on your project size and development capacity.
Please check these scenarios.
Running AngularJS 1.6 in Angular 5 (side by side)
Running Angular and AngularJS frameworks side by side
For Angularjs support, you can find the previous discussion on this portal: angularjs 1.x support lifecycle and end-of-life
And the question regarding migration, in my personal opinion migration is a better option as the latest Angular version provides Boost in performance, Mobile-driven approach, code Maintainability & optimization, and most importantly Reduced development time and costs with better support.
And if asked about the migration approach, I would suggest a complete re-write that can be the most cost-effective strategy. If you’re a manager, put your team through Angular training (live, online, videos, books). Allocate time and budget for getting your developers up to speed with Angular as the learning curve is steep and prior experience with AngularJS is not overly helpful. Then your developers will write the new version of the app as per best practices recommended for Angular/TypeScript projects.
And finally, it’ll definitely pay off in the end. And, secondly, the newer versions of Angular won’t let you systems become outdated or irrelevant.
There is a team called XLTS.dev who are providing extended support for AngularJS beyond December 2021.
We have used Angular JS extensively in our company for enterprise projects, mobile applications and continue to use it. Google's decision to stop development of AngularJS and put it on a EOL will definitely make developers to panic. But 3 years to migrate away from it is a long time and you can plan accordingly.
If your plan is to migrate to Angular, then you can follow their official guide to upgrade using ngUpgrade. You can find numerous articles online that explain how they upgraded existing AngularJS apps to Angular.
If your plan is to consider migrating to a totally new framework, then this will involve some work. You should take a look Web Components spec. Your existing directives/components can be re-written, with less effort, as web components (shadow DOM) or custom components (without shadow DOM). There are libraries that help you write these generic components - supported on most browsers today - Stencil JS, lit element and a few others.
The advantage of using Stencil JS is that it provides tools to compile your web components to target different frameworks (Angular, React, Vue, Ember).
The latter solution seems feasible as it allows you to migrate directives one by one over a period of time, without having to re-write the whole application in one go. In the future you can also re-use your components in the framework of your choice.
As for your question about will it continue to work after 2021 - yes it will continue to work. The problems you might face might not really be of technical nature, but related to hiring resources to work on it or maintain it.
I am AngularJS developer and I do continue to use this framework for some of my projects. I am aware that in not too distant future this library will be completely outdated (as some of you can say it's the case now), however:
AngularJS ecosystem gives you still lots of choice/support (as framework is very mature)
my main libraries as ag-grid, highChart or others, help to build great apps out of the box with little time
I still do enjoy to work with this framework for it's simplicity and flexibility
If you should build brand new app I would recommend React or Vue (or other framework) especially if you do not have significant experience with Angularjs. However if Angularjs is not new for you, you need to go fast - just use your experience and go for Angular.
Taking into account what you wrote:
My main concern is after 3 years of support. Whether after the 3 year end of support, Angularjs sites can continue to work without problems
Angularjs apps won't just stop to work like that, from one day to another.
As your project requires long-term maintenance, needs to be built from scratch and will take lots of effort - Angularjs ecosystem is then probably not the best choice for you (I do insist "for you").

Angular 2 or 4 or 5 [duplicate]

This question already has answers here:
What is Angular 4 and from where I can learn more about it?
(6 answers)
Closed 5 years ago.
I am posting this question to get some opinion from fellow developers on which version of Angular to start to learn when migrating from AngularJS to Angular.
I have been working with AngularJS 1.3.7. I have realized that AngularJS 1 is pretty old now and there have been more than significant changes in Angular 2 and higher versions. Also Angular 5 just come out.
I have plans of learning Angular and currently confused with which version to start. I am assuming that Angular 2 is currently trending in market now followed by Angular 4(I might be wrong though).
Should I take a sequential approach and start from Angular 2 and then higher versions or is is safe to jump directly to Angular 4 or 5 without having any Angular 2 knowledge ? Or probably my question should be, can I learn Angular 4+ directly without have any prior knowledge of Angular 2 ?
A lot of companies that have now been using AngularJS for years are still using it, and don't have immediate plans to migrate to 2+. So there's marketability, plus the inevitable requirement of knowing both as an Angular developer.
I know my question is broad and might get some downvotes and red flags, but I am curious to hear from folks who have experienced the transition from 2 to 4+.
Also, I wanted to know about the key differences between AngularJS 1 and Angular 2+. Are they completely different, or will some of the knowledge transfer?
And lastly, I would like to know some of the good resources/tutorial to learn Angular.
They are basically the same. The Angular project moved to Semantic Versioning, which means every breaking change results in the major version to be increased.
Angular 5 is just a newer version of Angular2.
Just use the newest.
http://angularjs.blogspot.co.at/2016/10/versioning-and-releasing-angular.html?m=1
You should use the newest version of Angular for new projects and for learning.
Difference between versions
The difference between Angular v1 and Angular v2/3/4/5+ is drastic, as the platform was completely rewritten in TypeScript, and with different conventions.
The difference between Angular v2/3/4/5+ is simply that breaking changes were released between each major revision; however, they're still the same platform and tutorials / documentation will generally remain applicable between these 4 versions.
Semantic Versioning
Angular now follows the semantic versioning scheme. Patch releases (e.g. 5.0.X) will not change the functionality, minor releases (e.g. 5.X.0) will contain only additive changes, and breaking changes (e.g. X.0.0) are reserved for major releases.
Originally, the rewrite of AngularJS was called "Angular 2" by the team, but this led to confusion among developers. To clarify, the team announced that separate terms should be used for each framework with "AngularJS" referring to the 1.X versions and "Angular" without the "JS" referring to versions 2 and up.

Ionic 1 AngularJs 1 vs Ionic 2 AngularJs 2?

I want to move from IOS to Ionic. But i don't have any idea that which version is best for starting, because i did't know nothing about AngularJs 1 and its update version AngularJs 2 features and differences. And also i did't find any related help from internet with difference of both versions. Can anyone please tell me pros and cons or difference between them. Or which one is best. And if Ionic 2 is best so from where i can watch video tutorials of this.
Thanks
If I remember correctly the podcast episode of Adventures in Angular, John Papa recommended starting new projects with Angular 2.
Since Ionic is built on top of Angular 2 it will be lagging a bit behind. If you want to go into production now with an Ionic 2 app I suppose it's not recommended using it. Since Angular 2 is in RC we might expect that they will release in the near future, and with that Ionic 2 will be some time behind that. Therefore, I recommend using Ionic 2 if you don't plan to go into production in the nearest future.
When it comes to the differences, this article has a nice write up on the differences between Angular 1 and 2.
Edit: It's been a while since I wrote this post and I have followed the development of ionic 2. I would now recommend using ionic 2.
Right now is quite unfortunate time to choose between Ionic/Angular v1 and v2. If you can afford that I would advise you to wait 1 year and the just pick Ionic 2. Most of the problems you will face today when dealing with Ionic/Angular 2 will be already solved here in stackoverflow 12 months from now.
Currently I would say it does not matter that much if you pick Ionic 1 or Ionic 2. In the first case you will move fast now, but waste time later trying to upgrade your app from ionic 1 to ionic 2. If you choose Ionic 2 now, you will waste similar amount of time just trying to make it work and adopt newer versions of Angular 2.
if You beginner you can start ionic-1 and angular-1,because lots of resource available like angularJS essential , Inter mediator and advance video tutorial in youtube and many other training provider.
if you want to include oops concept and other important script like typescript,move on to ionic2.
If you are developing a mobile app, the question is ionic vs ionic 2 vs alternative frameworks. A lot of work has gone to making ionic 2 fast, and unless you already have a lot of apps in ionic there is no point learning it now.
Regarding Angular 2, the benefit of Ionic is that you don't have to learn it to get started. You can create real apps using just Ionic, and when you do need Angular (for http for example) then there are plenty of examples around.
You can find videos on most of the pay learning sites, but to really learn it take an existing app such as https://github.com/driftyco/ionic-conference-app, which includes enough Angular 2 (Javascript and Typescript flavours) to see how a real app can be put together.
You can also play with the Ionic components with https://github.com/driftyco/ionic-preview-app.
The only reason for going Ionic 1 these days would be an edge case supporting an older version of Android, but if you need to go to a version earlier than 4.4 you will also find solutions that Ionic 2 can use.
================= UPDATE Jan 2017 ================
There is a great starter project which has a number of app features built in, such as app settings, api connection, registration and login, welcome tutorial which can be found here https://github.com/driftyco/ionic-starter-super

AngularJS - how to start best in 2016? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I just starting to learn AngularJS (Version 1.5.0) with Material Design for Angular - damn looks so freaking sweet :)
For building and deployment i use Gulp to automate my tasks.
So far so good, but while googling my way to more questions i found Frameworks like MEAN Stack, Meteor, lumX, Ionic and many many more.
Im wondering if its better to start with one of the Frameworks or if Gulp + AngularJS + Material Design for Angular is just fine.
Before i played a bit with Foundation for Apps which looks sweet too but i really like the look and feel from Material Design. Before i used Zurb Foundation for my Responsive Webdesign Projects but consider to jump to Material Design (which is based on FlexBox) even i miss support for some older browsers.
So im bit confused if im wasting time to learn Angular Version 1 now and better straight jump to Angular2 beta. My concern is that i may run in a lack of documentation and help. Also i have to learn more about ES6 (which is necessary in the next time anyway but makes it more hard to start). I guess lot of the stuff i will learn from Angular v1 i can later on use in Angular v2 anyway, or?
Another question for me as a Freelance Web Developer is if its not better to stick with Angular v1 for a while and learn more about it and later jump to Angular v2 when its out of beta. Because the goal is later to get into some projects and i can imagine that the companies stick with v1 for a while till v2 gets more stable.
For some starting projects i wanted to create a few Templates and Apps for my Wordpress Sites based on Angular with Material Design on a LAMP Enviroment. My Webspace sadly doesn't provide NOSQL databases yet so i guess i will keep coding on PHP / MySQL for a bit.
So in short, if you guys where in my place (experienced in Web Development but new to Angular) where would you start right now?
What Frameworks, Extensions and Tools do you recommend for Application Development with Angular?
From a business point of view when do you think will Angular2 be widely be used on live projects and is it better to start learning Angular v1 or go to v2?
Thanks for your replies.
Cheers bin2hex
Instead of giving a biased opinion, I'll just provide for you a few links of project structures that are being used currently that might serve you some guidance.
https://github.com/TheLarkInn/angular-starter-es6-webpack (This one is Shamelessly authored by me).
https://github.com/AngularClass/angular2-webpack-starter
https://github.com/AngularClass/NG6-starter (I took some pieces from this repo to create mine).
I'd recommend looking into writing Angular in the 'Component Style' (like the above links). It is a new way to start out using Angular 1/2 for the future and at the least you can use these repositories as thought-provoking brain-food for your own standards.
There are also other bundling platforms such as Browserify and JPSM, however Webpack provides a lot of awesome out of the box functionality that makes Angular development really awesome.
I don't know much about AngularJS V2, but I made some AngularJS V1 projects last year. Here tools I use to make my AngularsJS V1 projects:
As project generator:
Yeoman
As depedency manager (included in Yeoman angular generators):
Bower
As task runner (included in Yeoman angular generators):
Grunt
Set of prebuilt UI components based on AngularJS directives:
Angular Material
Angular Strap
Angular UI
Actually in my opinion is better use AngularJS V1 for production purpose.
The most important thing is something you haven't considered. All that matters is that you get your html/css/javascript to the browser. Everything in-between is trivial and leg work.
Now that Angular belongs to google, they have started very rapid development to support developers of all sorts. Either way it's going to be very stable, and if you keep your code modulare and clean, it's easy to transfer. I would say just make something, make what you need, and keep working on it over time and as the framework evolves, and change your code to match. If you keep waiting for the next big thing nothing will get done, so it's better to choose a framework and stick to it.
I word my answer like this because your question is very subjective, and you should experiment and find an answer based on your needs. As a web developer, you have to learn many different languages anyway, so start with where you think is best, and grow as you figure out what you need.

What are the differences between i18n and l10n in AngularJS 1.3, 1.4 and 2?

I have an AngularJS application written using AngularJS 1.4. We need to adapt this to work with different languages and of course sometime in the future we need to move to AngularJS 2.0.
Has anyone out there used the i18n and l10n features of both AngularJS 1.4 and 2? From what I understand 1.4 adds new features over 1.3 but I cannot find any information on what has changed :-(
What I would like to know is if there are some big differences. Big enough that we should wait until AngularJS 2.0 before starting internationalization.
Please do not close this question. Yes I know it may not fit exactly as a perfect question but I am pretty sure there are developers out there who are asking the same question as me.
Since AngularJS 2.0 will be a whole rewrite I don't think it is a good idea to rely on being able to migrate from previous versions. Moreover, it is not going to be released soon and even version 1.4 is not stable yet.
You should be always using the latest stable version. However, there is an official thread about migrating.
If you want to learn about specific changes e.g. l10n and i18n have a look at the changelog.

Resources