









































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A step-by-step guide on how to debug clients and servers using eclipse in google app engine. It covers creating an html template, modifying java client code to interact with the html, handling asynchronous calls, and linking client and service. The example demonstrates making a persistent thing using java and the app engine datastore.
Typology: Study notes
1 / 49
This page cannot be seen from the preview
Don't miss anything!










































We've talked about what the cloud can do for us, but We haven't talked (much) about using it. Goal of this lecture: start using it (with some difficulties, natural to the cloud). So far, So far, Monday, February 01, 2010 5:55 PM Docsity.com
Sort of like web programming... But not quite… Good news: a number of familiar concepts are no longer needed. Bad news: some new and complicated concepts replace them! Programming AppEngine Programming AppEngine Sunday, January 31, 2010 7:24 PM Docsity.com
Static content , e.g., file.html, file.css. Client code that runs inside (otherwise static) web pages on a browser. Services that provide data to client code from within the google infrastructure. An AppEngine Project is really a website with A project is a website Monday, February 01, 2010 10:59 AM Docsity.com
Hypertext Markup Language (HTML): how web pages are specified. Common Gateway Interface (CGI): how data from users is returned to servers. Servlets: java programs that run on a server and generate HTML or XML. Applets: java programs that run on a browser and interpret servlet data. AJAX (Asynchronous Javascript Execution): javascript client programs that interact with services. Website elements Website elements Monday, February 01, 2010 11:21 AM Docsity.com
A servlet response is usually a new web page. Web 1.0 elements Monday, February 01, 2010 11:36 AM Docsity.com
Interact asynchronously with services using AJAX. Insert new HTML into existing web pages. Utilize HTML widgets : highly-interactive HTML components designed for control by clients. Converse with services using web-rpc (not CGI). Update dynamic content (e.g., stock quotes). Query a service for data. Store persistent data using a service Embed clients in otherwise static HTML pages, that: The GAE/GWT concept of web programming: Web 2.0: GAE/GWT Monday, February 01, 2010 11:26 AM Docsity.com
A response is data to be inserted into the page. rpc response Web 2.0 elements Monday, February 01, 2010 11:40 AM Docsity.com
Distributed data stores (e.g., JDO) are only available to server-side code (e.g., services). Client-side code cannot store data on the client (other than cookies). Client-side code must communicate with services to store and retrieve data. Key AppEngine concepts Key AppEngine concepts Monday, February 01, 2010 11:02 AM Docsity.com
It may seem like GWT is java. Actually, it's not. It looks like Java, but compiles into JavaScript! No JVM is running! → No introspection available! → Factories unavailable! A course in programming languages would quickly convince you that GWT cannot be java: So, while GAE relies upon factories, GWT can't even use one! Some quick warnings Some quick warnings Sunday, January 30, 2011 12:41 PM Docsity.com
Run eclipse Select File/New web application project… Type a unique name, e.g. Example01. Type a randomly selected java class, e.g., com.example. Select both GWT and AppEngine SDKs. Press finish. Creating a Project Creating a project Sunday, January 31, 2010 8:40 PM Docsity.com
One or more web services that interact with distributed cloud services.
One or more static HTML web pages with embedded GWT clients that use services to obtain data.
A mapping from web URLs (names) to content that tells you which page corresponds to each URL.
Structure of a project Structure of a project Sunday, January 31, 2010 8:42 PM Docsity.com
Webserver on localhost (your machine) mimics both google AppEngine and cloud. It serves up client pages and invokes services as needed. Debugging clients and servers in eclipse Debugging clients and servers Sunday, January 31, 2010 9:25 PM Docsity.com
Model: how data is stored. View: what does data look like. Controller: orchestrates state changes in the model. Most prevalent web programming paradigm: Model- View-Controller Basis of Rails, Symfony, Cake, etc. Basic idea: M,V,C are naturally separate , and programmer should try to keep them separate. MVC, by any other name… MVC, by any other name Sunday, January 31, 2010 8:46 PM Docsity.com
Clients manage views , but don’t interact with distributed objects except by calling services.
Services interact with distributed objects , but can't create views.
So, clients must communicate with services to accomplish persistence and persistent changes.
Client-server communication is asynchronous , i.e., client does not wait for server to respond.
AppEngine design philosophy AppEngine design philosophy Sunday, January 31, 2010 8:48 PM Docsity.com