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.

Friday, 22 August 2014

Adding An Additional Font To Servoy Editable HTML_AREA (TinyMCE)

Hello World, 

As we all know in servoy 7.4.1 onward servoy is using tinyMCE as the default HTML_EDITOR. Servoy stopped using the old and legacy YUIeditor (Now of course this has been upgraded). This will be shown in the client when we place a HTML_AREA and mark it as 'editable' . This is come up with a beautiful editor tool. I know you will just love it.

Thanks to servoy, to make it more better they have also exposed a way to add our external plugins. We can now configure as the way you want. But How ??

To do this :



Tuesday, 19 August 2014

Migrating Postgres SQL from v9.0 to latest version...

Hello everyone,

Having legacy application and want to move to a new platform..well that a good idea of upgrading to the new release than relying on older version.

This article will help those who want to migrate PostgreSQL data from pre-postgres 9.1 to post-postgres 9.1 version.

What will be the problem? It must be a simple upgrade of database?

Well yeah! It is a simple database upgrade. Just keep a backup and upgrade the database and restore the data. Done!

Wait, when you will have a column in postgres having "citext" extension, then bang!! It will not let you in and even if it will, then your application will throws exceptions related to collation mismatch while comparing with values having "citext" data type. Believe me that will make you scream "What the hell is happening...??"

 ERROR: could not determine which collation to use for string comparison Hint: Use the COLLATE clause to set the collation explicitly.

Reason for this problem: