University of Virginia 1 Modern Web Application Development Overview of some newer web applications methods Web 2.0 Ajax fundamentals Ruby on Rails.

Slides:



Advertisements
Similar presentations
Introduction to Model-View-Controller (MVC) Web Programming with TurboGears Leif Oppermann,
Advertisements

Languages for Dynamic Web Documents
6/3/2015eBiquity1 Tutorial on AJAX Anubhav Kale (akale1 AT cs DOT umbc DOT edu)
© 2007 IBM Corporation IBM Emerging Technologies Enabling an Accessible Web 2.0 Becky Gibson Web Accessibility Architect.
AJAX Presented by: Dickson Fu Dimas Ariawan Niels Andreassen Ryan Dial Jordan Nielson CMPUT 410 University of Alberta 2006.
Cloud Computing Lecture #7 Introduction to Ajax Jimmy Lin The iSchool University of Maryland Wednesday, October 15, 2008 This work is licensed under a.
Does Ajax suck? CS575 Spring 2007 Chanwit Suebsureekul.
1 JavaScript & AJAX CS , Spring JavaScript.
E-Commerce The technical side. LAMP Linux Linux Apache Apache MySQL MySQL PHP PHP All Open Source and free packages. Can be installed and run on most.
INTRO TO MAKING A WEBSITE Mark Zhang.  HTML  CSS  Javascript  PHP  MySQL  …That’s a lot of stuff!
Web Programming Language Dr. Ken Cosh Week 1 (Introduction)
Chapter 6 DOJO TOOLKITS. Objectives Discuss XML DOM Discuss JSON Discuss Ajax Response in XML, HTML, JSON, and Other Data Type.
Web Design Basic Concepts.
Client/Server Architectures
INTRODUCTION TO WEB DATABASE PROGRAMMING
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
Introduction to AJAX AJAX Keywords: JavaScript and XML
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Web 2.0: Concepts and Applications 11 The Web Becomes 2.0.
JavaScript & jQuery the missing manual Chapter 11
Štefan PERO AIS What is Web 1.0?  statical web pages  contains informations to one use  no reason to comeback  not interactive web pages.
CS 4720 RESTfulness and AJAX CS 4720 – Web & Mobile Systems.
Databases and the Internet. Lecture Objectives Databases and the Internet Characteristics and Benefits of Internet Server-Side vs. Client-Side Special.
CSCI 6962: Server-side Design and Programming Introduction to AJAX.
 2008 Pearson Education, Inc. All rights reserved Ajax-Enabled Rich Internet Applications.
AJAX Without the “J” George Lawniczak. What is Ajax?
JavaScript, Fourth Edition Chapter 12 Updating Web Pages with AJAX.
Ajax Technology for the Web Nic Shulver, FCET, Staffordshire University Introduction What is it? Pros and Cons Why is it important? Traditional Client-Server.
Intro to Ajax Fred Stluka Jan 25, /25/2006Intro to AjaxFred Stluka2 What is Ajax? "Asynchronous JavaScript and XML" New name for an old technique:
Lecture 19 Web Application Frameworks Boriana Koleva Room: C54
CS453: State in Web Applications (Part 1) State in General Sessions (esp. in PHP) Prof. Tom Horton.
06/10/2015AJAX 1. 2 Introduction All material from AJAX – what is it? Traditional web pages and operation Examples of AJAX use Creating.
Instructor, Dr. Khalili Bahram Jeevan Kumar Gogineni.
JSF Introduction Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
Csi315csi315 Client/Server Models. Client/Server Environment LAN or WAN Server Data Berson, Fig 1.4, p.8 clients network.
Fall CIS 764 Database Systems Design L8. Web ….
Random Logic l Forum.NET l AJAX Behind the buzz word Forum.NET ● January 23, 2006.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Building Rich Web Applications with Ajax Linda Dailey Paulson IEEE – Computer, October 05 (Vol.38, No.10) Presented by Jingming Zhang.
Lecture 9: AJAX, Javascript review..  AJAX  Synchronous vs. asynchronous browsing.  Refreshing only “part of a page” from a URL.  Frameworks: Prototype,
AJAX Compiled from “AJAX Programming” [Sang Shin] (Asynchronous JavaScript and XML)
Ajax for Dynamic Web Development Gregory McChesney.
Chapter 16: Ajax-Enabled Rich Internet Applications with XML and JSON TP2543 Web Programming Mohammad Faidzul Nasrudin.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
Ajax VS Flex A comparison based on shopping cart implementation PoHsu Yeh py2157.
SE-2840 Dr. Mark L. Hornick 1 Introduction to Ajax Asynchronous Javascript And XML.
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
Web 2.0: Concepts and Applications 11 The Web Becomes 2.0.
Event Handling & AJAX IT210 Web Systems. Question How do we enable users to dynamically interact with a website? Answer: Use mouse and keyboard to trigger.
Introduction to AJAX Sue Brandreth. What is Ajax?
AJAX – Asynchronous JavaScript And XML By Kranthi Kiran Nuthi CIS 764 Kansas State University.
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
Overview Web Technologies Computing Science Thompson Rivers University.
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
AJAX. Objectives Understand and apply AJAX Using AJAX in DOJO library.
Presented by Alexey Vedishchev Developing Web-applications with Grails framework American University of Nigeria, 2016 Intro To MVC Architecture.
INNOV-16: Rich User Interface for the Web???? AJAX to the Rescue Ken Wilner VP of Technology Progress Software.
Web Programming Language
Web Technologies Computing Science Thompson Rivers University
AJAX.
AJAX.
Web Application Architectures
JavaScript & jQuery AJAX.
Web Application Architectures
WPS - your story so far Seems incredible complicated, already
Intro to Ajax Fred Stluka Jan 25, 2006.
DR. JOHN ABRAHAM PROFESSOR UTPA
Web Technologies Computing Science Thompson Rivers University
Introduction to AJAX and JSON
Web Application Architectures
Presentation transcript:

University of Virginia 1 Modern Web Application Development Overview of some newer web applications methods Web 2.0 Ajax fundamentals Ruby on Rails

University of Virginia 2 Some Newer Architecture Frameworks  Software Architectures Larger organization of components Frameworks include:  Components we’re given as building blocks  Standard forms of behavior between components Some frameworks for web-based applications  AJAX and supporting frameworks  Ruby on Rails

University of Virginia 3 Some General Issues  Client/Server architectures  Web interface through the browser Client-side processing (Javascript)  Server needs Underlying database management Server side processing  Security, authorization, etc.  Transaction processing  Business logic  Etc.

University of Virginia 4 AJAX and Web 2.0  Have a look at: Ajax: A New Approach to Web Applications, by Jesse James Garrett Building Rich Web Applications with Ajax, by Linda Dailey Paulson. (From IEEE Software.) Book: Pragmatic Ajax: A Web 2.0 Primer (Overview)

University of Virginia 5 Usual Model for Web Apps  Interact with a page Maybe enter info in forms, then hit Submit  Server receives the URL (and forms data etc.) Processes information, and then…  New page is returned to the browser and loaded Even small changes require entire page to be re- loaded  (The web as a hypertext system, not a SW app platform)

University of Virginia 6 New Model: Web 2.0, Ajax  Web 2.0: just a buzzword? See Wikipedia for the history  In part, Web 2.0 is about The web as a computing platform  But also: “new generation” of web usage Collaboration, sharing, things linked together Examples (?):  Blogs, social networking, Flickr, del.icio.us, Skype, games, SecondLife, wikis, podcasts, RSS,…

University of Virginia 7 Ajax  Ajax Named from “Asynchronous JavaScript and XML” Used to refer to two things  Collection of “old” Web-related technologies  A web-based SW architecture  Example apps: Google maps; new Yahoo mail

University of Virginia 8 Ajax Component Technologies  Presentation with XHTML and CSS  Dynamic page display and interaction using the DOM (Document Object Model) in the browser  Data interchange and processing with XML and XSLT  Asynchronous data retrieval with XMLHttpRequest (or equivalent)  JavaScript Ties it all together on the client-side

University of Virginia 9 What’s Different than the Old Model?  Small events Small request to the server that makes small change to the page No refresh of complete page!  Asynchronous processing Browser doesn’t block while waiting Key is a XMLHttpRequest (Javascript to server)  Richer events on the client-side Browser recognizes and shares events much like a GUI-application does

University of Virginia 10 Old vs. New  from Garrett’s web article

University of Virginia 11 Page Modification in Ajax  From Pragmatic Ajax  See explanation given in class

