Re: AngularJS

Tim Fathers <[email protected]>
Newsgroups gmane.comp.systems.as400.web
Message-ID <FRYP281MB0422819EDFD2A84A1BE4A53DE3F09@FRYP281MB0422.DEUP281.PROD.OUTLOOK.COM>
From AngularJS to Angular 2, as it was at the time, there was no easy upgrade path, they tried to make it as painless as possible, but it was basically a complete rewrite of the framework using Typescript and hence required a rewrite of any existing apps. It was a good decision however, because the result was a huge improvement over the first version.

These days upgrades are pretty painless, thanks to the Angular CLI and Schematics, using a simple command which is even able to automatically upgrade any of your existing, deprecated source code with whatever has replaced it. The last few times I upgraded I don't think I had to change anything manually. Right now, there are two releases a year (let alone 5 years!) but Angular is used extensively at Google and so they are very mindful of making breaking changes because of the aggravation it would cause themselves. That said, your 5-year timescale is an absolute age in any other environment apart from IBM i (as I'm sure you know 😉 ) I can't think of many other platforms that don't go through some upheaval and deprecation over that timescale, with breaking changes requiring a degree of maintenance effort.

Tim.

________________________________
From: WEB400 <[email protected]> on behalf of Brad Stone <[email protected]>
Sent: 02 August 2021 23:34
To: Web Enabling the IBM i (AS/400 and iSeries) <[email protected]>
Subject: Re: [WEB400] AngularJS

