NG Snakeoil: A Technology Walkthrough
Angular
Angular is an application framework developed by Google. I decided to base the SnakeoilOS WebApp on Angular after finding it to be the best tool against other technologies.
Funny story - when development first begin in late Feb 2017, this framework is called Angular2. In a month (Late March 2017), Google released an update called Angular4. Angular4 is also known as Angular (feels like we have gone full circle here!).
Angular/Angular2/Angular4 is not the same thing as AngularJS (also from Google). And there is no Angular 3.
The previous pages I mentioned the SnakeoilOS WebApp is a JavaScript application running on your browser. Technically the Angular language is not JavaScript, it is called TypeScript - think of it as an advanced version of JavaScript. SnakeoilOS is written in Angular/TypeScript, and through NodeJS the TypeScript code is ‘converted’ into JavaScript to be served to your web browser.
This is the reason why tools like GIT and Mantis are so important in helping me manage all this. Documenting everything down will make it easier when I decide to move SnakeoilOS to the “framework of the month".
The rapid pace of technology advancement means it’d be far better to do all my development inside VM than on physical machines. Developing everything on 1 or 2 machines is no longer feasible.
There is is a pattern in all this chaos.
The old Snakeoil WebApp (0.1.x) is 100% server-side. The new SnakeoilOS WebApp now works on two realms - Client-Side and Server-side.
All the Angular code I’ve written for SnakeoilOS is 100% client-side - i.e. Graphical User Interface. Angular is responsible for the layout, formatting, themes, language and error checking.
This is client-side JavaScript, and being clide-side, it do not have the necessary permissions to find out what audio cards your SnakeoilOS machine have, what size HDDs it has, and so on. The GUI is completely locked out from directly knowing anything about your SnakeoilOS machine.
To pass these information to the GUI, it has to communicate with another piece of software also running on your SnakeoilOS machine - the SnakeoilOS RESTful server.
Confused yet?
Life was a lot simpler in C/C++ land, things are moving so quickly in the Web I can hardly keep up. It does feel like everything I learn today will be outdated in 3 months time.