University of Virginia 12 Steps in Previous Diagram 1. Browser requests original page 2. Servers sends back complete page 3. Browser displays and creates a DOM tree 4. (later) Some user activity initiates a request to the server  Asynchronous! To a different URL for a script 5. Server returns data to browser to be handled differently than in (3) above 6. Browser process server-response and updates current DOM in memory

University of Virginia 13 Handling Asynchronous Requests  On the client side with JavaScript An object of type XMLHttpRequest (XHR for short)  On the server side Most basic: any kind of script like those you’ve written before More complex and useful: a larger framework  E.g. servlets, Ruby on Rails, etc. Get request (with parameters) and send back data (not a webpage)  Simple, or more complex (XML)  Note that browsers must be “smarter” too

University of Virginia 14 XMLHttpRequest on the client  What’s it need to do? Be created and used by some JavaScript function Create a request to a script on the server  E.g. a URL with parameters Send it Be linked to a call-back function that will be run on the client when the data is returned

University of Virginia 15 Example: making the call  From the demo (simplified) var xhr = XMLHttpRequest(); // not for older IE xhr.onreadystatechange=callback-func-name; xhr.open(“GET”, “/scriptURL?” + param); xhr.send(null);

University of Virginia 16 Example: Processing Responses  Server talks to the call-back function multiple times xhr.readystate -- an int that indicates status Value of 4 means it’s done and data is ready  Also, xhr.status is set to HTTP response code E.g. 404 “not found”. 200 means “OK”  In call-back function, after checking the above: Get data sent back: xhr.responseText (text data) Process it and update current page using DOM  No reload of entire page occurs!

University of Virginia 17 See demo   Two very simple demos of XMLHttpRequest processing with JavaScript Very simple server-side processing with PHP

University of Virginia 18 Ajax Support  Server-side “remoting” Frameworks and toolkits to support communications more easily  Client-side GUI toolkits for Ajax apps (Java Script)  More complete toolkits for building larger apps Rails, Tapestry, Dojo, Django, … SEAS Final 4 Bracket Challenge  Aptana, includes support for Ajax/Javascript libraries  Used Dojo and Yahoo UI

University of Virginia 19 Ajax and Frameworks  Many frameworks use Ajax and provide Higher-level support for requests and responses Data integration between DBs on the server and client-side objects GUI support Separation of data, control, presentation, business rules “components” or “helpers”: sessions, carts, etc. Internationalization  PHP users: Check out symfony

University of Virginia 20

University of Virginia 21 Ruby on Rails  A framework for developing web apps Remember what a framework is? Rails derived from a real commercial application  Features client-side dynamic pages (DHTML) good integration with database on the server coding written in Ruby based on the MVC architecture AJAX characteristics  Book: Agile Web Development with Rails

University of Virginia 22 Concepts behind Rails  More slogans! DRY: Don’t repeat yourself  Things defined in code in one place only Convention over Configuration  Code less by submitting to defaults  Often depends on naming conventions  Can override these if needed

University of Virginia 23 ORM in Rails  Challenge: putting together an OO program with class design and a set of database tables ORM: object-relational mapping  Rails version of ORM called Active Record Define class and get both Ruby class and DB table Get certain methods for free Other parts of the architecture rely on naming conventions etc. to make all work together with far less programming effort

University of Virginia 24 Rails and MVC Architecture  MVC is a design pattern for interactive applications  Model: just like in Observer Also enforces business rules  View: displays the user-interface  Controller receives external events from the user etc. interact with model and view  Many other frameworks also use MVC E.g. Struts, JavaServer Faces

University of Virginia 25 MVC in Rails Diagram (from book Agile Web Development with Rails)

University of Virginia 26 Views, Controllers in Rails  First step: Rails code generation…  Views: You write HTML pages with embedded Ruby Your code interacts with the controller  Controller: You write code focused on application-specific functions Rails provides  routing events/requests from pages/views to your handlers  sessions, caching, …

University of Virginia 27 Summary  The high-level big picture here is: Certain kinds of applications…  (E.g. web-applications, DB-centered, etc.) … benefit from particular architecture models…  (E.g. Ajax ideas) … and we use frameworks at the architecture level…  (E.g. Rails or AJAX environments) … and lower-level design and coding “tools”  (E.g. specific IDEs, toolkits, GUI libraries,…) … to build larger, better systems quicker.