SlideShare a Scribd company logo
1 of 40
Download to read offline
WRITING GADGETS WITH WSO2 GADGET
               SERVER




Presented By:

Achala Aponso– Software Engineer, Member Development Technology Group, WSO2

Lalaji Sureshika- Software Engineer, Member Development Technology Group, WSO2
WSO2

•   Founded in 2005 by acknowledged leaders in XML, Web Services
    Technologies & Standards and Open Source

•   Producing entire middleware platform 100% open source under
    Apache license

•   Business model is to sell comprehensive support & maintenance for
    our products

•   Venture funded by Intel Capital and Quest Software.

•   Global corporation with offices in USA, UK & Sri Lanka

•   150+ employees and growing.
CONTENT
What is a Gadget
●


Role of Gadgets in Enterprise World
●


Role of the WSO2 Gadget Server
●


Anatomy of a Gadget
●


Writing Gadgets for a useful use-case.
●


Tips & Tricks
●
WHAT IS A GADGET?
 ●   A web-based software component written with HTML,
     CSS, and JavaScript
 ●   An open standard to present chunks of data in
     personalized or enterprise portals
 ●   Defined using a declarative XML syntax
 ●   Adhere to Google Gadget Specification
ROLE OF GADGETS IN ENTERPRISE WORLD
 ●   Presentation layer is a critical aspect of a service-
     oriented architecture (SOA)
 ●   There are limitations with the traditional way of
     presenting data e.g.: web applications
      –   Deciding the content for users
 ●   Gadgets allow users to decide the UI for themselves.
 ●   Provide Data Visualization, Data Analysis and Decision
     Making support
ROLE OF THE WSO2 GADGET SERVER
●   The WSO2 Gadget Server brings Gadget technology into
    the enterprise
●   A comprehensive portal solution targeted to be deployed
    in SOAs as a presentation layer
●   The gadget server is a pure Java application which is
    based on our carbon framework
●   Users can write, deploy and use enterprise gadgets with
    ease
●   Implementation is based on Apache Shindig
●   Built on top of the Google Gadget Specification
WSO2 GADGET SERVER OFFERS

●   Enterprise-class portal interface
●   Enterprise gadget repository
●   Administrative console
●   Inter-gadget communication support
●   Support for i18n
●   Secure sign-in options
WRITING GADGETS

●   Anatomy of a Gadget
●   Basic Gadget Example - Hello Gadget
●   Pulling Information from the Web into a Gadget
●   Processing Fetched HTML with JavaScript
●   Using External JavaScript Libraries
●   Setting User Preferences
●   Dealing with Views
●   Important Gadget Features
ANATOMY OF A GADGET




http://wso2.org/library/articles/2011/11/writing-google-gadgets-tutorial-part-01
BASIC SAMPLE: HELLO WORLD GADGET
Hello Gadget in Action
GADGET:MODULE-PREFS
 ●   Specifies characteristics of the gadget
      –   Gadget Title
      –   Author
      –   Preferred sizing
GADGET:CONTENT
●   Represents 'Brain' of a gadget
●   Provides the actual HTML, CSS, and JavaScript logic to be
    rendered by the gadget
●   Two data delivery mechanisms from Web to Gadget
     –   Content Type -URL:
         Specify a base URL
     –   Content Type -HTML:
         Code is provided directly in the gadget XML content section
         for rendering and control flow
GADGET:CONTENT EXAMPLE
 ●   Content Type URL Gadgets




 ●   Content Type HTML Gadgets
GADGET:MAKE REQUEST
●   A function provide by gadgets API
●   Useful to retrieve and operate on remote web
    content
●   Can use with only type="html" gadgets
●   makeRequest(url, callback, opt_params)
    –   String url - The URL where the content is located
    –   Function callback - The function to call with the data from
        the URL once it is fetched
    –   opt_params - Additional parameters to pass to the
        request.[eg: Request -Content type/Method
        type/Authorization type]
GADGET:MAKE REQUEST EXAMPLE
           ●   Content Type set by request : Text

           ●   Method Type of Request:GET


http://markmail.org/browse/org.wso2
.carbon-commits
                                                                     After render
                                                                     gadget
                                        Pull information


                                      MakeRequest(
                                      feedUrl,callback,
    Web page
                                      opt_params)          Gadget xml code segment
GADGET:MAKEREQUEST HTTPMETHOD

●   GET [gadgets.io.MethodType.GET]
    Use to retrieve information from a website
    Default mode of MakeRequest()


●   POST [gadgets.io.MethodType.POST]
    Use to pass data to a server with the intent to modify or
    delete records
    Have to specify a parameter under the key
    gadgets.io.RequestParameters.POST_DATA
GADGET:MAKEREQUEST CONTENTTYPE
●   Text [gadgets.io.ContentType.TEXT]
●   DOM [gadgets.io.ContentType.DOM]
    For data fetched from XML files as SOAP or REST service
    endpoints
●   Feeds[gadgets.io.ContentType.FEED]
    Parse an ATOM or RSS XML feed and return the response as a
    JSON-encoded object
●   JSON [gadgets.io.ContentType.JSON]
    To fetch JSON-encoded content as a JavaScript object
PROCESS FETCHED DATA WITH JAVASCRIPT
GADGET:EXTERNAL LIBRARIES USAGE
 ●   Javascript libraries
 ●   Jquery libraries
 ●   Java Servlet Pages
 ●   CSS
