Rapid Web Application Development with the WSO2 Mashup Server

20
Rapid Web Application Development with the WSO2 Mashup Server Nuwan Bandara & Ruchira Wageesha

description

Rapid Web App Development with WSO2 Mashup Server, The webinar done on 10-03-2011, by Nuwan Bandara & Ruchira Wageesha

Transcript of Rapid Web Application Development with the WSO2 Mashup Server

Page 1: Rapid Web Application Development with the WSO2 Mashup Server

Rapid Web Application Development

with the WSO2 Mashup Server

Nuwan Bandara & Ruchira Wageesha

Page 2: Rapid Web Application Development with the WSO2 Mashup Server

• There are many great web app development frameworks, but …

• Is there a simple way to consume different information streams, APIs and services ?

• How much code do you have to write to aggregate the responses of two different web services ?

• Can you easily setup an event based alert system

Hurdles of rapid web application development

Page 3: Rapid Web Application Development with the WSO2 Mashup Server

How can Mashup Server help you ?

• Mashup server can help you in consuming those Web Services, APIs and other information streams

• There is almost no learning curve

• Write the mashup simply in JavaScript and its ready to go

• Your web application can have one single entry point to consume the mashup and the rest can be delegated to the mashup server

Page 4: Rapid Web Application Development with the WSO2 Mashup Server

Features of the server

• Provides a service hosting platform

• Has an extensible programming model

• Ability to bundle a custom user interface for the mashup

• Many useful JavaScript APIs (Host-Objects) that can be used when writing mashups (WSRequest, IM, File, Session, Scraper etc)

• Mashup authoring tools

• Task scheduling

• Ability apply quality of services

• Security, Reliability etc

• Server administration, monitoring and governance

Page 5: Rapid Web Application Development with the WSO2 Mashup Server

Architecture

Page 6: Rapid Web Application Development with the WSO2 Mashup Server

WSO2 Mashup

• Is written in Server Side Javascript

• Able to import any JS library

• Javascript extensions are available for Mashup authors as

• Objects (Feed, APP, IM, Tasks, Scraping)

• ECMAScript for XML (E4X)

• Immediately becomes a Web Service, which means it;

• Can be invoked via SOAP or REST

• Can be configured for QoS (Security, Throttling, Policies, etc.)

• Can be monitored (Statistics)

Page 7: Rapid Web Application Development with the WSO2 Mashup Server

Hello World

• Step 1 - In Notepad or your favorite IDE, type the following text:

• Step 2 - Save this file as 'helloworld.js' in a directory within 'repository/deployment/server/jsservices' directory of

Mashup Server.

• And now it’s a web service

Page 8: Rapid Web Application Development with the WSO2 Mashup Server

Few common use-cases

• Consuming information from different data sources

• Aggregating RSS feeds

• Event based alerts

• Periodical tasks

• Web scraping

• Session management

Page 9: Rapid Web Application Development with the WSO2 Mashup Server

If you want to consume many different data sources

Page 10: Rapid Web Application Development with the WSO2 Mashup Server

The WSRequest Object

• Similar to the XMLHTTPRequest object

• Usage typically involves specifying the endpoint address and setting up options on how to frame the message, invoking the operation with a specific XML payload, and then checking and extracting information from the result.

Page 11: Rapid Web Application Development with the WSO2 Mashup Server

If you want to Aggregating some feeds and create a RSS reader

Page 12: Rapid Web Application Development with the WSO2 Mashup Server

The Feed Object

• Helps Mashups to consume and create Atom and RSS Feeds

Page 13: Rapid Web Application Development with the WSO2 Mashup Server

If you want to configure an alert to be sent via IM or email

Page 14: Rapid Web Application Development with the WSO2 Mashup Server

The Email Object

• Allows users to send out email from their Mashups. It helps notify users of certain events and acts as a bridge between Mashups and users

Page 15: Rapid Web Application Development with the WSO2 Mashup Server

If you want to create a web scraping bot

Page 16: Rapid Web Application Development with the WSO2 Mashup Server

The Scraper Object

• The Scraper object allows data to be extracted from HTML pages and presented in XML format. It provides a bridge to data sources that don't have XML or Web service representations at present

Page 17: Rapid Web Application Development with the WSO2 Mashup Server

Mashup Server in the cloud

• You don’t have to worry about deploying a Mashup Server in a hosting environment

• Simply create an account at http://cloud.wso2.com

• Navigate to the Mashup Server and get cracking

Page 19: Rapid Web Application Development with the WSO2 Mashup Server

Contribute and feedback

• https://wso2.org/jira/browse/MASHUP

• http://wso2.org/forum/226

• http://wso2.org/mail