lecture3

lecture3 - CSE 135 Server Side Web Languages Lecture 3...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 135 Server Side Web Languages Lecture # 3 Server-Side Web Programming Intro Friday, August 6, 2010
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
CSE 135 Server Side Web Languages Lecture # 3 To make a Web server based “program” You have to get data in (from user-agent to server) Then process the data, perform some task, etc. You have get data out (from server to user-agent) Input: <form> data, URLs, HTTP headers (browser type, IP, cookie, etc.) Output: Some form of data usually HTTP, GIF, JPEG, etc. and the appropriate header (MIME type ,cookie, etc.) You will need to fix the stateless nature of HTTP to do anything meaningful Sessionization via cookies, URLs, hidden fields, etc. You should provide features to make programming easy not only do the previous things simply but allow for access to DBs, output HTML and Web site widgets, etc. Friday, August 6, 2010
Background image of page 2
CSE 135 Server Side Web Languages Lecture # 3 Redux -3 Server-Side Programming Models • Revisit this again because it is that important – there are just 3 models at play here really – #1) Classic CGI model – “fork and exec” • Web server creates new child process, passing it request data as environment variables • CGI script issues response using standard I/O stream mechanisms – #2) Server API model • Web server runs additional request handling code inside its own process space – #3) Web application frameworks • Web server calls API application, which may manage request within its own pool of resources and using its native objects Friday, August 6, 2010
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
CSE 135 Server Side Web Languages Lecture # 3 3 Server-Side Programming Models Redux Classic CGI “fork and exec” Server API running inside Web server’s address space Web application framework running inside Web server process but managing its own pool of resources via IPC Friday, August 6, 2010
Background image of page 4
CSE 135 Server Side Web Languages Lecture # 3 3 Server-Side Programming Models • Each model has its pros and cons Classic CGI model • Pro: isolation means easiest in principle to secure, least damaging if something goes wrong Server API model • Con: hard to write; blows up server if done wrong Web application frameworks • Pro: ideally combines efficiency of API model with safety of CGI; adds helpful encapsulation of routine tasks like state management • Con: built-in tools can be resource hogs in wrong hands; ease of use may encourage carelessness Friday, August 6, 2010
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Server Side Web Languages Lecture # 3 3 Server-Side Programming Models • Many examples of each – Classic CGI • Scripts written in Perl • Programs written in C – Server API • Apache modules • ISAPI filters and extensions – Web application frameworks • All descended from Server Side Includes (SSI), original “parsed HTML” solution that allowed interspersing of executable code with markup • ASP, ASP.NET, Cold Fusion, JSP/Servlets, Python, PHP, etc. Friday, August 6, 2010
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 22

lecture3 - CSE 135 Server Side Web Languages Lecture 3...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online