GADGET:USER-PREFERENCES
 ●   Defines controls that allow users to specify settings for
     the gadget
 ●   key/value pairs
 ●   Persisted on behalf of a user
 ●   (Often)Manipulate by users
 ●   Able to set programatically too
 ●   Supporting data types :String, bool, enum, hidden
GADGET:USER-PREFERENCES DEMO
 ●   String Type
 ●   Enum Type
 ●   Boolean Type
 ●   Int Type
GADGET:USER-PREFERENCES SAMPLE
WSO2 GADGET SERVER:SET USER-
PREFERENCES




 Default View             Set user-prefs




                          View with user-prefs
GADGET:VIEWS

●   The location where a gadget is displayed
●   Views are different on each characteristics
     –   'Default' View -Appears in a column layout
          among other gadgets
     –   'Canvas' View-Expands the gadget horizontally
         in the entire gadget area
GADGET:VIEWS EXAMPLE

                   'Default' Mode




                       'Canvas' Mode
GADGET:VIEWS Contd.

●   Define multiple views for a gadget
     –   Duplicate <Content> sections based on views
     –   Concatenate the views for a single <Content>
     –   <Content type="html" view=“default,canvas">
GADGET:JAVASCRIPT REFERENCES
 ●   Required when a gadget uses a feature
 ●   Have to include <Require> tag in gadget xml
GADGET:JAVASCRIPT REFERENCES
 Feature Library   Description                     Syntax


 setPrefs          Sets the value of a user        <Require
                   preference programmatically     feature=“setprefs”>

 dynamic-height    Gives a gadget the ability to   <Require
                   resize itself                   feature=“dynamic-height”>

 settitle          Sets a gadget’s title           <Require
                   programatically                 feature=“settitle”>

 tabs              Adds a tab interface to a gadget <Require feature=“tabs”>
GADGET:DYNAMIC HEIGHT
●   Required when gadget content populate
    dynamically
●   Include <Required feature=”dynamic-height”/>
    under <ModulePrefs>
●   Call gadgets.* api method
    gadgets.window.adjustHeight()
GADGET:SETPREFS
●   Required when setting user preferences
    programatically
●   Include <Required feature=”setprefs”/>
    under <ModulePrefs>
●   Call gadgets.* api method
    var prefs = new gadgets.Prefs();
    prefs.set("key", value); //To set user-prefs
    //To get user-prefs
    prefs.getString(key); prefs.getInt(key);
GADGET:VIEWS
●   Provides operations for dealing with views
●   Include <Required feature=”views”/>
    under <ModulePrefs>
●   Call gadgets.* api method
    //To get current view
    gadgets.views.getCurrentView()
    //To get all supported view by Gadget Server
    gadgets.views.getSupportedViews()
GADGET:TABS
●   Useful when need tabs inside a gadget
●   Include <Required feature=”tabs”/> under
    <modulePrefs>
●   “tabs” library provides functions & css to operate
●   “tabs” library contains main three objects
    –   'tabs' object:Parent container around all tabs
    –   'tab' object: A single tab within an array of
        indexed tabs
    –   Content Container:Holds the content of an
        individual 'tab' object
TABS EXAMPLE
IMPROVE GADGET PERFORMANCE
 ●   Avoid using external JavaScript or CSS files
 ●   Use “type=html” gadgets over “type=url” gadgets
 ●   Specify height and width for all <img> tags in your
     gadget's HTML
 ●   Do not refresh cache often with the parameter
     'refreshInterval' when using makeRequest() function
TIPS & TRICKS

 ●   Error Handling
 ●   F12: Browser specific debugging tools
 ●   Incremental Development
 ●   Test with IE
 ●   Use an IDE
MORE ON WSO2 GADGET SERVER
●   SOAP Request Gadget
    Allows a gadget author to invoke a SOAP Web Service
    [refer]
●   OAuth Support
    Allow accessing private data from a hosting service to a
    consumer gadget [refer]
●   Inter Gadget Communication
    Facilitated with the help of publisher and subscriber gadgets
    [refer]
REFERENCES & SOME USEFUL INFORMATION

Google Gadget Specification
●

http://code.google.com/apis/gadgets/docs/spec.html
●Writing Google Gadgets – A Tutorial
http://wso2.org/library/articles/2011/11/writing-google-
gadgets-tutorial-part-01
Browse through WSO2 developer archive http://wso2.org
●



Download WSO2 Gadget Server
●

http://wso2.org/downloads/gadget-server
●Installation Guide http://wso2.org/project/gadget-
server/1.4.2/docs/installation_guide.html
Selected Customers



 https://ail.google.com/mail/u/0/?ui=2&ik=ad9ae58
 f41&view=att&th=1331a70983344a32&attid=0.1&d
 isp=thd&realattid=f_gtxto6mk0&zw
●   WSO2 engagement model
•       QuickStart
•       Development
        Support
•       Development
        Services
•       Production
        Support
•       Turnkey Solutions
         •   WSO2 Mobile Services Solution
         •   WSO2 FIX Gateway Solution
         •   WSO2 SAP Gateway Solution

More Related Content

What's hot

Java Web Programming on Google Cloud Platform [2/3] : Datastore
Java Web Programming on Google Cloud Platform [2/3] : DatastoreJava Web Programming on Google Cloud Platform [2/3] : Datastore
Java Web Programming on Google Cloud Platform [2/3] : DatastoreIMC Institute
 
