Successfully reported this slideshow.
Your SlideShare is downloading. ×

Rapid Web Application Development with the WSO2 Mashup Server

Check these out next

1 of 20 Ad
1 of 20 Ad

More Related Content

Similar to Rapid Web Application Development with the WSO2 Mashup Server (20)


Rapid Web Application Development with the WSO2 Mashup Server

  1. 1. Rapid Web Application Development with the WSO2 Mashup Server Nuwan Bandara & Ruchira Wageesha
  2. 2. Hurdles of rapid web application development • 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
  3. 3. 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
  4. 4. 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
  5. 5. Architecture
  6. 6. 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)
  7. 7. 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 
  8. 8. Few common use-cases • Consuming information from different data sources • Aggregating RSS feeds • Event based alerts • Periodical tasks • Web scraping • Session management
  9. 9. If you want to consume many different data sources
  10. 10. 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.
  11. 11. If you want to Aggregating some feeds and create a RSS reader
  12. 12. The Feed Object • Helps Mashups to consume and create Atom and RSS Feeds
  13. 13. If you want to configure an alert to be sent via IM or email
  14. 14. 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
  15. 15. If you want to create a web scraping bot
  16. 16. 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
  17. 17. 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 • Navigate to the Mashup Server and get cracking
  18. 18. Documentation & articles • • • mashup-server/ • mashup-server/
  19. 19. Contribute and feedback • • •
  20. 20. Image References • 01_use_framework.png • om_feeds_news_icon.jpg • homepage.gif •