Tuesday, 16 September 2014

Servoy Web Services Part-1

Hello,


We must have heard about web services and some point of time we must have wondered, it is possible to expose servoy method (server side methods) as Web Service over network?

The answer is YES!!
Servoy has everything we wish for...kinda cool.. :)

Before we move ahead on how to use web services in servoy, let us first understand what is web services and why we need to use that in servoy application.

What is web service ?

Web service helps in communicating between client and server over World Wide Web's (WWW) Hypertext Transfer Protocol(HTTP).

Why Web services ?

- We can use Web Services to expose some server-side methods to be remotely invoked using HTTP, meaning it can be activated by using HTTP request. So Web Services allows to expose functionality over the network.
- Helps in connecting two different application. Web services allows different applications to talk to each other and exchange data and services among themselves example ".NET" application can talk to java web services and vice verse, Web application can talk to Servoy application and vice verse. So, Web services is used to make the application platform and technology independent.
- Easy to use.
- We can expose functionality of our application. So you might be thinking it is not secure. We can even make it secure by using authentication in web services.



What are the different methods we have in web services ?

There are four types of HTTP request
1) GET - Fetching existing data
2) POST - Create new records and save it
3) DELETE - Deleting existing data
4) PUT - Updating existing data


With web service we can post XML/JSON/Plain Text data to our servoy methods and executes some functionality in servoy and return either Javascript Object or Byte Array.

Now hold on and stay tuned for the next part. That will explain you how to create web service in Servoy and map the HTTP request to servoy methods.

Till then,
Happy Coding.. :)


No comments:

Post a Comment