Top Banner
Behzad Samin 1 An End-to-End Overview of a RESTful Web Service
16

Behzad Samin 0 An End-to-End Overview of a RESTful Web Service.

Mar 26, 2015

Download

Documents

Samantha Davies
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Behzad Samin 0 An End-to-End Overview of a RESTful Web Service.

Behzad Samin

1

An End-to-End Overview of a RESTful Web Service

Page 2: Behzad Samin 0 An End-to-End Overview of a RESTful Web Service.

Agenda Overview (45 minutes)  

jQuery, Jersey, JDO (Behzad) Google App Engine (David and Cory)

Demo (45 minutes)   Showing a sample application (Behzad). Highlighting some of the Google App Engine

features to make development and support easier (David and Cory).

Q&A (30 minutes) 

2

Page 3: Behzad Samin 0 An End-to-End Overview of a RESTful Web Service.

ObjectivesThis is a presentation to explore a RESTful web

service end to end leveraging the following technologies:

jQuery (internationalization, list grid, context menu ) Jersey JDO Google App Engine (cloud to virtualize application

server & data store)

3

Page 4: Behzad Samin 0 An End-to-End Overview of a RESTful Web Service.

jQuery a JavaScript Library Simplifies HTML document traversing, event handling,

animating, and Ajax interactions for rapid web development.

Cross-browser CSS Compliant Lightweight Footprint And more…

To explore the features check out:http://visualjquery.com/

4

Page 5: Behzad Samin 0 An End-to-End Overview of a RESTful Web Service.

internationalizationjQuery.i18n.properties is a lightweight jQuery plugin for providing internationalization to javascript from ‘.properties’ files, just like in Java Resource Bundles.

Include plugin in your main page. Load resource bundles based on browser or user

choice. Get values per keys e.g. $.i18n.prop(’title')

5

Page 6: Behzad Samin 0 An End-to-End Overview of a RESTful Web Service.

list griddataTable is a plug-in for the jQuery Javascript library. It is a flexible tool which will add advanced interaction controls to any HTML table.

Include plugin in your main page. Create an html table. Initialize the dataTable for the table. Enable and disable features per your

requirements.

6

Page 7: Behzad Samin 0 An End-to-End Overview of a RESTful Web Service.

context menu contextMenu is a lightweight jQuery plugin that lets you selectively override the browser's right-click menu with a custom one of your own.

Include plugin in your main page. Create an html list Initialize the contextMenu for the list. Bind a function for each contextMenu item select

event.

7

Page 8: Behzad Samin 0 An End-to-End Overview of a RESTful Web Service.

REST vs. SOAP

8

Page 9: Behzad Samin 0 An End-to-End Overview of a RESTful Web Service.

Simple Object Access Protocol (SOAP) Web Service

9

Page 10: Behzad Samin 0 An End-to-End Overview of a RESTful Web Service.

REpresentational State Transfer (REST) Web Service

10

Page 11: Behzad Samin 0 An End-to-End Overview of a RESTful Web Service.

Building RESTful Web Services in Jersey Jersey is an open source, JAX-RS (JSR 311) Reference

Implementation for building RESTful Web services.

Jersey is more than a Reference Implementation because it provides an API so that developers may extend Jersey to suit their needs.

Getting Started:http://jersey.java.net/nonav/documentation/latest/index.html A Good Examplehttp://www.vogella.de/articles/REST/article.html#rest

11

Page 12: Behzad Samin 0 An End-to-End Overview of a RESTful Web Service.

Java Data Objects (JDO)To handle Data Access and Persistence, you can use

JDO, a standardised persistence API. With JDO you can develop plain old java objects

(POJOs) and persist them as they are transparently. This requires very little work from the developer. It

allows persistence to any type of datastore in principle, being designed with flexibility and datastore agnosticity in mind.

A good example of Defining Data Classes with JDOhttp://code.google.com/appengine/docs/java/datastore/jdo/dataclasses.html

12

Page 13: Behzad Samin 0 An End-to-End Overview of a RESTful Web Service.

Demo: Suggestion Entry System

13

Page 14: Behzad Samin 0 An End-to-End Overview of a RESTful Web Service.

Google App EngineRun your web apps on Google's infrastructure:

Easy to build Easy to maintain Easy to scale

Focus on your app, leave the rest to Google Zero to sixty: App Engine enables your application to scale automatically

without worrying about managing machines. You're in control: The simple, web-based dashboard makes it easy to

manage your application without having to babysit it.

Google offers a Eclipse plugin that provides both Google App Engine and GWT development capabilities. Install the plugins from http://dl.google.com/eclipse/plugin/3.7 via the Eclipse update manager.

14

Page 15: Behzad Samin 0 An End-to-End Overview of a RESTful Web Service.

Run Applications LocallyThe Eclipse Plugin allows to run applications for the

Google App Enginelocally in an environment which simulates the

environment on the App Engine.

You also have a local admin console (http://localhost:8888/_ah/admin/ ) which

allows you to see: your local datastore the task queue, inbound email and XMPP traffic.

15

Page 16: Behzad Samin 0 An End-to-End Overview of a RESTful Web Service.

Run Applications in Google CloudTo create an application on the Google App Engine, create an

application on the Google App Engine website (https://appengine.google.com/ ).

Afterwards you can locally create an web application and upload this

application to the created application on the Google App Engine.

To create an application on the App Engine press the button "Create an application" and select an application name. You have to choose one which is still available.

16