MVVM with SwiftUI and Combine
MVVM with SwiftUI and CombineMVVM with SwiftUI and Combine
MVVM with SwiftUI and CombineTai Lun Tseng
 
SwiftUI and Combine All the Things
SwiftUI and Combine All the ThingsSwiftUI and Combine All the Things
SwiftUI and Combine All the ThingsScott Gardner
 
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitJava Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitIMC Institute
 
Web Components for Java Developers
Web Components for Java DevelopersWeb Components for Java Developers
Web Components for Java DevelopersJoonas Lehtinen
 
GQuery a jQuery clone for Gwt, RivieraDev 2011
GQuery a jQuery clone for Gwt, RivieraDev 2011GQuery a jQuery clone for Gwt, RivieraDev 2011
GQuery a jQuery clone for Gwt, RivieraDev 2011Manuel Carrasco Moñino
 
준비하세요 Angular js 2.0
준비하세요 Angular js 2.0준비하세요 Angular js 2.0
준비하세요 Angular js 2.0Jeado Ko
 
Hastening React SSR - Web Performance San Diego
Hastening React SSR - Web Performance San DiegoHastening React SSR - Web Performance San Diego
Hastening React SSR - Web Performance San DiegoMaxime Najim
 
Angular JS blog tutorial
Angular JS blog tutorialAngular JS blog tutorial
Angular JS blog tutorialClaude Tech
 
Training in Android with Maven
Training in Android with MavenTraining in Android with Maven
Training in Android with MavenArcadian Learning
 
MvvmQuickCross for Windows Phone
MvvmQuickCross for Windows PhoneMvvmQuickCross for Windows Phone
MvvmQuickCross for Windows PhoneVincent Hoogendoorn
 
Web Components & Polymer 1.0 (Webinale Berlin)
Web Components & Polymer 1.0 (Webinale Berlin)Web Components & Polymer 1.0 (Webinale Berlin)
Web Components & Polymer 1.0 (Webinale Berlin)Hendrik Ebbers
 
Starting with jQuery
Starting with jQueryStarting with jQuery
Starting with jQueryAnil Kumar
 
Local storage in Web apps
Local storage in Web appsLocal storage in Web apps
Local storage in Web appsIvano Malavolta
 
Planbox Backbone MVC
Planbox Backbone MVCPlanbox Backbone MVC
Planbox Backbone MVCAcquisio
 
jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks TriviaCognizant
 
Vaadin Components @ Angular U
Vaadin Components @ Angular UVaadin Components @ Angular U
Vaadin Components @ Angular UJoonas Lehtinen
 
Web Components the best marriage for a PWA
Web Components the best marriage for a PWAWeb Components the best marriage for a PWA
Web Components the best marriage for a PWAManuel Carrasco Moñino
 

What's hot (20)

Java Web Programming on Google Cloud Platform [2/3] : Datastore
Java Web Programming on Google Cloud Platform [2/3] : DatastoreJava Web Programming on Google Cloud Platform [2/3] : Datastore
Java Web Programming on Google Cloud Platform [2/3] : Datastore
 
MVVM with SwiftUI and Combine
MVVM with SwiftUI and CombineMVVM with SwiftUI and Combine
MVVM with SwiftUI and Combine
 
SwiftUI and Combine All the Things
SwiftUI and Combine All the ThingsSwiftUI and Combine All the Things
SwiftUI and Combine All the Things
 
Speed up your GWT coding with gQuery
Speed up your GWT coding with gQuerySpeed up your GWT coding with gQuery
Speed up your GWT coding with gQuery
 
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitJava Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
 
Web Components for Java Developers
Web Components for Java DevelopersWeb Components for Java Developers
Web Components for Java Developers
 
GQuery a jQuery clone for Gwt, RivieraDev 2011
GQuery a jQuery clone for Gwt, RivieraDev 2011GQuery a jQuery clone for Gwt, RivieraDev 2011
GQuery a jQuery clone for Gwt, RivieraDev 2011
 
준비하세요 Angular js 2.0
준비하세요 Angular js 2.0준비하세요 Angular js 2.0
준비하세요 Angular js 2.0
 
Hastening React SSR - Web Performance San Diego
Hastening React SSR - Web Performance San DiegoHastening React SSR - Web Performance San Diego
Hastening React SSR - Web Performance San Diego
 
Angular JS blog tutorial
Angular JS blog tutorialAngular JS blog tutorial
Angular JS blog tutorial
 
Training in Android with Maven
Training in Android with MavenTraining in Android with Maven
Training in Android with Maven
 
MvvmQuickCross for Windows Phone
MvvmQuickCross for Windows PhoneMvvmQuickCross for Windows Phone
MvvmQuickCross for Windows Phone
 
Web Components & Polymer 1.0 (Webinale Berlin)
Web Components & Polymer 1.0 (Webinale Berlin)Web Components & Polymer 1.0 (Webinale Berlin)
Web Components & Polymer 1.0 (Webinale Berlin)
 
Starting with jQuery
Starting with jQueryStarting with jQuery
Starting with jQuery
 
Jsf2 html5-jazoon
Jsf2 html5-jazoonJsf2 html5-jazoon
Jsf2 html5-jazoon
 
Local storage in Web apps
Local storage in Web appsLocal storage in Web apps
Local storage in Web apps
 
Planbox Backbone MVC
Planbox Backbone MVCPlanbox Backbone MVC
Planbox Backbone MVC
 
jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks Trivia
 
Vaadin Components @ Angular U
Vaadin Components @ Angular UVaadin Components @ Angular U
Vaadin Components @ Angular U
 