So lets say 5 years ago you did an AngularJS project.  Now you should use
Angular.  Is there an easy path to update?  And what happens in 5 more
years when Angular++ (or whatever it's called) comes out?

On Mon, Aug 2, 2021 at 3:57 PM Tim Fathers <[email protected]> wrote:

> It's a while since I looked at any other frameworks, but the thing about
> Angular is that it tries to be a more or less completely integrated
> framework, including almost everything you need to create scalable,
> enterprise class web applications. It also includes all of the build
> tooling you need as well as tools to help quickly scaffold apps from
> scratch and scaffold new parts of the app for you, saving you from having
> to write much of the boiler-plate code yourself. Some of the other
> frameworks are much lighter, and superficially easier to learn perhaps, but
> might not contain some of the functionality you will later need later down
> the line when you want to write more than just a relatively basic app.
>
> Another benefit IMO of Angular is that you're pretty much forced to use
> Typescript instead of plain old Javascript, which helps avoid many, many
> gotchas. Angular is also very opinionated, so you're corralled into doing
> things the Angular way, I found this beneficial because it saves any
> headaches and arguments other things like naming conventions and folder
> structures, which are all already decided for you.
>
> There's a tutorial on the Angular website here https://angular.io/start
> One of my favourite learning resources is the Angular University
> https://angular-university.io/course/getting-started-with-angular2, it's
> not all free but the beginner's course is if you sign up by the look of it.
> Here's another free course from another guy whose videos I like
> https://www.youtube.com/watch?v=AaNZBrP26LQ  Bear in mind, Angular is on
> version 12 now and so some things in these tutorials might be slightly out
> of date but the fundamentals are the same.
>
> Another great resource is Stackblitz https://stackblitz.com/ here you can
> almost instantly spin up a working Angular app and play around with it,
> it's also available for several other languages and frameworks. Here's a
> video that demonstrates just how powerful Stackblitz is, this was from 3
> years ago, the latest version is even better!
> https://www.youtube.com/watch?v=EBzoTnX6LzU
>
> Tim
>
>
>
>
>
>
>
>
>
> ________________________________
> From: Jay <[email protected]>
> Sent: 02 August 2021 21:03
> To: Web Enabling the IBM i (AS/400 and iSeries) <[email protected]>;
> Tim Fathers <[email protected]>
> Subject: Re: [WEB400] AngularJS
>
> Have you across a good tutorial for Angular?
>
> A friend of mine just sent over a decent one for EmberJS.  Doesn't look as
> powerful though.
>
>
> > On 08/02/2021 3:45 PM Tim Fathers <[email protected]> wrote:
> >
> >
> > ...it's probably unfortunate that you found AngularJS and not Angular
> and wasted your time with that. The learning curve is steep but Angular is
> easier and faster to get started with and Single Page Web-apps are, IMO,
> definitely better than the alternative. Maybe give it another try later 🙂
> I have used it for quite a few years so can maybe help if you get stuck.
> >
> > Tim.
> >
> > ________________________________
> > From: WEB400 <[email protected]> on behalf of Jay <
> [email protected]>
> > Sent: 02 August 2021 20:41
> > To: Web Enabling the IBM i (AS/400 and iSeries) <
> [email protected]>
> > Subject: Re: [WEB400] AngularJS
> >
> > I went with Angular as a trial.
> >
> > In the last 20-minutes or so, I've decided it was a waste of time and
> the existing CGIDEV2 will stay as is.
> >
> >
> > > On 08/02/2021 3:27 PM Tim Fathers <[email protected]> wrote:
> > >
> > >
> > > You definitely shouldn't be using AngularJS, it's long since been
> deprecated by Angular (no JS), which is now some 12 versions further on
> than the original. It's also alot nicer to use and with its CLI, you can
> get a skeleton project up and running quite quickly, although after that,
> the learning curve is steep!
> > >
> > > Get Outlook for Android<https://aka.ms/AAb9ysg>
> > >
> > > ________________________________
> > > From: WEB400 <[email protected]> on behalf of Jay <
> [email protected]>
> > > Sent: Monday, August 2, 2021 6:51:25 PM
> > > To: [email protected] <[email protected]>
> > > Subject: [WEB400] AngularJS
> > >
> > > I'm using AngularJS to replace a CGIDEV2 application. So far, it is
> not working out with the time I've wasted on it.
> > >
> > > The $http post doesn't want to pass parms to the RPGLE routines. I can
> see the routine trying, but the POST variables aren't there.
> > >
> > > I have the following:
> > > var data = {
> > > pagectl:"LOGIN",
> > > pagesub1:"VALIDATE",
> > > username: username,
> > > password: password
> > > };
> > > var config= {
> > > headers: {"Content-Type": "application/json"}
> > > };
> > > $http( { url:'/cgi-bin/wqa0100c',
> > > method:"POST",
> > > headers: {"Content-Type": "application/json"},
> > > data: data
> > > }
> > > )
> > > .success(function(response) {
> > > console.log(response);
> > > if( response.status=="OK" ) {
> > > smn=response.smn;
> > > slname=response.name;
> > > } else {
> > > $rootScope.error=response.errmsg;
> > > }
> > > });
> > >
> > > The data isn't seen by the RPGLE routine. I can call it from the
> webbrowser and pass parameters as a GET process, no issue.
> > > The same chunk of code is running in production now with the CGIDEV2
> processes and is access via AJAX.
> > >
> > > Any ideas?
> > > --
> > > This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
> mailing list
> > > To post a message email: [email protected]
> > > To subscribe, unsubscribe, or change list options,
> > > visit: https://lists.midrange.com/mailman/listinfo/web400
> > > or email: [email protected]
> > > Before posting, please take a moment to review the archives
> > > at https://archive.midrange.com/web400.
> > >
> > > --
> > > This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
> mailing list
> > > To post a message email: [email protected]
> > > To subscribe, unsubscribe, or change list options,
> > > visit: https://lists.midrange.com/mailman/listinfo/web400
> > > or email: [email protected]
> > > Before posting, please take a moment to review the archives
> > > at https://archive.midrange.com/web400.
> > --
> > This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
> list
> > To post a message email: [email protected]
> > To subscribe, unsubscribe, or change list options,
> > visit: https://lists.midrange.com/mailman/listinfo/web400
> > or email: [email protected]
> > Before posting, please take a moment to review the archives
> > at https://archive.midrange.com/web400.
> >
> > --
> > This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
> list
> > To post a message email: [email protected]
> > To subscribe, unsubscribe, or change list options,
> > visit: https://lists.midrange.com/mailman/listinfo/web400
> > or email: [email protected]
> > Before posting, please take a moment to review the archives
> > at https://archive.midrange.com/web400.
> --
> This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
> list
> To post a message email: [email protected]
> To subscribe, unsubscribe, or change list options,
> visit: https://lists.midrange.com/mailman/listinfo/web400
> or email: [email protected]
> Before posting, please take a moment to review the archives
> at https://archive.midrange.com/web400.
>
>
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.

-- 
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.