What’s the difference between
Web page
Web site
Web application
Web site is a collection of web page, application is something has logic determine what you get.
Web Application Architecture
Web Server
Manages requests and responses//It’s are about pages
Application Server
Application logic / data processing
Database Server
Data storage and manipulation
Client – Web App Interaction
the security we usually do on database server.
Server Side Technologies
Common Gateway Interface (CGI)
Very flexible
Application can be written in any language
Doesn’t scale well
PHP(&python)
Hypertext pre-processor
Embedded in HTML documents
Server plug-in
Scales well
write application in web page. every time request come in, it has run over.
Ruby on Rails
Pattern focussed reuse
MVC, JSON, XML
Doesn’t scale well
Rails is a framework of ruby.
Java
Servlets & JSP
Sophisticated
Java and servlet tools and frameworks
Portable
Runs in a servlet container on server
All web servers support technology
Scales well
seemly to php(php stolen), selrvlet can do a lot.
.NET
Very similar to servlets & JSP (ASP.NET)
Best support on IIS
should run on Microsoft server
JavaScript
AngularJS, Ember.js, …
jsp is complicate but useful.
php is simplify, easy to use, release server, effective for application.
Uniform Resource Locators
URL/URI
Uniform Resource Locator / Identifier
Uniform Resource Locator / Identifier
scheme:[//[user:password@]host[:port]][/]path[?query][#fragment]
HTTP Request Headers
Accept
Indicates MIME types browser can handle
Can send different content to different clients. For example, PNG files have good compression but are not widely supported in browsers. Could check to see if PNG is supported, sending
<IMG SRC="picture.png" ...> if it is supported, and <IMG SRC="picture.gif" ...> if not.
Warning: IE incorrectly sets this header when you hit the Refresh button. It sets it correctly on original request.
Accept-Encoding
Indicates encodings (e.g. gzip or compress) browser can handle.
Connection
In HTTP 1.0, keep-alive means browser can handle persistent connection. In HTTP 1.1, persistent connection is default. Persistent connections mean that the server can reuse the same socket for requests very close together from the same client (e.g. images associated with a page, or cells within a framed page).
Servlets can’t do this unilaterally
Give server enough info to permit persistent connections
Set Content-Length with setContentLength
using ByteArrayOutputStream to determine length of output
Cookie
Gives cookies previously sent to client.
本文详细阐述了网页、网站和Web应用的区别,并介绍了Web应用架构的组成部分,包括Web服务器、应用服务器和数据库服务器的工作原理。此外,还对比了几种常用的服务器端技术,如CGI、PHP、Ruby on Rails、Java (Servlets & JSP) 和 .NET 的特点及适用场景。
427

被折叠的 条评论
为什么被折叠?



