Approaches To Web Development - East Tennessee State University

1y ago
12 Views
2 Downloads
507.42 KB
18 Pages
Last View : Today
Last Download : 3m ago
Upload by : Emanuel Batten
Transcription

Approaches to Web Application Development CSCI3110 Department of Computing, ETSU Jeff Roach

Web Application Approaches and Frameworks Scripting (or Programmatic) Approaches Template Approaches Hybrid Approaches Frameworks

Programmatic Approaches The page is generated primarily from code written in a scripting language or a high level language.

Example: Perl #!/usr/bin/perl @months qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); @weekDays qw(Sun Mon Tue Wed Thu Fri Sat Sun); ( second, minute, hour, dayOfMonth, month, yearOffset, dayOfWeek, dayOfYear, daylightSavings) localtime(); year 1900 yearOffset; theTime " weekDays[ dayOfWeek] months[ month] dayOfMonth, year"; print "Content-type: text/html\n\n"; print HTML; html head title A Simple Perl CGI /title /head body h1 A Simple Perl CGI /h1 p theTime /p /body HTML exit;

Example: Java Servlet import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class HelloWWW extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out response.getWriter(); out.println(" !DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " "Transitional//EN\" \n" " HTML \n" " HEAD TITLE Hello WWW /TITLE /HEAD \n" " BODY \n" " H1 Hello WWW /H1 \n" " /BODY /HTML "); } }

Template Approaches Utilize a source object (the template) that focuses on formatting with a limited set of embedded programming constructs

Example: Apache Velocity html body Hello customer.Name! table #foreach( mud in mudsOnSpecial ) #if ( customer.hasPurchased( mud) ) tr td flogger.getPromo( mud ) /td /tr #end #end /table /body /html

Hybrid Approaches Combine both programmatic and template approaches

Example: ASP !DOCTYPE html html body form action "demo reqquery.asp" method "get" Your name: input type "text" name "fname" size "20" / input type "submit" value "Submit" / /form % dim fname fname Request.QueryString("fname") If fname "" Then Response.Write("Hello " & fname & "! br ") Response.Write("How are you today?") End If % /body /html

Example: JSP html head title First JSP /title /head body % double num Math.random(); if (num 0.95) { % h2 You'll have a luck day! /h2 p ( % num % ) /p % } else { % h2 Well, life goes on . /h2 p ( % num % ) /p % } % a href " % request.getRequestURI() % " h3 Try Again /h3 /a /body /html

Frameworks Allow the principle of separating content from presentation

MVC

MVC Pattern Model-View-Controller Architectural Design Pattern Separation of presentation from the data domain

MVC Benefits Increased flexibility Improved maintainability Improved testability

Model The data domain Stores data elements and how to process them Notifies its associated views when there is a change of state E.g. – Meal cost data Breakfast Lunch Dinner 7 11 5

View Visual representation of the model Notifies controller of user commands E.g. – A pie chart view – A bar chart view – A line chart view Breakfast Lunch Dinner 12 12 10 10 8 8 6 6 Series1 4 Series1 4 2 2 0 0 Breakfast Lunch Dinner Breakfast Lunch Dinner

Controller Represents the interface between the user of the system and the system itself It chooses the appropriate views depending on commands issued by the user of the system It also tells the model when to update the model’s state

MVC Summary Diagram Controller The user commands! You’ve changed I choose you Model I changed! View Events Messages Give me some information

Approaches to Web Application Development CSCI3110 Department of Computing, ETSU Jeff Roach . Web Application Approaches and Frameworks Scripting (or Programmatic) Approaches Template Approaches Hybrid Approaches Frameworks . Programmatic Approaches The page is generated primarily from code

Related Documents:

janus et cie waterworks safavieh l e xin g t on a venu e t h ir d a venu e s e c on d a v e nu e east 55th street east 5th street east 5th street east 5th street east 59th street east th street east d street east d street east s t street tutenkian artisan carpets the catholic center of an a sa tvern

work/products (Beading, Candles, Carving, Food Products, Soap, Weaving, etc.) ⃝I understand that if my work contains Indigenous visual representation that it is a reflection of the Indigenous culture of my native region. ⃝To the best of my knowledge, my work/products fall within Craft Council standards and expectations with respect to

Board of Education/Charter School Absecon Bd of Ed Alexandria Twp Bd of Ed Allamuchy Bd of Ed . East Amwell Bd of Ed East Brunswick Twp Bd of Ed East Greenwich Bd of Ed East Hanover Twp Bd of Ed East Newark Bd of Ed East Orange Bd of Ed East Ruthe

sam rayburn lake rayburn east 14,624 13,072 san augustine first east 16,342 15,224 san augustine mcmahan chapeleast 1,020 3,447 shelbyville east 5,617 4,939 stockman east na na tatum east 5,299 6,729 tenaha first east 2,982 2,920 timpson east 4,910 4,805 trinity firs

Common Microsoft FrontPage tasks Work with and manage Web pages F8 Run the accessibility checker. CTRL N Create a new Web page. CTRL O Open a Web page. CTRL F4 Close a Web page. CTRL S Save a Web page. CTRL P Print a Web page. F5 Refresh a Web page; refresh the Folder List. CTRL TAB Switch between open Web pages. CTRL SHIFT B Preview a Web page .

2. WEB SERVER APPLICATION DEVELOPMENT Figure 2 Working of CGI A. CGI and WSGI - Web Server Application Development using Python Standard Library A.1 CGI In a static web, documents (static web pages) over the web can be returned easily to the client on its request. However, dynamic web involves generating the reply on the fly based

Objectives: To impart the skills needed for web programming, web administration, and web site development. After studying this course student can develop; static web pages; dynamic web pages; data Processing on web pages. S. No. Description 1. Internet Fundamentals: Introduction to Internet, Web browser, web page, website, homepage, hyperlinks,

Sarjana Akuntansi Syariah (S.Akun) Pada Program Studi Akuntansi Syariah Menyetujui Pembimbing I Pembimbing II Drs. Sugianto, MA Kamilah, SE, AK, M.Si NIP. 196706072000031003 NIP. 197910232008012014 Mengetahui Ketua Jurusan Akuntansi Syariah Hendra Harmain, SE., M. Pd NIP. 197305101998031003 . LEMBARAN PERSETUJUAN PENGUJI SEMINAR Proposal skripsi berjudul “PERLAKUAN AKUNTANSI TERHADAP .