Web Components the best marriage for a PWA
Web Components the best marriage for a PWAWeb Components the best marriage for a PWA
Web Components the best marriage for a PWA
 

Viewers also liked

WSO2 Gadget Server
WSO2 Gadget ServerWSO2 Gadget Server
WSO2 Gadget ServerWSO2
 
Introduction to WSO2 Data Analytics Platform
Introduction to  WSO2 Data Analytics PlatformIntroduction to  WSO2 Data Analytics Platform
Introduction to WSO2 Data Analytics PlatformSrinath Perera
 
5pen pc Technology
5pen pc Technology5pen pc Technology
5pen pc TechnologyRaga Deepthi
 
Field Study 3 Episode 1
Field Study 3 Episode 1Field Study 3 Episode 1
Field Study 3 Episode 1Jundel Deliman
 
Field Study 3 Episode 3
Field Study 3 Episode 3Field Study 3 Episode 3
Field Study 3 Episode 3Jundel Deliman
 
Field Study 3 Episode 2
Field Study 3 Episode 2Field Study 3 Episode 2
Field Study 3 Episode 2Jundel Deliman
 
Field Study 3 Episode 4
Field Study 3 Episode 4Field Study 3 Episode 4
Field Study 3 Episode 4Jundel Deliman
 
Field Study 3 Episode 7
Field Study 3 Episode 7Field Study 3 Episode 7
Field Study 3 Episode 7Jundel Deliman
 
Field Study 3 Episode 5
Field Study 3 Episode 5Field Study 3 Episode 5
Field Study 3 Episode 5Jundel Deliman
 
Fs3 episode 6- sarah jane cabilino
Fs3 episode 6- sarah jane cabilinoFs3 episode 6- sarah jane cabilino
Fs3 episode 6- sarah jane cabilinoSarah Cabilino
 

Viewers also liked (12)

WSO2 Gadget Server
WSO2 Gadget ServerWSO2 Gadget Server
WSO2 Gadget Server
 
Introduction to WSO2 Data Analytics Platform
Introduction to  WSO2 Data Analytics PlatformIntroduction to  WSO2 Data Analytics Platform
Introduction to WSO2 Data Analytics Platform
 
5pen pc Technology
5pen pc Technology5pen pc Technology
5pen pc Technology
 
Field Study 3 Episode 1
Field Study 3 Episode 1Field Study 3 Episode 1
Field Study 3 Episode 1
 
Fs 3 episode 1
Fs 3 episode 1Fs 3 episode 1
Fs 3 episode 1
 
5 PEN PC TECHNOLOGY
5 PEN PC TECHNOLOGY5 PEN PC TECHNOLOGY
5 PEN PC TECHNOLOGY
 
Field Study 3 Episode 3
Field Study 3 Episode 3Field Study 3 Episode 3
Field Study 3 Episode 3
 
Field Study 3 Episode 2
Field Study 3 Episode 2Field Study 3 Episode 2
Field Study 3 Episode 2
 
Field Study 3 Episode 4
Field Study 3 Episode 4Field Study 3 Episode 4
Field Study 3 Episode 4
 
Field Study 3 Episode 7
Field Study 3 Episode 7Field Study 3 Episode 7
Field Study 3 Episode 7
 
Field Study 3 Episode 5
Field Study 3 Episode 5Field Study 3 Episode 5
Field Study 3 Episode 5
 
Fs3 episode 6- sarah jane cabilino
Fs3 episode 6- sarah jane cabilinoFs3 episode 6- sarah jane cabilino
Fs3 episode 6- sarah jane cabilino
 

Similar to Writing Gadgets with the WSO2 Gadget Server

Webcenter Sites Google Gadget Development Techniques
Webcenter Sites Google Gadget Development TechniquesWebcenter Sites Google Gadget Development Techniques
Webcenter Sites Google Gadget Development TechniquesJohn Brunswick
 
JMP103 : Extending Your App Arsenal With OpenSocial
JMP103 : Extending Your App Arsenal With OpenSocialJMP103 : Extending Your App Arsenal With OpenSocial
JMP103 : Extending Your App Arsenal With OpenSocialRyan Baxter
 
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocialIBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocialIBM Connections Developers
 
Google app-engine-with-python
Google app-engine-with-pythonGoogle app-engine-with-python
Google app-engine-with-pythonDeepak Garg
 
Web components - An Introduction
Web components - An IntroductionWeb components - An Introduction
Web components - An Introductioncherukumilli2
 
QtDD13 - Qt Creator plugins - Tobias Hunger
QtDD13 - Qt Creator plugins - Tobias Hunger QtDD13 - Qt Creator plugins - Tobias Hunger
QtDD13 - Qt Creator plugins - Tobias Hunger Robert-Emmanuel Mayssat
 
Angular 2 at solutions.hamburg
Angular 2 at solutions.hamburgAngular 2 at solutions.hamburg
Angular 2 at solutions.hamburgBaqend
 
Building an Angular 2 App
Building an Angular 2 AppBuilding an Angular 2 App
Building an Angular 2 AppFelix Gessert
 
Adding custom ui controls to your application (1)
Adding custom ui controls to your application (1)Adding custom ui controls to your application (1)
Adding custom ui controls to your application (1)Oro Inc.
 
Webinar: AngularJS and the WordPress REST API
Webinar: AngularJS and the WordPress REST APIWebinar: AngularJS and the WordPress REST API
Webinar: AngularJS and the WordPress REST APIWP Engine
 
