HTC - dancers on the browser

zhaozj2021-02-16  45

I have been distressing and disorderly for the page for a long time, making B / S a lot of pain is in the event of this block, the processing of business logic, and data layers is relaxed. why? Because you can't reuse, a lot of CSS and JavaScript and HTML are intertwined together, then mix some program code, only painful feelings are maintained, often doing well, do not want to change. At the same time, I want to use the client's operation as beautiful and easy to use, JavaScript is not impossible. This feeling is not strong when doing .NET, because .NET has made controls very well, and common controls are also available. Until encounter JSP ...

Based on .NET development experience, I really want to write more clearly on the page, but there is no service control in JSP, suddenly thinking that the TreeView control in .Net is made by HTC, so I started from this. HTC's hall.

HTC (HTML Component)

HTML components

Through constant learning and research, I think he is a script-oriented programming technology. Since JavaScript and HTML is better, it will be skilled in the application. The DOM document object model will become the main application point in HTC.

The benefits of using HTC are huge, and the server program does not need to consider problems such as style. All styles can be set in the HTC. The server only needs to fill the data, then HTC is displayed according to the settings of the settings. The effect, I am doing a TreeView control, even writing the recursive inside HTC, but the server just takes the data.

Another benefit is multiplexed, and everyone uses a unified HTC control, which has the same style, saving a large number of encoded times, and many programmers who don't understand JavaScript can also be very easy to use. Sometimes I think of MVC, Struts, and the benefits of Struts may not be as good as HTC, because the performance layer has always been the most heavy.

This is my little feeling, I hope to bring a little help to everyone's work.

Below is a MSDN site that learns HTC, I will also write some time.

Http://msdn.microsoft.com/library/default.asp?url=/workshop/components/htc/reference/htcref.asp

转载请注明原文地址:https://www.9cbs.com/read-23219.html

New Post(0)