4. app/
----- shared/ // acts as reusable components or partials of our site
---------- sidebar/
--------------- sidebarDirective.js
--------------- sidebarView.html
---------- article/
--------------- articleDirective.js
--------------- articleView.html
----- components/ // each component is treated as a mini Angular app
---------- home/
--------------- homeController.js
--------------- homeService.js
--------------- homeView.html
---------- blog/
--------------- blogController.js
--------------- blogService.js
--------------- blogView.html
----- app.module.js
----- app.routes.js
assets/
----- img/ // Images and icons for your app
----- css/ // All styles and style related files (SCSS or LESS files)
----- js/ // JavaScript files written for your app that are not for angular
----- libs/ // Third-party libraries such as jQuery, Moment, Underscore, etc.
index.html
Lets build a better structure and foundation
5. using this STRATEGY we can create our own endpoint
or we can replace it with a
scalable service e.g. server-less service like Kinesis,
Lambda and SNS of ,
Mobile Services of ,
or the App Engine of ,
scaling automatically as the need arises
6. For Enterprise solutions look
at Robert Christian’s
seed project
http://robertjchristian.github.io/angular-
enterprise-seed/#/
8. Suggested Stubbing
1. Mocking and stubbing is not the norm
2. But as we go towards a cloud-first strategy for
our clients we need to do it stubbing
3. Codebase of the development team will do
stubbing for:
1. Normal VMs
2. AWS - EC2 and S3
3. Google Compute for app engine
4. Mobile Services for Windows Azure
4. On our configuration file for deployment we put
the targeted platform and Jenkins will build
that up for us using the designated CLI
5. Build will be deployed using docker images so
no environment issues may arise
9. Our Take Aways
1. We learn the basics of AngularJS
2. We hit and make and code in javascript more
readable and clean
3. AngularJS is the foundation for a hybrid
solution in web and mobile
4. We separate our code in our api development
5. We create our microservice api for our
endpoints by doing this we create server
components e.g. /api/getcustomer/id:{} and
our AngularJS codebase will now only
consume the service done in any
programming language