Webinar: AngularJS and the WordPress REST API
Webinar: AngularJS and the WordPress REST APIWebinar: AngularJS and the WordPress REST API
Webinar: AngularJS and the WordPress REST APIWP Engine UK
 
Tech talk live share extras extension modules feb 13
Tech talk live   share extras extension modules feb 13Tech talk live   share extras extension modules feb 13
Tech talk live share extras extension modules feb 13Alfresco Software
 
Developing your first application using FI-WARE
Developing your first application using FI-WAREDeveloping your first application using FI-WARE
Developing your first application using FI-WAREFermin Galan
 
JEE Conf 2015: Less JS!
JEE Conf 2015: Less JS!JEE Conf 2015: Less JS!
JEE Conf 2015: Less JS!_Dewy_
 
The Big Picture and How to Get Started
The Big Picture and How to Get StartedThe Big Picture and How to Get Started
The Big Picture and How to Get Startedguest1af57e
 
Sphinx + robot framework = documentation as result of functional testing
Sphinx + robot framework = documentation as result of functional testingSphinx + robot framework = documentation as result of functional testing
Sphinx + robot framework = documentation as result of functional testingplewicki
 
Web Components v1
Web Components v1Web Components v1
Web Components v1Mike Wilcox
 
Magento Performance Toolkit
Magento Performance ToolkitMagento Performance Toolkit
Magento Performance ToolkitSergii Shymko
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWAREFIWARE
 

Similar to Writing Gadgets with the WSO2 Gadget Server (20)

Webcenter Sites Google Gadget Development Techniques
Webcenter Sites Google Gadget Development TechniquesWebcenter Sites Google Gadget Development Techniques
Webcenter Sites Google Gadget Development Techniques
 
JMP103 : Extending Your App Arsenal With OpenSocial
JMP103 : Extending Your App Arsenal With OpenSocialJMP103 : Extending Your App Arsenal With OpenSocial
JMP103 : Extending Your App Arsenal With OpenSocial
 
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocialIBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
 
Google app-engine-with-python
Google app-engine-with-pythonGoogle app-engine-with-python
Google app-engine-with-python
 
Web components - An Introduction
Web components - An IntroductionWeb components - An Introduction
Web components - An Introduction
 
QtDD13 - Qt Creator plugins - Tobias Hunger
QtDD13 - Qt Creator plugins - Tobias Hunger QtDD13 - Qt Creator plugins - Tobias Hunger
QtDD13 - Qt Creator plugins - Tobias Hunger
 
Angular 2 at solutions.hamburg
Angular 2 at solutions.hamburgAngular 2 at solutions.hamburg
Angular 2 at solutions.hamburg
 
Building an Angular 2 App
Building an Angular 2 AppBuilding an Angular 2 App
Building an Angular 2 App
 
Adding custom ui controls to your application (1)
Adding custom ui controls to your application (1)Adding custom ui controls to your application (1)
Adding custom ui controls to your application (1)
 
Webinar: AngularJS and the WordPress REST API
Webinar: AngularJS and the WordPress REST APIWebinar: AngularJS and the WordPress REST API
Webinar: AngularJS and the WordPress REST API
 
Webinar: AngularJS and the WordPress REST API
Webinar: AngularJS and the WordPress REST APIWebinar: AngularJS and the WordPress REST API
Webinar: AngularJS and the WordPress REST API
 
Tech talk live share extras extension modules feb 13
Tech talk live   share extras extension modules feb 13Tech talk live   share extras extension modules feb 13
Tech talk live share extras extension modules feb 13
 
Developing your first application using FI-WARE
Developing your first application using FI-WAREDeveloping your first application using FI-WARE
Developing your first application using FI-WARE
 
JEE Conf 2015: Less JS!
JEE Conf 2015: Less JS!JEE Conf 2015: Less JS!
JEE Conf 2015: Less JS!
 
The Big Picture and How to Get Started
The Big Picture and How to Get StartedThe Big Picture and How to Get Started
The Big Picture and How to Get Started
 
Open Social Summit Korea
Open Social Summit KoreaOpen Social Summit Korea
Open Social Summit Korea
 
Sphinx + robot framework = documentation as result of functional testing
Sphinx + robot framework = documentation as result of functional testingSphinx + robot framework = documentation as result of functional testing
Sphinx + robot framework = documentation as result of functional testing
 
Web Components v1
Web Components v1Web Components v1
Web Components v1
 
Magento Performance Toolkit
Magento Performance ToolkitMagento Performance Toolkit
Magento Performance Toolkit
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWARE
 

More from WSO2

Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessWSO2
 
How to Create a Service in Choreo
How to Create a Service in ChoreoHow to Create a Service in Choreo
How to Create a Service in ChoreoWSO2
 
Ballerina Tech Talk - May 2023
Ballerina Tech Talk - May 2023Ballerina Tech Talk - May 2023
Ballerina Tech Talk - May 2023WSO2
 
Platform Strategy to Deliver Digital Experiences on Azure
Platform Strategy to Deliver Digital Experiences on AzurePlatform Strategy to Deliver Digital Experiences on Azure
Platform Strategy to Deliver Digital Experiences on AzureWSO2
 
GartnerITSymSessionSlides.pdf
GartnerITSymSessionSlides.pdfGartnerITSymSessionSlides.pdf
GartnerITSymSessionSlides.pdfWSO2
 
