P&O3: Tools & methodologies Stefaan Ternier. Overview TCP/IP Servlets Google Web Toolkit Google Maps JPDA.

Slides:



Advertisements
Similar presentations
GWT - RPC. RPC plumbing diagram package com.mycompany.client; import com.google.gwt.user.client.rpc.RemoteService; public interface MyAddService extends.
Advertisements

Fawaz Ghali AJAX: Web Programming's Toy.
Web Toolkit Julie George & Ronald Lopez 1. Requirements  Java SDK version 1.5 or later  Apache Ant is also necessary to run command line arguments 
1 CGICGI Common Gateway Interface Server-side Programming Lecture.
Servlets Enterprise Systems Programming. Servlets  Servlets: server-side Java programs that enable dynamic processing of web-based requests  Web-based.
1 GWT Google Web Toolkit Build AJAX apps in the Java language
P&O3: Tools & methodologies Stefaan Ternier. Overview TCP/IP Servlets Google Web Toolkit Google Maps JPDA.
Google Web Toolkit - Gufran Mohammed. Google Web Toolkit (GWT) is an open source Java software development framework that makes writing AJAX applications.
MC365 Application Servers: Servlets. Today We Will Cover: What a servlet is The HTTPServlet and some of its more important methods How to configure the.
Servlets and a little bit of Web Services Russell Beale.
Apache Tomcat Server – installation & use Server-side language-- use Java Server Pages Contrast Client-side languages HTML Forms Servers & Server-side.
1 Static Web Pages Websites on Servers (The Big Picture) –Apache Tomcat can support static web pages –Primarily intended to support servlets and JSP –Some.
DT211/3 Internet Application Development Web Servers.
Apache Tomcat Server Typical html Request/Response cycle
Definitions, Definitions, Definitions Lead to Understanding.
Web programming for project students Dr Jim Briggs.
Web Applications Basics. Introduction to Web Web features Clent/Server HTTP HyperText Markup Language URL addresses Web server - a computer program that.
Java Servlets and JSP.
Softsmith Infotech Installing and Configuring Tomcat.
Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
Servlet and Tomcat Tutorial
Chapter 6 DOJO TOOLKITS. Objectives Discuss XML DOM Discuss JSON Discuss Ajax Response in XML, HTML, JSON, and Other Data Type.
Web server and web browser It’s a take and give policy in between client and server through HTTP(Hyper Text Transport Protocol) Server takes a request.
Apache Tomcat Web Server SNU OOPSLA Lab. October 2005.
1 Homework / Exam Exam 3 –Solutions Posted –Questions? HW8 due next class Final Exam –See posted schedule Websites on UNIX systems Course Evaluations.
Introduction to ASP.NET. Prehistory of ASP.NET Original Internet – text based WWW – static graphical content  HTML (client-side) Need for interactive.
Java Omar Rana University of South Asia. Course Overview JAVA  C/C++ and JAVA Comparison  OOP in JAVA  Exception Handling  Streams  Graphics User.
Web application architecture
CS441 CURRENT TOPICS IN PROGRAMMING LANGUAGES LECTURE 5_1 George Koutsogiannakis/ Summer
AN OVERVIEW OF SERVLET TECHNOLOGY SERVER SETUP AND CONFIGURATION WEB APPLICATION STRUCTURE BASIC SERVLET EXAMPLE Java Servlets - Compiled By Nitin Pai.
Functionality of a web server What does the web server do? Let a user request a resource Find the resource Return something to the user The resource can.
COMP 321 Week 7. Overview HTML and HTTP Basics Dynamic Web Content ServletsMVC Tomcat in Eclipse Demonstration Lab 7-1 Introduction.
Google Web Toolkit An Overview By Shauvik Roy Choudhary.
Lecturer: Prof. Piero Fraternali, Teaching Assistant: Alessandro Bozzon, Advanced Web Technologies: Struts–
Java Servlets Lec 27. Creating a Simple Web Application in Tomcat.
Chapter 6 Server-side Programming: Java Servlets
Http protocol Response-request Clients not limited to web browsers. Anything that can access code implementing the protocol works: –Standalone programs.
XML and Web Services (II/2546)
Web Architecture Introduction
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
JS (Java Servlets). Internet evolution [1] The internet Internet started of as a static content dispersal and delivery mechanism, where files residing.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
Ajax and the GWT. Ajax  Asynchronous JavaScript And XML  Technology behind interactive web sites  Provide smoother experience than conventional web.
1 G52IWS: Example Web-services Chris Greenhalgh. 2 Contents Software requirements AXIS web service run-time components Getting started with Jetty & AXIS.
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
Web Programming Introduction to Web Technology HTML & Dynamic web content.
HTTP protocol Java Servlets. HTTP protocol Web system communicates with end-user via HTTP protocol HTTP protocol methods: GET, POST, HEAD, PUT, OPTIONS,
Servers- Apache Tomcat Server Server-side scripts- Java Server Pages.
JavaScript and Ajax (Internet Background) Week 1 Web site:
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
JAVA, JEE Training Introduction to Web Harinath Mallepally
Server-side http General form of http response/request GET request method POST request method Responses Servlet support.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
Google Web Toolkit (GWT) St. Louis Java SIG April 12, 2007 Brad Busch Andrew Prunicki.
Deploying Web Applications to Tomcat Server Chun Guo
The web, reloaded..  I. What is Web 2.0?  II. Technologies and examples of applications  III. Building Web 2.0 applications.
Labs: Create, deploy and test a simple web service
JavaScript and Ajax (Internet Background)
Google Web Toolkit Tutorial
Course Outcomes of Advanced Java Programming AJP (17625, C603)
GWT - RPC.
Google Web Toolkit - Gufran Mohammed
PHP / MySQL Introduction
Web App vs Mobile App.
WEB API.
Installing and Configuring Tomcat
DWR: Direct Web Remoting
Apache Tomcat Web Server
Java Servlets and JSP.
Installing Tomcat.
Presentation transcript:

