Wednesday, 17 September 2014

Servoy Web Services Part-4

Hello and welcome back... :)

Hope by this time you must have successfully posted a form and save the data in database...
Now let move ahead and GET those data and display in our web page.

To fetch data from Servoy one must have to do a GET request through HTTP. 
Let us add a HTML Button to send the request. We can request for a particular record, bunch of records or all the records. So let us put a text box as well to to enter the ID to be fetched.

 <label for="name">Enter ID to get the value:<br></label>
 <input name="elementId" type="text"  /><br><br>
 <input type="button" value="GET" onclick="getServoyDataInForm();"/>

Definition of  getServoyDataInForm()...

Servoy Web Services Part-3

Hello,

Welcome back again...Keep your fingers ready to type in some codes now...

Let us create a HTML file and have a form with simply two fields 'firstName' and 'lastName'. We will be doing POST request to post these form data to servoy web service and store them in database.

HTML form contents
 <form id="myForm">
      <label for="name">First Name:</label>
      <input name="firstName" type="text"  /><br>
 <label for="name">Last Name:</label>
 <input name="lastName" type="text"  /><br>
      <input type="button" value="Submit" onclick="postFormDataToServoy();"/>
</form>

Lets add JQuery to our web page...

<script src="jquery.js"></script>

Tuesday, 16 September 2014

Servoy Web Services part-2

Hello,

Welcome Back, 

In the first part we have learnt about the web services and what are the different method we have in HTTP Request.

In this article , we are going to create a solution in Servoy and write few methods that will map to the HTTP requests.

Before we jump into creating solutions and methods, let understand how servoy handles the requests from HTTP...

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.

Sunday, 7 September 2014

Connecting MySQL database with Servoy

Hello All,


This tutorials is for new developers into the world of servoy.

While learning servoy must must have gone through this line. "We can connect servoy to any back-end database and same code base will work for any database you connect". That is TRUE and it is very easy to connect databases with servoy. Just we need some information to connect it..

In this article, I am going to show you how we can connect MySQL with servoy.