[Webinar] How to Create an API in Minutes
[Webinar] How to Create an API in Minutes[Webinar] How to Create an API in Minutes
[Webinar] How to Create an API in MinutesWSO2
 
Modernizing the Student Journey with Ethos Identity
Modernizing the Student Journey with Ethos IdentityModernizing the Student Journey with Ethos Identity
Modernizing the Student Journey with Ethos IdentityWSO2
 
Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...
Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...
Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...WSO2
 
CIO Summit Berlin 2022.pptx.pdf
CIO Summit Berlin 2022.pptx.pdfCIO Summit Berlin 2022.pptx.pdf
CIO Summit Berlin 2022.pptx.pdfWSO2
 
Delivering New Digital Experiences Fast - Introducing Choreo
Delivering New Digital Experiences Fast - Introducing ChoreoDelivering New Digital Experiences Fast - Introducing Choreo
Delivering New Digital Experiences Fast - Introducing ChoreoWSO2
 
Fueling the Digital Experience Economy with Connected Products
Fueling the Digital Experience Economy with Connected ProductsFueling the Digital Experience Economy with Connected Products
Fueling the Digital Experience Economy with Connected ProductsWSO2
 
A Reference Methodology for Agile Digital Businesses
 A Reference Methodology for Agile Digital Businesses A Reference Methodology for Agile Digital Businesses
A Reference Methodology for Agile Digital BusinessesWSO2
 
Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)
Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)
Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)WSO2
 
Lessons from the pandemic - From a single use case to true transformation
 Lessons from the pandemic - From a single use case to true transformation Lessons from the pandemic - From a single use case to true transformation
Lessons from the pandemic - From a single use case to true transformationWSO2
 
Adding Liveliness to Banking Experiences
Adding Liveliness to Banking ExperiencesAdding Liveliness to Banking Experiences
Adding Liveliness to Banking ExperiencesWSO2
 
Building a Future-ready Bank
Building a Future-ready BankBuilding a Future-ready Bank
Building a Future-ready BankWSO2
 
WSO2 API Manager Community Call - November 2021
WSO2 API Manager Community Call - November 2021WSO2 API Manager Community Call - November 2021
WSO2 API Manager Community Call - November 2021WSO2
 
[API World ] - Managing Asynchronous APIs
[API World ] - Managing Asynchronous APIs[API World ] - Managing Asynchronous APIs
[API World ] - Managing Asynchronous APIsWSO2
 
[API World 2021 ] - Understanding Cloud Native Deployment
[API World 2021 ] - Understanding Cloud Native Deployment[API World 2021 ] - Understanding Cloud Native Deployment
[API World 2021 ] - Understanding Cloud Native DeploymentWSO2
 
[API Word 2021] - Quantum Duality of “API as a Business and a Technology”
[API Word 2021] - Quantum Duality of “API as a Business and a Technology”[API Word 2021] - Quantum Duality of “API as a Business and a Technology”
[API Word 2021] - Quantum Duality of “API as a Business and a Technology”WSO2
 

More from WSO2 (20)

Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with Platformless
 
How to Create a Service in Choreo
How to Create a Service in ChoreoHow to Create a Service in Choreo
How to Create a Service in Choreo
 
Ballerina Tech Talk - May 2023
Ballerina Tech Talk - May 2023Ballerina Tech Talk - May 2023
Ballerina Tech Talk - May 2023
 
Platform Strategy to Deliver Digital Experiences on Azure
Platform Strategy to Deliver Digital Experiences on AzurePlatform Strategy to Deliver Digital Experiences on Azure
Platform Strategy to Deliver Digital Experiences on Azure
 
GartnerITSymSessionSlides.pdf
GartnerITSymSessionSlides.pdfGartnerITSymSessionSlides.pdf
GartnerITSymSessionSlides.pdf
 
[Webinar] How to Create an API in Minutes
[Webinar] How to Create an API in Minutes[Webinar] How to Create an API in Minutes
[Webinar] How to Create an API in Minutes
 
Modernizing the Student Journey with Ethos Identity
Modernizing the Student Journey with Ethos IdentityModernizing the Student Journey with Ethos Identity
Modernizing the Student Journey with Ethos Identity
 
Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...
Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...
Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...
 
CIO Summit Berlin 2022.pptx.pdf
CIO Summit Berlin 2022.pptx.pdfCIO Summit Berlin 2022.pptx.pdf
CIO Summit Berlin 2022.pptx.pdf
 
Delivering New Digital Experiences Fast - Introducing Choreo
Delivering New Digital Experiences Fast - Introducing ChoreoDelivering New Digital Experiences Fast - Introducing Choreo
Delivering New Digital Experiences Fast - Introducing Choreo
 
Fueling the Digital Experience Economy with Connected Products
Fueling the Digital Experience Economy with Connected ProductsFueling the Digital Experience Economy with Connected Products
Fueling the Digital Experience Economy with Connected Products
 
A Reference Methodology for Agile Digital Businesses
 A Reference Methodology for Agile Digital Businesses A Reference Methodology for Agile Digital Businesses
A Reference Methodology for Agile Digital Businesses
 
Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)
Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)
Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)
 
Lessons from the pandemic - From a single use case to true transformation
 Lessons from the pandemic - From a single use case to true transformation Lessons from the pandemic - From a single use case to true transformation
Lessons from the pandemic - From a single use case to true transformation
 
Adding Liveliness to Banking Experiences
Adding Liveliness to Banking ExperiencesAdding Liveliness to Banking Experiences
Adding Liveliness to Banking Experiences
 
