Full-Stack and three-tier architectures

You remember the old philosophical question? “Which came first the chicken or the egg?” Some people may ask which came first, the concept of a three-tier architecture, or the concept of full-stack development? The great thing is, they are complimentary.

Always think of your architecture consisting of layers. MEAN is about layers of technologies all written with JavaScript. And it just so happens that you can set those up to achieve a three-tier architecture. Here is how they line up:The Data Layer (MongoDB/DocumentDB/NoSQL, etc.): This is where you persist your data. Data can be stored, retrieved, updated or deleted. MongoDB is what is called a “document-based” database and has a JavaScript API available to interact with it.

The Service Layer (Node.js+Express.js): This is where a Web API service would be exposed that is the doorway to all business logic and data storage. It would perform workflows that require more complicated computations and sequencing of operations. These might be user event driven, or could be scheduled to run periodically. Node.js was specifically designed to run scalable server-side Web Applications. Express.js is an add-on module to Node.js that simplifies the building of a web service layer with request and response routing.

The Presentation Layer (AngularJS/HTML): The presentation layer is what does the final work of providing the display and interaction to the human user. It provides the binding of the data from the service layer to HTML templates. This would ultimately be presented to the user on a computer or mobile device of some type. Angular.js provides a declarative style for declaring your display code. You focus on the relationships you want between the service layer and what appears on the screen, and Angular does the work of keeping them in sync.

About Bushman

Living a purposeful life.
This entry was posted in Uncategorized and tagged , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s