Ngày đăng: 18/01/2018  

ASP.NET WebForms Template - High development technology

In term of WebForms 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 WebForms 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 WebForms also supports this simple, clear, native, flexible, performance and powerful technology without using javascript libraries.

We know that ASP.NET WebForms 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 WebForms 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 WebForms and promotes all of its strengths (simple, clear, native, flexible, performance, powerful, etc.). Consequently, if WebForms applies Template, it will help WebForms 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 WebForms 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



Những bài liên quan
ASP.NET WebForms - The very modern design pattern model is gradually oblivion

WebForms 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.

Hỗ trợ trực tuyến


Contact Us

KhaLa Company

61A No.8 Street, Linh Trung Ward, Thu Duc District, HCM City

https://khala.com.vn

Copyright © 2014-2024 KhaLa. All rights reserved.

Developed by KhaLa

Follow Us