JSF Mashups in Action

46
JSF Mashups in Action Hazem Saleh

description

Integrating Mashups in web applications is not an easy job. Web developers need to write intensive JavaScript code and much duplicate feed parsing code in order to create an interactive Mashup web application. Mashups4JSF is an open source library that aims at integrating Mashup services in JSF web applications. Using Mashups4JSF, JSF developers will be able to construct rich and customized Mashups using a set of custom JSF components. They will be able to export domain model data as mashup feeds. They will be able to create rich Google Maps declaratively and create custom Ajax actions powered by JSF 2.x architecture. This session discusses how to utilize this library in order to build interactive mashups in the JavaServer Faces applications. This session was presented by Hazem Saleh in JavaOne Russia 2013.

Transcript of JSF Mashups in Action

Page 1: JSF Mashups in Action

JSF Mashups in Action

Hazem Saleh

My Bio

Nine years of experience in open source technologies and Java Enterprise

I worked with many clients in Europe (Sweden) North America (USA and

Canada) Latin America (Peru) Asia (Qatar and Kuwait) and Africa

(Egypt Morocco and South Africa)

Apache MyFaces Committer

Co-author of ldquoThe Definitive Guide to Apache MyFacesrdquo book (Apress)

Author of ldquoJavaScript Unit Testingrdquo book (Packtpub)

DeveloperWorks Contributing Author

Technical Speaker in (JavaOne San Francisco CON-FESS Vienna IBM

Regional Technical Exchange hellipetc)

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

What is Mashups

Mashup is an application that combines data or functionality from two or more sources for creating a new service

Two main actors

Service Provider Service Consumer

Mashup Service Consumer cycle

Aggregation

Visualization

Data Retrieval and Formatting

What is Mashups

Composing different mashups and linking them with organization data may produce a new service that is not realized by the Mashup service

providers (Mashability)

Mashup Styles

Server-based Mashups

Web-based Mashups

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Common Mashup Architecture

Client (JavaScript

CSS HTML)Server (Service)

Data (XML JSON)

Popular Public Mashup Services

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Common Mashup Scenarios

ltscript type=textjavascriptgt

hellip

function getWeatherForecast(map address)

var geocoder = new GClientGeocoder()

geocodergetLatLng(address

function(location)

if (location)

alert(location + not found)

else

var countryWeatherStatus = Mathfloor(Mathrandom() 4)

var iconObject = new GIcon(G_DEFAULT_ICON)

iconObjecticonSize = new GSize(45 45)

iconObjectshadowSize = new GSize(37 34)

iconObjecticonAnchor = new GPoint(9 34)

iconObjectinfoWindowAnchor = new GPoint(9 2)

iconObjectimage = weatherForecasts[countryWeatherStatus]

var marker = new GMarker(location icon iconObject)

mapaddOverlay(marker)

)

function initialize()

if (GBrowserIsCompatible())

var map = new GMap2(documentgetElementById(map))

mapsetCenter(new GLatLng(24 15) 13)

mapsetZoom(4)

get the weather status for countries

getWeatherForecast(map Egypt)

getWeatherForecast(map Turkey)

getWeatherForecast(map Libya)

getWeatherForecast(map Spain)

getWeatherForecast(map Algeria)

getWeatherForecast(map Mali)

getWeatherForecast(map Kenya)

getWeatherForecast(map Saudi Arabia)

getWeatherForecast(map Niger)

add the map control

var mapControlPosition = new GControlPosition(G_ANCHOR_BOTTOM_RIGHT new GSize(10 10))

mapaddControl(new GLargeMapControl() mapControlPosition)

ltscriptgt

JavaScript

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpweatheryahooapiscomforecastrssp=03592

bull Parse RSS feedltrss version=20 gt

ltchannelgt

lttitlegtYahoo Weather - Pittsburg NHlttitlegt

ltlinkgtltlinkgt

ltdescriptiongtYahoo Weather for Pittsburg NHltdescriptiongt

ltlanguagegten-usltlanguagegt

ltlastBuildDategtFri 22 Mar 2013 651 pm EDTltlastBuildDategt

ltttlgt60ltttlgt

ltyweatherlocation city=Pittsburg region=NH country=USgt

ltyweatherunits temperature=F distance=mi pressure=in speed=mphgt

ltyweatherwind chill=23 direction=330 speed=6 gt

ltyweatheratmosphere humidity=60 visibility=10 pressure=2959 rising=1 gt

ltyweatherastronomy sunrise=642 am sunset=658 pmgt

ltimage

lttitlegtYahoo Weatherlttitlegt

ltwidthgt142ltwidthgt

ltheightgt18ltheightgt

ltlinkgthttpweatheryahoocomltlinkgt

lturlgthttplyimgcomaibrandpurplelogouhusnews-weagiflturlgt

ltimagegt

ltitemgt

lttitlegtConditions for Pittsburg NH at 651 pm EDTlttitlegt

ltgeolatgt4505ltgeolatgt

ltgeolonggt-7139ltgeolonggt

ltlinkgtltlinkgt

ltpubDategtFri 22 Mar 2013 651 pm EDTltpubDategt

ltyweathercondition text=Cloudy code=26 temp=29 date=Fri 22 Mar 2013 651 pm EDT gt

ltdescriptiongtltdescriptiongt

ltyweatherforecast day=Fri date=22 Mar 2013 low=14 high=26 text=Snow Showers code=14 gt

ltyweatherforecast day=Sat date=23 Mar 2013 low=18 high=28 text=Few Snow Showers code=14 gt

ltguid isPermaLink=falsegtUSNH0186_2013_03_23_7_00_EDTltguidgt

ltitemgt

ltchannelgt

ltrssgt

Retrieve content

+

Custom RSS parsing

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpgdatayoutubecom feedsapivideosalt=atomampv=2ampmax-results=5ampq=javaone

bull Parse ATOM Feed (Sample for a single item)ltentry gdetag=WampquotCU8DR347eCp7I2A9WhBXEUkampquotgt

ltidgttagyoutubecom2008videoI5lAgaCbqZ0ltidgt

ltpublishedgt2012-10-01T160927000Zltpublishedgt

ltupdatedgt2013-03-24T165116000Zltupdatedgt

ltcategory scheme=httpschemasgooglecomg2005kind term=httpgdatayoutubecomschemas2007video gt

ltcategory scheme=httpgdatayoutubecomschemas2007categoriescat term=Tech label=Science ampamp Technology gt

lttitlegtWelcome to JavaOne 2012lttitlegt

ltcontent type=applicationx-shockwave-flash src=httpwwwyoutubecomvI5lAgaCbqZ0version=3ampampf=videosampampapp=youtube_gdata gt

ltauthorgt

ltnamegtjavaltnamegt

lturigthttpgdatayoutubecomfeedsapiusersjavalturigt

ltytuserIdgtmRtPmgnQ04CMUpSUqPfhxQltytuserIdgt

ltauthorgt

ltmediagroupgt

ltmediatitle type=plaingtWelcome to JavaOne 2012ltmediatitlegt

ltytaspectRatiogtwidescreenltytaspectRatiogt

ltytduration seconds=97 gt

ltytuploadedgt2012-10-01T160927000Zltytuploadedgt

ltytuploaderIdgtUCmRtPmgnQ04CMUpSUqPfhxQltytuploaderIdgt

ltytvideoidgtI5lAgaCbqZ0ltytvideoidgt

ltmediagroupgt

ltgdrating average=4716216 max=5 min=1 numRaters=74 rel=httpschemasgooglecomg2005overall gt

ltytstatistics favoriteCount=0 viewCount=4835 gt

ltytrating numDislikes=5 numLikes=69 gt

ltentrygt

Retrieve content

+

Custom ATOM parsing

Common Mashup Scenarios

bull GET httpssearchtwittercomsearchjsonq=javaoneamprpp=10

bull Parse JSON Feed (Sample for a single item)

completed_in0021

max_id320699880265891840

max_id_str320699880265891840

next_pagepage=2ampmax_id=320699880265891840ampq=javaoneamprpp=10

page1

queryjavaone

refresh_urlsince_id=320699880265891840ampq=javaone

results[

created_atSun 07 Apr 2013 004944 +0000

from_userrob_ratcliff

from_user_id265460384

from_user_id_str265460384

from_user_nameRob Ratcliff

geonull

id320699880265891840

id_str320699880265891840

iso_language_codeen

metadata

result_typerecent

profile_image_urlhttpa0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

profile_image_url_httpshttpssi0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

sourceamplta href=ampquothttptwittercomtweetbuttonampquotampgtTweet Buttonampltaampgt

textRT karianna Dont forget that the CFP for javaone is closing in only 8-9 days Submit your paper today --ampgt httptco6AAWdIf87h java dev

]

results_per_page10

since_id0

since_id_str0

Retrieve content

+

Custom JSON parsing

Common Mashup Scenarios

In order to interact with the most popular mashup service providers we have to

Write Intensive JavaScript code

Write extra Java code to interact with the server and then parse different formats

JSON ATOM RSS

So Developing Mashups is not an easy task

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 2: JSF Mashups in Action

My Bio

Nine years of experience in open source technologies and Java Enterprise

I worked with many clients in Europe (Sweden) North America (USA and

Canada) Latin America (Peru) Asia (Qatar and Kuwait) and Africa

(Egypt Morocco and South Africa)

Apache MyFaces Committer

Co-author of ldquoThe Definitive Guide to Apache MyFacesrdquo book (Apress)

Author of ldquoJavaScript Unit Testingrdquo book (Packtpub)

DeveloperWorks Contributing Author

Technical Speaker in (JavaOne San Francisco CON-FESS Vienna IBM

Regional Technical Exchange hellipetc)

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

What is Mashups

Mashup is an application that combines data or functionality from two or more sources for creating a new service

Two main actors

Service Provider Service Consumer

Mashup Service Consumer cycle

Aggregation

Visualization

Data Retrieval and Formatting

What is Mashups

Composing different mashups and linking them with organization data may produce a new service that is not realized by the Mashup service

providers (Mashability)

Mashup Styles

Server-based Mashups

Web-based Mashups

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Common Mashup Architecture

Client (JavaScript

CSS HTML)Server (Service)

Data (XML JSON)

Popular Public Mashup Services

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Common Mashup Scenarios

ltscript type=textjavascriptgt

hellip

function getWeatherForecast(map address)

var geocoder = new GClientGeocoder()

geocodergetLatLng(address

function(location)

if (location)

alert(location + not found)

else

var countryWeatherStatus = Mathfloor(Mathrandom() 4)

var iconObject = new GIcon(G_DEFAULT_ICON)

iconObjecticonSize = new GSize(45 45)

iconObjectshadowSize = new GSize(37 34)

iconObjecticonAnchor = new GPoint(9 34)

iconObjectinfoWindowAnchor = new GPoint(9 2)

iconObjectimage = weatherForecasts[countryWeatherStatus]

var marker = new GMarker(location icon iconObject)

mapaddOverlay(marker)

)

function initialize()

if (GBrowserIsCompatible())

var map = new GMap2(documentgetElementById(map))

mapsetCenter(new GLatLng(24 15) 13)

mapsetZoom(4)

get the weather status for countries

getWeatherForecast(map Egypt)

getWeatherForecast(map Turkey)

getWeatherForecast(map Libya)

getWeatherForecast(map Spain)

getWeatherForecast(map Algeria)

getWeatherForecast(map Mali)

getWeatherForecast(map Kenya)

getWeatherForecast(map Saudi Arabia)

getWeatherForecast(map Niger)

add the map control

var mapControlPosition = new GControlPosition(G_ANCHOR_BOTTOM_RIGHT new GSize(10 10))

mapaddControl(new GLargeMapControl() mapControlPosition)

ltscriptgt

JavaScript

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpweatheryahooapiscomforecastrssp=03592

bull Parse RSS feedltrss version=20 gt

ltchannelgt

lttitlegtYahoo Weather - Pittsburg NHlttitlegt

ltlinkgtltlinkgt

ltdescriptiongtYahoo Weather for Pittsburg NHltdescriptiongt

ltlanguagegten-usltlanguagegt

ltlastBuildDategtFri 22 Mar 2013 651 pm EDTltlastBuildDategt

ltttlgt60ltttlgt

ltyweatherlocation city=Pittsburg region=NH country=USgt

ltyweatherunits temperature=F distance=mi pressure=in speed=mphgt

ltyweatherwind chill=23 direction=330 speed=6 gt

ltyweatheratmosphere humidity=60 visibility=10 pressure=2959 rising=1 gt

ltyweatherastronomy sunrise=642 am sunset=658 pmgt

ltimage

lttitlegtYahoo Weatherlttitlegt

ltwidthgt142ltwidthgt

ltheightgt18ltheightgt

ltlinkgthttpweatheryahoocomltlinkgt

lturlgthttplyimgcomaibrandpurplelogouhusnews-weagiflturlgt

ltimagegt

ltitemgt

lttitlegtConditions for Pittsburg NH at 651 pm EDTlttitlegt

ltgeolatgt4505ltgeolatgt

ltgeolonggt-7139ltgeolonggt

ltlinkgtltlinkgt

ltpubDategtFri 22 Mar 2013 651 pm EDTltpubDategt

ltyweathercondition text=Cloudy code=26 temp=29 date=Fri 22 Mar 2013 651 pm EDT gt

ltdescriptiongtltdescriptiongt

ltyweatherforecast day=Fri date=22 Mar 2013 low=14 high=26 text=Snow Showers code=14 gt

ltyweatherforecast day=Sat date=23 Mar 2013 low=18 high=28 text=Few Snow Showers code=14 gt

ltguid isPermaLink=falsegtUSNH0186_2013_03_23_7_00_EDTltguidgt

ltitemgt

ltchannelgt

ltrssgt

Retrieve content

+

Custom RSS parsing

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpgdatayoutubecom feedsapivideosalt=atomampv=2ampmax-results=5ampq=javaone

bull Parse ATOM Feed (Sample for a single item)ltentry gdetag=WampquotCU8DR347eCp7I2A9WhBXEUkampquotgt

ltidgttagyoutubecom2008videoI5lAgaCbqZ0ltidgt

ltpublishedgt2012-10-01T160927000Zltpublishedgt

ltupdatedgt2013-03-24T165116000Zltupdatedgt

ltcategory scheme=httpschemasgooglecomg2005kind term=httpgdatayoutubecomschemas2007video gt

