rapid web application development with the wso2 mashup server
Post on 18-Dec-2014
1.779 Views
Preview:
DESCRIPTION
TRANSCRIPT
Rapid Web Application Development
with the WSO2 Mashup Server
Nuwan Bandara & Ruchira Wageesha
• 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
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
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
Architecture
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)
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
Few common use-cases
• Consuming information from different data sources
• Aggregating RSS feeds
• Event based alerts
• Periodical tasks
• Web scraping
• Session management
If you want to consume many different data sources
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.
If you want to Aggregating some feeds and create a RSS reader
The Feed Object
• Helps Mashups to consume and create Atom and RSS Feeds
If you want to configure an alert to be sent via IM or email
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
If you want to create a web scraping bot
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
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
Documentation & articles
• http://wso2.org/project/mashup/2.2.0/docs/
• http://wso2.org/library/mashup-server
• http://jonathanmarsh.net/category/wso2-mashup-server/
• http://www.nuwanbando.com/category/wso2-mashup-server/
Contribute and feedback
• https://wso2.org/jira/browse/MASHUP
• http://wso2.org/forum/226
• http://wso2.org/mail
Image References
• http://images.sixrevisions.com/2008/12/15-01_use_framework.png
• http://www.theredelephant.org/html/images/rss_xml_atom_feeds_news_icon.jpg
• http://www.digitalpipelines.com/images/craigslist-homepage.gif
• http://www.livescorefeed.net/images/xmlfeed.png
top related