The first chapter the basics of web site development, web runtime configuration and code editing tools Introduction - the basics of web site development

First, the basics of web site development

(A), the client and server, front-end code and back-end code, web site background and foreground

    The client (Client) also called user terminal, refers to the corresponding end of the service, to provide local programs and services. For example, you have installed on your computer QQ software, micro-channel APP installed on the phone, in the bank's ATM machines and so on, are all clients.
    Server (Server), it refers to the client service that runs on the server, the data access provider and business logic. For example, you fill QQ number and password to log QQ, the actual process by which the client sends the login information to the server for authentication, sent back from the server data related information (such as profile, friends list) after the adoption. Once the server is stopped, then most of the features of the client are not working. This client (Client) + server (Server) mode of operation of the software, known as C / S mode. C / S mode software is widely used, such as online games, network communication software, mobile banking and so on.
    Popular terms to C / S mode or application software architecture, installed in the client application or software, that is, the client; running on the server, the client accepts the data processing procedures, that is the server.
    Browser (Browser) also belongs to the client. Open a Web browser to process is generally: the browser requesting access → URL of the request to be served after a series of parsing the URL (domain name) pointed to the server, the server performs arithmetic processing in accordance with the request, return code to return the distal end distal codes → to the browser, the browser parsing and processing front-end code, the final content described front-end code, including text, images, multimedia and so presented. This browser (Browser) client (Client) + server (Server) mode of operation of the software, known as B / S model. Now a growing number of C / S mode software redeveloped into a B / S model, such as the web version of OA (Office Online), the web version of CRM (customer relationship management system), the web version of the online game (page tour )Wait. In contrast, C / S mode installs the client software (such as QQ client 60M of the micro-channel APP 100M, 1.8G gaming client, etc.), if the operator of the client has been upgraded, the user need to upgrade client after normal use; and the program does not require the user B / S mode to install the client software, you can run directly up the browser and the operating side of the program is to upgrade the server upgrade, users do not need to upgrade update operating. B / S mode application procedures are increasingly being used as a web developer, there are many things you can do a lot of value can be achieved.
    In the B / S mode, also known as the front end of the front end of the code means running on the client, the client can be identified, the parsing and rendering the code, usually HTML + CSS + JavaScript code; refers to the rear end of the rear end code that runs on the server, usually refers to the programming language code or scripting language code used for the site, such as ASP code, PHP Code, .Net Code, JSP code. Browser only recognizes front-end code (HTML, CSS, JavaScript), does not recognize the back-end code (ASP, PHP, JSP, .NET ); after any back-end code to parse and after a series of operations in the server, are generated front-end code is returned to the browser. Code for computing such as a piece rear end: the accumulated value of 1 to 100 displayed on the browser from the actual interactively: open web browser to initiate an access request → → access request reaches the server running a server in accumulating the code-calculated → eventual return value "5050" to the browser → browser is responsible for displaying the value of it. Browser is not responsible for the back-end code can not execute the back-end code.
    Reception site is a collection of web pages for users to browse, such as a website business section of the station is "Home, About Us, News, the company's products, Feedback, Contact Us," all of these pages are the front page, collectively reception for the site. Website background refers to the front page of data content management system, platform, operating platform is available only to site managers to use (use with the administrator account and password). The website now rarely used pure static (.html or .htm) to develop, and more will be written using a programming language, and customized according to the foreground column has a corresponding management background, site administrator with the account number and password can be increased, modify, delete data in the foreground website content.

 

(B) the extension .html and .htm files on web pages

About .html pages and file extension .htm
Picture 1-1

    File extensions (filename extension), also known as the file extension, a mechanism to mark the file type is the operating system used. Such as "my resume .doc", after which point the number of "doc" is the file extension, which is representative of a word document, when we double-click the file, the operating system software after using the word on their own judgment to open this file; Another example is "my graduation photo .jpg", the file extension is "jpg", which is representative of a picture when we double-click the file, the operating system will judge for themselves using the photo viewer to open The document. Namely: the operating system is based on the file extension of the file to determine what type of file, which is what software to open it. When the operating system is not installed the appropriate software to open the correct file, double-click to open the file will prompt "Windows can not open this file", as (Figure 1-2):