ltcategory scheme=httpgdatayoutubecomschemas2007categoriescat term=Tech label=Science ampamp Technology gt

lttitlegtWelcome to JavaOne 2012lttitlegt

ltcontent type=applicationx-shockwave-flash src=httpwwwyoutubecomvI5lAgaCbqZ0version=3ampampf=videosampampapp=youtube_gdata gt

ltauthorgt

ltnamegtjavaltnamegt

lturigthttpgdatayoutubecomfeedsapiusersjavalturigt

ltytuserIdgtmRtPmgnQ04CMUpSUqPfhxQltytuserIdgt

ltauthorgt

ltmediagroupgt

ltmediatitle type=plaingtWelcome to JavaOne 2012ltmediatitlegt

ltytaspectRatiogtwidescreenltytaspectRatiogt

ltytduration seconds=97 gt

ltytuploadedgt2012-10-01T160927000Zltytuploadedgt

ltytuploaderIdgtUCmRtPmgnQ04CMUpSUqPfhxQltytuploaderIdgt

ltytvideoidgtI5lAgaCbqZ0ltytvideoidgt

ltmediagroupgt

ltgdrating average=4716216 max=5 min=1 numRaters=74 rel=httpschemasgooglecomg2005overall gt

ltytstatistics favoriteCount=0 viewCount=4835 gt

ltytrating numDislikes=5 numLikes=69 gt

ltentrygt

Retrieve content

+

Custom ATOM parsing

Common Mashup Scenarios

bull GET httpssearchtwittercomsearchjsonq=javaoneamprpp=10

bull Parse JSON Feed (Sample for a single item)

completed_in0021

max_id320699880265891840

max_id_str320699880265891840

next_pagepage=2ampmax_id=320699880265891840ampq=javaoneamprpp=10

page1

queryjavaone

refresh_urlsince_id=320699880265891840ampq=javaone

results[

created_atSun 07 Apr 2013 004944 +0000

from_userrob_ratcliff

from_user_id265460384

from_user_id_str265460384

from_user_nameRob Ratcliff

geonull

id320699880265891840

id_str320699880265891840

iso_language_codeen

metadata

result_typerecent

profile_image_urlhttpa0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

profile_image_url_httpshttpssi0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

sourceamplta href=ampquothttptwittercomtweetbuttonampquotampgtTweet Buttonampltaampgt

textRT karianna Dont forget that the CFP for javaone is closing in only 8-9 days Submit your paper today --ampgt httptco6AAWdIf87h java dev

]

results_per_page10

since_id0

since_id_str0

Retrieve content

+

Custom JSON parsing

Common Mashup Scenarios

In order to interact with the most popular mashup service providers we have to

Write Intensive JavaScript code

Write extra Java code to interact with the server and then parse different formats

JSON ATOM RSS

So Developing Mashups is not an easy task

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 3: JSF Mashups in Action

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

What is Mashups

Mashup is an application that combines data or functionality from two or more sources for creating a new service

Two main actors

Service Provider Service Consumer

Mashup Service Consumer cycle

Aggregation

Visualization

Data Retrieval and Formatting

What is Mashups

Composing different mashups and linking them with organization data may produce a new service that is not realized by the Mashup service

providers (Mashability)

Mashup Styles

Server-based Mashups

Web-based Mashups

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Common Mashup Architecture

Client (JavaScript

CSS HTML)Server (Service)

Data (XML JSON)

Popular Public Mashup Services

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Common Mashup Scenarios

ltscript type=textjavascriptgt

hellip

function getWeatherForecast(map address)

var geocoder = new GClientGeocoder()

geocodergetLatLng(address

function(location)

if (location)

alert(location + not found)

else

var countryWeatherStatus = Mathfloor(Mathrandom() 4)

var iconObject = new GIcon(G_DEFAULT_ICON)

iconObjecticonSize = new GSize(45 45)

iconObjectshadowSize = new GSize(37 34)

iconObjecticonAnchor = new GPoint(9 34)

iconObjectinfoWindowAnchor = new GPoint(9 2)

iconObjectimage = weatherForecasts[countryWeatherStatus]

var marker = new GMarker(location icon iconObject)

mapaddOverlay(marker)

)

function initialize()

if (GBrowserIsCompatible())

var map = new GMap2(documentgetElementById(map))

mapsetCenter(new GLatLng(24 15) 13)

mapsetZoom(4)

get the weather status for countries

getWeatherForecast(map Egypt)

getWeatherForecast(map Turkey)

getWeatherForecast(map Libya)

getWeatherForecast(map Spain)

getWeatherForecast(map Algeria)

getWeatherForecast(map Mali)

getWeatherForecast(map Kenya)

getWeatherForecast(map Saudi Arabia)

getWeatherForecast(map Niger)

add the map control

var mapControlPosition = new GControlPosition(G_ANCHOR_BOTTOM_RIGHT new GSize(10 10))

mapaddControl(new GLargeMapControl() mapControlPosition)

ltscriptgt

JavaScript

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpweatheryahooapiscomforecastrssp=03592

bull Parse RSS feedltrss version=20 gt

ltchannelgt

lttitlegtYahoo Weather - Pittsburg NHlttitlegt

ltlinkgtltlinkgt

ltdescriptiongtYahoo Weather for Pittsburg NHltdescriptiongt

ltlanguagegten-usltlanguagegt

ltlastBuildDategtFri 22 Mar 2013 651 pm EDTltlastBuildDategt

ltttlgt60ltttlgt

ltyweatherlocation city=Pittsburg region=NH country=USgt

ltyweatherunits temperature=F distance=mi pressure=in speed=mphgt

ltyweatherwind chill=23 direction=330 speed=6 gt

ltyweatheratmosphere humidity=60 visibility=10 pressure=2959 rising=1 gt

ltyweatherastronomy sunrise=642 am sunset=658 pmgt

ltimage

lttitlegtYahoo Weatherlttitlegt

ltwidthgt142ltwidthgt

ltheightgt18ltheightgt

ltlinkgthttpweatheryahoocomltlinkgt

lturlgthttplyimgcomaibrandpurplelogouhusnews-weagiflturlgt

ltimagegt

ltitemgt

lttitlegtConditions for Pittsburg NH at 651 pm EDTlttitlegt

ltgeolatgt4505ltgeolatgt

ltgeolonggt-7139ltgeolonggt

ltlinkgtltlinkgt

ltpubDategtFri 22 Mar 2013 651 pm EDTltpubDategt

ltyweathercondition text=Cloudy code=26 temp=29 date=Fri 22 Mar 2013 651 pm EDT gt

ltdescriptiongtltdescriptiongt

ltyweatherforecast day=Fri date=22 Mar 2013 low=14 high=26 text=Snow Showers code=14 gt

ltyweatherforecast day=Sat date=23 Mar 2013 low=18 high=28 text=Few Snow Showers code=14 gt

ltguid isPermaLink=falsegtUSNH0186_2013_03_23_7_00_EDTltguidgt

ltitemgt

ltchannelgt

ltrssgt

Retrieve content

+

Custom RSS parsing

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpgdatayoutubecom feedsapivideosalt=atomampv=2ampmax-results=5ampq=javaone

bull Parse ATOM Feed (Sample for a single item)ltentry gdetag=WampquotCU8DR347eCp7I2A9WhBXEUkampquotgt

ltidgttagyoutubecom2008videoI5lAgaCbqZ0ltidgt

ltpublishedgt2012-10-01T160927000Zltpublishedgt

ltupdatedgt2013-03-24T165116000Zltupdatedgt

ltcategory scheme=httpschemasgooglecomg2005kind term=httpgdatayoutubecomschemas2007video gt

ltcategory scheme=httpgdatayoutubecomschemas2007categoriescat term=Tech label=Science ampamp Technology gt

lttitlegtWelcome to JavaOne 2012lttitlegt

ltcontent type=applicationx-shockwave-flash src=httpwwwyoutubecomvI5lAgaCbqZ0version=3ampampf=videosampampapp=youtube_gdata gt

ltauthorgt

ltnamegtjavaltnamegt

lturigthttpgdatayoutubecomfeedsapiusersjavalturigt

ltytuserIdgtmRtPmgnQ04CMUpSUqPfhxQltytuserIdgt

ltauthorgt

ltmediagroupgt

ltmediatitle type=plaingtWelcome to JavaOne 2012ltmediatitlegt

ltytaspectRatiogtwidescreenltytaspectRatiogt

ltytduration seconds=97 gt

ltytuploadedgt2012-10-01T160927000Zltytuploadedgt

ltytuploaderIdgtUCmRtPmgnQ04CMUpSUqPfhxQltytuploaderIdgt

ltytvideoidgtI5lAgaCbqZ0ltytvideoidgt

ltmediagroupgt

ltgdrating average=4716216 max=5 min=1 numRaters=74 rel=httpschemasgooglecomg2005overall gt

ltytstatistics favoriteCount=0 viewCount=4835 gt

ltytrating numDislikes=5 numLikes=69 gt

ltentrygt

Retrieve content

+

Custom ATOM parsing

Common Mashup Scenarios

bull GET httpssearchtwittercomsearchjsonq=javaoneamprpp=10

bull Parse JSON Feed (Sample for a single item)

completed_in0021

max_id320699880265891840

max_id_str320699880265891840

next_pagepage=2ampmax_id=320699880265891840ampq=javaoneamprpp=10

page1

queryjavaone

refresh_urlsince_id=320699880265891840ampq=javaone

results[

created_atSun 07 Apr 2013 004944 +0000

from_userrob_ratcliff

from_user_id265460384

from_user_id_str265460384

from_user_nameRob Ratcliff

geonull

id320699880265891840

id_str320699880265891840

iso_language_codeen

metadata

result_typerecent

profile_image_urlhttpa0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

profile_image_url_httpshttpssi0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

sourceamplta href=ampquothttptwittercomtweetbuttonampquotampgtTweet Buttonampltaampgt

textRT karianna Dont forget that the CFP for javaone is closing in only 8-9 days Submit your paper today --ampgt httptco6AAWdIf87h java dev

]

results_per_page10

since_id0

since_id_str0

Retrieve content

+

Custom JSON parsing

Common Mashup Scenarios

In order to interact with the most popular mashup service providers we have to

Write Intensive JavaScript code

Write extra Java code to interact with the server and then parse different formats

JSON ATOM RSS

So Developing Mashups is not an easy task

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 4: JSF Mashups in Action

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

What is Mashups

Mashup is an application that combines data or functionality from two or more sources for creating a new service

Two main actors

Service Provider Service Consumer

Mashup Service Consumer cycle

Aggregation

Visualization

Data Retrieval and Formatting

What is Mashups

Composing different mashups and linking them with organization data may produce a new service that is not realized by the Mashup service

providers (Mashability)

Mashup Styles

Server-based Mashups

Web-based Mashups

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Common Mashup Architecture

Client (JavaScript

CSS HTML)Server (Service)

Data (XML JSON)

Popular Public Mashup Services

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Common Mashup Scenarios

ltscript type=textjavascriptgt

hellip

function getWeatherForecast(map address)

var geocoder = new GClientGeocoder()

geocodergetLatLng(address

function(location)

if (location)

alert(location + not found)

else

var countryWeatherStatus = Mathfloor(Mathrandom() 4)

var iconObject = new GIcon(G_DEFAULT_ICON)

iconObjecticonSize = new GSize(45 45)

iconObjectshadowSize = new GSize(37 34)

iconObjecticonAnchor = new GPoint(9 34)

iconObjectinfoWindowAnchor = new GPoint(9 2)

iconObjectimage = weatherForecasts[countryWeatherStatus]

var marker = new GMarker(location icon iconObject)

mapaddOverlay(marker)

)

function initialize()

if (GBrowserIsCompatible())

var map = new GMap2(documentgetElementById(map))

mapsetCenter(new GLatLng(24 15) 13)

mapsetZoom(4)

get the weather status for countries

getWeatherForecast(map Egypt)

getWeatherForecast(map Turkey)

getWeatherForecast(map Libya)

getWeatherForecast(map Spain)

getWeatherForecast(map Algeria)

getWeatherForecast(map Mali)

getWeatherForecast(map Kenya)

getWeatherForecast(map Saudi Arabia)

getWeatherForecast(map Niger)

add the map control

var mapControlPosition = new GControlPosition(G_ANCHOR_BOTTOM_RIGHT new GSize(10 10))

mapaddControl(new GLargeMapControl() mapControlPosition)

ltscriptgt

JavaScript

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpweatheryahooapiscomforecastrssp=03592

bull Parse RSS feedltrss version=20 gt

ltchannelgt

lttitlegtYahoo Weather - Pittsburg NHlttitlegt

ltlinkgtltlinkgt

ltdescriptiongtYahoo Weather for Pittsburg NHltdescriptiongt

ltlanguagegten-usltlanguagegt

ltlastBuildDategtFri 22 Mar 2013 651 pm EDTltlastBuildDategt

ltttlgt60ltttlgt

ltyweatherlocation city=Pittsburg region=NH country=USgt

ltyweatherunits temperature=F distance=mi pressure=in speed=mphgt

ltyweatherwind chill=23 direction=330 speed=6 gt

ltyweatheratmosphere humidity=60 visibility=10 pressure=2959 rising=1 gt

ltyweatherastronomy sunrise=642 am sunset=658 pmgt

ltimage

lttitlegtYahoo Weatherlttitlegt

ltwidthgt142ltwidthgt

ltheightgt18ltheightgt

ltlinkgthttpweatheryahoocomltlinkgt

lturlgthttplyimgcomaibrandpurplelogouhusnews-weagiflturlgt

ltimagegt

ltitemgt

lttitlegtConditions for Pittsburg NH at 651 pm EDTlttitlegt

ltgeolatgt4505ltgeolatgt

ltgeolonggt-7139ltgeolonggt

ltlinkgtltlinkgt

ltpubDategtFri 22 Mar 2013 651 pm EDTltpubDategt

ltyweathercondition text=Cloudy code=26 temp=29 date=Fri 22 Mar 2013 651 pm EDT gt

ltdescriptiongtltdescriptiongt

ltyweatherforecast day=Fri date=22 Mar 2013 low=14 high=26 text=Snow Showers code=14 gt

ltyweatherforecast day=Sat date=23 Mar 2013 low=18 high=28 text=Few Snow Showers code=14 gt

ltguid isPermaLink=falsegtUSNH0186_2013_03_23_7_00_EDTltguidgt

ltitemgt

ltchannelgt

ltrssgt

