Online Management Software Consult design Hardware and Software Professional Website Design
 
Posted date: 18/01/2018 

ASP.NET Web Forms Template - High development technology

In term of Web Forms technology, many people thought that it has view-state, driven-events so it is difficult to control the objects, whereas other few people recognized that Web Forms supports template programming technology. It is very simple, modern and flexible technology. We even do not need use view-state, driven-events.

asp-net-webform-template-cong-nghe-lap-trinh-dinh-cao


Programming Template is a modern programming technology which some javascript libraries are applied (such as: jQuery, ReactJS, AngularJS, etc.). However, it has some limitations (for example: it is difficult to use cache because it renders data at client side, it makes client machine slow down, it is difficult to apply SEO standard). Perhaps, few people knew that the ASP.NET Web Forms also supports this simple, clear, native, flexible, performance and powerful technology without using javascript libraries.

We know that ASP.NET Web Forms is a very modern design pattern that decouples code (HTML, CS, JS, CSS and SQL). With this approach, it helps developers to control, reuse, upgrade and maintain the code easily. It also helps developer to write their code natively.

We can use ASP.NET Web Forms to build a Template Control with less effort but it is very native, flexible, performance and powerful:

asp-net-webform-template-cong-nghe-lap-trinh-dinh-cao


It can be used to view news:

asp-net-webform-template-cong-nghe-lap-trinh-dinh-cao


It can be used to view product:

asp-net-webform-template-cong-nghe-lap-trinh-dinh-cao


It can also be used to export to json format (a very common format currently):

asp-net-webform-template-cong-nghe-lap-trinh-dinh-cao


It can also be used to create an input form:

asp-net-webform-template-cong-nghe-lap-trinh-dinh-cao


It can be used to create a slideshow easily:

asp-net-webform-template-cong-nghe-lap-trinh-dinh-cao


It can be used to export to xml format:

asp-net-webform-template-cong-nghe-lap-trinh-dinh-cao


It can be used to create Template Control easily:

asp-net-webform-template-cong-nghe-lap-trinh-dinh-cao


Although it is used for multiple purposes, it is very easy to use and flexible technology. Code behind (C#) is also very simple. We can process every business logic with just a few lines of code.

asp-net-webform-template-cong-nghe-lap-trinh-dinh-cao


Template Control will automatically bind the data in a fairly simple structure as shown below without adding any lines of code. It relies on httpContext, menu_url and menu_data to determine the data to process.

asp-net-webform-template-cong-nghe-lap-trinh-dinh-cao


As you can see, the code (HTML, CS and SQL) is decoupled completely. We can write the code independently without fearing of conflict (When we modify code in C#, we also do not care much about mixing up code between HTML and SQL). We can control the code completely without worrying about the system generating arbitrary code. We can test our code very easy. It renders code by block so it runs very fast and use less server resources. We can also control the cache completely so we can make adjustment to optimize the system to help it run faster. Code is very native so it is easy to control exception and manage code. Especially, it is easy to reuse, upgrade, maintain. Those are vital factors in software development.


Template technology eliminates all limitations (ViewState, SessionState, DrivenEvent, PostBack, PageLifeCycle, MasterPage, etc.) of Web Forms and promotes all of its strengths (simple, clear, native, flexible, performance, powerful, etc.). Consequently, if Web Forms applies Template, it will help Web Forms become the most wonderful programming technology out of current programming technologies.


KhaLa Company has applied this technology for more than 10 years. It helps us to shorten the project duration from 2 months to 2 days. Although we use VPS (Virtual Private Server) server that has very low configuration (2 Cores, 3GB RAM) but we can still install hundreds of apps that running very fast (response time <100 ms). It can also respond hundreds of thousands of requests simultaneously. Besides, the upgraded capability (add, edit, delete: module, business logic, etc.) is simple and fast without modifying the code, without restarting the app, without interrupting the running system.


In short, we hope that Microsoft will take a serious consideration to upgrade Web Forms technology and integrate into .Net Core soon so that it can run on cross platform. And of course, Microsoft should improve this technology by removing the limitations and remove the word "runat" for the simple and clear code.


We just provide some basic examples in this article. However, there are many wonderful functions in reality.


Thank you for taking your time to read this article!

Author: Le Van Khanh
Source: Document of KhaLa company




 Related articles Back
 ASP.NET Web Forms - The very modern design pattern model is gradually oblivion

Web Forms is a very modern, simple, clear, flexible, decouple design pattern model. It was one of Microsoft's wonderful technologies, but unluckily it has been gradually oblivion recently.