Thursday, May 1, 2014

Developing Web Application Using Jaggery - Part 1


Introduction

This series of tutorials gives you a basic understanding of Jaggery framework and its capabilities in web application development. This tutorial, part 1, explains a little bit about Jaggery and how we can install it.

Jaggery is a newly designed server side JavaScript framework. You might know about JavaScript that is used at the client side to control the interaction of the user with the browser. It controls the browser, decorate the page, validate fields and do more and more stuff at the client side. At the server side, you normally have your logic in programming languages such as Java or PHP. So JavaScript runs at your computer's browser. Java runs at your server.


Isn't nice if we can write the server side logic using JavaScript? Jaggery is the solution. So you can develop a web application using JavaScript only.

 
Installation


Download the latest Jaggery here
Extract it (jaggery-0.9.0-SNAPSHOT.zip in my case) to a directory you prefer. Lets call it JAGGERY_HOME 


You will get the following folder structure.


├── apps
├── bin
├── carbon
├── etc
├── INSTALL.txt
├── LICENSE.txt
├── modules
├── README.txt
└── release-notes.html



That's it. You have installed it.

 

Running the Server


In your terminal, navigate to JAGGERY_HOME/bin directory which contains all the Jaggery execution scripts.
Run sh JAGGERY_HOME/bin/server.sh ( JAGGERY_HOME/bin/server.bat in windows) command to start the server. It starts the default carbon server bundled with the framework itself.


If your server starts successfully, you will get something like below in your terminal, 

 

Deploy Jaggery Applications

JAGGERY_HOME/apps is the deployment directory. Deploy (copy) your Jaggery application to the deployment directory. You can find some sample application in the deployment directory including the taskmaster application.

 

Accessing Jaggery Applications

Point the browser URL to http://localhost:9763/taskmaster
You will have a web application, taskmaster application, running.

So if you deploy an application $myApp, you can access your application @ http://localhost:9763/$myApp

 

Developing Jaggery Applications

Please refer Developing Web Application Using Jaggery - Part 2

No comments:

Post a Comment