Retrieve content

+

Custom RSS parsing

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpgdatayoutubecom feedsapivideosalt=atomampv=2ampmax-results=5ampq=javaone

bull Parse ATOM Feed (Sample for a single item)ltentry gdetag=WampquotCU8DR347eCp7I2A9WhBXEUkampquotgt

ltidgttagyoutubecom2008videoI5lAgaCbqZ0ltidgt

ltpublishedgt2012-10-01T160927000Zltpublishedgt

ltupdatedgt2013-03-24T165116000Zltupdatedgt

ltcategory scheme=httpschemasgooglecomg2005kind term=httpgdatayoutubecomschemas2007video gt

ltcategory scheme=httpgdatayoutubecomschemas2007categoriescat term=Tech label=Science ampamp Technology gt

lttitlegtWelcome to JavaOne 2012lttitlegt

ltcontent type=applicationx-shockwave-flash src=httpwwwyoutubecomvI5lAgaCbqZ0version=3ampampf=videosampampapp=youtube_gdata gt

ltauthorgt

ltnamegtjavaltnamegt

lturigthttpgdatayoutubecomfeedsapiusersjavalturigt

ltytuserIdgtmRtPmgnQ04CMUpSUqPfhxQltytuserIdgt

ltauthorgt

ltmediagroupgt

ltmediatitle type=plaingtWelcome to JavaOne 2012ltmediatitlegt

ltytaspectRatiogtwidescreenltytaspectRatiogt

ltytduration seconds=97 gt

ltytuploadedgt2012-10-01T160927000Zltytuploadedgt

ltytuploaderIdgtUCmRtPmgnQ04CMUpSUqPfhxQltytuploaderIdgt

ltytvideoidgtI5lAgaCbqZ0ltytvideoidgt

ltmediagroupgt

ltgdrating average=4716216 max=5 min=1 numRaters=74 rel=httpschemasgooglecomg2005overall gt

ltytstatistics favoriteCount=0 viewCount=4835 gt

ltytrating numDislikes=5 numLikes=69 gt

ltentrygt

Retrieve content

+

Custom ATOM parsing

Common Mashup Scenarios

bull GET httpssearchtwittercomsearchjsonq=javaoneamprpp=10

bull Parse JSON Feed (Sample for a single item)

completed_in0021

max_id320699880265891840

max_id_str320699880265891840

next_pagepage=2ampmax_id=320699880265891840ampq=javaoneamprpp=10

page1

queryjavaone

refresh_urlsince_id=320699880265891840ampq=javaone

results[

created_atSun 07 Apr 2013 004944 +0000

from_userrob_ratcliff

from_user_id265460384

from_user_id_str265460384

from_user_nameRob Ratcliff

geonull

id320699880265891840

id_str320699880265891840

iso_language_codeen

metadata

result_typerecent

profile_image_urlhttpa0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

profile_image_url_httpshttpssi0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

sourceamplta href=ampquothttptwittercomtweetbuttonampquotampgtTweet Buttonampltaampgt

textRT karianna Dont forget that the CFP for javaone is closing in only 8-9 days Submit your paper today --ampgt httptco6AAWdIf87h java dev

]

results_per_page10

since_id0

since_id_str0

Retrieve content

+

Custom JSON parsing

Common Mashup Scenarios

In order to interact with the most popular mashup service providers we have to

Write Intensive JavaScript code

Write extra Java code to interact with the server and then parse different formats

JSON ATOM RSS

So Developing Mashups is not an easy task

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 5: JSF Mashups in Action

What is Mashups

Mashup is an application that combines data or functionality from two or more sources for creating a new service

Two main actors

Service Provider Service Consumer

Mashup Service Consumer cycle

Aggregation

Visualization

Data Retrieval and Formatting

What is Mashups

Composing different mashups and linking them with organization data may produce a new service that is not realized by the Mashup service

providers (Mashability)

Mashup Styles

Server-based Mashups

Web-based Mashups

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Common Mashup Architecture

Client (JavaScript

CSS HTML)Server (Service)

Data (XML JSON)

Popular Public Mashup Services

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Common Mashup Scenarios

ltscript type=textjavascriptgt

hellip

function getWeatherForecast(map address)

var geocoder = new GClientGeocoder()

geocodergetLatLng(address

function(location)

if (location)

alert(location + not found)

else

var countryWeatherStatus = Mathfloor(Mathrandom() 4)

var iconObject = new GIcon(G_DEFAULT_ICON)

iconObjecticonSize = new GSize(45 45)

iconObjectshadowSize = new GSize(37 34)

iconObjecticonAnchor = new GPoint(9 34)

iconObjectinfoWindowAnchor = new GPoint(9 2)

iconObjectimage = weatherForecasts[countryWeatherStatus]

var marker = new GMarker(location icon iconObject)

mapaddOverlay(marker)

)

function initialize()

if (GBrowserIsCompatible())

var map = new GMap2(documentgetElementById(map))

mapsetCenter(new GLatLng(24 15) 13)

mapsetZoom(4)

get the weather status for countries

getWeatherForecast(map Egypt)

getWeatherForecast(map Turkey)

getWeatherForecast(map Libya)

getWeatherForecast(map Spain)

getWeatherForecast(map Algeria)

getWeatherForecast(map Mali)

getWeatherForecast(map Kenya)

getWeatherForecast(map Saudi Arabia)

getWeatherForecast(map Niger)

add the map control

var mapControlPosition = new GControlPosition(G_ANCHOR_BOTTOM_RIGHT new GSize(10 10))

mapaddControl(new GLargeMapControl() mapControlPosition)

ltscriptgt

JavaScript

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpweatheryahooapiscomforecastrssp=03592

bull Parse RSS feedltrss version=20 gt

ltchannelgt

lttitlegtYahoo Weather - Pittsburg NHlttitlegt

ltlinkgtltlinkgt

ltdescriptiongtYahoo Weather for Pittsburg NHltdescriptiongt

ltlanguagegten-usltlanguagegt

ltlastBuildDategtFri 22 Mar 2013 651 pm EDTltlastBuildDategt

ltttlgt60ltttlgt

ltyweatherlocation city=Pittsburg region=NH country=USgt

ltyweatherunits temperature=F distance=mi pressure=in speed=mphgt

ltyweatherwind chill=23 direction=330 speed=6 gt

ltyweatheratmosphere humidity=60 visibility=10 pressure=2959 rising=1 gt

ltyweatherastronomy sunrise=642 am sunset=658 pmgt

ltimage

lttitlegtYahoo Weatherlttitlegt

ltwidthgt142ltwidthgt

ltheightgt18ltheightgt

ltlinkgthttpweatheryahoocomltlinkgt

lturlgthttplyimgcomaibrandpurplelogouhusnews-weagiflturlgt

ltimagegt

ltitemgt

lttitlegtConditions for Pittsburg NH at 651 pm EDTlttitlegt

ltgeolatgt4505ltgeolatgt

ltgeolonggt-7139ltgeolonggt

ltlinkgtltlinkgt

ltpubDategtFri 22 Mar 2013 651 pm EDTltpubDategt

ltyweathercondition text=Cloudy code=26 temp=29 date=Fri 22 Mar 2013 651 pm EDT gt

ltdescriptiongtltdescriptiongt

ltyweatherforecast day=Fri date=22 Mar 2013 low=14 high=26 text=Snow Showers code=14 gt

ltyweatherforecast day=Sat date=23 Mar 2013 low=18 high=28 text=Few Snow Showers code=14 gt

ltguid isPermaLink=falsegtUSNH0186_2013_03_23_7_00_EDTltguidgt

ltitemgt

ltchannelgt

ltrssgt

Retrieve content

+

Custom RSS parsing

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpgdatayoutubecom feedsapivideosalt=atomampv=2ampmax-results=5ampq=javaone

bull Parse ATOM Feed (Sample for a single item)ltentry gdetag=WampquotCU8DR347eCp7I2A9WhBXEUkampquotgt

ltidgttagyoutubecom2008videoI5lAgaCbqZ0ltidgt

ltpublishedgt2012-10-01T160927000Zltpublishedgt

ltupdatedgt2013-03-24T165116000Zltupdatedgt

ltcategory scheme=httpschemasgooglecomg2005kind term=httpgdatayoutubecomschemas2007video gt

ltcategory scheme=httpgdatayoutubecomschemas2007categoriescat term=Tech label=Science ampamp Technology gt

lttitlegtWelcome to JavaOne 2012lttitlegt

ltcontent type=applicationx-shockwave-flash src=httpwwwyoutubecomvI5lAgaCbqZ0version=3ampampf=videosampampapp=youtube_gdata gt

ltauthorgt

ltnamegtjavaltnamegt

lturigthttpgdatayoutubecomfeedsapiusersjavalturigt

ltytuserIdgtmRtPmgnQ04CMUpSUqPfhxQltytuserIdgt

ltauthorgt

ltmediagroupgt

ltmediatitle type=plaingtWelcome to JavaOne 2012ltmediatitlegt

ltytaspectRatiogtwidescreenltytaspectRatiogt

ltytduration seconds=97 gt

ltytuploadedgt2012-10-01T160927000Zltytuploadedgt

ltytuploaderIdgtUCmRtPmgnQ04CMUpSUqPfhxQltytuploaderIdgt

ltytvideoidgtI5lAgaCbqZ0ltytvideoidgt

ltmediagroupgt

ltgdrating average=4716216 max=5 min=1 numRaters=74 rel=httpschemasgooglecomg2005overall gt

ltytstatistics favoriteCount=0 viewCount=4835 gt

ltytrating numDislikes=5 numLikes=69 gt

ltentrygt

Retrieve content

+

Custom ATOM parsing

Common Mashup Scenarios

bull GET httpssearchtwittercomsearchjsonq=javaoneamprpp=10

bull Parse JSON Feed (Sample for a single item)

completed_in0021

max_id320699880265891840

max_id_str320699880265891840

next_pagepage=2ampmax_id=320699880265891840ampq=javaoneamprpp=10

page1

queryjavaone

refresh_urlsince_id=320699880265891840ampq=javaone

results[

created_atSun 07 Apr 2013 004944 +0000

from_userrob_ratcliff

from_user_id265460384

from_user_id_str265460384

from_user_nameRob Ratcliff

geonull

id320699880265891840

id_str320699880265891840

iso_language_codeen

metadata

result_typerecent

profile_image_urlhttpa0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

profile_image_url_httpshttpssi0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

sourceamplta href=ampquothttptwittercomtweetbuttonampquotampgtTweet Buttonampltaampgt

textRT karianna Dont forget that the CFP for javaone is closing in only 8-9 days Submit your paper today --ampgt httptco6AAWdIf87h java dev

]

results_per_page10

since_id0

since_id_str0

Retrieve content

+

Custom JSON parsing

Common Mashup Scenarios

In order to interact with the most popular mashup service providers we have to

Write Intensive JavaScript code

Write extra Java code to interact with the server and then parse different formats

JSON ATOM RSS

So Developing Mashups is not an easy task

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 6: JSF Mashups in Action

What is Mashups

Composing different mashups and linking them with organization data may produce a new service that is not realized by the Mashup service

providers (Mashability)

Mashup Styles

Server-based Mashups

Web-based Mashups

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Common Mashup Architecture

Client (JavaScript

CSS HTML)Server (Service)

Data (XML JSON)

Popular Public Mashup Services

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Common Mashup Scenarios

ltscript type=textjavascriptgt

hellip

function getWeatherForecast(map address)

var geocoder = new GClientGeocoder()

geocodergetLatLng(address

function(location)

if (location)

alert(location + not found)

else

var countryWeatherStatus = Mathfloor(Mathrandom() 4)

var iconObject = new GIcon(G_DEFAULT_ICON)

iconObjecticonSize = new GSize(45 45)

iconObjectshadowSize = new GSize(37 34)

iconObjecticonAnchor = new GPoint(9 34)

iconObjectinfoWindowAnchor = new GPoint(9 2)

iconObjectimage = weatherForecasts[countryWeatherStatus]

var marker = new GMarker(location icon iconObject)

mapaddOverlay(marker)

)

function initialize()

if (GBrowserIsCompatible())

var map = new GMap2(documentgetElementById(map))

mapsetCenter(new GLatLng(24 15) 13)

mapsetZoom(4)

get the weather status for countries

getWeatherForecast(map Egypt)

getWeatherForecast(map Turkey)

getWeatherForecast(map Libya)

getWeatherForecast(map Spain)

getWeatherForecast(map Algeria)

getWeatherForecast(map Mali)

getWeatherForecast(map Kenya)

getWeatherForecast(map Saudi Arabia)

getWeatherForecast(map Niger)

add the map control

var mapControlPosition = new GControlPosition(G_ANCHOR_BOTTOM_RIGHT new GSize(10 10))

mapaddControl(new GLargeMapControl() mapControlPosition)

ltscriptgt

JavaScript

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpweatheryahooapiscomforecastrssp=03592

bull Parse RSS feedltrss version=20 gt

ltchannelgt

lttitlegtYahoo Weather - Pittsburg NHlttitlegt

ltlinkgtltlinkgt

ltdescriptiongtYahoo Weather for Pittsburg NHltdescriptiongt

ltlanguagegten-usltlanguagegt

ltlastBuildDategtFri 22 Mar 2013 651 pm EDTltlastBuildDategt

ltttlgt60ltttlgt

ltyweatherlocation city=Pittsburg region=NH country=USgt

ltyweatherunits temperature=F distance=mi pressure=in speed=mphgt

ltyweatherwind chill=23 direction=330 speed=6 gt

ltyweatheratmosphere humidity=60 visibility=10 pressure=2959 rising=1 gt

ltyweatherastronomy sunrise=642 am sunset=658 pmgt

ltimage

lttitlegtYahoo Weatherlttitlegt

ltwidthgt142ltwidthgt

ltheightgt18ltheightgt

ltlinkgthttpweatheryahoocomltlinkgt

lturlgthttplyimgcomaibrandpurplelogouhusnews-weagiflturlgt

ltimagegt

ltitemgt

lttitlegtConditions for Pittsburg NH at 651 pm EDTlttitlegt

ltgeolatgt4505ltgeolatgt

ltgeolonggt-7139ltgeolonggt

ltlinkgtltlinkgt

ltpubDategtFri 22 Mar 2013 651 pm EDTltpubDategt

ltyweathercondition text=Cloudy code=26 temp=29 date=Fri 22 Mar 2013 651 pm EDT gt