P&O3: Tools & methodologies Stefaan Ternier

Overview TCP/IP Servlets Google Web Toolkit Google Maps JPDA

HTTP over TCP/IP Server - side Client – side Eg.

TCP/IP protocol Data link IP (Internet Protocol)‏ TCP (reliable services)‏UDP (unreliable services)‏ browserapplication

TCP/IP protocol Data link IP (Internet Protocol)‏ TCP browser … Data link IP (Internet Protocol)‏ TCP Web server

HTTP over TCP/IP Server - side Client – side Eg. (axis bin)‏ cd axis-1_4\lib java -cp axis.jar org.apache.axis.utils.tcpmon

HTTP - request Request line Headers Empty line Optional message

HTTP - response status line Headers Empty line Message body

HTML - forms Enter information (textfields, textarea fields, radio buttons, etc)‏ Send to server: 8 “verbs” –GET -> request data from server –POST -> submit data to be processed

HTML – a simple form Value of a: Value of b:

HTML – a simple form Value of a: Value of b:

Overview TCP/IP Servlets Google Web Toolkit Google Maps JPDA

Servlets – request/response

Servlets – an example

Apache tomcat - structure …\apache-tomcat |- bin | |- startup.sh | `- startup.bat |- conf | `- server.xml |- webapps | |-SumWebapp | `-jsp-examples `- work …\SumWebApp |- index.html `- WEB-INF |- lib |- classes | `- SumServlet.class `- web.xml

Apache tomcat – web.xml SumServlet com.mycompany.SumServlet SumServlet /MyServlets/SUM

Overview TCP/IP Servlets Google Web Toolkit Google Maps JPDA

Asynchronous JavaScript and XML (AJAX)‏ Server - side Client – side Javascript -> Firefox/IE [...] [...] xmlhttp.open("POST", url, true); xmlhttp.onreadystatechange = function(func) { if (xmlhttp.readyState == 4) { [...] } xmlhttp.setRequestHeader('MessageType', 'CALL'); xmlhttp.setRequestHeader('Content-Type', 'text/xml'); [...] JAVA -> Tomcat package com.mycompany.server; import com.google.gwt.user.server.rpc.RemoteServiceServlet; import com.mycompany.client.MyAddService; public class MyAddServiceImpl extends RemoteServiceServlet implements MyAddService{ public int add(int a, int b) { return a + b; }

Server - side Client – side JavascriptJAVA + no page transition, no blocking - No IDE - Debugging is difficult - weakly typed + eclipse: debugging, easy development - good IDE’s - Debugging is easy - strongly typed Asynchronous JavaScript and XML (AJAX)‏

Google Web Toolkit run development time [...] [...] xmlhttp.open("POST", url, true); xmlhttp.onreadystatechange = function(func) { if (xmlhttp.readyState == 4) { [...] } xmlhttp.setRequestHeader('MessageType', 'CALL'); xmlhttp.setRequestHeader('Content-Type', 'text/xml'); [...] JAVA/eclipsejavascript Hosted mode JVM IDE Compile to JAVA bytecode Compile to Javascript

GWT: project structure Client-side source files and subpackages com/mycompany/client/ The project root package contains module XML files com/mycompany/ Server-side code and subpackages com/mycompany/server/ Static resources that can be served publicly com/mycompany/public/ PurposePackage

Hello world

/localhost/packages/eclipse/eclipse-wtp/gwt-linux-1.5.2

Create new module

GWT: Build your first app final Label resultaatLabel = new Label(); final TextBox aBox= new TextBox(); final TextBox bBox= new TextBox(); final Button button = new Button("Click me"); button.addClickListener(new ClickListener() { public void onClick(Widget sender) { resultaatLabel.setText("hier komt het resultaat"); } }); RootPanel.get().add(aBox); RootPanel.get().add(bBox); RootPanel.get().add(resultaatLabel); RootPanel.get().add(button); GWT Widgets Bind to HTML page

GWT ext Add gwtext java library Update gwt.xml config file Copy resources

Update gwt.xml config file

Copy resources cd eclipsedata/SumProject/src/org/myproject/public/ cp -r /localhost/packages/eclipse/eclipse-wtp/ext-2.0.2/adapter/. cp -r /localhost/packages/eclipse/eclipse-wtp/ext-2.0.2/resources/. cp /localhost/packages/eclipse/eclipse-wtp/ext-2.0.2/ext-all. cp /localhost/packages/eclipse/eclipse-wtp/ext-2.0.2/ext-all*

Overview TCP/IP Servlets Google Web Toolkit Google Maps JPDA

Google Maps – import api

Google Maps public void onModuleLoad() { GMap2Widget mapWidget = new GMap2Widget("300", "400"); final GMap2 gmaps = mapWidget.getGmap(); RootPanel.get("slot1").add(mapWidget); } Module XML JAVA code

Google Maps - Geocoder Convert addresses to latitude/longitude pairs

Overview TCP/IP Servlets Google Web Toolkit Google Maps JPDA

Java Platform Debugger Architecture (JPDA)‏ Server - side Client – side HTTP Port 80, 8080 JPDA Port 8000

Tomcat – setup JPDA set JPDA_ADDRESS=8000 set JPDA_TRANSPORT=dt_socket set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_09 set PATH=%JAVA_HOME%\bin;%PATH% cd jakarta-tomcat \bin catalina.bat jpda start cd GET > tomcat.tgz tar xvzf tomcat.tgz cd tomcat sh jakarta.sh start-debug Linux - bash Windows - cmd

Eclipse – setup JPDA 1 2 3

References Google Web Toolkit, W3 Schools, Apache axis, GWT – Google Maps API