A web front-end Development Specification course introduction and practical significance
1.1 Course Brief
This is a must-have program for front-end programmers to help you make less detours, efficient, and high-quality development tasks in Web development
1.2 Practical significance
Improve the team's ability to collaborate
Increase the reuse rate of code
Can write higher quality, more efficient code
Provide better support for post-maintenance
Naming rules for two HTML
2.1 File name naming rules
Unify the combination of lowercase letters, numbers, and underscores, and must not contain man spaces and special characters
The principle of 2.1.1 naming
Easy to understand
Makes it easy for you and each member of your team to understand the meaning of each document
Easy to find
When we use in the folder? Sort by name? command, the same large class of files can be arranged together so that we find, modify, replace, calculate the amount of load and so on operations
2.2 Index file naming principles
Index.htm
Index.html
Index.asp
Index.aspx
index.jsp
index.php
2.3 Principles of naming each sub-page
2.3.1 The English name of the unified translation
Index
Product
Newslist
AboutUs
2.3.2 Unified Pinyin Naming
2.3.3 Note: Do not mix with English pinyin
2.3.4 Common sub-pages
About Us \aboutus.html
Feedback \feedback.html
Product \product.html
News list \news.html
Development history \history.html
Contact Us \linkus.html
Naming rules for three pictures
3.1 The name of the picture is divided into the head and tail, separated by an underscore, the first part of the picture is a large class of properties, such as: ads, logos, menus, buttons and so on
3.2 General naming
3.2.1 placed in the top of the page ads, decorative patterns and other rectangular image named: Banner
3.2.2 's iconic image is named: Logo
3.2.3 The page position is not fixed and a small picture with a link we name: button
3.2.4 on the page in a continuous appearance, the same nature of the link column picture we named: Menu
3.2.5 Decorative Photos We name: pic
3.2.6 without a link to represent the title of the picture we name: Title
3.3 Example
Banner_sohu.gif
Banner_sina.gif
Menu_aboutus.gif
Menu_job.gif
Title_news.gif
Logo_police.gif
Logo_national.gif
Pic_people.jpg
Four script files and dynamic file naming conventions
4.1 General English lowercase abbreviations with scripting features
4.1.1 Actual Module
For example: The JavaScript file named Ad.js Pop-up window for the ad strip is named Pop.js
4.1.2 Common Module
JS file name: English name, suffix. js. Common Common.js.basic.js
4.1.3 External Resources
Jquery.min.js
Jquery.validate.js
Jquery.date.js
4.2 Dynamic Language file naming principles: see names and know-how
4.2.1 described by nature, the description can have multiple words, separated by "_", the nature is generally the summary of the page
Example: register_form.aspx
Register_post.aspx
Topic_lock.aspx
4.2.2 between different modules, you can use different prefixes to differentiate
Five File storage location specification
5.1 Folder description
Flash store Flash files
Images storing picture files
inc Storage Include files
Library Storage DW Library file
Media Storage for multimedia files
Script to store JavaScript scripts
CSS to store CSS files
5.2 Site Page Location store
5.2.1 Client
Web
Site root directory
5.2.2 Server-side
Admin
Web Front end 1