ltdescriptiongtltdescriptiongt

ltyweatherforecast day=Fri date=22 Mar 2013 low=14 high=26 text=Snow Showers code=14 gt

ltyweatherforecast day=Sat date=23 Mar 2013 low=18 high=28 text=Few Snow Showers code=14 gt

ltguid isPermaLink=falsegtUSNH0186_2013_03_23_7_00_EDTltguidgt

ltitemgt

ltchannelgt

ltrssgt

Retrieve content

+

Custom RSS parsing

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpgdatayoutubecom feedsapivideosalt=atomampv=2ampmax-results=5ampq=javaone

bull Parse ATOM Feed (Sample for a single item)ltentry gdetag=WampquotCU8DR347eCp7I2A9WhBXEUkampquotgt

ltidgttagyoutubecom2008videoI5lAgaCbqZ0ltidgt

ltpublishedgt2012-10-01T160927000Zltpublishedgt

ltupdatedgt2013-03-24T165116000Zltupdatedgt

ltcategory scheme=httpschemasgooglecomg2005kind term=httpgdatayoutubecomschemas2007video gt

ltcategory scheme=httpgdatayoutubecomschemas2007categoriescat term=Tech label=Science ampamp Technology gt

lttitlegtWelcome to JavaOne 2012lttitlegt

ltcontent type=applicationx-shockwave-flash src=httpwwwyoutubecomvI5lAgaCbqZ0version=3ampampf=videosampampapp=youtube_gdata gt

ltauthorgt

ltnamegtjavaltnamegt

lturigthttpgdatayoutubecomfeedsapiusersjavalturigt

ltytuserIdgtmRtPmgnQ04CMUpSUqPfhxQltytuserIdgt

ltauthorgt

ltmediagroupgt

ltmediatitle type=plaingtWelcome to JavaOne 2012ltmediatitlegt

ltytaspectRatiogtwidescreenltytaspectRatiogt

ltytduration seconds=97 gt

ltytuploadedgt2012-10-01T160927000Zltytuploadedgt

ltytuploaderIdgtUCmRtPmgnQ04CMUpSUqPfhxQltytuploaderIdgt

ltytvideoidgtI5lAgaCbqZ0ltytvideoidgt

ltmediagroupgt

ltgdrating average=4716216 max=5 min=1 numRaters=74 rel=httpschemasgooglecomg2005overall gt

ltytstatistics favoriteCount=0 viewCount=4835 gt

ltytrating numDislikes=5 numLikes=69 gt

ltentrygt

Retrieve content

+

Custom ATOM parsing

Common Mashup Scenarios

bull GET httpssearchtwittercomsearchjsonq=javaoneamprpp=10

bull Parse JSON Feed (Sample for a single item)

completed_in0021

max_id320699880265891840

max_id_str320699880265891840

next_pagepage=2ampmax_id=320699880265891840ampq=javaoneamprpp=10

page1

queryjavaone

refresh_urlsince_id=320699880265891840ampq=javaone

results[

created_atSun 07 Apr 2013 004944 +0000

from_userrob_ratcliff

from_user_id265460384

from_user_id_str265460384

from_user_nameRob Ratcliff

geonull

id320699880265891840

id_str320699880265891840

iso_language_codeen

metadata

result_typerecent

profile_image_urlhttpa0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

profile_image_url_httpshttpssi0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

sourceamplta href=ampquothttptwittercomtweetbuttonampquotampgtTweet Buttonampltaampgt

textRT karianna Dont forget that the CFP for javaone is closing in only 8-9 days Submit your paper today --ampgt httptco6AAWdIf87h java dev

]

results_per_page10

since_id0

since_id_str0

Retrieve content

+

Custom JSON parsing

Common Mashup Scenarios

In order to interact with the most popular mashup service providers we have to

Write Intensive JavaScript code

Write extra Java code to interact with the server and then parse different formats

JSON ATOM RSS

So Developing Mashups is not an easy task

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 7: JSF Mashups in Action

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Common Mashup Architecture

Client (JavaScript

CSS HTML)Server (Service)

Data (XML JSON)

Popular Public Mashup Services

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Common Mashup Scenarios

ltscript type=textjavascriptgt

hellip

function getWeatherForecast(map address)

var geocoder = new GClientGeocoder()

geocodergetLatLng(address

function(location)

if (location)

alert(location + not found)

else

var countryWeatherStatus = Mathfloor(Mathrandom() 4)

var iconObject = new GIcon(G_DEFAULT_ICON)

iconObjecticonSize = new GSize(45 45)

iconObjectshadowSize = new GSize(37 34)

iconObjecticonAnchor = new GPoint(9 34)

iconObjectinfoWindowAnchor = new GPoint(9 2)

iconObjectimage = weatherForecasts[countryWeatherStatus]

var marker = new GMarker(location icon iconObject)

mapaddOverlay(marker)

)

function initialize()

if (GBrowserIsCompatible())

var map = new GMap2(documentgetElementById(map))

mapsetCenter(new GLatLng(24 15) 13)

mapsetZoom(4)

get the weather status for countries

getWeatherForecast(map Egypt)

getWeatherForecast(map Turkey)

getWeatherForecast(map Libya)

getWeatherForecast(map Spain)

getWeatherForecast(map Algeria)

getWeatherForecast(map Mali)

getWeatherForecast(map Kenya)

getWeatherForecast(map Saudi Arabia)

getWeatherForecast(map Niger)

add the map control

var mapControlPosition = new GControlPosition(G_ANCHOR_BOTTOM_RIGHT new GSize(10 10))

mapaddControl(new GLargeMapControl() mapControlPosition)

ltscriptgt

JavaScript

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpweatheryahooapiscomforecastrssp=03592

bull Parse RSS feedltrss version=20 gt

ltchannelgt

lttitlegtYahoo Weather - Pittsburg NHlttitlegt

ltlinkgtltlinkgt

ltdescriptiongtYahoo Weather for Pittsburg NHltdescriptiongt

ltlanguagegten-usltlanguagegt

ltlastBuildDategtFri 22 Mar 2013 651 pm EDTltlastBuildDategt

ltttlgt60ltttlgt

ltyweatherlocation city=Pittsburg region=NH country=USgt

ltyweatherunits temperature=F distance=mi pressure=in speed=mphgt

ltyweatherwind chill=23 direction=330 speed=6 gt

ltyweatheratmosphere humidity=60 visibility=10 pressure=2959 rising=1 gt

ltyweatherastronomy sunrise=642 am sunset=658 pmgt

ltimage

lttitlegtYahoo Weatherlttitlegt

ltwidthgt142ltwidthgt

ltheightgt18ltheightgt

ltlinkgthttpweatheryahoocomltlinkgt

lturlgthttplyimgcomaibrandpurplelogouhusnews-weagiflturlgt

ltimagegt

ltitemgt

lttitlegtConditions for Pittsburg NH at 651 pm EDTlttitlegt

ltgeolatgt4505ltgeolatgt

ltgeolonggt-7139ltgeolonggt

ltlinkgtltlinkgt

ltpubDategtFri 22 Mar 2013 651 pm EDTltpubDategt

ltyweathercondition text=Cloudy code=26 temp=29 date=Fri 22 Mar 2013 651 pm EDT gt

ltdescriptiongtltdescriptiongt

ltyweatherforecast day=Fri date=22 Mar 2013 low=14 high=26 text=Snow Showers code=14 gt

ltyweatherforecast day=Sat date=23 Mar 2013 low=18 high=28 text=Few Snow Showers code=14 gt

ltguid isPermaLink=falsegtUSNH0186_2013_03_23_7_00_EDTltguidgt

ltitemgt

ltchannelgt

ltrssgt

Retrieve content

+

Custom RSS parsing

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpgdatayoutubecom feedsapivideosalt=atomampv=2ampmax-results=5ampq=javaone

bull Parse ATOM Feed (Sample for a single item)ltentry gdetag=WampquotCU8DR347eCp7I2A9WhBXEUkampquotgt

ltidgttagyoutubecom2008videoI5lAgaCbqZ0ltidgt

ltpublishedgt2012-10-01T160927000Zltpublishedgt

ltupdatedgt2013-03-24T165116000Zltupdatedgt

ltcategory scheme=httpschemasgooglecomg2005kind term=httpgdatayoutubecomschemas2007video gt

ltcategory scheme=httpgdatayoutubecomschemas2007categoriescat term=Tech label=Science ampamp Technology gt

lttitlegtWelcome to JavaOne 2012lttitlegt

ltcontent type=applicationx-shockwave-flash src=httpwwwyoutubecomvI5lAgaCbqZ0version=3ampampf=videosampampapp=youtube_gdata gt

ltauthorgt

ltnamegtjavaltnamegt

lturigthttpgdatayoutubecomfeedsapiusersjavalturigt

ltytuserIdgtmRtPmgnQ04CMUpSUqPfhxQltytuserIdgt

ltauthorgt

ltmediagroupgt

ltmediatitle type=plaingtWelcome to JavaOne 2012ltmediatitlegt

ltytaspectRatiogtwidescreenltytaspectRatiogt

ltytduration seconds=97 gt

ltytuploadedgt2012-10-01T160927000Zltytuploadedgt

ltytuploaderIdgtUCmRtPmgnQ04CMUpSUqPfhxQltytuploaderIdgt

ltytvideoidgtI5lAgaCbqZ0ltytvideoidgt

ltmediagroupgt

ltgdrating average=4716216 max=5 min=1 numRaters=74 rel=httpschemasgooglecomg2005overall gt

ltytstatistics favoriteCount=0 viewCount=4835 gt

ltytrating numDislikes=5 numLikes=69 gt

ltentrygt

Retrieve content

+

Custom ATOM parsing

Common Mashup Scenarios

bull GET httpssearchtwittercomsearchjsonq=javaoneamprpp=10

bull Parse JSON Feed (Sample for a single item)

completed_in0021

max_id320699880265891840

max_id_str320699880265891840

next_pagepage=2ampmax_id=320699880265891840ampq=javaoneamprpp=10

page1

queryjavaone

refresh_urlsince_id=320699880265891840ampq=javaone

results[

created_atSun 07 Apr 2013 004944 +0000

from_userrob_ratcliff

from_user_id265460384

from_user_id_str265460384

from_user_nameRob Ratcliff

geonull

id320699880265891840

id_str320699880265891840

iso_language_codeen

metadata

result_typerecent

profile_image_urlhttpa0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

profile_image_url_httpshttpssi0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

sourceamplta href=ampquothttptwittercomtweetbuttonampquotampgtTweet Buttonampltaampgt

textRT karianna Dont forget that the CFP for javaone is closing in only 8-9 days Submit your paper today --ampgt httptco6AAWdIf87h java dev

]

results_per_page10

since_id0

since_id_str0

Retrieve content

+

Custom JSON parsing

Common Mashup Scenarios

In order to interact with the most popular mashup service providers we have to

Write Intensive JavaScript code

Write extra Java code to interact with the server and then parse different formats

JSON ATOM RSS

So Developing Mashups is not an easy task

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 8: JSF Mashups in Action

Common Mashup Architecture

Client (JavaScript

CSS HTML)Server (Service)

Data (XML JSON)

Popular Public Mashup Services

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Common Mashup Scenarios

ltscript type=textjavascriptgt

hellip

function getWeatherForecast(map address)

var geocoder = new GClientGeocoder()

geocodergetLatLng(address

function(location)

if (location)

alert(location + not found)

else

var countryWeatherStatus = Mathfloor(Mathrandom() 4)

var iconObject = new GIcon(G_DEFAULT_ICON)

iconObjecticonSize = new GSize(45 45)

iconObjectshadowSize = new GSize(37 34)

iconObjecticonAnchor = new GPoint(9 34)

iconObjectinfoWindowAnchor = new GPoint(9 2)

iconObjectimage = weatherForecasts[countryWeatherStatus]

var marker = new GMarker(location icon iconObject)

mapaddOverlay(marker)

)

function initialize()

if (GBrowserIsCompatible())

var map = new GMap2(documentgetElementById(map))

mapsetCenter(new GLatLng(24 15) 13)

mapsetZoom(4)

get the weather status for countries

getWeatherForecast(map Egypt)

getWeatherForecast(map Turkey)

getWeatherForecast(map Libya)

getWeatherForecast(map Spain)

getWeatherForecast(map Algeria)

getWeatherForecast(map Mali)

getWeatherForecast(map Kenya)

getWeatherForecast(map Saudi Arabia)

getWeatherForecast(map Niger)

add the map control

var mapControlPosition = new GControlPosition(G_ANCHOR_BOTTOM_RIGHT new GSize(10 10))

mapaddControl(new GLargeMapControl() mapControlPosition)

ltscriptgt

JavaScript

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpweatheryahooapiscomforecastrssp=03592

bull Parse RSS feedltrss version=20 gt

ltchannelgt

lttitlegtYahoo Weather - Pittsburg NHlttitlegt

ltlinkgtltlinkgt

ltdescriptiongtYahoo Weather for Pittsburg NHltdescriptiongt

ltlanguagegten-usltlanguagegt

ltlastBuildDategtFri 22 Mar 2013 651 pm EDTltlastBuildDategt

ltttlgt60ltttlgt

ltyweatherlocation city=Pittsburg region=NH country=USgt

ltyweatherunits temperature=F distance=mi pressure=in speed=mphgt

ltyweatherwind chill=23 direction=330 speed=6 gt

ltyweatheratmosphere humidity=60 visibility=10 pressure=2959 rising=1 gt

ltyweatherastronomy sunrise=642 am sunset=658 pmgt

ltimage

lttitlegtYahoo Weatherlttitlegt

ltwidthgt142ltwidthgt

ltheightgt18ltheightgt

ltlinkgthttpweatheryahoocomltlinkgt

lturlgthttplyimgcomaibrandpurplelogouhusnews-weagiflturlgt

ltimagegt

ltitemgt

lttitlegtConditions for Pittsburg NH at 651 pm EDTlttitlegt

ltgeolatgt4505ltgeolatgt

ltgeolonggt-7139ltgeolonggt

ltlinkgtltlinkgt

ltpubDategtFri 22 Mar 2013 651 pm EDTltpubDategt

ltyweathercondition text=Cloudy code=26 temp=29 date=Fri 22 Mar 2013 651 pm EDT gt

ltdescriptiongtltdescriptiongt

ltyweatherforecast day=Fri date=22 Mar 2013 low=14 high=26 text=Snow Showers code=14 gt

