tailieunhanh - Developing Large Web Applications- P7
Developing Large Web Applications- P7:This book presents a number of techniques for applying established practices of good software engineering to web development—that is, development primarily using the disparate technologies of HTML, CSS, JavaScript, and server-side scripting languages. Whereas there are many books on how to use languages, how to use libraries, and how to approach software engineering, this is the first book to codify many of the techniques it presents. These techniques will make the components of your own web applications more reusable, maintainable, and reliable | Don t confuse the id attribute with the name attribute. In various form inputs the name attribute lets you give names to input values these names are passed along with the values for scripts on the server side. Conventions for Naming There are a lot of opinions about naming conventions for IDs classes and names but everyone can agree that establishing some sort of convention is important. In largescale HTML a good naming convention is key to modularity. One convention demonstrated earlier in Example 3-3 is to use short groups of three to six characters for naming . nwcrev is the ID for the New Car Reviews module . From here you can append other name segments of three or four characters to create further qualified names for use deeper within the module . nwcreveml for the id and name attributes of the email address text field . Using fully qualified names like this promotes modularity because you can be assured that anywhere you use this module its names will not conflict with those used by other modules. For example if you were to place the New Car Reviews module on a page with another module that also contained a similar form input field for an email address this naming convention would ensure that the inputs of the two modules would be passed to the server-side script with different names. Because using short augmentable name segments is compact and works well it s the convention that we employ throughout this book. That said the exact convention is not what is important here whatever conventions you prefer establishing a system of unique qualification that ensures modularity is the key. XHTML For quite some time HTML has implied HTML but browsers have been very forgiving of code that did not meet precisely with this specification. In fact many egregious transgressions are politely rendered by the browsers in a reasonably elegant way. That said this forgiving attitude by browsers has been a double-edged sword. On the one hand it plays an essential role
đang nạp các trang xem trước