The document discusses web applications and how they work. It explains that web applications have programs running on servers that retrieve data from sensors or databases and dynamically generate web pages in response to user requests. It also covers common programming languages used to build web apps like PHP and ASP, and how technologies like AJAX allow for asynchronous JavaScript requests to update parts of pages without reloading.
WEB APPLICATION INTRODUCTION NCU CE MWNL Shaojung Lu (shaojung@gmail.com)
2.
Simple Type ofApplications Console Application Windows Application Web Application
3.
How Do aWeb Work Store many web pages in the server Request Response
4.
But How theScreen Work? Edit HTML Manual?? (Dreamweaver ? FrontPage ? Notepad or vi ?) Retrieve data from sensors and produce the page.
5.
How does thewebpage of Taipei Feitsui Reservoir Work? There is a program on the server. The program runs every ten minutes. When the program runs, it retrieves data from the sensors and produces the web page.
6.
How does theinteraction function on the web site work? 1. Request 3. Response 2.The program runs.
7.
More complicated ofthe web application system DB Server Web Server 2. Query Data 3. Retrieve Data 1. Request 4. Response
8.
More and morecomplicated of the web application system DB Server Web Server 2. Query Data 5. Retrieve Data Business Rules 3. Query Data 4. Retrieve Data 1. Request 6. Response
9.
Program Languages ofWeb Application CGI: Perl / C / C++ ASP: Active Server Pages – An Interpreter Language Using the code like Visual Basic Released in 1997 (With NT4.0 Release 3) PHP: Hypertext Preprocessor Released in 1995 Using the code like C It is hot now when using LAMP Linux, Apache, MySQL, PHP
Interpreter? Fast orSlow? ASP and PHP is all interpreter language. Java and .NET appears in the web application. Source Code Byte Code Virtual Machine or Framework Linux Windows Solaris Using Different VMs or Frameworks can run the same byte code file.
13.
CGI or ServerPage? Hard coding like CGI is hard to maintain the appearance of the web page. Using Server Page, artists can design the web page and save it to HTML. Programmers can modify the HTML into ASP or PHP. When the program is finish by using server page, it is hard to modify the visual design.
14.
MVC Architecture ModelController View Model: Manage the data Controller: Control Model and the view to present the data. View: The Template of display data
AJAX - AsynchronousJavaScript and XML 4. JavaScript Programs runs in your browser 8. JavaScript get the response and make the change on the page. 5. Sending XML from the JavaScript Code 7. XML response 1. Request 3. Response the page and JavaScript Programs 2.The program runs. 6. The server receive the XML request and response it
18.
AJAX – Howto write it? Using the component XMLHttpRequest To be the main component. Need to consider different Browser!! EVEN DIFFERENT Version of IE!!
19.
AJAX – UsingFramework Now! We can use jQuery in all Languages. ASP.NET AJAX.NET JAVA DWR PHP XAJAX
20.
Web Application Programmer…..You have to learn everything HTML A Web application Language JavaScript SQL Language AJAX Framework SEO – Search Engine Optimization