ltyweatherforecast day=Sat date=23 Mar 2013 low=18 high=28 text=Few Snow Showers code=14 gt

ltguid isPermaLink=falsegtUSNH0186_2013_03_23_7_00_EDTltguidgt

ltitemgt

ltchannelgt

ltrssgt

Retrieve content

+

Custom RSS parsing

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpgdatayoutubecom feedsapivideosalt=atomampv=2ampmax-results=5ampq=javaone

bull Parse ATOM Feed (Sample for a single item)ltentry gdetag=WampquotCU8DR347eCp7I2A9WhBXEUkampquotgt

ltidgttagyoutubecom2008videoI5lAgaCbqZ0ltidgt

ltpublishedgt2012-10-01T160927000Zltpublishedgt

ltupdatedgt2013-03-24T165116000Zltupdatedgt

ltcategory scheme=httpschemasgooglecomg2005kind term=httpgdatayoutubecomschemas2007video gt

ltcategory scheme=httpgdatayoutubecomschemas2007categoriescat term=Tech label=Science ampamp Technology gt

lttitlegtWelcome to JavaOne 2012lttitlegt

ltcontent type=applicationx-shockwave-flash src=httpwwwyoutubecomvI5lAgaCbqZ0version=3ampampf=videosampampapp=youtube_gdata gt

ltauthorgt

ltnamegtjavaltnamegt

lturigthttpgdatayoutubecomfeedsapiusersjavalturigt

ltytuserIdgtmRtPmgnQ04CMUpSUqPfhxQltytuserIdgt

ltauthorgt

ltmediagroupgt

ltmediatitle type=plaingtWelcome to JavaOne 2012ltmediatitlegt

ltytaspectRatiogtwidescreenltytaspectRatiogt

ltytduration seconds=97 gt

ltytuploadedgt2012-10-01T160927000Zltytuploadedgt

ltytuploaderIdgtUCmRtPmgnQ04CMUpSUqPfhxQltytuploaderIdgt

ltytvideoidgtI5lAgaCbqZ0ltytvideoidgt

ltmediagroupgt

ltgdrating average=4716216 max=5 min=1 numRaters=74 rel=httpschemasgooglecomg2005overall gt

ltytstatistics favoriteCount=0 viewCount=4835 gt

ltytrating numDislikes=5 numLikes=69 gt

ltentrygt

Retrieve content

+

Custom ATOM parsing

Common Mashup Scenarios

bull GET httpssearchtwittercomsearchjsonq=javaoneamprpp=10

bull Parse JSON Feed (Sample for a single item)

completed_in0021

max_id320699880265891840

max_id_str320699880265891840

next_pagepage=2ampmax_id=320699880265891840ampq=javaoneamprpp=10

page1

queryjavaone

refresh_urlsince_id=320699880265891840ampq=javaone

results[

created_atSun 07 Apr 2013 004944 +0000

from_userrob_ratcliff

from_user_id265460384

from_user_id_str265460384

from_user_nameRob Ratcliff

geonull

id320699880265891840

id_str320699880265891840

iso_language_codeen

metadata

result_typerecent

profile_image_urlhttpa0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

profile_image_url_httpshttpssi0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

sourceamplta href=ampquothttptwittercomtweetbuttonampquotampgtTweet Buttonampltaampgt

textRT karianna Dont forget that the CFP for javaone is closing in only 8-9 days Submit your paper today --ampgt httptco6AAWdIf87h java dev

]

results_per_page10

since_id0

since_id_str0

Retrieve content

+

Custom JSON parsing

Common Mashup Scenarios

In order to interact with the most popular mashup service providers we have to

Write Intensive JavaScript code

Write extra Java code to interact with the server and then parse different formats

JSON ATOM RSS

So Developing Mashups is not an easy task

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 9: JSF Mashups in Action

Popular Public Mashup Services

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Common Mashup Scenarios

ltscript type=textjavascriptgt

hellip

function getWeatherForecast(map address)

var geocoder = new GClientGeocoder()

geocodergetLatLng(address

function(location)

if (location)

alert(location + not found)

else

var countryWeatherStatus = Mathfloor(Mathrandom() 4)

var iconObject = new GIcon(G_DEFAULT_ICON)

iconObjecticonSize = new GSize(45 45)

iconObjectshadowSize = new GSize(37 34)

iconObjecticonAnchor = new GPoint(9 34)

iconObjectinfoWindowAnchor = new GPoint(9 2)

iconObjectimage = weatherForecasts[countryWeatherStatus]

var marker = new GMarker(location icon iconObject)

mapaddOverlay(marker)

)

function initialize()

if (GBrowserIsCompatible())

var map = new GMap2(documentgetElementById(map))

mapsetCenter(new GLatLng(24 15) 13)

mapsetZoom(4)

get the weather status for countries

getWeatherForecast(map Egypt)

getWeatherForecast(map Turkey)

getWeatherForecast(map Libya)

getWeatherForecast(map Spain)

getWeatherForecast(map Algeria)

getWeatherForecast(map Mali)

getWeatherForecast(map Kenya)

getWeatherForecast(map Saudi Arabia)

getWeatherForecast(map Niger)

add the map control

var mapControlPosition = new GControlPosition(G_ANCHOR_BOTTOM_RIGHT new GSize(10 10))

mapaddControl(new GLargeMapControl() mapControlPosition)

ltscriptgt

JavaScript

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpweatheryahooapiscomforecastrssp=03592

bull Parse RSS feedltrss version=20 gt

ltchannelgt

lttitlegtYahoo Weather - Pittsburg NHlttitlegt

ltlinkgtltlinkgt

ltdescriptiongtYahoo Weather for Pittsburg NHltdescriptiongt

ltlanguagegten-usltlanguagegt

ltlastBuildDategtFri 22 Mar 2013 651 pm EDTltlastBuildDategt

ltttlgt60ltttlgt

ltyweatherlocation city=Pittsburg region=NH country=USgt

ltyweatherunits temperature=F distance=mi pressure=in speed=mphgt

ltyweatherwind chill=23 direction=330 speed=6 gt

ltyweatheratmosphere humidity=60 visibility=10 pressure=2959 rising=1 gt

ltyweatherastronomy sunrise=642 am sunset=658 pmgt

ltimage

lttitlegtYahoo Weatherlttitlegt

ltwidthgt142ltwidthgt

ltheightgt18ltheightgt

ltlinkgthttpweatheryahoocomltlinkgt

lturlgthttplyimgcomaibrandpurplelogouhusnews-weagiflturlgt

ltimagegt

ltitemgt

lttitlegtConditions for Pittsburg NH at 651 pm EDTlttitlegt

ltgeolatgt4505ltgeolatgt

ltgeolonggt-7139ltgeolonggt

ltlinkgtltlinkgt

ltpubDategtFri 22 Mar 2013 651 pm EDTltpubDategt

ltyweathercondition text=Cloudy code=26 temp=29 date=Fri 22 Mar 2013 651 pm EDT gt

ltdescriptiongtltdescriptiongt

ltyweatherforecast day=Fri date=22 Mar 2013 low=14 high=26 text=Snow Showers code=14 gt

ltyweatherforecast day=Sat date=23 Mar 2013 low=18 high=28 text=Few Snow Showers code=14 gt

ltguid isPermaLink=falsegtUSNH0186_2013_03_23_7_00_EDTltguidgt

ltitemgt

ltchannelgt

ltrssgt

Retrieve content

+

Custom RSS parsing

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpgdatayoutubecom feedsapivideosalt=atomampv=2ampmax-results=5ampq=javaone

bull Parse ATOM Feed (Sample for a single item)ltentry gdetag=WampquotCU8DR347eCp7I2A9WhBXEUkampquotgt

ltidgttagyoutubecom2008videoI5lAgaCbqZ0ltidgt

ltpublishedgt2012-10-01T160927000Zltpublishedgt

ltupdatedgt2013-03-24T165116000Zltupdatedgt

ltcategory scheme=httpschemasgooglecomg2005kind term=httpgdatayoutubecomschemas2007video gt

ltcategory scheme=httpgdatayoutubecomschemas2007categoriescat term=Tech label=Science ampamp Technology gt

lttitlegtWelcome to JavaOne 2012lttitlegt

ltcontent type=applicationx-shockwave-flash src=httpwwwyoutubecomvI5lAgaCbqZ0version=3ampampf=videosampampapp=youtube_gdata gt

ltauthorgt

ltnamegtjavaltnamegt

lturigthttpgdatayoutubecomfeedsapiusersjavalturigt

ltytuserIdgtmRtPmgnQ04CMUpSUqPfhxQltytuserIdgt

ltauthorgt

ltmediagroupgt

ltmediatitle type=plaingtWelcome to JavaOne 2012ltmediatitlegt

ltytaspectRatiogtwidescreenltytaspectRatiogt

ltytduration seconds=97 gt

ltytuploadedgt2012-10-01T160927000Zltytuploadedgt

ltytuploaderIdgtUCmRtPmgnQ04CMUpSUqPfhxQltytuploaderIdgt

ltytvideoidgtI5lAgaCbqZ0ltytvideoidgt

ltmediagroupgt

ltgdrating average=4716216 max=5 min=1 numRaters=74 rel=httpschemasgooglecomg2005overall gt

ltytstatistics favoriteCount=0 viewCount=4835 gt

ltytrating numDislikes=5 numLikes=69 gt

ltentrygt

Retrieve content

+

Custom ATOM parsing

Common Mashup Scenarios

bull GET httpssearchtwittercomsearchjsonq=javaoneamprpp=10

bull Parse JSON Feed (Sample for a single item)

completed_in0021

max_id320699880265891840

max_id_str320699880265891840

next_pagepage=2ampmax_id=320699880265891840ampq=javaoneamprpp=10

page1

queryjavaone

refresh_urlsince_id=320699880265891840ampq=javaone

results[

created_atSun 07 Apr 2013 004944 +0000

from_userrob_ratcliff

from_user_id265460384

from_user_id_str265460384

from_user_nameRob Ratcliff

geonull

id320699880265891840

id_str320699880265891840

iso_language_codeen

metadata

result_typerecent

profile_image_urlhttpa0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

profile_image_url_httpshttpssi0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

sourceamplta href=ampquothttptwittercomtweetbuttonampquotampgtTweet Buttonampltaampgt

textRT karianna Dont forget that the CFP for javaone is closing in only 8-9 days Submit your paper today --ampgt httptco6AAWdIf87h java dev

]

results_per_page10

since_id0

since_id_str0

Retrieve content

+

Custom JSON parsing

Common Mashup Scenarios

In order to interact with the most popular mashup service providers we have to

Write Intensive JavaScript code

Write extra Java code to interact with the server and then parse different formats

JSON ATOM RSS

So Developing Mashups is not an easy task

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 10: JSF Mashups in Action

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Common Mashup Scenarios

ltscript type=textjavascriptgt

hellip

function getWeatherForecast(map address)

var geocoder = new GClientGeocoder()

geocodergetLatLng(address

function(location)

if (location)

alert(location + not found)

else

var countryWeatherStatus = Mathfloor(Mathrandom() 4)

var iconObject = new GIcon(G_DEFAULT_ICON)

iconObjecticonSize = new GSize(45 45)

iconObjectshadowSize = new GSize(37 34)

iconObjecticonAnchor = new GPoint(9 34)

iconObjectinfoWindowAnchor = new GPoint(9 2)

iconObjectimage = weatherForecasts[countryWeatherStatus]

var marker = new GMarker(location icon iconObject)

mapaddOverlay(marker)

)

function initialize()

if (GBrowserIsCompatible())

var map = new GMap2(documentgetElementById(map))

mapsetCenter(new GLatLng(24 15) 13)

mapsetZoom(4)

get the weather status for countries

getWeatherForecast(map Egypt)

getWeatherForecast(map Turkey)

getWeatherForecast(map Libya)

getWeatherForecast(map Spain)

getWeatherForecast(map Algeria)

getWeatherForecast(map Mali)

getWeatherForecast(map Kenya)

getWeatherForecast(map Saudi Arabia)

getWeatherForecast(map Niger)

add the map control

var mapControlPosition = new GControlPosition(G_ANCHOR_BOTTOM_RIGHT new GSize(10 10))

mapaddControl(new GLargeMapControl() mapControlPosition)

ltscriptgt

JavaScript

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpweatheryahooapiscomforecastrssp=03592

bull Parse RSS feedltrss version=20 gt

ltchannelgt

lttitlegtYahoo Weather - Pittsburg NHlttitlegt

ltlinkgtltlinkgt

ltdescriptiongtYahoo Weather for Pittsburg NHltdescriptiongt

ltlanguagegten-usltlanguagegt

ltlastBuildDategtFri 22 Mar 2013 651 pm EDTltlastBuildDategt

ltttlgt60ltttlgt

ltyweatherlocation city=Pittsburg region=NH country=USgt

ltyweatherunits temperature=F distance=mi pressure=in speed=mphgt

ltyweatherwind chill=23 direction=330 speed=6 gt

ltyweatheratmosphere humidity=60 visibility=10 pressure=2959 rising=1 gt

ltyweatherastronomy sunrise=642 am sunset=658 pmgt

ltimage

lttitlegtYahoo Weatherlttitlegt

ltwidthgt142ltwidthgt

ltheightgt18ltheightgt

ltlinkgthttpweatheryahoocomltlinkgt

lturlgthttplyimgcomaibrandpurplelogouhusnews-weagiflturlgt

ltimagegt

ltitemgt

lttitlegtConditions for Pittsburg NH at 651 pm EDTlttitlegt

ltgeolatgt4505ltgeolatgt

ltgeolonggt-7139ltgeolonggt

ltlinkgtltlinkgt

ltpubDategtFri 22 Mar 2013 651 pm EDTltpubDategt

ltyweathercondition text=Cloudy code=26 temp=29 date=Fri 22 Mar 2013 651 pm EDT gt

ltdescriptiongtltdescriptiongt

ltyweatherforecast day=Fri date=22 Mar 2013 low=14 high=26 text=Snow Showers code=14 gt

ltyweatherforecast day=Sat date=23 Mar 2013 low=18 high=28 text=Few Snow Showers code=14 gt

ltguid isPermaLink=falsegtUSNH0186_2013_03_23_7_00_EDTltguidgt

ltitemgt

ltchannelgt

ltrssgt

Retrieve content

+

