Refactoring, standards, layout _css/html

Source: Internet
Author: User
Recently we have been arguing about the standard, in fact, some of the relevant articles have been very clear.

I would like to talk about my views below. This post has too many "I think", explained that I just want to take my ideas out to discuss with you, perhaps there are too many wrong places, please point out.

1. My understanding of Web standards
The so-called web standards have been concluded in some tutorial articles: structured standards (XHTML, XML), Performance standards (CSS, XSLT?). ), Behavior criteria (DOM, ECMAScript). These things on the internet a lot of search, here I will not say more. I only say my own thoughts:

A. Standards are relative and have certain limitations
As the standard itself, it is constantly being perfected. We can also join in to refine it, rather than blindly follow it. No best, only better. (Lexrus a while ago to set up their own web standards organization, do not know how now.) )

B. Standard is recommended only, good standard everyone will consciously abide by it.
The reason we use standards is because standards are in our favor. As now advocated by the ISO9000 standard, it is just advocating, not forcing. I think it works for me, so I use it; Similarly, if you think it is really not good, you can not use it, the standard itself should not have any compulsion. Like playing basketball, the NBA is 24 seconds to attack, we are 30 seconds to attack, we want to join the NBA, we have to use the rules of others. Also, we join the "WTO" also, if we are enough to drag, set up a "WTO", the release of a set of standards, it is also possible.

C. The standard does not explicitly refer to div or table
It is easy for some friends to equate the standard simply with "Change table to Div". I don't think so, because table also conforms to the XML rules. Pages that contain a table can also be verified by XHTML1.0.

D. " Div layout "is not just a div layout
We can use all possible tags (including table) to lay out the page to achieve optimal. It just presents a concept, a whole new paradigm. Someone in the jar said, "It's important to update the concept, not the code." "Of course, our ultimate goal is to update the code.

E.xhtml validation is a means, not an end
Sometimes, we use JavaScript to generate Flash movie code to trick validator through validation. In this way, there is no pass-through of the validated page. If it's just a play, it's okay. But I'm afraid there will be some beginners who take validator seriously, and even think that through verification is the ultimate goal. My view is that validator is just a tool that helps us check whether our pages are up to par, that's all. In the end, we still have to design our pages according to our customers ' requirements.

2, why should I use the standard
someone would think that the purpose of using standards is to achieve the standard. In fact, "website Reconstruction" gave away: in order to site can "live" more long-term, in order to improve the accessibility of the site, in order to reduce costs, we must adopt the Web Standard! There are three "for", not one for the standard. Standards are just means. After I
touch the standard, I try to do some pages that meet the "standard". At the time, it was not clear why standards were used, just a curiosity. In the middle also encountered some problems, there are technical, but also conceptual. But now I'm happy to use DIV+CSS to make Web pages for my clients.
after using the standard, give me the feeling is: The code is streamlined, easy to maintain. The
code is streamlined to reduce page load times. Even in the current broadband conditions, we should not relax our own requirements--------Streamline the code (I think this is what every programmer wants for themselves), and now there are a lot of dial-up users, as well as mobile Internet/browsing users. This is a society in which every second counts. The
is strictly standard and allows for higher compatibility. A qualified web creator who always tries to get the most out of the web. Of course, he has to strike a balance between effectiveness and compatibility. As we now choose Husband: both rich and handsome.
Easy to maintain, I can even modify the CSS to make the entire page appear completely different styles. This can save a lot of work.
Of course, I think the most important thing to do with standards is backwards compatibility. Using a professional term is: sustainable development. The network is always in continuous development, a good web-maker, must have some foresight for the future development. Now I know that the next period of time is really the world of XML, until there is something better to replace it.
Every year there are too many sites to keep up with the times, spending a lot of money on the revision. Because the revision means everything again, including the code, even the program. The
Standard also requires that we give the data to XHTML (or HTML, XML) and give the performance to CSS, which combines the two.

3. For table Vindication
"Website Refactoring" after a book, perhaps there is a lot of misreading, some friends to the standard and refactoring confused, even the equivalent. I have not read this book, not good at evaluation.
"To modify the code to improve the internal structure of the program without changing the external behavior of the code," This is refactoring. I think "website refactoring" has the meaning of "div layout" and "Web Standard". The layout is about a method, and the standard is a specification, which is a different story.
The Web Standard is not to say no table, I looked all over the Internet article, did not find an article said Web standards against the use of or even recommend not to use the table tag, I think it is said: We do not recommend the table "layout", instead of using Div+cs "layout."
For a data sheet, I think it's the best solution to organize it with table. Of course, you have to use other means to achieve it is also possible, but I dare say no table comes simple, concise. (Maybe I did, but I didn't find it?) Of course, in the learning phase, it is quite useful to force yourself not to use tables to solve all problems.

The above said so much, rather than my idea, rather, is to summarize the ideas of everyone. But do not laughable, if can be beneficial to beginners, it is amitabha.

Source: Blue Ideal

  • Related Article

    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.