LAB S313389 – v0.13 – mpf – 23 juin Build a Mobile Rich Internet Application with JavaFX and RESTful services Didier Burkhalter, Mark Foster, Patrice Goutin.

Slides:



Advertisements
Similar presentations
Pierre-Johan CHARTRE Java EE - JAX-RS - Pierre-Johan CHARTRE
Advertisements

General introduction to Web services and an implementation example
1 CGICGI Common Gateway Interface Server-side Programming Lecture.
Introduction to Web Services and Web API’s Richard Holowczak Baruch College December, 2014.
Copyright © IBM Corp., All rights reserved. The presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. RESTful Service Oriented.
JSON Valery Ivanov.
With jQuery and AJAX Doncho Minkov Telerik Corporation Technical Trainer.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
Lecture 2: Technical Basics
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
More APIs: Web Services CMPT 281. Announcements Project milestone Lab: – Web services examples.
© 2006 by IBM 1 How to use Eclipse to Build Rich Internet Applications With PHP and AJAX Phil Berkland IBM Software Group Emerging.
Java Pet Store Application. Outline Introduction Introduction Information Layer Information Layer Application Layer Application Layer Infrastructure Layer.
WEB DESIGN SOME FOUNDATIONS. SO WHAT IS THIS INTERNET.
UNIT-V The MVC architecture and Struts Framework.
1 Introduction to Web Development. Web Basics The Web consists of computers on the Internet connected to each other in a specific way Used in all levels.
RIA Introduce Comparison among several technology.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com ICOM 5016 – Introduction.
1 WebSocket & JSON Java APIs Hackday By Somay David
 2000 Deitel & Associates, Inc. All rights reserved. Chapter 24 – Web Servers (PWS, IIS, Apache, Jigsaw) Outline 24.1Introduction 24.2Microsoft Personal.
JavaScript, Fourth Edition Chapter 12 Updating Web Pages with AJAX.
Raffaele Di Fazio Connecting to the Clouds Cloud Brokers and OCCI.
Prepared By : Monika Darji Web Services using REST & JAX-WS.
The New Zealand Institute for Plant & Food Research Limited Matthew Laurenson Web Services: Introduction & Design Considerations.
WEB API: WHY THEY MATTER ECOL 453/ Nirav Merchant
CSCI 6962: Server-side Design and Programming Web Services.
Python and REST Kevin Hibma. What is REST? Why REST? REST stands for Representational State Transfer. (It is sometimes spelled "ReST".) It relies on a.
HTML5. HTML5’s overall theme The browser as a rich application platform rich, cross-device user interfaces offline operation capability hardware access.
RESTful Web Services.
Google Data Protocol Guy Mark Lifshitz. Motivation Google’s Mission: – Organize the world’s information – Make information universally accessible – Provide.
13. JavaFX. 2 JavaFX Intro Sun's answer to –the popularity of scripting languages –problems with Java GUI AWT is very basic Swing is too complex, too.
API Crash Course CWU Startup Club. OUTLINE What is an API? Why are API’s useful? What is HTTP? JSON? XML? What is a RESTful API? How do we consume an.
Introduction to Web Services
Internet Technologies1 Internet Technologies JavaFX.
RESTful Web Services What is RESTful?
PLATFORM A new platform that wants to be a new standard JavaFX
Jan Štěrba Technical Lead, JavaFX Mobile Sun Microsystems JavaFX.
/16 Final Project Report By Facializer Team Final Project Report Eagle, Leo, Bessie, Five, Evan Dan, Kyle, Ben, Caleb.
INTRODUCING HYBRID APP KAU with MICT PARK IT COMPANIES Supported by KOICA
Using Retrofit framework in implementation of Android REST client David Ante Macan*, Zlatko Stapić, Milan Pavlović* University of Zagreb Faculty of Organization.
IRMIS3 Data Service and Application Layer Gabriele Carcassi Oct
Embt.co/sprint-rest-json-services Blog Notes: Building RESTful servers. In C++ Builder Developer Skill Sprint Tips, Tricks and Techniques The Ultimate.
Social Enablement of Xpages - Linoy K George & Mervin Thomas.
Web Services with Netbeans 6.0 Your Name Sun Campus Ambassador Your Address.
INNOV-16: Rich User Interface for the Web???? AJAX to the Rescue Ken Wilner VP of Technology Progress Software.
The Holmes Platform and Applications
Practical using C++ WMProxy API advanced job submission
GF and RS, Dept of CS, Mangalore University
The Client-Server Model
Web Programming Developing Web Applications including Servlets, and Web Services using NetBeans 6.5 with GlassFish.V3.
WEB SERVICES.
JSON.
Unit – 5 JAVA Web Services
An introduction to REST for SharePoint 2013
User Interface / User Experience Demo
CMPE419 Mobile Application Development
Automated Automation of REST APIs
Introduction to Web Services and SOA
$, $$, $$$ API testing Edition
Cloud Web Filtering Platform
Testing RESTful Web APIs
Integrating REST API and SQL Server JSON Functions
RESTful Web Services.
REST på Microsoft-stacken
Choosing between Silverlight and AJAX
Python and REST Kevin Hibma.
Introduction to Web Services and SOA
CMPE419 Mobile Application Development
TN19-TCI: Integration and API management using TIBCO Cloud™ Integration
#01# ASP.NET Core Overview Design by: TEDU Trainer: Bach Ngoc Toan
Presentation transcript:

LAB S – v0.13 – mpf – 23 juin Build a Mobile Rich Internet Application with JavaFX and RESTful services Didier Burkhalter, Mark Foster, Patrice Goutin Sun Microsystems France SAS (before LEC)