Custom RSS parsing

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpgdatayoutubecom feedsapivideosalt=atomampv=2ampmax-results=5ampq=javaone

bull Parse ATOM Feed (Sample for a single item)ltentry gdetag=WampquotCU8DR347eCp7I2A9WhBXEUkampquotgt

ltidgttagyoutubecom2008videoI5lAgaCbqZ0ltidgt

ltpublishedgt2012-10-01T160927000Zltpublishedgt

ltupdatedgt2013-03-24T165116000Zltupdatedgt

ltcategory scheme=httpschemasgooglecomg2005kind term=httpgdatayoutubecomschemas2007video gt

ltcategory scheme=httpgdatayoutubecomschemas2007categoriescat term=Tech label=Science ampamp Technology gt

lttitlegtWelcome to JavaOne 2012lttitlegt

ltcontent type=applicationx-shockwave-flash src=httpwwwyoutubecomvI5lAgaCbqZ0version=3ampampf=videosampampapp=youtube_gdata gt

ltauthorgt

ltnamegtjavaltnamegt

lturigthttpgdatayoutubecomfeedsapiusersjavalturigt

ltytuserIdgtmRtPmgnQ04CMUpSUqPfhxQltytuserIdgt

ltauthorgt

ltmediagroupgt

ltmediatitle type=plaingtWelcome to JavaOne 2012ltmediatitlegt

ltytaspectRatiogtwidescreenltytaspectRatiogt

ltytduration seconds=97 gt

ltytuploadedgt2012-10-01T160927000Zltytuploadedgt

ltytuploaderIdgtUCmRtPmgnQ04CMUpSUqPfhxQltytuploaderIdgt

ltytvideoidgtI5lAgaCbqZ0ltytvideoidgt

ltmediagroupgt

ltgdrating average=4716216 max=5 min=1 numRaters=74 rel=httpschemasgooglecomg2005overall gt

ltytstatistics favoriteCount=0 viewCount=4835 gt

ltytrating numDislikes=5 numLikes=69 gt

ltentrygt

Retrieve content

+

Custom ATOM parsing

Common Mashup Scenarios

bull GET httpssearchtwittercomsearchjsonq=javaoneamprpp=10

bull Parse JSON Feed (Sample for a single item)

completed_in0021

max_id320699880265891840

max_id_str320699880265891840

next_pagepage=2ampmax_id=320699880265891840ampq=javaoneamprpp=10

page1

queryjavaone

refresh_urlsince_id=320699880265891840ampq=javaone

results[

created_atSun 07 Apr 2013 004944 +0000

from_userrob_ratcliff

from_user_id265460384

from_user_id_str265460384

from_user_nameRob Ratcliff

geonull

id320699880265891840

id_str320699880265891840

iso_language_codeen

metadata

result_typerecent

profile_image_urlhttpa0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

profile_image_url_httpshttpssi0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

sourceamplta href=ampquothttptwittercomtweetbuttonampquotampgtTweet Buttonampltaampgt

textRT karianna Dont forget that the CFP for javaone is closing in only 8-9 days Submit your paper today --ampgt httptco6AAWdIf87h java dev

]

results_per_page10

since_id0

since_id_str0

Retrieve content

+

Custom JSON parsing

Common Mashup Scenarios

In order to interact with the most popular mashup service providers we have to

Write Intensive JavaScript code

Write extra Java code to interact with the server and then parse different formats

JSON ATOM RSS

So Developing Mashups is not an easy task

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 11: JSF Mashups in Action

Common Mashup Scenarios

ltscript type=textjavascriptgt

hellip

function getWeatherForecast(map address)

var geocoder = new GClientGeocoder()

geocodergetLatLng(address

function(location)

if (location)

alert(location + not found)

else

var countryWeatherStatus = Mathfloor(Mathrandom() 4)

var iconObject = new GIcon(G_DEFAULT_ICON)

iconObjecticonSize = new GSize(45 45)

iconObjectshadowSize = new GSize(37 34)

iconObjecticonAnchor = new GPoint(9 34)

iconObjectinfoWindowAnchor = new GPoint(9 2)

iconObjectimage = weatherForecasts[countryWeatherStatus]

var marker = new GMarker(location icon iconObject)

mapaddOverlay(marker)

)

function initialize()

if (GBrowserIsCompatible())

var map = new GMap2(documentgetElementById(map))

mapsetCenter(new GLatLng(24 15) 13)

mapsetZoom(4)

get the weather status for countries

getWeatherForecast(map Egypt)

getWeatherForecast(map Turkey)

getWeatherForecast(map Libya)

getWeatherForecast(map Spain)

getWeatherForecast(map Algeria)

getWeatherForecast(map Mali)

getWeatherForecast(map Kenya)

getWeatherForecast(map Saudi Arabia)

getWeatherForecast(map Niger)

add the map control

var mapControlPosition = new GControlPosition(G_ANCHOR_BOTTOM_RIGHT new GSize(10 10))

mapaddControl(new GLargeMapControl() mapControlPosition)

ltscriptgt

JavaScript

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpweatheryahooapiscomforecastrssp=03592

bull Parse RSS feedltrss version=20 gt

ltchannelgt

lttitlegtYahoo Weather - Pittsburg NHlttitlegt

ltlinkgtltlinkgt

ltdescriptiongtYahoo Weather for Pittsburg NHltdescriptiongt

ltlanguagegten-usltlanguagegt

ltlastBuildDategtFri 22 Mar 2013 651 pm EDTltlastBuildDategt

ltttlgt60ltttlgt

ltyweatherlocation city=Pittsburg region=NH country=USgt

ltyweatherunits temperature=F distance=mi pressure=in speed=mphgt

ltyweatherwind chill=23 direction=330 speed=6 gt

ltyweatheratmosphere humidity=60 visibility=10 pressure=2959 rising=1 gt

ltyweatherastronomy sunrise=642 am sunset=658 pmgt

ltimage

lttitlegtYahoo Weatherlttitlegt

ltwidthgt142ltwidthgt

ltheightgt18ltheightgt

ltlinkgthttpweatheryahoocomltlinkgt

lturlgthttplyimgcomaibrandpurplelogouhusnews-weagiflturlgt

ltimagegt

ltitemgt

lttitlegtConditions for Pittsburg NH at 651 pm EDTlttitlegt

ltgeolatgt4505ltgeolatgt

ltgeolonggt-7139ltgeolonggt

ltlinkgtltlinkgt

ltpubDategtFri 22 Mar 2013 651 pm EDTltpubDategt

ltyweathercondition text=Cloudy code=26 temp=29 date=Fri 22 Mar 2013 651 pm EDT gt

ltdescriptiongtltdescriptiongt

ltyweatherforecast day=Fri date=22 Mar 2013 low=14 high=26 text=Snow Showers code=14 gt

ltyweatherforecast day=Sat date=23 Mar 2013 low=18 high=28 text=Few Snow Showers code=14 gt

ltguid isPermaLink=falsegtUSNH0186_2013_03_23_7_00_EDTltguidgt

ltitemgt

ltchannelgt

ltrssgt

Retrieve content

+

Custom RSS parsing

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpgdatayoutubecom feedsapivideosalt=atomampv=2ampmax-results=5ampq=javaone

bull Parse ATOM Feed (Sample for a single item)ltentry gdetag=WampquotCU8DR347eCp7I2A9WhBXEUkampquotgt

ltidgttagyoutubecom2008videoI5lAgaCbqZ0ltidgt

ltpublishedgt2012-10-01T160927000Zltpublishedgt

ltupdatedgt2013-03-24T165116000Zltupdatedgt

ltcategory scheme=httpschemasgooglecomg2005kind term=httpgdatayoutubecomschemas2007video gt

ltcategory scheme=httpgdatayoutubecomschemas2007categoriescat term=Tech label=Science ampamp Technology gt

lttitlegtWelcome to JavaOne 2012lttitlegt

ltcontent type=applicationx-shockwave-flash src=httpwwwyoutubecomvI5lAgaCbqZ0version=3ampampf=videosampampapp=youtube_gdata gt

ltauthorgt

ltnamegtjavaltnamegt

lturigthttpgdatayoutubecomfeedsapiusersjavalturigt

ltytuserIdgtmRtPmgnQ04CMUpSUqPfhxQltytuserIdgt

ltauthorgt

ltmediagroupgt

ltmediatitle type=plaingtWelcome to JavaOne 2012ltmediatitlegt

ltytaspectRatiogtwidescreenltytaspectRatiogt

ltytduration seconds=97 gt

ltytuploadedgt2012-10-01T160927000Zltytuploadedgt

ltytuploaderIdgtUCmRtPmgnQ04CMUpSUqPfhxQltytuploaderIdgt

ltytvideoidgtI5lAgaCbqZ0ltytvideoidgt

ltmediagroupgt

ltgdrating average=4716216 max=5 min=1 numRaters=74 rel=httpschemasgooglecomg2005overall gt

ltytstatistics favoriteCount=0 viewCount=4835 gt

ltytrating numDislikes=5 numLikes=69 gt

ltentrygt

Retrieve content

+

Custom ATOM parsing

Common Mashup Scenarios

bull GET httpssearchtwittercomsearchjsonq=javaoneamprpp=10

bull Parse JSON Feed (Sample for a single item)

completed_in0021

max_id320699880265891840

max_id_str320699880265891840

next_pagepage=2ampmax_id=320699880265891840ampq=javaoneamprpp=10

page1

queryjavaone

refresh_urlsince_id=320699880265891840ampq=javaone

results[

created_atSun 07 Apr 2013 004944 +0000

from_userrob_ratcliff

from_user_id265460384

from_user_id_str265460384

from_user_nameRob Ratcliff

geonull

id320699880265891840

id_str320699880265891840

iso_language_codeen

metadata

result_typerecent

profile_image_urlhttpa0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

profile_image_url_httpshttpssi0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

sourceamplta href=ampquothttptwittercomtweetbuttonampquotampgtTweet Buttonampltaampgt

textRT karianna Dont forget that the CFP for javaone is closing in only 8-9 days Submit your paper today --ampgt httptco6AAWdIf87h java dev

]

results_per_page10

since_id0

since_id_str0

Retrieve content

+

Custom JSON parsing

Common Mashup Scenarios

In order to interact with the most popular mashup service providers we have to

Write Intensive JavaScript code

Write extra Java code to interact with the server and then parse different formats

JSON ATOM RSS

So Developing Mashups is not an easy task

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 12: JSF Mashups in Action

ltscript type=textjavascriptgt

hellip

function getWeatherForecast(map address)

var geocoder = new GClientGeocoder()

geocodergetLatLng(address

function(location)

if (location)

alert(location + not found)

else

var countryWeatherStatus = Mathfloor(Mathrandom() 4)

var iconObject = new GIcon(G_DEFAULT_ICON)

iconObjecticonSize = new GSize(45 45)

iconObjectshadowSize = new GSize(37 34)

iconObjecticonAnchor = new GPoint(9 34)

iconObjectinfoWindowAnchor = new GPoint(9 2)

iconObjectimage = weatherForecasts[countryWeatherStatus]

var marker = new GMarker(location icon iconObject)

mapaddOverlay(marker)

)

function initialize()

if (GBrowserIsCompatible())

var map = new GMap2(documentgetElementById(map))

mapsetCenter(new GLatLng(24 15) 13)

mapsetZoom(4)

get the weather status for countries

getWeatherForecast(map Egypt)

getWeatherForecast(map Turkey)

getWeatherForecast(map Libya)

getWeatherForecast(map Spain)

getWeatherForecast(map Algeria)

getWeatherForecast(map Mali)

getWeatherForecast(map Kenya)

getWeatherForecast(map Saudi Arabia)

getWeatherForecast(map Niger)

add the map control

var mapControlPosition = new GControlPosition(G_ANCHOR_BOTTOM_RIGHT new GSize(10 10))

mapaddControl(new GLargeMapControl() mapControlPosition)

ltscriptgt

JavaScript

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpweatheryahooapiscomforecastrssp=03592

bull Parse RSS feedltrss version=20 gt

ltchannelgt

lttitlegtYahoo Weather - Pittsburg NHlttitlegt

ltlinkgtltlinkgt

ltdescriptiongtYahoo Weather for Pittsburg NHltdescriptiongt

ltlanguagegten-usltlanguagegt

ltlastBuildDategtFri 22 Mar 2013 651 pm EDTltlastBuildDategt

ltttlgt60ltttlgt

ltyweatherlocation city=Pittsburg region=NH country=USgt

ltyweatherunits temperature=F distance=mi pressure=in speed=mphgt

ltyweatherwind chill=23 direction=330 speed=6 gt

ltyweatheratmosphere humidity=60 visibility=10 pressure=2959 rising=1 gt

ltyweatherastronomy sunrise=642 am sunset=658 pmgt

ltimage

lttitlegtYahoo Weatherlttitlegt

ltwidthgt142ltwidthgt

ltheightgt18ltheightgt

ltlinkgthttpweatheryahoocomltlinkgt

lturlgthttplyimgcomaibrandpurplelogouhusnews-weagiflturlgt

ltimagegt

ltitemgt

lttitlegtConditions for Pittsburg NH at 651 pm EDTlttitlegt

ltgeolatgt4505ltgeolatgt

ltgeolonggt-7139ltgeolonggt

ltlinkgtltlinkgt

ltpubDategtFri 22 Mar 2013 651 pm EDTltpubDategt

ltyweathercondition text=Cloudy code=26 temp=29 date=Fri 22 Mar 2013 651 pm EDT gt

ltdescriptiongtltdescriptiongt

ltyweatherforecast day=Fri date=22 Mar 2013 low=14 high=26 text=Snow Showers code=14 gt

ltyweatherforecast day=Sat date=23 Mar 2013 low=18 high=28 text=Few Snow Showers code=14 gt

ltguid isPermaLink=falsegtUSNH0186_2013_03_23_7_00_EDTltguidgt

ltitemgt

ltchannelgt

ltrssgt

Retrieve content

+

Custom RSS parsing

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpgdatayoutubecom feedsapivideosalt=atomampv=2ampmax-results=5ampq=javaone

bull Parse ATOM Feed (Sample for a single item)ltentry gdetag=WampquotCU8DR347eCp7I2A9WhBXEUkampquotgt

ltidgttagyoutubecom2008videoI5lAgaCbqZ0ltidgt

ltpublishedgt2012-10-01T160927000Zltpublishedgt

ltupdatedgt2013-03-24T165116000Zltupdatedgt

