Refactoring, standards, layout

Source: Internet
Author: User
Tags end join modify
Standard recently everyone is always arguing about the standard, in fact, some of the relevant articles have been made clear.
Let me just talk about my opinion. This post has too many "I think", explained that I just want to take out my ideas to discuss with you, perhaps there are too many wrong places, please point out.
1, my understanding of the Web standards
The so-called web standards have come to the conclusion in some tutorial articles: structured standards (XHTML, XML), Performance standards (CSS, XSLT?). ), behavioral standards (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 also constantly improving. We can also join in perfecting it rather than blindly follow it. No best, only better. (Lexrus said a while ago to set up their own web standards organization, do not know how now. )
   B. Standards are only recommended, good standards everyone will consciously adhere to
The reason we use the standard is because the standard is good for us. As is now advocated by the ISO9000 standard, it is only advocated, not forced. I think it works for me, so I use it, and again, if you think it's really bad, you can use it, and the standard itself should not be coerced. Like playing basketball, the NBA is 24 seconds attack, we are 30 seconds attack, we want to join the NBA, we have to use the rules of others. Also, we join the "WTO" is also, if we are enough to drag, we set up a "WTO", the release of a set of standards, it is also possible.
   c. The standard does not explicitly mention using div or table
Some friends can easily equate the standard with "replace table with Div". I don't think so, because table also conforms to XML rules. Pages that contain a table can still be validated by XHTML1.0.
   d. " div layout "Not just layout with Div
We can use all possible tags (including table) to layout the page, the goal is to achieve the best. It just brings up a concept, a whole new pattern. It is also said in the jar that "what is important is conceptual renewal, not code." "Of course, our ultimate goal is to update the code."
   e.xhtml Verification is a means, not an end.
Sometimes we use JavaScript to generate Flash movie code to deceive validator and pass validation. In this way, there are no validated pages. If it's just a play, it's OK. But I am afraid some beginners will take validator seriously, even think that through verification is the ultimate goal. My view is: Validator is just a tool that helps us check if our pages are up to standard, that's all. In the end we still have to design our page according to the customer's request.
2. Why should I use the standard
Some people would think that the purpose of using standards is to achieve standards. In fact, "website refactoring" nail Secret: For the site to "live" longer, in order to improve the accessibility of the site, in order to reduce costs, we must adopt the Web standards! There are three "for", none for the standard. Standards are just means.
After contacting the "standard", I try to do something that meets the "standard" page. At the time, it was not clear why standards were used, but out of curiosity. In the middle also encountered some problems, there are technical, but also the concept of. However, now I am happy to use div+css to make Web pages for clients.
After using the standard, give me the feeling is: The code is streamlined, maintenance convenient.
Streamlined code to shorten page load time. Even in the current broadband situation, we should not relax the requirements of our own-thin code (I think this is also the requirements of each programmer), and now there are a lot of dial-up users, as well as mobile Internet/browsing users. This is a society that counts every minute.
In strict accordance with the standards, you can achieve higher compatibility. A qualified web page producer, he always tries to make the page achieve the highest compatibility. Of course, he wants to strike a balance between effect and compatibility. As we now choose Husband: both rich and handsome.
Maintenance is convenient, I even just modify the CSS can make the whole page to show a completely different style. This can save a lot of work.
Of course, I think the most important thing with standards is backwards compatibility. A professional term is: sustainable development. The network is always in constant development, a good web page maker, must have a certain forecast for future development. Now I know that for a while it is really the world of XML until there is something better to replace it.
Every year there are too many websites to keep up with the times, spend a lot of money on the revision. Because the revision means everything again, including code, even procedures.
The standard also requires that we give the data to XHTML (or HTML, XML), and give the performance to CSS, both of which are combined.
3. Vindication for table
"Website refactoring" after the book came out, there may be a lot of misreading, some friends of the standard and refactoring confused, even equate. I have not read this book, I am not good at evaluating it.
"Modify the code to improve the internal structure of the program without altering the external behavior of the Code", which is refactoring. I think "site refactoring" also has the meaning of "div layout" and "Web Standard". Layout is about a method, the standard is a specification, this is different.
The Web Standard is not to say not to use table, I searched the articles on the Internet, did not find an article said that the Web standards against the use or even suggested that the table label is not used, I think it is said: it is recommended not to use table "layout" instead of Div+cs "layout."
To get a datasheet, I think it's the best solution to organize it with a table. Of course, you have to use other ways to achieve it is also possible, but I dare say that none of the table is simple and concise. (maybe, but I didn't find it?) Of course, in the learning phase, it is useful to force yourself not to use forms to solve all problems.
So much has been said, it is not my idea, as is summed up the idea of everyone. But if you can be of benefit to the beginner, then Amitabha will be laughable.

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.