2 JavaONE 2010 | sun.com/javaone Agenda > Lab Introduction > Exercise 0 (15 minutes) IDE setup plus ReST test (cloud) > Exercise 1 (15 minutes) JavaFX simple UI > Exercise 2 (15 minutes) Integrate UI with ReST service > Exercise 3 (10 minutes) JavaFX multimedia

3 JavaONE 2010 | sun.com/javaone Why JavaFX? > & specifically for mobile development

4 JavaONE 2010 | sun.com/javaone Why NetBeans & GlassFish?

5 JavaONE 2010 | sun.com/javaone Exercise 0 - IDE setup plus ReST test > Goal – Check NetBeans installed & check external ReST service (Amazon Cloud)

6 JavaONE 2010 | sun.com/javaone Exercise 1 – JavaFX Simple UI > Goal – First JavaFX project and JavaFX project using “states”

7 JavaONE 2010 | sun.com/javaone Housekeeping > Before you leave, please fill out a survey and hand it to someone We really want to know what you think! > Please log out of your machine when done > Please look around to make sure you have all of your belongings > The hard copies of the lab guides are yours to keep

8 JavaONE 2010 | sun.com/javaone Architecture Overview RIA Leveraging existing backend services GlassFish v3 REST Web Service HTTP/XML

9 JavaONE 2010 | sun.com/javaone Client Architecture Overview JavaFX leverages the MVC pattern, allowing clean client application design source:

10 JavaONE 2010 | sun.com/javaone UI Overview JavaFX leverages the MVC pattern, allowing clean client application design

11 JavaONE 2010 | sun.com/javaone JavaFX Mobile packaging

12 JavaONE 2010 | sun.com/javaone JavaFX in a nutshell > Scripting, declarative, object oriented language & API for Graphical Applications Cool Language w/ data binding and triggers Rich Graphics API Multimedia ready > Tools for developers and designers JavaFX SDK NetBeans Samples Adobe Illustrator & Photoshop plugins > Built on top of Java™ platform

13 JavaONE 2010 | sun.com/javaone REST Architecture > REST Architecture Principles Representational State Transfer Everything is a resource Resources are addressable Resources have an interface (operations and data types) Protocol is client-server, stateless, cacheable, layered

14 JavaONE 2010 | sun.com/javaone RESTful Web Services > JSR 311, aka aka JAX-RS Part of Java EE 6 specification > RESTful web service is A Java class A set of methods > Use Java annotations to represent The resources (the URI) The Operations The Data Types (as MIME types) > Jersey is JAX-RS Reference Implementation

15 JavaONE 2010 | sun.com/javaone JSON, JavaScript Object Notation > A data format to exchange data structures > Language independent > Mainly used for object serialization and AJAX { "firstName": "John", "lastName": "Smith", "address": { "streetAddress": "21 2nd Street", "city": "New York", "state": "NY", "postalCode": }, "phoneNumbers": [ " ", " " ] }

16 JavaONE 2010 | sun.com/javaone Exercises > Exercise 1: Create a Simple JavaFX Application ● Expected duration: 20 minutes > Exercise 2: Create the JavaFX UI ● Expected duration: 30 minutes > Exercise 3: Add Photos with JavaFX ● Expected duration: 30 minutes > Exercise 4:... ● Expected duration: 20 minutes > Lab built on JavaFX 1.3

17 JavaONE 2010 | sun.com/javaone Scenario overview > Copies d'ecran de l'appli a trois stades

18 JavaONE 2010 | sun.com/javaone Getting Started > If you have not logged in, log in with username: x password: y > Online lab guide will open in a browser window > All necessary software and lab files are already installed on your lab machine Start from exercise 1

19 JavaONE 2010 | sun.com/javaone Exercise 1 > Create your first JavaFX application Create the project Build, Run and Test > Add a Label > Modify the backgroundwall paper, using the CSS

20 JavaONE 2010 | sun.com/javaone Exercise 1... > Change the UI theme Change the back groundwall paper Background fill: select linearGradient Change the Component style using Stylesheets: apply your style sheet: {__DIR__}javafx.css

21 JavaONE 2010 | sun.com/javaone Missing casapiun.css filein javafxapi- cldc.jar( dib)

22 JavaONE 2010 | sun.com/javaone Exercise 2 > Create a Web Application Create, Build, Run and Test > Add a RESTful web service Will return text/plain data type Build, Run and Test > Add a method that will return JSON data Will return application/json data type Build, Run and Test

23 JavaONE 2010 | sun.com/javaone Exercise 3 > Return to the JavaFX Application > Add an asynchronous call to the RESTful web service > Use Java based JSON parser to parse the result var request : RemoteTextDocument = RemoteTextDocument { url: " } var value: String = bind request.document on replace { if (request.done) { //do something with value }

24 JavaONE 2010 | sun.com/javaone Exercise 4 > Add polling capabilities to JavaFX Reuse existing java.util.Timer class Poll every 5000 ms class PieChartTask extends TimerTask { override function run() { //wrap existing connection and parsing code } }; def timer : Timer = new Timer("TimerThread"); def task : PieChartTask = new PieChartTask(); timer.schedule(task, 0, 5000);

25 JavaONE 2010 | sun.com/javaone Bibliography > Applying CSS to UI Controls

26 JavaONE 2010 | sun.com/javaone Congratulations! > You should now have completed this lab > If you would like more time to continue working, please consider taking the lab exercises with you Discs containing all of the labs offered this year are available for you to take home The lab guide will tell you where to get help with this lab after JavaOne > Thank you for attending this hands-on lab!

27 JavaONE 2010 | sun.com/javaone David Delabassée Sébastien Stormacq Sun Microsystems, Northen Europe