Building a Future-ready Bank
Building a Future-ready BankBuilding a Future-ready Bank
Building a Future-ready Bank
 
WSO2 API Manager Community Call - November 2021
WSO2 API Manager Community Call - November 2021WSO2 API Manager Community Call - November 2021
WSO2 API Manager Community Call - November 2021
 
[API World ] - Managing Asynchronous APIs
[API World ] - Managing Asynchronous APIs[API World ] - Managing Asynchronous APIs
[API World ] - Managing Asynchronous APIs
 
[API World 2021 ] - Understanding Cloud Native Deployment
[API World 2021 ] - Understanding Cloud Native Deployment[API World 2021 ] - Understanding Cloud Native Deployment
[API World 2021 ] - Understanding Cloud Native Deployment
 
[API Word 2021] - Quantum Duality of “API as a Business and a Technology”
[API Word 2021] - Quantum Duality of “API as a Business and a Technology”[API Word 2021] - Quantum Duality of “API as a Business and a Technology”
[API Word 2021] - Quantum Duality of “API as a Business and a Technology”
 

Recently uploaded

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 

Recently uploaded (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 

Writing Gadgets with the WSO2 Gadget Server

  • 1. WRITING GADGETS WITH WSO2 GADGET SERVER Presented By: Achala Aponso– Software Engineer, Member Development Technology Group, WSO2 Lalaji Sureshika- Software Engineer, Member Development Technology Group, WSO2
  • 2. WSO2 • Founded in 2005 by acknowledged leaders in XML, Web Services Technologies & Standards and Open Source • Producing entire middleware platform 100% open source under Apache license • Business model is to sell comprehensive support & maintenance for our products • Venture funded by Intel Capital and Quest Software. • Global corporation with offices in USA, UK & Sri Lanka • 150+ employees and growing.
  • 3. CONTENT What is a Gadget ● Role of Gadgets in Enterprise World ● Role of the WSO2 Gadget Server ● Anatomy of a Gadget ● Writing Gadgets for a useful use-case. ● Tips & Tricks ●
  • 4. WHAT IS A GADGET? ● A web-based software component written with HTML, CSS, and JavaScript ● An open standard to present chunks of data in personalized or enterprise portals ● Defined using a declarative XML syntax ● Adhere to Google Gadget Specification
  • 5. ROLE OF GADGETS IN ENTERPRISE WORLD ● Presentation layer is a critical aspect of a service- oriented architecture (SOA) ● There are limitations with the traditional way of presenting data e.g.: web applications – Deciding the content for users ● Gadgets allow users to decide the UI for themselves. ● Provide Data Visualization, Data Analysis and Decision Making support
  • 6. ROLE OF THE WSO2 GADGET SERVER ● The WSO2 Gadget Server brings Gadget technology into the enterprise ● A comprehensive portal solution targeted to be deployed in SOAs as a presentation layer ● The gadget server is a pure Java application which is based on our carbon framework ● Users can write, deploy and use enterprise gadgets with ease ● Implementation is based on Apache Shindig ● Built on top of the Google Gadget Specification
  • 7. WSO2 GADGET SERVER OFFERS ● Enterprise-class portal interface ● Enterprise gadget repository ● Administrative console ● Inter-gadget communication support ● Support for i18n ● Secure sign-in options
  • 8. WRITING GADGETS ● Anatomy of a Gadget ● Basic Gadget Example - Hello Gadget ● Pulling Information from the Web into a Gadget ● Processing Fetched HTML with JavaScript ● Using External JavaScript Libraries ● Setting User Preferences ● Dealing with Views ● Important Gadget Features
  • 9. ANATOMY OF A GADGET http://wso2.org/library/articles/2011/11/writing-google-gadgets-tutorial-part-01
  • 10. BASIC SAMPLE: HELLO WORLD GADGET
  • 11. Hello Gadget in Action
  • 12. GADGET:MODULE-PREFS ● Specifies characteristics of the gadget – Gadget Title – Author – Preferred sizing
  • 13. GADGET:CONTENT ● Represents 'Brain' of a gadget ● Provides the actual HTML, CSS, and JavaScript logic to be rendered by the gadget ● Two data delivery mechanisms from Web to Gadget – Content Type -URL: Specify a base URL – Content Type -HTML: Code is provided directly in the gadget XML content section for rendering and control flow
  • 14. GADGET:CONTENT EXAMPLE ● Content Type URL Gadgets ● Content Type HTML Gadgets
  • 15. GADGET:MAKE REQUEST ● A function provide by gadgets API ● Useful to retrieve and operate on remote web content ● Can use with only type="html" gadgets ● makeRequest(url, callback, opt_params) – String url - The URL where the content is located – Function callback - The function to call with the data from the URL once it is fetched – opt_params - Additional parameters to pass to the request.[eg: Request -Content type/Method type/Authorization type]
  • 16. GADGET:MAKE REQUEST EXAMPLE ● Content Type set by request : Text ● Method Type of Request:GET http://markmail.org/browse/org.wso2 .carbon-commits After render gadget Pull information MakeRequest( feedUrl,callback, Web page opt_params) Gadget xml code segment
  • 17. GADGET:MAKEREQUEST HTTPMETHOD ● GET [gadgets.io.MethodType.GET] Use to retrieve information from a website Default mode of MakeRequest() ● POST [gadgets.io.MethodType.POST] Use to pass data to a server with the intent to modify or delete records Have to specify a parameter under the key gadgets.io.RequestParameters.POST_DATA
  • 18. GADGET:MAKEREQUEST CONTENTTYPE ● Text [gadgets.io.ContentType.TEXT] ● DOM [gadgets.io.ContentType.DOM] For data fetched from XML files as SOAP or REST service endpoints ● Feeds[gadgets.io.ContentType.FEED] Parse an ATOM or RSS XML feed and return the response as a JSON-encoded object ● JSON [gadgets.io.ContentType.JSON] To fetch JSON-encoded content as a JavaScript object
  • 19. PROCESS FETCHED DATA WITH JAVASCRIPT
  • 20. GADGET:EXTERNAL LIBRARIES USAGE ● Javascript libraries ● Jquery libraries ● Java Servlet Pages ● CSS
  • 21. GADGET:USER-PREFERENCES ● Defines controls that allow users to specify settings for the gadget ● key/value pairs ● Persisted on behalf of a user ● (Often)Manipulate by users ● Able to set programatically too ● Supporting data types :String, bool, enum, hidden
  • 22. GADGET:USER-PREFERENCES DEMO ● String Type ● Enum Type ● Boolean Type ● Int Type
  • 24. WSO2 GADGET SERVER:SET USER- PREFERENCES Default View Set user-prefs View with user-prefs
  • 25. GADGET:VIEWS ● The location where a gadget is displayed ● Views are different on each characteristics – 'Default' View -Appears in a column layout among other gadgets – 'Canvas' View-Expands the gadget horizontally in the entire gadget area
  • 26. GADGET:VIEWS EXAMPLE 'Default' Mode 'Canvas' Mode
  • 27. GADGET:VIEWS Contd. ● Define multiple views for a gadget – Duplicate <Content> sections based on views – Concatenate the views for a single <Content> – <Content type="html" view=“default,canvas">
  • 28. GADGET:JAVASCRIPT REFERENCES ● Required when a gadget uses a feature ● Have to include <Require> tag in gadget xml
  • 29. GADGET:JAVASCRIPT REFERENCES Feature Library Description Syntax setPrefs Sets the value of a user <Require preference programmatically feature=“setprefs”> dynamic-height Gives a gadget the ability to <Require resize itself feature=“dynamic-height”> settitle Sets a gadget’s title <Require programatically feature=“settitle”> tabs Adds a tab interface to a gadget <Require feature=“tabs”>
  • 30. GADGET:DYNAMIC HEIGHT ● Required when gadget content populate dynamically ● Include <Required feature=”dynamic-height”/> under <ModulePrefs> ● Call gadgets.* api method gadgets.window.adjustHeight()
  • 31. GADGET:SETPREFS ● Required when setting user preferences programatically ● Include <Required feature=”setprefs”/> under <ModulePrefs> ● Call gadgets.* api method var prefs = new gadgets.Prefs(); prefs.set("key", value); //To set user-prefs //To get user-prefs prefs.getString(key); prefs.getInt(key);
  • 32. GADGET:VIEWS ● Provides operations for dealing with views ● Include <Required feature=”views”/> under <ModulePrefs> ● Call gadgets.* api method //To get current view gadgets.views.getCurrentView() //To get all supported view by Gadget Server gadgets.views.getSupportedViews()
  • 33. GADGET:TABS ● Useful when need tabs inside a gadget ● Include <Required feature=”tabs”/> under <modulePrefs> ● “tabs” library provides functions & css to operate ● “tabs” library contains main three objects – 'tabs' object:Parent container around all tabs – 'tab' object: A single tab within an array of indexed tabs – Content Container:Holds the content of an individual 'tab' object
  • 35. IMPROVE GADGET PERFORMANCE ● Avoid using external JavaScript or CSS files ● Use “type=html” gadgets over “type=url” gadgets ● Specify height and width for all <img> tags in your gadget's HTML ● Do not refresh cache often with the parameter 'refreshInterval' when using makeRequest() function
  • 36. TIPS & TRICKS ● Error Handling ● F12: Browser specific debugging tools ● Incremental Development ● Test with IE ● Use an IDE
  • 37. MORE ON WSO2 GADGET SERVER ● SOAP Request Gadget Allows a gadget author to invoke a SOAP Web Service [refer] ● OAuth Support Allow accessing private data from a hosting service to a consumer gadget [refer] ● Inter Gadget Communication Facilitated with the help of publisher and subscriber gadgets [refer]
  • 38. REFERENCES & SOME USEFUL INFORMATION Google Gadget Specification ● http://code.google.com/apis/gadgets/docs/spec.html ●Writing Google Gadgets – A Tutorial http://wso2.org/library/articles/2011/11/writing-google- gadgets-tutorial-part-01 Browse through WSO2 developer archive http://wso2.org ● Download WSO2 Gadget Server ● http://wso2.org/downloads/gadget-server ●Installation Guide http://wso2.org/project/gadget- server/1.4.2/docs/installation_guide.html
  • 39. Selected Customers https://ail.google.com/mail/u/0/?ui=2&ik=ad9ae58 f41&view=att&th=1331a70983344a32&attid=0.1&d isp=thd&realattid=f_gtxto6mk0&zw
  • 40. WSO2 engagement model • QuickStart • Development Support • Development Services • Production Support • Turnkey Solutions • WSO2 Mobile Services Solution • WSO2 FIX Gateway Solution • WSO2 SAP Gateway Solution