2

I develop an application on IBM worklight for android. I have to use a web service, but I need worklight server. I wonder that why an app developed on worklight needs a worklight server. Don't I develop an application without worklight server ?

3 Answers 3

8

There are various features IBM Worklight provides that require the Worklight Server. For example:

  • Adapters that allow you to get data from REST and SOAP APIs via HTTP, SQL DB, JMS and IBM Cast Iron. These live on the Worklight Server and always send JSON back to the client, despite what the original service returned (e.g. XML). You can find more information in the Getting Started Modules. However, this does not stop you from doing normal AJAX requests from the client without using the Worklight Server. I posted an example of doing an simple AJAX request here. Another feature is that you can use Java (not JavaScript) code to provide functionality inside those Adapters.

  • Direct Updates - As soon as you deploy a Worklight Hybrid Application to the Worklight Server, when existing mobile devices with the application installed contact the server they will be notified that there's an update. After the user has selected to upgrade, resources (HTML, CSS, JS) files will be downloaded from the Worklight Server and he/she will have an updated application without going through Apple's or Google's Application stores. There is also a way to disable access to a Worklight Hybrid Application.

  • Security - There are various security features that depend on the Worklight Server. For example: Custom Device Provisioning and various types of Authentication. Some level of communication with the Worklight Server is required for data storage features like: JSONStore and Encrypted Cache.

Using the Worklight Server is not required, but it will limit the amount of features your application can take advantage of.

2
  • is necessary to keep worklight server always running when you are using your app on device?
    – Xcihnegn
    Jul 11, 2014 at 8:39
  • If you want to take advantage of the features listed above (i.e. Adapters, Direct Update, Security) in my answer, you must leave the Worklight Server running.
    – cnandreu
    Jul 12, 2014 at 10:41
0

An app without a WL server is just a PhoneGap/Cordova app. The whole point of WL is to have the server backend to provide updating, user access controls, and secure data communication, for example using adapters to interface with servers that may be behind firewalls.

If you don't need the server, then you probably don't really need WL. If you do use WL, just use an adapter to talk to the web server.

3
  • 1
    For future readers: "An app without a WL server is just a PhoneGap/Cordova app". There is some truth to that, but it's over simplified. IBM Worklight also provides many client libraries like JSONStore that do not exist outside of Worklight Apps. Developers may also take advantage of various tools provided by the Worklight Ecosystem.
    – cnandreu
    Mar 4, 2013 at 1:45
  • @cnandreu You are right that there are client side APIs that are unique to WL, and perhaps I should have added more context to my response. However, I think most will agree that the main benefit of WL is the server component, and the capabilities it adds to traditional hybrid app. Especially when building for enterprise clients/users.
    – Ralph Pina
    Mar 4, 2013 at 5:53
  • 1
    I am not sure I would write that the main benefit of WL is the server component, it is an important component, but not more important then the studio or the run time environment (the client libraries). Mar 4, 2013 at 11:51
0

The Worklight Server is a runtime container for the mobile applications you develop in Worklight Studio. It is not an application server in the Java™ Platform, Enterprise Edition (JEE) sense. It acts as a container for Worklight application packages, and is in fact a collection of web applications (optionally packaged as an EAR file) that run on top of traditional application servers.

Worklight Server is designed to integrate into the enterprise environment and use its existing resources and infrastructure. This integration is based on adapters that are server-side software components responsible for channeling back-end enterprise systems and cloud-based services to the user device. You can use adapters to retrieve and update data from information sources, and to allow users to perform transactions and start other services and applications.

You can use Worklight Server for the following tasks:

  • Empower hundreds of thousands of users with transactional capabilities and enable their direct access to back-end systems and cloud-based services.

  • Configure, test, and deploy descriptive XML files to connect to various back-end systems by using standard Worklight Studio tools.

  • Directly update deployed hybrid and web applications, without going through the different app stores (subject to the terms of service of the vendor).

  • Automatically convert hierarchical data to JSON format for optimal delivery and consumption.

  • Enhance users interaction with a uniform push notification architecture.

  • Define complex mashups of multiple data sources to reduce overall traffic.

  • Integrate with the existing security and authentication mechanisms of the organization.

http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0/index.jsp

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.