Introductive
“My salary blocks be traffic bank, but I often take a money on the machine of draw money of industrial and commercial bank with my downstair home;
I am Shanghai person, I use mandarin to be able to undertake communicating with the classmate of Guangzhou;
Faucet is bad today, I go water warms the shop bought to be changed newly;
I go France travels, the friend that informs me France is in Beijing time 15:3Will 0 minutes receive me. Will 0 minutes receive me..
Similar issue produces everyday in the life, such thing does not pass normally again it seems that, do not have the place with special what. But, you had thought:
Why is the size that all banks block same size?
Why can I communicate with Guangzhou classmate with mandarin?
The snail mouth as it happens of the new faucet that why buys and old hose can be received on?
Why won’t French friend receive bad time?
To day-to-day a lot of businesses, we did not notice this backside is having a hidden ” element ” in effective, this element is: Standard.
Had ” the standard that the bank blocks ” , you need not fear the card volume of different bank is different, the mouth entering card of all drawing machine is same;
Had ” mandarin standard ” , the people of the whole country can have language communication expediently;
Had ” the industrial standard of snail mouth ” , it is absolutely and OK that you buy a faucet of 6 minutes but conduit of 6 minutes is received on;
Had ” Greenwich Mean Time ” , the people of the whole world won’t receive time of poor regular air service.
All trades and professions in the life is having his corresponding standard and standard, the standard is OK and convenient communication, stimulative cooperation, improve efficiency.
To IT industry, the diversity of the diversity of equipment and information needs a standard to assure the communication between them and cooperation more. We may be alternant between camera of mobile phone, printer, number data; We may be mixed in website, mail information is passed between office software; We should be in possibly prospective new facility (for example home appliance of machine top box, information) medium applying existing natural resources. If do not have uniform standard, so now all information are isolated, cannot share, cannot of put sb in a very important position; We need to waste many manpower material resources to build data for new facility afresh; The many systematic application that we need to be every time makes special development.
Fortunately we had found the program that settle, this is—XML.
XML says simply even if a kind ” the documentation that has formulary pattern ” , the facility that wants us only or the data that the system generates abide by this kind of format, can realize commutative data exchange, share with cooperation.
Since international World-Wide-Web was organized 1998 (since W3C.org) rolls out XML 1.0 standard, already many XML standard applies in our life, for example prices of the weather forecast that we subscribe to with the mobile phone, stock, these data are obtain what send you through XML format changeover next from corresponding system; We pass QQ the message perhaps is sent to arrive on MSN not on on-line friend mobile phone, this among them information also is the; that changes implementation through XML still have more commercial application, for example the data between system of the CRM of company interior, ERP, content management alternant, conformity and share applied XML.
So, you can think of naturally: Webpage (whether should Web) also follow XML standard? The answer is affirmative.
After World-Wide-Web appears, the message that changed people greatly gets way, get information from newspaper, TV, broadcast before, OK now more convenient carry a network, browse through the browser obtain. The information on Web is increasingly substantial also, from simple at the beginning, static documentation and picture news, to now dynamic, but interactive multimedia information, the information on Web has arrived more can use ” horrible ” will describe. By last year, google searchs engine to be able to have searched 8.2 billion pieces of webpage and 2.1 billion pieces of image. So much data is fortune, but if cannot be used effectively,mix search even if ” information rubbish ” . And in fact, had produced data to cannot be shared effectively with information redundantly, the circumstance of inquiry.
The website that we have 99% uses HTML to make, and HTML does not accord with XML format. Accordingly these webpage news get used to the requirement that prospective new facility and data share very hard. How to do? International World-Wide-Web is organized (W3C.org) had put forward to settle way, they go up in HTML foundation, made new normative XHTML1.0 according to XML format, want to adopt simple change only, can turn HTML for XHTML, realize the transition to XML thereby. In the meantime, to make your page information is searched more easily and the code of put sb in a very important position, XHTML needs a structure more clearer, label has semantics more, w3C recommends use CSS to dominate show, in order to realize the photograph depart of content and expression.
This namely we the subject that this book should discuss: Reframe with Web standard technology your website.
One: Know Web level
1. What is Web standard?
Want to make clear a concept above all. We the Web level that this book says, not be to point to XML, point to however to realize the transition of many HTML information to XML standard, w3C and ECMA make a series of technical standard, basically include XHTML1.0, CSS2.0, DOM1.0 and ECMA JavaScrit at present. Web standard is a standard not just, however a series of normative floorboard.
Press the webpage that these standards make, accord with XML format standard, content and expressional appearance are detached, after will making your page data is in, can be shared, exchange and put sb in a very important position.
Below, let us understand a few important ABC together. If you had mastered, can have jumped to read the 2nd directly.
2. What is W3c?
W3C is ” World Wide Web Consortium ” abbreviate, chinese calls World-Wide-Web the organization. Be dedicated at ” leader and development Web technology ” international industry guild. It is led by World-Wide-Web contriver Time Berners-Lee, hold water with 1994. W3C has had more than 500 member- - include Microsoft, United States online (the parent company of Netscape) , manufacturer of malic computer, Adobe, Macromedia, SUN and hardware of of all kinds mainstream, software and telegraphic company. The society basically studies by 3 learning orgnaization advocate manage- - American Masschusetts Institute of Technology (the European information of MIT) , France and mathematical research forum (the Ying Qing university of ERCIM) , Japan (KEIO) .
W3C basically works is consider and establish open standard (in fact standard) , so that raise Web,the each other of relevant product uses a sex. The commendation of W3C makes choose a site for the capital normatively is origin is mixed at the member oneself special the working group that invited expert forms is finished. The draft of the working group (W3C board is referred to discuss after Drafts) is connecting too most and relevant company and organization to agree, the ability after be being approved formally is become ” recommend a standard (Recommendations) ” release. You can visit more information the website of W3C: Www.w3.org
The standard that 3.W3C issues
3.1 HTML4.0
HyperText Markup Language(HTML, transcend text label language) the webpage that is used extensively now, HTML purpose is to be documentation to add structural information, express caption for example,
Represent stage; The browser is OK and analytic the structure of these documentation, show formal expression to come out with corresponding watch. For example: The browser is met will. . . The content between shows with thick substance.
Stylist also can define some kind of structure to come out with what form expression through CSS(Cascading Style Sheets) .
3.2 XML1.0
XML is Extensible Markup Language(can expand label language) logogram. XML similar HTML also is label language, different place is: HTML has fixed ticket, and the label that XML allows yourself to define his, allow you to define many set for a documentation through XML Namespaces even. See case of a XML:
<addressbook>
<entry>
<name>AJIE</name><email>ajie33@hotmail.com</email>
</entry>
<entry><name>ALLAN</name><email>neo_n@21cn.com</email>
</entry>
<entry><name>YAHOO</name><email>tingpeng@msn.com</email>
</entry>
</addressbook>
The application of a few XML, for example XHTML and MathML, had become W3C to recommend a standard. You can adopt modal standard likewise (CSS and XSL) , will define the expressional shape of XML label. XML documentation still cannot show with the browser directly at present, the page is shown still use HTML or XHTML, XML is used at server and server mostly now (system and system) the data switch between.
3.3 CSS2.0
CSS is the abbreviate that style of cascade of Cascading Style Sheets expresses. Can control HTML through CSS or the expressional form of XML label. W3C recommends method of use CSS distribution, make Web more simple, the structure is more clear.
3.4 XHTML1.0
XHTML is actually redefine of HTML basis XML standard. Its label and HTML4.0 are consistent, and the format follows XML standard strictly. Accordingly, although XHTML and HTML show euqally in the browser, but if you want to be changed into PDF, so many XHTML will be easy.
XHTML has definition of 3 kinds of DTD: Strict (Strict) , those who transfer (Transitional) , of frame (Frameset) . DTD is the abbreviate that type of documentation of Document Type Definition defines. It writes in XHTML file most begin, tell a browser this documentation accords with what standard, come with what standard analytic.
3.5 DOM1.0
DOM is the abbreviate of model of object of documentation of Document Object Model. DOM gave script the language (the ability that similar ECMAScript) develops indefinitely. It makes script language visits the structure of whole documentation, content and expression very easily.
4 what is ECMA?
Be ” European Computer Manufactures Association ” abbreviate, chinese says European computer makes union. Was 1961 those who hold water aim to build unified computer to operate format level- - include program language make peace input-output organization.
ECMA is located in Geneva, organize with ISO(international standard) and IEC(international electrician standardizes an orgnaization) headquarters photograph adjacent, the standard that main task is research news and communication technology respect is intercurrent cloth reports about the technology. ECMA is not official orgnaization, comprise by mainstream manufacturer however, they often cooperate all right with interweave of other international group.
The standard ECMAscript that 4.1 ECMA releases
ECMAscript is the language of script of a kind of standard that is based on Netscape JavaScript. It also is a kind of language that is based on an object, pass DOM to be able to operate any objects on the webpage. Can increase, delete, move or change a target. Make the alternant sex of the webpage rises greatly.
Afore-mentioned standards are the main level that we use to XML interim from HTML at present, also be the category that this book basically discusses.
The advantage of 5.web standard
5.1 use a sex easily
Make made page with Web standard, to search index is propped up more ” transparent ” , the judgement that because the structure of good clarity makes,search engine can go to the lavatory and evaluate information, build more accurate index thereby. The page that makes by Web standard also can be in the browser of older version is normal show basic structure, although CSS/XSL style cannot analytic, it also can show complete information and structure.
The page that accords with Web standard is changed very easily also into other form documentation, example exactly the number occupies a library or Word format, be gone to easily also by transplanting new system- - hardware or software system, for instance network TV, PDA is waited a moment. This is the advantage that XML has inherently.
Accord with the page of Web standard to also have a day to be born ” use a sex easily (Accessibility) ” , it is common browser can be read not just, those people that have disability also can pass reader of blind browser, sound to be used normally.
5.2 backward compatibility
The page that use Web standard builds, the new browser in future the very good job in equipment of new perhaps network. We should revise CSS only or the expressional form with custom-built and corresponding XSL is OK.
2: The reflection of Web standard and controversy
Pass the introduction of above paragraphs, we are already preliminary understanding why W3C should establish XML standard, why each are big the manufacturer is willing to support XML. Also understand to transfer to XML standard, we are current level need study and control Web standard have those, be specific application next. But we discover application also is inferior to envisaging in successful in that way, the difficulty that still has one lot places before us:
99% use the webpage that older perhaps standard builds HTML4.0 to need to change XHTML;
Everyday still many new page uses the technology that does not accord with Web standard releasing;
Lack uses easily, the powerful page that supports Web level develops software;
The IE support to Web standard does not perfect mainstream browser;
Large quantities of stylist needs to know Web level, change idea;
Among them ” change idea ” it is the most important, also be the most difficult. A lot of stylist still do not understand Web criterion, still be in wait-and-see object even. We analyse the typical problem that in extending a process, Web standard encounters and controversy here:
(One) about Web standard
1.web standard is not ” standard ” , why should be I abided by?
Really, web standard is not a standard, it is W3C only those who make recommend a standard, w3C did not ask compulsively and supervise industry to carry out. Web standard is organized (Webstandards.org) to facilitate these are popularized normatively, just call their interconnected system ” Web standard ” . Although W3C is made, is only ” recommend a standard ” , but it has been in fact standard, what insider of company of before the world 500 big IT approbates is normative, you suspect its extensive sex and feasibility without reason. Microsoft also is the main member of W3C, the normative and regular meeting that itself passes supports, but the consideration that stems from commercial competition, microsoft can do a few detail adjust normally will bind calm user, but what this does not affect W3C standard is directional with authority.
Is 2.DIV CSS Web standard?
DIV CSS is concrete implementation technology step only, can not cover Web standard. Web standard is the HTML changeover to XHTML not just, more important is information structure clarity, content and expressional appearance depart, and the implementation with DIV CSS can better technology this kind of thought. Accordingly, the page that the majority that we see accords with a standard is to use DIV CSS to make.
(2) . About the advantage of Web standard
1. Science and technology is in progress, network bandwidth is bigger and bigger, speed comes more fast also, economic is that braille part significant?
One of advantage of Web standard are: The page code amount that makes with Web standard is small, can save bandwidth. This is the advantage with Web accessary standard only, because the structural itself of DIV is simpler than TABLE, the layer upon layer nest of TABLE layout causes code too fat to move, file dimension expands. Normally the circumstance falls, the page of same show compares the code of the economic 2/3 that uses TABLE position with DIV CSS. This is the advantage with Web natural standard. Basically not be aimed at average user as to the meaning of economic bandwidth, and basically be aimed at website operator, especially in large website, similar sina, Netease such site. Home page of a news narrows from 500K 170k, assume Pageview of a day is 30 million (conservative figure) , so economic server discharge is 330k*30000000=9440G, of this cost managing it is considerable.
2. Do I need to consider physical disabilities public figure (the blind and amblyopia) ?
Offer a network to browse the legal provision that going to the lavatory is a few countries of the United States and Europe for physical disabilities personage, because the clarity of Web standard page is structure, semantic complete, the correct extraction information with a few relevant very can light fixture gives physical disabilities the public figure. Accordingly, convenient blind reads information to also make one of inherent profit of Web standard. Say as to somebody China still has a lot of to solve dress warmly and ear one’s fill to be anxious artificially at present, which have time to consider physical disabilities public figure. This is social civilization and social morality problem, do not discuss a category in this book. But if your page presses Web metric system,made, can achieve this result, where is what is there against it?
(3) . About layout
Cannot 1.web standard use form?
Want to clarify a concept above all: Web standard is not not to allow to use TABLE label, TABLE also is the standard label in XHTML1.0. We just recommend the Table position that will replace a tradition with DIV CSS layout. The reason is: Former TABLE position will be behaved and content is jumbly together, structure unsharpness, content is not complete, go against the put sb in a very important position of content. And tell from semantics, w3C makes TABLE label moment just do form structure to define with it, in documentation if have form, should use TABLE so. And the composing, stuff that locates these are behaved should be controlled by CSS.
2. I use Table layout correcting very convenient also, you use CSS not to compare me certainly efficiency is tall.
Individual situation or particular, say like you likely, with Table layout correcting very fast also. But this is not long-term plan, we need to see essence through the phenomenon, content of Web mark brigadier and expressional appearance come off, the thing that all styles, style, layout behaves etc comes out independently, by CSS or XSLT will be controlled alone, after such coming off, correcting just is true convenience. And ” correcting ” not be the correcting on the browser merely, same page if I need to be released to the mobile phone, the page that accords with Web standard needs to alter modal document only, and a need of Table layout is complete redo, if future still needs republication to arrive on network TV or on other new facility? The efficiency of CSS compares Table certainly tall.
3. Can you make handsome page with Web standard?
Because study with promotion the personage of Web standard is done at the beginning,the page is compared ” simple ” , because this causes everybody’s misunderstanding, think the page of Web standard is concise, of effect of small figure, light vision. Actually, with the page result that TABLE layout can achieve, basically also can come true with CSS. This problem does not need much explanation, look to built newly-built Web standard site domestic and internationally to be clear about. For example: Www.macromedia.com, Www.mp3.com
(4) . About the browser compatible
1. I do not need to care Web standard, IE has the market of 99% , it is OK that the page that I make wants IE to be able to look only.
“It is core with the user ” the archives arrow card that is the person that oppose Web level normally, actually this is hypocritical ” it is core with the user ” . You are unwarrantable IE is forestall browser market forever, you are unwarrantable also IE does not make any changes (in fact, the IE7 of Microsoft has begun to improve the supportive) of pair of Web standards. Holding to the page that makes with Html table layout will be ” dead ” information, no-go search, cannot put sb in a very important position and share, from long-term will tell, this ability is the greatest to the user harm.
2. Why is the page compatibility of Web standard bad?
It is good that we say the advantage of Web standard is compatibility, this compatible be after pointing to compatible, to new browser, new facility compatible. Right already for some browsers, because they are right the supportive level of Web standard is different, because this conference appears,different browser leaves page metabolic case. What we must use skill of a few “hack” to realize different browser is compatible. This is helpless, also be inevitable, it is a process that Web technology development should experience necessarily, it is we transfer to XML a difficulty that must overcome.
(5) . Other
1. Had done not have used development tool, want me handwritten code?
Yes. We suggest you are handwritten code, can promote you to understand Web criterion more deeply. In fact, software of a lot of development has begun to support Web level. You can see the Dreamweaver 8 of latest edition, still have the Golive of Adobe, the Visual Studio.NET 2005 of Microsoft, the supports Web standard page development with these already very good tools. When new technology appears, our manner should be to go understanding, practice and evaluate, is not blind object or its become sit back and wait, in that way you are laggard forever.
2. The boss does not understand, the client also does not have a requirement, why should I use Web level?
Below the case that perhaps develops a group to not be familiar with Web standard technology in oneself, new project uses Web standard to have a risk really (technology and cost risk) , after can be being evaluated, decide to whether use Web level again. But if capable to use a level still deceive boss and client, this attributes professional morality and the problem of the spirit that respect property.
3: Future and direction
I think you and I am same, the tomorrow that cares WEB can be how, below one round new technology heat is in what direction. Actually, want to answer this question, without who more authoritative than W3C. Should see W3C only what doing, studying what standard knows the trend of WEB and climate.
W3C tells us explicitly: The trend that XML is future is beyond question, open and share the spirit that is Internet and basic power.
Mu of the base of a fruit. Bei Na this - plum (Tim Berners-Lee) , w3C leader, the father of World-Wide-Web, respecting: XML provided the measure that information exchanges, but this just begins merely. The semantics that our target is Web is changed, namely: Make the information content on Web more easy understanding, more facilitating exchange and share, RDF and OWL language will provide more powerful support in this respect.
Web technology is about to receive new round change and develop, if you still need to learn Web standard in hesitation, so you will lose this chance.
