MyPortfolio Development Log - PMenezes/MyPortfolio GitHub Wiki

In here i will talk more about what i used to implement this platform, first i will start by explaining why i choose this stack of thechnologies. AngularJS, NodeJS

AngularJS

Because Angular is the next generation framework where each tool was designed to work with every other tool in an interconnected way.

I really like to develop front-end with the MVC pattern, and angularjs implements MVC by asking you to split your app into MVC components, then just let Angular do the rest. Angular manages your components for you and also serves as the pipeline that connects them.

Angular uses HTML to define the app’s user interface. HTML is a declarative language which is more intuitive and less convoluted than defining the interface procedurally in JavaScript. HTML is also less brittle to reorganize than an interface written in JavaScript, meaning things are less likely to break.

Data models in Angular are JavaScript objects (POJO), traditional data models are the gatekeepers of data and are responsible for data persistence and server syncing. Those data models behave like smart data providers. But since Angular’s data models are plain objects, they behave more like a cork board. A cork board is nothing more than a temporary storage area for people to put and retrieve data. However, Angular’s cork boards work closely with a controller and view. To differentiate it from the traditional sense of data models, Angular calls them “scopes”.

All properties found on the scope object are automatically bound to the view by Angular. Meaning, Angular quietly watches for changes to these properties and updates the view automatically.

The whole of Angular is linked together by Dependency Injection (DI). It’s what it uses to manage your controllers and scopes. Because all your controllers depend on DI to pass it information, Angular’s unit tests are able to usurp DI to perform unit testing by injecting mock data into your controller and measuring the output and behavior. In fact, Angular already has a mock HTTP provider to inject fake server responses into controllers. This beats the more traditional way of testing web apps by creating individual test pages that invoke one component and then interacting with it to see if it works.

NodeJS

Why node.js? Real-time web service. The programming model of node.js is the same as angular.js but oriented to a server-side application, including, callbacks, events. If you are comfortable with Javascript both of this technologies are so easy to learn, and with a few lines of code you can do many things.

ExpressJS

With express we can easily create a web api, that is what we are aiming for. It helps you to define routes, and handling requests/responses.