ltcategory scheme=httpschemasgooglecomg2005kind term=httpgdatayoutubecomschemas2007video gt

ltcategory scheme=httpgdatayoutubecomschemas2007categoriescat term=Tech label=Science ampamp Technology gt

lttitlegtWelcome to JavaOne 2012lttitlegt

ltcontent type=applicationx-shockwave-flash src=httpwwwyoutubecomvI5lAgaCbqZ0version=3ampampf=videosampampapp=youtube_gdata gt

ltauthorgt

ltnamegtjavaltnamegt

lturigthttpgdatayoutubecomfeedsapiusersjavalturigt

ltytuserIdgtmRtPmgnQ04CMUpSUqPfhxQltytuserIdgt

ltauthorgt

ltmediagroupgt

ltmediatitle type=plaingtWelcome to JavaOne 2012ltmediatitlegt

ltytaspectRatiogtwidescreenltytaspectRatiogt

ltytduration seconds=97 gt

ltytuploadedgt2012-10-01T160927000Zltytuploadedgt

ltytuploaderIdgtUCmRtPmgnQ04CMUpSUqPfhxQltytuploaderIdgt

ltytvideoidgtI5lAgaCbqZ0ltytvideoidgt

ltmediagroupgt

ltgdrating average=4716216 max=5 min=1 numRaters=74 rel=httpschemasgooglecomg2005overall gt

ltytstatistics favoriteCount=0 viewCount=4835 gt

ltytrating numDislikes=5 numLikes=69 gt

ltentrygt

Retrieve content

+

Custom ATOM parsing

Common Mashup Scenarios

bull GET httpssearchtwittercomsearchjsonq=javaoneamprpp=10

bull Parse JSON Feed (Sample for a single item)

completed_in0021

max_id320699880265891840

max_id_str320699880265891840

next_pagepage=2ampmax_id=320699880265891840ampq=javaoneamprpp=10

page1

queryjavaone

refresh_urlsince_id=320699880265891840ampq=javaone

results[

created_atSun 07 Apr 2013 004944 +0000

from_userrob_ratcliff

from_user_id265460384

from_user_id_str265460384

from_user_nameRob Ratcliff

geonull

id320699880265891840

id_str320699880265891840

iso_language_codeen

metadata

result_typerecent

profile_image_urlhttpa0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

profile_image_url_httpshttpssi0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

sourceamplta href=ampquothttptwittercomtweetbuttonampquotampgtTweet Buttonampltaampgt

textRT karianna Dont forget that the CFP for javaone is closing in only 8-9 days Submit your paper today --ampgt httptco6AAWdIf87h java dev

]

results_per_page10

since_id0

since_id_str0

Retrieve content

+

Custom JSON parsing

Common Mashup Scenarios

In order to interact with the most popular mashup service providers we have to

Write Intensive JavaScript code

Write extra Java code to interact with the server and then parse different formats

JSON ATOM RSS

So Developing Mashups is not an easy task

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 13: JSF Mashups in Action

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpweatheryahooapiscomforecastrssp=03592

bull Parse RSS feedltrss version=20 gt

ltchannelgt

lttitlegtYahoo Weather - Pittsburg NHlttitlegt

ltlinkgtltlinkgt

ltdescriptiongtYahoo Weather for Pittsburg NHltdescriptiongt

ltlanguagegten-usltlanguagegt

ltlastBuildDategtFri 22 Mar 2013 651 pm EDTltlastBuildDategt

ltttlgt60ltttlgt

ltyweatherlocation city=Pittsburg region=NH country=USgt

ltyweatherunits temperature=F distance=mi pressure=in speed=mphgt

ltyweatherwind chill=23 direction=330 speed=6 gt

ltyweatheratmosphere humidity=60 visibility=10 pressure=2959 rising=1 gt

ltyweatherastronomy sunrise=642 am sunset=658 pmgt

ltimage

lttitlegtYahoo Weatherlttitlegt

ltwidthgt142ltwidthgt

ltheightgt18ltheightgt

ltlinkgthttpweatheryahoocomltlinkgt

lturlgthttplyimgcomaibrandpurplelogouhusnews-weagiflturlgt

ltimagegt

ltitemgt

lttitlegtConditions for Pittsburg NH at 651 pm EDTlttitlegt

ltgeolatgt4505ltgeolatgt

ltgeolonggt-7139ltgeolonggt

ltlinkgtltlinkgt

ltpubDategtFri 22 Mar 2013 651 pm EDTltpubDategt

ltyweathercondition text=Cloudy code=26 temp=29 date=Fri 22 Mar 2013 651 pm EDT gt

ltdescriptiongtltdescriptiongt

ltyweatherforecast day=Fri date=22 Mar 2013 low=14 high=26 text=Snow Showers code=14 gt

ltyweatherforecast day=Sat date=23 Mar 2013 low=18 high=28 text=Few Snow Showers code=14 gt

ltguid isPermaLink=falsegtUSNH0186_2013_03_23_7_00_EDTltguidgt

ltitemgt

ltchannelgt

ltrssgt

Retrieve content

+

Custom RSS parsing

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpgdatayoutubecom feedsapivideosalt=atomampv=2ampmax-results=5ampq=javaone

bull Parse ATOM Feed (Sample for a single item)ltentry gdetag=WampquotCU8DR347eCp7I2A9WhBXEUkampquotgt

ltidgttagyoutubecom2008videoI5lAgaCbqZ0ltidgt

ltpublishedgt2012-10-01T160927000Zltpublishedgt

ltupdatedgt2013-03-24T165116000Zltupdatedgt

ltcategory scheme=httpschemasgooglecomg2005kind term=httpgdatayoutubecomschemas2007video gt

ltcategory scheme=httpgdatayoutubecomschemas2007categoriescat term=Tech label=Science ampamp Technology gt

lttitlegtWelcome to JavaOne 2012lttitlegt

ltcontent type=applicationx-shockwave-flash src=httpwwwyoutubecomvI5lAgaCbqZ0version=3ampampf=videosampampapp=youtube_gdata gt

ltauthorgt

ltnamegtjavaltnamegt

lturigthttpgdatayoutubecomfeedsapiusersjavalturigt

ltytuserIdgtmRtPmgnQ04CMUpSUqPfhxQltytuserIdgt

ltauthorgt

ltmediagroupgt

ltmediatitle type=plaingtWelcome to JavaOne 2012ltmediatitlegt

ltytaspectRatiogtwidescreenltytaspectRatiogt

ltytduration seconds=97 gt

ltytuploadedgt2012-10-01T160927000Zltytuploadedgt

ltytuploaderIdgtUCmRtPmgnQ04CMUpSUqPfhxQltytuploaderIdgt

ltytvideoidgtI5lAgaCbqZ0ltytvideoidgt

ltmediagroupgt

ltgdrating average=4716216 max=5 min=1 numRaters=74 rel=httpschemasgooglecomg2005overall gt

ltytstatistics favoriteCount=0 viewCount=4835 gt

ltytrating numDislikes=5 numLikes=69 gt

ltentrygt

Retrieve content

+

Custom ATOM parsing

Common Mashup Scenarios

bull GET httpssearchtwittercomsearchjsonq=javaoneamprpp=10

bull Parse JSON Feed (Sample for a single item)

completed_in0021

max_id320699880265891840

max_id_str320699880265891840

next_pagepage=2ampmax_id=320699880265891840ampq=javaoneamprpp=10

page1

queryjavaone

refresh_urlsince_id=320699880265891840ampq=javaone

results[

created_atSun 07 Apr 2013 004944 +0000

from_userrob_ratcliff

from_user_id265460384

from_user_id_str265460384

from_user_nameRob Ratcliff

geonull

id320699880265891840

id_str320699880265891840

iso_language_codeen

metadata

result_typerecent

profile_image_urlhttpa0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

profile_image_url_httpshttpssi0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

sourceamplta href=ampquothttptwittercomtweetbuttonampquotampgtTweet Buttonampltaampgt

textRT karianna Dont forget that the CFP for javaone is closing in only 8-9 days Submit your paper today --ampgt httptco6AAWdIf87h java dev

]

results_per_page10

since_id0

since_id_str0

Retrieve content

+

Custom JSON parsing

Common Mashup Scenarios

In order to interact with the most popular mashup service providers we have to

Write Intensive JavaScript code

Write extra Java code to interact with the server and then parse different formats

JSON ATOM RSS

So Developing Mashups is not an easy task

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 14: JSF Mashups in Action

Common Mashup Scenariosbull GET httpweatheryahooapiscomforecastrssp=03592

bull Parse RSS feedltrss version=20 gt

ltchannelgt

lttitlegtYahoo Weather - Pittsburg NHlttitlegt

ltlinkgtltlinkgt

ltdescriptiongtYahoo Weather for Pittsburg NHltdescriptiongt

ltlanguagegten-usltlanguagegt

ltlastBuildDategtFri 22 Mar 2013 651 pm EDTltlastBuildDategt

ltttlgt60ltttlgt

ltyweatherlocation city=Pittsburg region=NH country=USgt

ltyweatherunits temperature=F distance=mi pressure=in speed=mphgt

ltyweatherwind chill=23 direction=330 speed=6 gt

ltyweatheratmosphere humidity=60 visibility=10 pressure=2959 rising=1 gt

ltyweatherastronomy sunrise=642 am sunset=658 pmgt

ltimage

lttitlegtYahoo Weatherlttitlegt

ltwidthgt142ltwidthgt

ltheightgt18ltheightgt

ltlinkgthttpweatheryahoocomltlinkgt

lturlgthttplyimgcomaibrandpurplelogouhusnews-weagiflturlgt

ltimagegt

ltitemgt

lttitlegtConditions for Pittsburg NH at 651 pm EDTlttitlegt

ltgeolatgt4505ltgeolatgt

ltgeolonggt-7139ltgeolonggt

ltlinkgtltlinkgt

ltpubDategtFri 22 Mar 2013 651 pm EDTltpubDategt

ltyweathercondition text=Cloudy code=26 temp=29 date=Fri 22 Mar 2013 651 pm EDT gt

ltdescriptiongtltdescriptiongt

ltyweatherforecast day=Fri date=22 Mar 2013 low=14 high=26 text=Snow Showers code=14 gt

ltyweatherforecast day=Sat date=23 Mar 2013 low=18 high=28 text=Few Snow Showers code=14 gt

ltguid isPermaLink=falsegtUSNH0186_2013_03_23_7_00_EDTltguidgt

ltitemgt

ltchannelgt

ltrssgt

Retrieve content

+

Custom RSS parsing

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpgdatayoutubecom feedsapivideosalt=atomampv=2ampmax-results=5ampq=javaone

bull Parse ATOM Feed (Sample for a single item)ltentry gdetag=WampquotCU8DR347eCp7I2A9WhBXEUkampquotgt

ltidgttagyoutubecom2008videoI5lAgaCbqZ0ltidgt

ltpublishedgt2012-10-01T160927000Zltpublishedgt

ltupdatedgt2013-03-24T165116000Zltupdatedgt

ltcategory scheme=httpschemasgooglecomg2005kind term=httpgdatayoutubecomschemas2007video gt

ltcategory scheme=httpgdatayoutubecomschemas2007categoriescat term=Tech label=Science ampamp Technology gt

lttitlegtWelcome to JavaOne 2012lttitlegt

ltcontent type=applicationx-shockwave-flash src=httpwwwyoutubecomvI5lAgaCbqZ0version=3ampampf=videosampampapp=youtube_gdata gt

ltauthorgt

ltnamegtjavaltnamegt

lturigthttpgdatayoutubecomfeedsapiusersjavalturigt

ltytuserIdgtmRtPmgnQ04CMUpSUqPfhxQltytuserIdgt

ltauthorgt

ltmediagroupgt

ltmediatitle type=plaingtWelcome to JavaOne 2012ltmediatitlegt

ltytaspectRatiogtwidescreenltytaspectRatiogt

ltytduration seconds=97 gt

ltytuploadedgt2012-10-01T160927000Zltytuploadedgt

ltytuploaderIdgtUCmRtPmgnQ04CMUpSUqPfhxQltytuploaderIdgt

ltytvideoidgtI5lAgaCbqZ0ltytvideoidgt

ltmediagroupgt

ltgdrating average=4716216 max=5 min=1 numRaters=74 rel=httpschemasgooglecomg2005overall gt

ltytstatistics favoriteCount=0 viewCount=4835 gt

ltytrating numDislikes=5 numLikes=69 gt

ltentrygt

Retrieve content

+

Custom ATOM parsing

Common Mashup Scenarios

bull GET httpssearchtwittercomsearchjsonq=javaoneamprpp=10

bull Parse JSON Feed (Sample for a single item)

completed_in0021

max_id320699880265891840

max_id_str320699880265891840

next_pagepage=2ampmax_id=320699880265891840ampq=javaoneamprpp=10

page1

queryjavaone

refresh_urlsince_id=320699880265891840ampq=javaone

results[

created_atSun 07 Apr 2013 004944 +0000

from_userrob_ratcliff

from_user_id265460384

from_user_id_str265460384

from_user_nameRob Ratcliff

geonull

id320699880265891840

id_str320699880265891840

iso_language_codeen

metadata

result_typerecent

profile_image_urlhttpa0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

profile_image_url_httpshttpssi0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

sourceamplta href=ampquothttptwittercomtweetbuttonampquotampgtTweet Buttonampltaampgt

textRT karianna Dont forget that the CFP for javaone is closing in only 8-9 days Submit your paper today --ampgt httptco6AAWdIf87h java dev

]

results_per_page10

since_id0

since_id_str0

Retrieve content

+

Custom JSON parsing

Common Mashup Scenarios

In order to interact with the most popular mashup service providers we have to

Write Intensive JavaScript code

Write extra Java code to interact with the server and then parse different formats

JSON ATOM RSS

So Developing Mashups is not an easy task

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 15: JSF Mashups in Action

Common Mashup Scenarios

Common Mashup Scenariosbull GET httpgdatayoutubecom feedsapivideosalt=atomampv=2ampmax-results=5ampq=javaone

bull Parse ATOM Feed (Sample for a single item)ltentry gdetag=WampquotCU8DR347eCp7I2A9WhBXEUkampquotgt

ltidgttagyoutubecom2008videoI5lAgaCbqZ0ltidgt

ltpublishedgt2012-10-01T160927000Zltpublishedgt

ltupdatedgt2013-03-24T165116000Zltupdatedgt

