ASP.NET Core 2: Architecture & Design Pattern Ideology
The need of more robust and interactive web experience is growing rapidly and so, is the need of more improved, simpler and developer friendly web technologies are rising in terms of making web development more productive, highly user-friendly & interactive and quicker to develop with less effort. Gone are those days when development of a website consumes a lot of time and expenses as everything needs to be done from scratch by yourself. Now a days, everything is available to a web developer and all that needs to build a website is understanding of the technology and the focus on more productive web development.
Today's demonstration is more theoretical than code base as I will try to elucidate ASP.NET Core 2 architecture and ideology behind some core design patterns being made part of the ASP.NET core 2 development templates.
So, in essences ASP.NET core creates necessary per-defined "N" tier/layers architecture for us developers automatically, which saves our time and effort to worry less about the complexity of necessary "N" tier/architecture of the web project and focus more on the business logic. In non-ASP.NET core environment, what happens in general that we as a developer are more focused on the business logic and the selection of best design patterns not on the architecture side because at the end of the day the final version of our web project is deployed on a single tier machine and we are more focused on managing the complexity of the project in terms of code re-usability and modular components but on a single tier, very few organizations/enterprises actually implement "N" tier/layer architecture to make their product more robust and modular as "N" tier/layer architecture requires more resources consumption, management for scaling the project as necessary and of course hiring of more skilled resources that can build the necessities.
No wonder you will find many modern web development frameworks more pre-build design pattern friendly rather that pre-build tier/layer friendly, for, that matter, a developer need to make the necessary tiers/layer himself/herself and no wonder MVC design pattern is the most popular for web development. Remember that design pattern and architecture are separate concepts, unfortunately, many senior developers refer design pattern and architecture as same, so, they refer MVC as architecture rather than design pattern. So, here comes ASP.NET core that brings the benefit of pre-build architectural framework that ease out tier deployment of the project along with providing pre-build Single Page Application (SPA) design pattern, Razor Pages (Page based more cleaner MVC model) design pattern and traditional MVC (View based model) design pattern. These design patterns are mostly used in hybrid manner, but, can be utilize as individual only pattern as well.
Today's demonstration is more theoretical than code base as I will try to elucidate ASP.NET Core 2 architecture and ideology behind some core design patterns being made part of the ASP.NET core 2 development templates.
ASP.NET Core Architecture
The ideology behind the ASP.NET core in general as the name suggests is to layer out web logic, infrastructure and core components from each other in order to provide more development friendly web development environment. The concept is somewhat similar to "N" tier/layer architecture, the only difference is that ASP.NET core defines the layers as core component of the platform which ease the developer from redefining it in order to make solution more modular and reusable. What happens in ASP.NET core is that main Business logic and UI logic are encapsulated in ASP.NET core Web App layer, while, database access layer, cache services and web API services are encapsulated in infrastructure layer and common utilities, objects, interfaces and reusable business services are encapsulated as micro-services in application core layer.So, in essences ASP.NET core creates necessary per-defined "N" tier/layers architecture for us developers automatically, which saves our time and effort to worry less about the complexity of necessary "N" tier/architecture of the web project and focus more on the business logic. In non-ASP.NET core environment, what happens in general that we as a developer are more focused on the business logic and the selection of best design patterns not on the architecture side because at the end of the day the final version of our web project is deployed on a single tier machine and we are more focused on managing the complexity of the project in terms of code re-usability and modular components but on a single tier, very few organizations/enterprises actually implement "N" tier/layer architecture to make their product more robust and modular as "N" tier/layer architecture requires more resources consumption, management for scaling the project as necessary and of course hiring of more skilled resources that can build the necessities.
No wonder you will find many modern web development frameworks more pre-build design pattern friendly rather that pre-build tier/layer friendly, for, that matter, a developer need to make the necessary tiers/layer himself/herself and no wonder MVC design pattern is the most popular for web development. Remember that design pattern and architecture are separate concepts, unfortunately, many senior developers refer design pattern and architecture as same, so, they refer MVC as architecture rather than design pattern. So, here comes ASP.NET core that brings the benefit of pre-build architectural framework that ease out tier deployment of the project along with providing pre-build Single Page Application (SPA) design pattern, Razor Pages (Page based more cleaner MVC model) design pattern and traditional MVC (View based model) design pattern. These design patterns are mostly used in hybrid manner, but, can be utilize as individual only pattern as well.
ASP.NET Web Core 2 Project Templates
So, here are the list of project templates that ASP.NET web core 2 provides i.e.- ASP.NET Core Web App (Razor Pages).
- ASP.NET Core Web App (Model-View-Controller).
- ASP.NET Core Web API (no UI).
- ASP.NET Core with Angular (SPA).
- ASP.NET Core with React.js (SPA).
- ASP.NET Core with React.js and Redux (SPA).
Traditional Web Application Vs Single Page Application (SPA)
There are two approaches in which a web application is being built i.e.
- Traditional Web Application.
- Single Page Application (SPA).
1) Traditional Web Application
In Traditional Web Application development style, UI application logic is performed at server side. For example, in MVC design pattern application every time user clicks, the web request is sent back to server and on response entire page is reloaded, even with ajax calls to load only necessary component, the logic against any action is done at server level and then necessary UI or component on screen will load. This development style makes frequent web request calls impacting performance of the website.2) Single Page Application (SPA)
In Single Page Application development style, UI logic is performed at client (web browser) side and server side is communicated primarily for data processing through web api calls. For example, modern front-end framework AngularJS provides all the necessary tools to perform interactive UI logic at client side and make only necessary calls to the server side. This definitely reduces frequent server requests and improves performance.When to choose Traditional Application vs Single Page Application (SPA) Development Style
Here below is the excerpt from Architecting Modern Web Applications with ASP.NET Core 2 and Microsoft Azure book that explains well about the decision for development approach. Notice that most of the time hybrid approach is being used for development style:
Factor
|
Traditional Web App
|
Single Page Application
|
Required Team Familiarity with
JavaScript/TypeScript
|
Minimal
|
Required
|
Support Browsers without Scripting
|
Supported
|
Not Supported
|
Minimal Client-Side Application
Behavior
|
Well-Suited
|
Overkill
|
Rich, Complex User Interface
Requirements
|
Limited
|
Well-Suited
|
Nice go through.
ReplyDeleteWhich is great but with the templates not being kept inline with new releases of the spa frameworks it still works out easier rolling the whole thing by hand from an empty project !
ReplyDeleteYour site is amazing and your blogs are informative and knowledgeable to my websites.This is one of the best tips in my life.I have in quite some time.Nicely written and great info.Thanks to share the more information's.
ReplyDeleteSeo Experts
Seo Company
Web Designing Company
Digital Marketing
Web Development Company
App Development
Hey, this is an Amazing article. This article is a good read to know more tips on designing the web.
ReplyDeleteProWeb365
Such A Nice Post, Keep Up The Fantastic Work. Do check the link below:
ReplyDeletecustom logo
Usually I never comment on blogs but your article is so convincing
ReplyDeleteThat I never stop myself to say something about it. You’re doing a
Great job, Keep it up.
The Love of People at
New Orleans, United States
Great post! Thanks for sharing a piece of informative information. It would be helpful for newbies, keep posting. I appreciate your efforts. Click here.
ReplyDeleteAwesome article. I enjoyed reading your articles. this can be really a good scan for me. wanting forward to reading new articles. maintain the nice work!
ReplyDeleteData Science Courses in Bangalore
Excellent Blog! I would like to thank you for the efforts you have made in writing this post. Gained lots of knowledge.
ReplyDeleteData Analytics Course
What an incredible message this is. Truly one of the best posts I have ever seen in my life. Wow, keep it up.
ReplyDeleteAI Courses in Bangalore
I am sure it will help many people. Keep up the good work. It's very compelling and I enjoyed browsing the entire blog.
ReplyDeleteBusiness Analytics Course in Bangalore
You have completed certain reliable points there. I did some research on the subject and found that almost everyone will agree with your blog.
ReplyDeleteData Science Training in Bangalore
Wonderful blog found to be very impressive to come across such an awesome blog. I should really appreciate the blogger for the efforts they have put in to develop such amazing content for all the curious readers who are very keen on being updated across every corner. Ultimately, this is an awesome experience for the readers. Anyways, thanks a lot and keep sharing the content in the future too.
ReplyDeleteDigital Marketing Training in Bangalore
I wanted to leave a little comment to support you and wish you the best of luck. We wish you the best of luck in all of your blogging endeavors.
ReplyDeleteArtificial Intelligence Training in Bangalore
You actually make it seem like it's really easy with your acting, but I think it's something I think I would never understand. I find that too complicated and extremely broad. I look forward to your next message. I'll try to figure it out!
ReplyDeleteMachine Learning Course in Bangalore
This is great job, thanks for sharing it with us.
ReplyDeleteBuy law essay
ReplyDeleteI feel very grateful that I read this. It is very helpful and very informative and I really learned a lot from it.
Data Analytics Course
I am really enjoying reading your well written articles. I am looking forward to reading new articles. Keep up the good work.
ReplyDeleteData Science Courses in Bangalore
What an incredible message this is. Truly one of the best posts I have ever seen in my life. Wow, keep it up.
ReplyDeleteAI Courses in Bangalore
I am sure it will help many people. Keep up the good work. It's very compelling and I enjoyed browsing the entire blog.
ReplyDeleteBusiness Analytics Course in Bangalore
Thanks for posting the best information and the blog is very helpful.
ReplyDeleteArtificial Intelligence Training in Bangalore | Artificial Intelligence Online Training
Python Training in Bangalore | Python Online Training
Data Science Training in Bangalore | Data Science Online Training
Machine Learning Training in Bangalore | Machine Learning Online Training
AWS Training in bangalore | AWS Training
UiPath Training in Bangalore | UiPath Online Training
You have completed certain reliable points there. I did some research on the subject and found that almost everyone will agree with your blog.
ReplyDeleteArtificial Intelligence Training in Bangalore
Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing. Great websites! Modern Java EE Design Patterns PDF
ReplyDeleteI have read good things here. Definitely worth to bookmark again. I am amazed at how much effort you put into creating such an informative website.
ReplyDeleteData Science Training in Bangalore
Happy to chat on your blog, I feel like I can't wait to read more reliable posts and think we all want to thank many blog posts to share with us.
ReplyDeleteData Science in Bangalore
Hey friend, it is very well written article, thank you for the valuable and useful information you provide in this post. Keep up the good work! FYI, Pet Care adda
ReplyDeleteCredit card processing, Klara and the Sun PDF Download ,my favourite movie essay
Amazingly by and large very interesting post. I was looking for such an information and thoroughly enjoyed examining this one. Keep posting. An obligation of appreciation is all together for sharing.data science course in bhubaneswar
ReplyDeleteI am more curious to take an interest in some of them. I hope you will provide more information on these topics in your next articles.
ReplyDeleteData Science in Bangalore
I think this is an informative and very useful and knowledgeable blog. therefore, I would like to thank you for your effort.
ReplyDeleteData Science Course in Jaipur
it's really nice and meanful. it's really cool blog. Linking is very useful thing.you have really helped lots of people who visit blog and provide them usefull information. Web Design Oxford
ReplyDelete