Figure 1-2

    Static page file name extension is "html" or "htm". If the computer has a file called "personal home page .html", when we double-click it, the operating system will automatically use a browser to open this file because it is a web page file. Where "htm" This extension is a result of historical compatibility issues, earlier operating systems such as DOS, Windows 95, etc., to limit the extension of up to three characters, that is correct "html" extension is abbreviated as "htm". Now the operating system is not restricted natural, if we make static pages and save the file, it is recommended to save the "html" extension, it is more accurate representation page file type, and for non-Windows family of operating systems with better compatibility (such as Unix system).

    Supplementary knowledge: the same code on different operating systems, platforms, the produce identical results or effects, this difference is called "compatibility issues." The same front-end code pages in different browsers, produce identical results or effects, this difference is called "Compatible Pages." The root cause of the problem lies in web compatible: different versions of various browsers and browser understanding the same way front-end code is not uniform, the degree of compliance with W3C standards is not the same.


(C) the difference between static and dynamic web pages

    File static pages, dynamic pages as well as files in addition. Dynamic web page file depends on the programming or scripting language may be, the extension is different. For example, using a web ASP for the language, the file extension "asp"; (C #) NET file extension "aspx";. JSP file extension "jsp" or "do"; file extension for PHP to "php". When we browse the site, with the URL of the site you will be able to know what dynamic language development. For example: http: //www.taobao.com/index.php, this is a dynamic website using PHP language development.
    Tell a site is "static" that is about the site "does not use server-side web programming or scripting language", "dynamic" refers to "site uses a server-side web programming or scripting language", instead of saying pages on the site, there are moving pictures is "dynamic." Do not use server-side web programming or scripting language web site, the whole point of all pages by .html or .htm file constituted.
The first pages are static pages, if making a presentation class 40 student website, you need to make at least 41 pages, which is a home page, and the remaining 40 pages each page describes a student. So that when the need to upgrade the site to modify the time, the workload is very large, new transfer student coming in, you need to make a new page to introduce the student, and the need to modify the original 41 pages to add the new student page link . When it also requires a site maintenance personnel must have a basic knowledge of the site editor to modify or update the content of the website maintenance, heavily dependent on the developer's site.
    After the web programming or scripting language appeared to solve the many problems of static pages. Web programming or scripting language can connect to the database, access to classified data, so that the development and maintenance of separate sites: the site maintainer visit the website managed by the background data, change, delete, update site content to achieve maintenance (website management background, also known as website management system, also known as website management platform, developed by the site developer made according to the maintenance needs of the front page). Web programming or scripting language can perform complex calculations, which can help solve many problems in real life, business management and business development, to automate the management or business or semi-automated, such as: automatic solution multivariate equations many times, online shopping automatic calculation of shipping costs and commodity prices, online office, online check-in, inventory management. Written by web programming or scripting language page is called a dynamic page, the whole point is called a dynamic website.
    Since dynamic websites more advanced, it is not as dynamic website development to learn it? No, dynamic website development is based on a static website development, dynamic website development includes a static website development technology. Analogy, the first floor is a static website, dynamic website is the second floor, the second floor can not be skipped and the first floor alone. If the browser to access the site of the static page, the server will return to the browser front-end code (static pages inside all of the code is the front-end code), browser recognizes the front-end code and renders show up; if a browser to access the site dynamic page, code interpreter or program code execution on the server reads the code in the dynamic pages do a series of operations, and ultimately generate front-end code returned to the browser, the browser to identify and render displayed. That is: no matter how dynamic pages do complex computing, processing, and ultimately returned to the browser is always front-end code. Contain static pages and dynamic relationship between pages is as follows:

The difference between static and dynamic web pages
Figure 1-3

    Supplementary knowledge: Web programming languages ​​compiled by the site is divided into two modes, programming and scripting languages. The biggest difference between programming languages ​​and scripting languages ​​is that programs written in the programming language before executing the application requires a special compilation process. That program application written in a programming language mode of operation are: ① ② compile the code ③ run, "② compile" only need to perform it again and then, every run is executed "③ run." Mode application program running scripting languages ​​are: ① ② explain ③ run the code, each run is executed "② ③ explain the run." Therefore, any changes to the programming language code must be re-compiled again run to take effect, and the scripting language for any code changes can take effect immediately. Its operation principle, the scripting language code maintenance changes will be faster and easier; but the script language Because each run must explain once, in theory, will be worse in terms of speed and performance than programming languages. But reality is not necessarily so, scripting language computing speed depends largely on the speed of execution scripting language parser. Many scripting language interpreter written in C or C ++, and not much difference in speed and performance than the implementation of programming languages, and in some environmental conditions faster than computer programming language. Common programming languages ​​.NET, Java, C, C ++, a common scripting language JavaScript, ASP, PHP.

 

Released three original articles · won praise 0 · Views 13

Guess you like

Origin blog.csdn.net/klyz505/article/details/105339763