版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、Jsp 、MySQL和 B/S 模式簡介1 Jsp 簡介1.1什么是 Java Server Pages?JSP全稱 Java Server Pages ,是一種動(dòng)態(tài)網(wǎng)頁開發(fā)技術(shù)。它使用JSP標(biāo)簽在 HTML網(wǎng)頁中插入 Java 代碼。標(biāo)簽通常以 結(jié)束。JSP是一種 Java servlet,主要用于實(shí)現(xiàn)Java web 應(yīng)用程序的用戶界面部分。網(wǎng)頁開發(fā)者們通過結(jié)合HTML代碼、 XHTML代碼、 XML元素以及嵌入 JSP操作和命令來編寫JSP。JSP通過網(wǎng)頁表單獲取用戶輸入數(shù)據(jù)、訪問數(shù)據(jù)庫及其他數(shù)據(jù)源,然后動(dòng)態(tài)地創(chuàng)建網(wǎng)頁。JSP標(biāo)簽有多種功能,比如訪問數(shù)據(jù)庫、記錄用戶選擇信息、訪問Java
2、Beans 組件等,還可以在不同的網(wǎng)頁中傳遞控制信息和共享信息。1.2為什么使用 JSP?JSP程序與 CGI 程序有著相似的功能,但和CGI 程序相比, JSP程序有如下優(yōu)勢(shì):(1)性能更加優(yōu)越,因?yàn)?JSP可以直接在 HTML網(wǎng)頁中動(dòng)態(tài)嵌入元素而不需要單獨(dú)引用 CGI 文件。(2)服務(wù)器調(diào)用的是已經(jīng)編譯好的JSP文件,而不像 CGI/Perl 那樣必須先載入解釋器和目標(biāo)腳本。(3)JSP 基于 Java Servlet API,因此, JSP擁有各種強(qiáng)大的企業(yè)級(jí)Java API ,包括 JDBC,JNDI,EJB, JAXP等等。(4)JSP 頁面可以與處理業(yè)務(wù)邏輯的 Servlet 一起
3、使用,這種模式被 Java servlet 模板引擎所支持。最后, JSP是 Java EE 不可或缺的一部分,是一個(gè)完整的企業(yè)級(jí)應(yīng)用平臺(tái)。這意味著 JSP可以用最簡單的方式來實(shí)現(xiàn)最復(fù)雜的應(yīng)用。1.3 JSP 的優(yōu)勢(shì)以下列出了使用JSP帶來的其他好處:(1)與 ASP相比: JSP 有兩大優(yōu)勢(shì)。首先,動(dòng)態(tài)部分用Java 編寫,而不是 VB或其他 MS專用語言,所以更加強(qiáng)大與易用。第二點(diǎn)就是JSP易于移植到非 MS平臺(tái)上。(2)與純 Servlet相比: JSP可以很方便的編寫或者修改HTML網(wǎng)頁而不用去面對(duì)大量的 println語句。(3)與 SSI 相比: SSI 無法使用表單數(shù)據(jù)、無法進(jìn)行
4、數(shù)據(jù)庫鏈接。(4)與 JavaScript 相比:雖然 JavaScript 可以在客戶端動(dòng)態(tài)生成 HTML,但是很難與服務(wù)器交互,因此不能提供復(fù)雜的服務(wù),比如訪問數(shù)據(jù)庫和圖像處理等等。(5)與靜態(tài) HTML相比:靜態(tài) HTML不包含動(dòng)態(tài)信息。2.MySQL簡介2.1 簡介: MySQL是最流行的開放源碼SQL數(shù)據(jù)庫管理系統(tǒng),它是由MySQL AB公司開發(fā)、發(fā)布并支持的。MySQL AB是由多名 MySQL開發(fā)人創(chuàng)辦的一家商業(yè)公司。它是一家第二代開放源碼公司,結(jié)合了開放源碼價(jià)值取向、方法和成功的商業(yè)模型。是一種數(shù)據(jù)庫管理系統(tǒng)數(shù)據(jù)庫是數(shù)據(jù)的結(jié)構(gòu)化集合。它可以是任何東西,從簡單的購物清單到畫展,或
5、企業(yè)網(wǎng)絡(luò)中的海量信息。要想將數(shù)據(jù)添加到數(shù)據(jù)庫,或訪問、處理計(jì)算機(jī)數(shù)據(jù)庫中保存的數(shù)據(jù),需要使用數(shù)據(jù)庫管理系統(tǒng),如 MySQL服務(wù)器。計(jì)算機(jī)是處理大量數(shù)據(jù)的理想工具,因此,數(shù)據(jù)庫管理系統(tǒng)在計(jì)算方面扮演著關(guān)鍵的中心角色,或是作為獨(dú)立的實(shí)用工具,或是作為其他應(yīng)用程序的組成部分。是一種關(guān)聯(lián)數(shù)據(jù)庫管理系統(tǒng)關(guān)聯(lián)數(shù)據(jù)庫將數(shù)據(jù)保存在不同的表中,而不是將所有數(shù)據(jù)放在一個(gè)大的倉庫內(nèi)。這樣就增加了速度并提高了靈活性。MySQL的 SQL指得是“結(jié)構(gòu)化查詢語言”。SQL是用于訪問數(shù)據(jù)庫的最常用標(biāo)準(zhǔn)化語言,它是由ANSI/ISO SQL 標(biāo)準(zhǔn)定義的。 SQL標(biāo)準(zhǔn)自 1986年以來不斷演化發(fā)展,有數(shù)種版本。在本手冊(cè)中,“S
6、QL-92”指得是 1992 年發(fā)布的標(biāo)準(zhǔn),“ SQL:1999”指得是 1999 年發(fā)布的標(biāo)準(zhǔn),“ SQL:2003”指得是標(biāo)準(zhǔn)的當(dāng)前版本。我們采用術(shù)語“ SQL標(biāo)準(zhǔn)”標(biāo)示 SQL標(biāo)準(zhǔn)的當(dāng)前版本軟件是一種開放源碼軟件“開放源碼”意味著任何人都能使用和改變軟件。任何人都能從 Internet 下載MySQL軟件,而無需支付任何費(fèi)用。如果愿意,你可以研究源碼并進(jìn)行恰當(dāng)?shù)母?,以滿足你自己的需求。 MySQL軟件采用了 GPL(GNU通用公共許可證),定義了在不同情況下可以用軟件作的事和不可作的事。數(shù)據(jù)庫服務(wù)器具有快速、可靠和易于使用的特點(diǎn)如果它正是你所尋找的,不妨一試。MySQL服務(wù)器還有一套實(shí)
7、用的特性集合,這些特性是通過與我們用戶的密切合作而開發(fā)的。在我們的基準(zhǔn)測(cè)試主頁上,給出了 MySQL 服務(wù)器和其他數(shù)據(jù)庫管理器的比較結(jié)果。MySQL服務(wù)器最初是為處理大型數(shù)據(jù)庫而開發(fā)的,與已有的解決方案相比,它的速度更快,多年以來,它已成功用于眾多要求很高的生產(chǎn)環(huán)境。盡管MySQL始終在不斷發(fā)展,但目前 MySQL服務(wù)器已能提供豐富和有用的功能。它具有良好的連通性、速度和安全性,這使的MySQL十分適合于訪問Internet上的數(shù)據(jù)庫服務(wù)器工作在客戶端 / 服務(wù)器模式下,或嵌入式系統(tǒng)中MySQL數(shù)據(jù)庫軟件是一種客戶端/ 服務(wù)器系統(tǒng),由支持不同后端的1 個(gè)多線程 SQL服務(wù)器,數(shù)種不同的客戶端程
8、序和庫,眾多管理工具和廣泛的應(yīng)用編程接口API 組成。我們還能以嵌入式多線程庫的形式提供MySQL服務(wù)器,你可以將其鏈接到你的應(yīng)用程序,從而獲得更小、更快、和更易管理的產(chǎn)品2.2 什么是 MySql?一個(gè)小型關(guān)系型數(shù)據(jù)庫管理系統(tǒng), 目前被廣泛應(yīng)用在Internate上的小型網(wǎng)站中 .有什么特點(diǎn) ?體積小、速度快、總體擁有成本低、開放源代碼、性能快捷、優(yōu)化 SQL 語言、容易使用、多線程和可靠性、多用戶支持、可移植性和開放源代碼、遵守國際標(biāo)準(zhǔn)和國際化支持、為多種編程語言提供 API2.3 不足之處不能直接處理 XML數(shù)據(jù)、不能提供任何OLAP(實(shí)時(shí)分析系統(tǒng) ) 功能B/S 模式簡介B/S 結(jié)構(gòu)
9、(Browser/Server,瀏覽器 / 服務(wù)器模式 ) ,是 WEB興起后的一種網(wǎng)絡(luò)結(jié)構(gòu)模式, WEB瀏覽器是客戶端最主要的應(yīng)用軟件。這種模式統(tǒng)一了客戶端,將系統(tǒng)功能實(shí)現(xiàn)的核心部分集中到服務(wù)器上,簡化了系統(tǒng)的開發(fā)、維護(hù)和使用??蛻魴C(jī)上只要安裝一個(gè)瀏覽器,如 Netscape Navigator 或 Internet Explorer ,服務(wù)器安裝 SQL Server 、 Oracle 、 MYSQL等數(shù)據(jù)庫。瀏覽器通過 Web Server 同數(shù)據(jù)庫進(jìn)行數(shù)據(jù)交互。3.1 主要作用B/S 最大的優(yōu)點(diǎn)就是可以在任何地方進(jìn)行操作而不用安裝任何專門的軟件,只要有一臺(tái)能上網(wǎng)的電腦就能使用,客戶端零
10、安裝、零維護(hù)。系統(tǒng)的擴(kuò)展非常容易。B/S 結(jié)構(gòu)的使用越來越多,特別是由需求推動(dòng)了AJAX技術(shù)的發(fā)展,它的程序也能在客戶端電腦上進(jìn)行部分處理,從而大大的減輕了服務(wù)器的負(fù)擔(dān);并增加了交互性,能進(jìn)行局部實(shí)時(shí)刷新。3.2 架構(gòu)軟件(1)維護(hù)和升級(jí)方式簡單。當(dāng)前,軟件系統(tǒng)的改進(jìn)和升級(jí)越發(fā)頻繁,B/S 架構(gòu)的產(chǎn)品明顯體現(xiàn)著更為方便的特性。對(duì)一個(gè)稍微大一點(diǎn)單位來說,系統(tǒng)管理人員如果需要在幾百甚至上千部電腦之間來回奔跑,效率和工作量是可想而知的,但B/S 架構(gòu)的軟件只需要管理服務(wù)器就行了,所有的客戶端只是瀏覽器,根本不需要做任何的維護(hù)。無論用戶的規(guī)模有多大,有多少分支機(jī)構(gòu)都不會(huì)增加任何維護(hù)升級(jí)的工作量,所有的
11、操作只需要針對(duì)服務(wù)器進(jìn)行;如果是異地,只需要把服務(wù)器連接專網(wǎng)即可,實(shí)現(xiàn)遠(yuǎn)程維護(hù)、升級(jí)和共享。所以客戶機(jī)越來越“瘦”,而服務(wù)器越來越“胖”是將來信息化發(fā)展的主流方向。今后,軟件升級(jí)和維護(hù)會(huì)越來越容易,而使用起來會(huì)越來越簡單,這對(duì)用戶人力、物力、時(shí)間、費(fèi)用的節(jié)省是顯而易見的,驚人的。因此,維護(hù)和升級(jí)革命的方式是“瘦”客戶機(jī),“胖”服務(wù)器。(2)成本降低,選擇更多。大家都知道 windows 在桌面電腦上幾乎一統(tǒng)天下,瀏覽器成為了標(biāo)準(zhǔn)配置,但在服務(wù)器操作系統(tǒng)上 windows 并不是處于絕對(duì)的統(tǒng)治地位。 當(dāng)前的趨勢(shì)是凡使用 B/S 架構(gòu)的應(yīng)用管理軟件,只需安裝在 Linux 服務(wù)器上即可,而且安全性
12、高。所以服務(wù)器操作系統(tǒng)的選擇是很多的,不管選用那種操作系統(tǒng)都可以讓大部分人使用 windows 作為桌面操作系統(tǒng)電腦不受影響,這就使得最流行免費(fèi)的Linux 操作系統(tǒng)快速發(fā)展起來, Linux 除了操作系統(tǒng)是免費(fèi)的以外,連數(shù)據(jù)庫也是免費(fèi)的,這種選擇非常盛行。比如說很多人每天上“新浪”網(wǎng),只要安裝了瀏覽器就可以了,并不需要了解“新浪”的服務(wù)器用的是什么操作系統(tǒng),而事實(shí)上大部分網(wǎng)站確實(shí)沒有使用 windows 操作系統(tǒng),但用戶的電腦本身安裝的大部分是 windows 操作系統(tǒng)。(3)應(yīng)用服務(wù)器運(yùn)行數(shù)據(jù)負(fù)荷較重。由于B/S 架構(gòu)管理軟件只安裝在服務(wù)器端( Server )上,網(wǎng)絡(luò)管理人員只需要管理服
13、務(wù)器就行了,用戶界面主要事務(wù)邏輯在服務(wù)器( Server )端完全通過 WWW瀏覽器實(shí)現(xiàn),極少部分事務(wù)邏輯在前端(Browser )實(shí)現(xiàn),所有的客戶端只有瀏覽器,網(wǎng)絡(luò)管理人員只需要做硬件維護(hù)。但是,應(yīng)用服務(wù)器運(yùn)行數(shù)據(jù)負(fù)荷較重,一旦發(fā)生服務(wù)器“崩潰”等問題,后果不堪設(shè)想。因此,許多單位都備有數(shù)據(jù)庫存儲(chǔ)服務(wù)器,以防萬一。Introduction to Jsp, MySQL, and B/S mode.1 introduction of Jsp1.1 what is Java Server Pages?JSP full name Java Server Pages is a dynamic web
14、development technology. It USES JSP tags to insert Java code into HTML pages. Tags usually end with %.JSP is a Java servlet that is used primarily to implement the user interface portion of a Java web application. Web developers write JSPS by combining HTML code, XHTML code, XML elements, and embedd
15、ed JSP operations and commands.The JSP gets the user input data, accesses the database, and other data sources through the web form, and then dynamically creates the web page.JSP tags have multiple functions, such as access to a database, record user selection information, access to JavaBeans compon
16、ents, etc., and can also pass control information and share information on different web pages.1.2 why use JSP?JSP programs have similar functionality to CGI programs, but compared to CGI programs,JSP programs have the following advantages:performance is superior, because JSPS can embed elements dir
17、ectly in HTML pages without needing to reference CGI files separately.the server calls a compiled JSP file, unlike CGI/Perl, which must first load the interpreter and target script.JSP is based on the Java Servlet API, so JSP has a variety of powerful enterprise Java apis, including JDBC, JNDI, EJB,
18、 JAXP, and so on.JSP pages can be used with servlets that process business logic, supported by the Java Servlet template engine.Finally, JSP is an integral part of Java EE and a complete enterprise application platform. This means that JSPS can implement the most complex applications in the simplest
19、 possible way.1.3 advantages of JSPOther benefits of using JSP are listed below:compared with ASP, JSP has two advantages. First, the dynamic part is written in Java rather than VB or other MS specific languages, so it is more powerful and easy to use. The second point is that the JSP is easily port
20、ed to a non-ms pared to pure servlets: JSPS can easily write or modify HTML pages without having to face a large number of println pared with SSI: the SSI cannot use form data and cannot link to the pared with JavaScript: although JavaScript can dynamically generated HTML on the client, but its hard
21、 to interact with the server, so you cant provide complex services, such as database access and image processing, and so pared to static HTML: static HTML does not contain dynamic information.Introduction of MySQLIntroduction: MySQL is the most popular open source SQL database management system, dev
22、eloped, released and supported by MySQL AB. MySQL AB is a commercial company founded by a number of MySQL developers. It is a second generation open source company, combined with open source value orientation, methodology and successful business models.A database is a structured collection of data.
23、It can be anything from a simple shopping list to an art show, or a huge amount of information in an enterprise network. To add data to a database, or to access and process data stored in a computer database, you need to use a database management system, such as a MySQL server. The computer is a ide
24、al tool of dealing with the large amounts of data, as a result, the database management system in the center of the computing plays a key role, or as a stand-alone utility, or as part of other applications.Relational databases store data in different tables, rather than putting all the data in a lar
25、ge warehouse. This increases speed and improves flexibility. MySQLs SQL refers to structured query language. SQL is the most common standardized language for accessing databases, which is defined by the ANSI/ISO SQL standard. SQL standards have been evolving since 1986, with several versions. In thi
26、s manual, sql-92 refers to the standard issued in 1992.SQL:1999 refers to the standard issued in 1999, and SQL:2003 refers to the current version of the standard. We use the term SQL standard to indicate the current version of the SQL standard.If its what youre looking for, try it. The MySQL server
27、also has a set of useful features that are developed through close collaboration with our users. On our benchmark home page, we gave a comparison of the MySQL server and other database managers.MySQL server was initially developed for dealing with large databases, compared with the existing solution
28、s, it is faster, over the years, it has been successfully used in many demanding production environment. Although MySQL is always evolving, the current MySQL server can provide rich and useful functionality. It has good connectivity, speed, and security, which makes MySQL very suitable for accessing
29、 databases on the Internet.The MySQL database software is a client/server system, by various backend support a multi-threaded SQL server, several different client programs and libraries, many management tools and extensive application programming interface (API.We can also provide MySQL servers in t
30、he form of embedded multithreaded libraries, which you can link to your application to get smaller, faster, and more manageable products.2.2 what is MySql?A small relational database management system is now widely used in small web sites on Internate.What are the characteristics? Small volume, quic
31、k speed, low total cost of ownership, open source, fast performance, optimization of SQL language, easy to use, multithreading and reliability, multi-user support, portability, and open source, comply with the international standard and international support, provide apis for a variety of programmin
32、g languages2.3 shortcomingsXML data cannot be processed directly and no OLAP(real-time analysis system) function is available.3. Introduction of B/S mode.B/S structure (Browser/Server, Browser/Server mode) is a network structure mode after the rise of the WEB, and the WEB Browser is the main applica
33、tion software of the client. This pattern unifies the client and centralizes the core of the system functionality implementation to the server, simplifying the development, maintenance, and use of the system. On the client, just install a browser, such as Netscape Navigator or Internet Explorer, and
34、 the Server installs SQL Server, Oracle, MYSQL, and other databases. The browser interacts with the database through Web Server.3.1 main functionsThe biggest advantage of B/S is that it can be operated anywhere without installing any special software. As long as there is a computer that can access t
35、he Internet, it can be used, and the client has zero installation and zero maintenance. The expansion of the system is very easy.B/S structure of the use of more and more, especially by the demand to promote the development of AJAX technology and its application can also be conducted on the client c
36、omputer parts processing, thus greatly reduce the burden of the server; It also increases interactivity and can be refreshed locally and in real time.3.2 architecture softwaresimple maintenance and upgrading. At present, the improvement and upgrade of software system is more and more frequent, and t
37、he product of B/S architecture clearly shows more convenient features. For a slightly larger unit, the system management staff if you need to run back and forth between the hundreds, even thousands of computers, efficiency and the workload is predictable, but the B/S structure software just need the
38、 management server, all clients just browser, dont need to do any maintenance. No matter how large the user is, how many branches will not increase the workload of any maintenance upgrade, all operations need to be done only for the server; If it is a remote location, you can only connect the server
39、 to the special network to achieve remote maintenance, upgrade and sharing. Therefore, the client is becoming thin, and the server is becoming more and more fat, which is the main direction of informationization development in the future. In the future, software upgrades and maintenance will become
40、easier and easier to use, and the savings on user manpower, material resources, time, and expenses are obvious and surprising. Therefore, the way to maintain and upgrade the revolution is thin client, fat server.lower cost and more choice. Everyone knows that Windows is almost universal on desktop computers, and browsers are standard, but Windows is not absolute dominance on the server operating system. The current trend is to use the B/S architecture for application management software that is only installed on the Linux server and is highly secure.
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年中國通信建設(shè)集團(tuán)有限公司招聘筆試參考題庫含答案解析
- 2025年浙江余杭交通集團(tuán)有限公司招聘筆試參考題庫含答案解析
- 2025年遼寧沈陽市法庫經(jīng)濟(jì)開發(fā)區(qū)管理委員會(huì)公司招聘筆試參考題庫附帶答案詳解
- 2025年度先進(jìn)模具開模及后續(xù)加工服務(wù)合同書4篇
- 2025年數(shù)據(jù)庫遷移與同步服務(wù)合同3篇
- 漳州理工職業(yè)學(xué)院《數(shù)據(jù)庫原理與應(yīng)用》2023-2024學(xué)年第一學(xué)期期末試卷
- 二零二五年度蜜蜂養(yǎng)殖基地環(huán)境監(jiān)測(cè)與改善合同3篇
- 湛江科技學(xué)院《數(shù)據(jù)庫技術(shù)及應(yīng)用實(shí)驗(yàn)》2023-2024學(xué)年第一學(xué)期期末試卷
- 運(yùn)城學(xué)院《電子商務(wù)應(yīng)用》2023-2024學(xué)年第一學(xué)期期末試卷
- 二零二五版特色餐飲品牌加盟合同規(guī)范文本3篇
- 人教版(2025新版)七年級(jí)下冊(cè)英語:寒假課內(nèi)預(yù)習(xí)重點(diǎn)知識(shí)默寫練習(xí)
- 藝術(shù)品捐贈(zèng)協(xié)議
- 【公開課】同一直線上二力的合成+課件+2024-2025學(xué)年+人教版(2024)初中物理八年級(jí)下冊(cè)+
- 高職組全國職業(yè)院校技能大賽(嬰幼兒照護(hù)賽項(xiàng))備賽試題庫(含答案)
- 2024年公安部直屬事業(yè)單位招聘筆試參考題庫附帶答案詳解
- NB-T 47013.15-2021 承壓設(shè)備無損檢測(cè) 第15部分:相控陣超聲檢測(cè)
- 10KV供配電工程施工組織設(shè)計(jì)
- 終端攔截攻略
- 藥物外滲處理及預(yù)防【病房護(hù)士安全警示教育培訓(xùn)課件】--ppt課件
- 紙箱檢驗(yàn)標(biāo)準(zhǔn)新
評(píng)論
0/150
提交評(píng)論