HTML from the devil's jigsaw puzzle to the online Flow

Source: Internet
Author: User

Although HTML was not born along with the Internet, their close relationships have almost ignored this history. HTML is so powerful and widely used. Since W3C declared that H is dead, the development of HTML 5 is reversed, forced W3C to accept and continue to develop.
However, since the HTML design, it mainly targets the performance of static content, which is also doomed to its inherent defect. The Internet has evolved from its initial content performance to its application platform. In terms of application level, it is enough to compete with desktop programs. Are you still using Foxmail to receive emails? Even the original content publishing application itself tends to adopt the dynamic generation method for implementation, and it is clear to see how many CMS systems there are.
However, the inherent defect of HTML is content-oriented instead of logic-oriented, which makes HTML generation a devil's puzzle. The perfect fantastic interface that users can see on the front end is thousands of magic fragments in the background.

Yes, a magic dream, a word of difference, thousands of miles.

Fortunately, the industry has been striving for change. Early CSS 1, 2, 3, JavaScript, especially jquery, contributed to the separation of style and behavior, which are part of fragments. Because HTML can only focus on the content and its structure, a very important part of pure regionalization. I will not go into details here, because there are too many articles and arguments on the Internet, even though many websites have not been well applied to these technologies.
Here, I just want to talk about the post-CSS and jquery era stories.
There are still many opportunities for fragmentation, even if only content is presented. Unchanged content and changes or dynamic content alternate. The former uses htmltml Code directly, and the latter often requires background code and variable support. The two are completely different areas. The integration naturally results in an ununderstandable split disk. Just like a process, switching a process is the most costly overhead. The essence of fragmentation is the switching of the logical context. no matter whether the developer's writing or reading comprehension, it is a high cost and eventually become the development leader.

The solution is to unify the context and reduce switching frequency at least.


ASP and net web form are a good attempt. HTML tags are object-oriented, And the HTML tags of unchanged content are unified to the background context. Each HTML Tag becomes a background object, and variable filling is naturally performed in the background. It is implemented in a unified manner by assigning values to objects, spanning context switching. This is also the meaning of web form naming, so that web pages can be programmed in the same way as desktops. It should be said that Microsoft's technical direction is still relatively successful. At least, in this environment, I have to enter the web industry. In turn, I learned HTML foreground DOM from the background model.
However, the failure of the web form is in terms of architecture. After the HTML is implemented, the background processing, in turn, is all page-centered. It is an attempt to ignore the time difference between the front end and the backend (Server Control ?), I really think of the Internet as a local high-speed network?

Asp mvc is coming soon, and from 1 to 3 and 4 are also being tested. Although it is a change in the background architecture, it has a huge impact on the front-end. The MVC structure cannot be extended with the web form.

History is always around the circle, and we are back to the ASP era, using embedded variables to piece together HTML code.

<span><%=Value%></span>

Start from a blank space and start again. Soon, Microsoft launched htmlhelper, 1.1 points, and re-bonded the fragments. Mvc3 introduced the razor view engine to make the view truly a template. Of course, there is still a class that supports the view, but it provides more flexibility to support expansion. The previous article details. In addition, Razor also further reduces the syntax by eliminating Terminator and angle brackets. It can intelligently identify environment changes. Is it the HTML mode or the background mode? All these are the fragments of code fragments and ideas described at the beginning of this article.
Finished? Wait. All these seem to be just preparing for our final hero appearance. Let the HTML flow, fluent HTML.

Http://lunaverse.wordpress.com/category/ms-mvc/fluenthtml/
Let's look at a piece of code for generating a table. A piece of code is better than one thousand images.

@ Model ienumerable <examdto> @ This. grid (model ). columns (C => {C. for (x => X. code ). named ("Code"); C. for (x => X. name ). named ("name"); C. for (x => "delete "). named ("operation ");}). empty ("no record! ")



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.