Individual resources are identified using URLS. The resources (database) are themselves different from the representation (XML, JSON, HTML) sent to the client. The client can manipulate the resource through the representations provided they have the permissions. Each message sent between the client and the server is self-descriptive and includes enough information to describe how it is to be processed. The hypermedia that is hyperlinks and hypertext act as the engine for state transfer.
none of the clients context is to be stored on the server side between the request. All of the information necessary to service the request is contained in the URL, query parameters, body or headers.
Clients can cache the responses. The responses must define themselves as cacheable or not to prevent the client from sending the inappropriate data in response to further requests.
The clients and the server are separated from each other thus the client is not concerned with the data storage thus the portability of the client code is improved while on the server side the server is not concerned with the client interference thus the server is simpler and easy to scale.
At any time client cannot tell if it is connected to the end server or to an intermediate. The intermediate layer helps to enforce the security policies and improve the system scalability by enabling load-balancing
an optional constraint where the server temporarily extends the functionality of a client by the transfer of executable code. servage magazine
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
- Modularize the Header and Footer
- Modularize the routes
- Don't forget to minify
- Keep the names consistent
GitHub
Opinionated Angular style guide for teams by @john_papa*
If you like this guide, check out my Angular Patterns: Clean Code course at Pluralsight which is a companion to this guide.
GitHub Architecture, file structure, components, one-way dataflow and best practices
GitHub A standardised approach for developing Angular applications in teams.
- Rule 1 - Organize your Files Around Features, Not Roles
- Rule 2 - Don't Put Logic in index.js Files
- Rule 3 - Place Your Test Files Next to The Implementation
- Rule 4 - Use a config Directory
- Start every new project with npm init
- Use a smart .npmrc
- Hop on the ES6 train
- Stick with lowercase
- Cluster your app
- Be environmentally aware
- Avoid garbage
- Hook things up
- Only git the important bits
- Simplify
[Meteor](https://guide.meteor.com/structuRule 4 - Use a config Directoryre.html)
How to structure your Meteor app with ES2015 modules, ship code to the client and server, and split your code into multiple apps.