Ibm Worklight Presentation
Ibm Worklight Presentation
PRESENTATION
• Enables the creation of rich, cross-platform apps without the use of code
translation, proprietary interpreters or unpopular scripting languages, while
reducing the time to market, cost and complexity of development and
enabling a better user experiences across a variety of mobile devices.
• Part of IBM Mobile foundation that provides the essential elements needed
for complete mobile development, deployment and management within a
business.
GOALS/OBJECTIVES OF MAKING MOBILE
APPLICATIONS
• SDK’s(Software Development Kit) for various environments like for Android , you need the
Android SDK, for IOS environment, you need the IOS SDK and vice versa.
• Worklight Adapters – We used SQL Adapters.
• Softwares required : Eclipse EE for Java Developers
IBM Mobilefirst Studio Plugin
MySQL Server + Workbench
JDK(Java Development Kit) (Version 1.7 or greater)
Various SDK’s as explained above.
STEPS TO CREATE YOUR FIRST WORKLIGHT HYBRID
APPLICATION
• Adapter is a mediator between mobile applications and enterprise system. Adapters provide an easy and secure
access to enterprise system. And it is efficient to provide enterprise data to mobile devices in a uniform data format.
The data can be presented to mobile device using various interchange formats like XML or JSON (used mostly)
• IBM Worklight provides three different types of adapters
1. HTTP adapter: HTTP adapters provide access to HTTP-based enterprise services, including RESTful and SOAP-
based services.
2. SQL adapter: SQL adapters provide access to enterprise databases.
3. Cast IRON adapter: Cast Iron adapters initiate orchestrations in IBM Web Sphere Cast Iron.
• Adapters are coded in JavaScript and it runs at server-side on the IBM Worklight mobile application platform. IBM
internally uses Rhino JavaScript engine for executing the JavaScript source code.
CONTD……
USE `ibmworklight`;
DROP TABLE IF EXISTS `studentinfo`;
CREATE TABLE `studentinfo` (`sid` varchar(20), `sname` varchar(20), `sclass` varchar(20), `sgrade` varchar(20));
INSERT INTO `studentinfo` ( `sid`, `sname`, `sclass`, `sgrade`) values ('PUC001','Rohan','PUC', 'A+');
INSERT INTO `studentinfo` ( `sid`, `sname`, `sclass`, `sgrade`) values ('PUC002','Rakesh','PUC', 'A');
INSERT INTO `studentinfo` ( `sid`, `sname`, `sclass`, `sgrade`) values ('PUC003','Raj','PUC', 'C');
INSERT INTO `studentinfo` ( `sid`, `sname`, `sclass`, `sgrade`) values ('PUC004','Roman','PUC', 'E');
select * from `studentinfo`;
CONTD…..
• Configure your sql adapter xml. For this you need to have mysql connector.jar file included in
the library. Use the following SQL command:
<dataSourceDefinition>
<driverClass>com.mysql.jdbc.Driver</driverClass>
<url>jdbc:mysql://localhost:3306/ibmworklight</url>
<user>root</user>
<password>root</password>
</dataSourceDefinition>
CONTD……
• Define Worklight procedures using the following command:
var selectStatement = WL.Server.createSQLStatement("select * from studentinfo");
function getStudentInfos() {
return WL.Server.invokeSQLStatement({
preparedStatement : selectStatement,
parameters : []
});
}
• Our project is called the “SWIM” which stands for “Shop While on the Move”.
• It is a hybrid application based on various online shopping applications.
• This application uses a QR Code assigned for each product.
• The apache cordova plugin camera is used for the QR Code.
• This application is deployed under Android environment.
• Software requirements have been listed in the above slides.
• The process of creating a hybrid app + creating sql adapters have been listed in the above slides as
well.
ABSTRACT
• A large home store came up with a unique idea of increasing its sales without adding additional
stores. It was proposed to put up pictures of store shelves displaying fast moving retail items and
groceries. Each item also had a corresponding QR Code embedded in its image. These pictures,
in form of posters, will be placed at metro stations, bus stops, and other similar transit places.
The commuters will be able to select the items they wish to buy by capturing the embedded QR
Code and subsequently add to the shopping cart. Once an order is placed electronically, the items
will be home delivered at a predetermined time by the home store. SWIM application will allow
selection of items using QR Code (captured using phone camera), management of shopping cart,
and the placement of the order.
INDRODUCTION
• In today’s world of hustle-bustle, everybody is on the move for most of the time and an
individual has no time for shopping or bargaining. They have no time to visit the malls for their
convenience. For the coustomer’s convenience, we have created a simple, easy to operate
application of online shopping. This app can work on any environment(IOS, Android,
Blackberry, Windows) installed on your smartphones. You can choose the items you want to buy
by tapping on the product icon and it gets added to your cart. Payments can be made online on a
single tap of your finger within no time. Payment can also be done after the delivery. Within 2-3
days, your product will be delivered at your doorstep.
PROS
• EASY TO USE.
• PORTABLE. CAN BE CARRIED ANYWHERE.
• RELIABLE.
• USER-FRIENDLY.
• MULTIPLE USERS CAN ACCESS IT AT THE SAME TIME.
• SAVES TIME AND EFFORT.
• ECONOMICAL.
• SCHEMES AND DISCOUNTS ARE AVAILABLE FOR A LIMITED TIME.
• TWO PAYMENT OPTIONS AVAILABLE- EITHER ONLINE OR ON-DELIVERY.
CONS
• NEEDS RELIABLE INTERNET CONNECTION.
• FOR THE INITIAL PERIOD, THE NUMBER OF ITEMS IS LIMITED WHICH CAN BE
EXPANDED IN THE FUTURE.
• THERE IS NO CASHBACK RETURN OPTION RIGHT NOW, BUT IT CAN BE ADDED
LATER ON.
FUTURE SCOPE