ltcategory scheme=httpschemasgooglecomg2005kind term=httpgdatayoutubecomschemas2007video gt

ltcategory scheme=httpgdatayoutubecomschemas2007categoriescat term=Tech label=Science ampamp Technology gt

lttitlegtWelcome to JavaOne 2012lttitlegt

ltcontent type=applicationx-shockwave-flash src=httpwwwyoutubecomvI5lAgaCbqZ0version=3ampampf=videosampampapp=youtube_gdata gt

ltauthorgt

ltnamegtjavaltnamegt

lturigthttpgdatayoutubecomfeedsapiusersjavalturigt

ltytuserIdgtmRtPmgnQ04CMUpSUqPfhxQltytuserIdgt

ltauthorgt

ltmediagroupgt

ltmediatitle type=plaingtWelcome to JavaOne 2012ltmediatitlegt

ltytaspectRatiogtwidescreenltytaspectRatiogt

ltytduration seconds=97 gt

ltytuploadedgt2012-10-01T160927000Zltytuploadedgt

ltytuploaderIdgtUCmRtPmgnQ04CMUpSUqPfhxQltytuploaderIdgt

ltytvideoidgtI5lAgaCbqZ0ltytvideoidgt

ltmediagroupgt

ltgdrating average=4716216 max=5 min=1 numRaters=74 rel=httpschemasgooglecomg2005overall gt

ltytstatistics favoriteCount=0 viewCount=4835 gt

ltytrating numDislikes=5 numLikes=69 gt

ltentrygt

Retrieve content

+

Custom ATOM parsing

Common Mashup Scenarios

bull GET httpssearchtwittercomsearchjsonq=javaoneamprpp=10

bull Parse JSON Feed (Sample for a single item)

completed_in0021

max_id320699880265891840

max_id_str320699880265891840

next_pagepage=2ampmax_id=320699880265891840ampq=javaoneamprpp=10

page1

queryjavaone

refresh_urlsince_id=320699880265891840ampq=javaone

results[

created_atSun 07 Apr 2013 004944 +0000

from_userrob_ratcliff

from_user_id265460384

from_user_id_str265460384

from_user_nameRob Ratcliff

geonull

id320699880265891840

id_str320699880265891840

iso_language_codeen

metadata

result_typerecent

profile_image_urlhttpa0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

profile_image_url_httpshttpssi0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

sourceamplta href=ampquothttptwittercomtweetbuttonampquotampgtTweet Buttonampltaampgt

textRT karianna Dont forget that the CFP for javaone is closing in only 8-9 days Submit your paper today --ampgt httptco6AAWdIf87h java dev

]

results_per_page10

since_id0

since_id_str0

Retrieve content

+

Custom JSON parsing

Common Mashup Scenarios

In order to interact with the most popular mashup service providers we have to

Write Intensive JavaScript code

Write extra Java code to interact with the server and then parse different formats

JSON ATOM RSS

So Developing Mashups is not an easy task

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 16: JSF Mashups in Action

Common Mashup Scenariosbull GET httpgdatayoutubecom feedsapivideosalt=atomampv=2ampmax-results=5ampq=javaone

bull Parse ATOM Feed (Sample for a single item)ltentry gdetag=WampquotCU8DR347eCp7I2A9WhBXEUkampquotgt

ltidgttagyoutubecom2008videoI5lAgaCbqZ0ltidgt

ltpublishedgt2012-10-01T160927000Zltpublishedgt

ltupdatedgt2013-03-24T165116000Zltupdatedgt

ltcategory scheme=httpschemasgooglecomg2005kind term=httpgdatayoutubecomschemas2007video gt

ltcategory scheme=httpgdatayoutubecomschemas2007categoriescat term=Tech label=Science ampamp Technology gt

lttitlegtWelcome to JavaOne 2012lttitlegt

ltcontent type=applicationx-shockwave-flash src=httpwwwyoutubecomvI5lAgaCbqZ0version=3ampampf=videosampampapp=youtube_gdata gt

ltauthorgt

ltnamegtjavaltnamegt

lturigthttpgdatayoutubecomfeedsapiusersjavalturigt

ltytuserIdgtmRtPmgnQ04CMUpSUqPfhxQltytuserIdgt

ltauthorgt

ltmediagroupgt

ltmediatitle type=plaingtWelcome to JavaOne 2012ltmediatitlegt

ltytaspectRatiogtwidescreenltytaspectRatiogt

ltytduration seconds=97 gt

ltytuploadedgt2012-10-01T160927000Zltytuploadedgt

ltytuploaderIdgtUCmRtPmgnQ04CMUpSUqPfhxQltytuploaderIdgt

ltytvideoidgtI5lAgaCbqZ0ltytvideoidgt

ltmediagroupgt

ltgdrating average=4716216 max=5 min=1 numRaters=74 rel=httpschemasgooglecomg2005overall gt

ltytstatistics favoriteCount=0 viewCount=4835 gt

ltytrating numDislikes=5 numLikes=69 gt

ltentrygt

Retrieve content

+

Custom ATOM parsing

Common Mashup Scenarios

bull GET httpssearchtwittercomsearchjsonq=javaoneamprpp=10

bull Parse JSON Feed (Sample for a single item)

completed_in0021

max_id320699880265891840

max_id_str320699880265891840

next_pagepage=2ampmax_id=320699880265891840ampq=javaoneamprpp=10

page1

queryjavaone

refresh_urlsince_id=320699880265891840ampq=javaone

results[

created_atSun 07 Apr 2013 004944 +0000

from_userrob_ratcliff

from_user_id265460384

from_user_id_str265460384

from_user_nameRob Ratcliff

geonull

id320699880265891840

id_str320699880265891840

iso_language_codeen

metadata

result_typerecent

profile_image_urlhttpa0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

profile_image_url_httpshttpssi0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

sourceamplta href=ampquothttptwittercomtweetbuttonampquotampgtTweet Buttonampltaampgt

textRT karianna Dont forget that the CFP for javaone is closing in only 8-9 days Submit your paper today --ampgt httptco6AAWdIf87h java dev

]

results_per_page10

since_id0

since_id_str0

Retrieve content

+

Custom JSON parsing

Common Mashup Scenarios

In order to interact with the most popular mashup service providers we have to

Write Intensive JavaScript code

Write extra Java code to interact with the server and then parse different formats

JSON ATOM RSS

So Developing Mashups is not an easy task

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 17: JSF Mashups in Action

Common Mashup Scenarios

bull GET httpssearchtwittercomsearchjsonq=javaoneamprpp=10

bull Parse JSON Feed (Sample for a single item)

completed_in0021

max_id320699880265891840

max_id_str320699880265891840

next_pagepage=2ampmax_id=320699880265891840ampq=javaoneamprpp=10

page1

queryjavaone

refresh_urlsince_id=320699880265891840ampq=javaone

results[

created_atSun 07 Apr 2013 004944 +0000

from_userrob_ratcliff

from_user_id265460384

from_user_id_str265460384

from_user_nameRob Ratcliff

geonull

id320699880265891840

id_str320699880265891840

iso_language_codeen

metadata

result_typerecent

profile_image_urlhttpa0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

profile_image_url_httpshttpssi0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

sourceamplta href=ampquothttptwittercomtweetbuttonampquotampgtTweet Buttonampltaampgt

textRT karianna Dont forget that the CFP for javaone is closing in only 8-9 days Submit your paper today --ampgt httptco6AAWdIf87h java dev

]

results_per_page10

since_id0

since_id_str0

Retrieve content

+

Custom JSON parsing

Common Mashup Scenarios

In order to interact with the most popular mashup service providers we have to

Write Intensive JavaScript code

Write extra Java code to interact with the server and then parse different formats

JSON ATOM RSS

So Developing Mashups is not an easy task

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 18: JSF Mashups in Action

bull GET httpssearchtwittercomsearchjsonq=javaoneamprpp=10

bull Parse JSON Feed (Sample for a single item)

completed_in0021

max_id320699880265891840

max_id_str320699880265891840

next_pagepage=2ampmax_id=320699880265891840ampq=javaoneamprpp=10

page1

queryjavaone

refresh_urlsince_id=320699880265891840ampq=javaone

results[

created_atSun 07 Apr 2013 004944 +0000

from_userrob_ratcliff

from_user_id265460384

from_user_id_str265460384

from_user_nameRob Ratcliff

geonull

id320699880265891840

id_str320699880265891840

iso_language_codeen

metadata

result_typerecent

profile_image_urlhttpa0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

profile_image_url_httpshttpssi0twimgcomprofile_images2376270945rfa2u2nheyb6jj5k9bv8_normaljpeg

sourceamplta href=ampquothttptwittercomtweetbuttonampquotampgtTweet Buttonampltaampgt

textRT karianna Dont forget that the CFP for javaone is closing in only 8-9 days Submit your paper today --ampgt httptco6AAWdIf87h java dev

]

results_per_page10

since_id0

since_id_str0

Retrieve content

+

Custom JSON parsing

Common Mashup Scenarios

In order to interact with the most popular mashup service providers we have to

Write Intensive JavaScript code

Write extra Java code to interact with the server and then parse different formats

JSON ATOM RSS

So Developing Mashups is not an easy task

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 19: JSF Mashups in Action

Common Mashup Scenarios

In order to interact with the most popular mashup service providers we have to

Write Intensive JavaScript code

Write extra Java code to interact with the server and then parse different formats

JSON ATOM RSS

So Developing Mashups is not an easy task

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 20: JSF Mashups in Action

So Developing Mashups is not an easy task

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 21: JSF Mashups in Action

Agenda

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 22: JSF Mashups in Action

Current Mashup Complexities

There is no economic-incentive model agreed by all the mashup service

providers for mashup service creation and consumption

Representations of Mashup services

SOAP REST

Formats of Mashup Data

ATOM CustomRSS JSON

Programming Models for Mashup consumption

Server side (Java PHP etc) Client side (JavaScript)

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 23: JSF Mashups in Action

Current Mashups Complexities

Study low level APIs of the

Mashup service provider

Ending up in writing a great

deal of similar code

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 24: JSF Mashups in Action

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 25: JSF Mashups in Action

Mashups4JSF

One of the possible ways for simplifying mashupdevelopment in the JavaServer Faces world

Provides a set of JSF components that allows the JSF developer to construct rich and customized mashups inside the web page

Public Feed search components and drill down the results for

Twitter

YouTube

Google Search

Digg

Yahoo Weather Component

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 26: JSF Mashups in Action

Mashups4JSF

Provides feed reader components for reading different types of feeds

Provides feed export annotations Feed annotation for exporting application data as Mashup feeds

ATOM

RSS

JSON

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 27: JSF Mashups in Action

Mashups4JSF

GMaps4JSF is

Integration with

JSF developer can construct rich maps using simple tags

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 28: JSF Mashups in Action

Mashups4JSF

GMaps4JSF

Allows creating declarative maps with all of their details (markers notes graphics hellipetc) in the JavaServer

Faces world without using JavaScript

Fully integrated with Google Maps v2 and v3

Fully integrated with the JSF 2x Ajax model

Ajaxified Map Actions

Ajaxified Marker Actions

Home httpcodegooglecompgmaps4jsf

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 29: JSF Mashups in Action

Mashups4JSF ndash GMaps4JSF

ltmmapgt

ltuirepeat var=countryldquo

value=countryFactorycountries gt

ltmmarker address=countrynamegtltmicon imageURL=countryweatherStatusImage gt

ltmmarkergt

ltuirepeatgt

ltmmapControl gt

ltmmapgt

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 30: JSF Mashups in Action

Mashups4JSF ndash Yahoo Weather

ltmashupyahooWeather locationCode=weatherBeanlocationCode

temperatureType=cgt

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 31: JSF Mashups in Action

Mashups4JSF ndash YouTube

ltmashupyouTubeVideoList searchQuery=ldquoJavaOnerdquo

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthor

searchItempubDate

lthpanelGridgt

ltffacetgt

ltmashupyouTubeVideoListgt

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 32: JSF Mashups in Action

Mashups4JSF ndash Twitter

ltmashuptwitterSearchList searchQuery=JavaOne

resultItemVar=searchItem

resultItemIndex=indexgt

ltffacet name=resultItemgt

lthpanelGrid columns=2gt

searchItemtitle

searchItemauthorName

searchItempublishDate

lthpanelGridgt

ltffacetgt

ltmashuptwitterSearchListgt

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 33: JSF Mashups in Action

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 34: JSF Mashups in Action

Mashup Demo1

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 35: JSF Mashups in Action

Mashup Demo1

Letrsquos build Demo1

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 36: JSF Mashups in Action

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 37: JSF Mashups in Action

Mashup Demo2

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 38: JSF Mashups in Action

Mashup Demo2

Letrsquos build Demo2

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 39: JSF Mashups in Action

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 40: JSF Mashups in Action

Consuming feed sources in JSF

Mashups4JSF provides the following components in

order to consume Mashup feeds

ltmashupatomFeedReadergt

ltmashuprssFeedReadergt

ltmashupjsonFeedReadergt

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 41: JSF Mashups in Action

Consuming feed sources in JSF

Letrsquos build an application that

consumes Yahoo News feed

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 42: JSF Mashups in Action

What is Mashups

Common Mashup Architecture

Common Mashup Scenarios

Current Mashup Complexities

Mashups4JSF = Mashups meet the JavaServer Faces

Mashup Demo1

Building Mashup Application using Mashups4JSF

Mashup Demo2

Consuming feed sources from JSF Applications

Producing feeds from JSF Applications

Agenda

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 43: JSF Mashups in Action

Producing feeds from JSF Applications

Mashups4JSF provides the following annotations in order

to produce Mashup feeds

Feed which refers to the feed class

FeedItems which refers to a Java List object of the

feed items

All of the other feed producing annotations are optional

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 44: JSF Mashups in Action

Producing feeds from JSF Applications

Letrsquos build the Mashup application

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 45: JSF Mashups in Action

Conclusion

Mashups4JSF (including GMaps4JSF) is an open source project

that provides a layer of abstraction to create rich mashup

applications without the need to use JavaScript extensively or

writing a great deal of code

Mashups4JSF (including GMaps4JSF) is compliant with the JSF

2x Ajax model and architecture

Mashups4JSF (including GMaps4JSF) is an open source project so

your contributions and ideas and improvements are welcome

httpcodegooglecompgmaps4jsf

httpcodegooglecompmashups4jsf

Questions

Page 46: JSF Mashups in Action

Questions