Download - Jaggery Introductory Webinar

Transcript
Page 1: Jaggery Introductory Webinar

{Jaggery.js}“The delicious javascript framework”

http://jaggeryjs.org31st May 2012

Page 2: Jaggery Introductory Webinar

Why do we need another server-side js toolkit

Right now, when writing a web app we need to walk through multiple layers of technology HTML(5)/JS, PHP/Ruby/Java, ORM(SQL)

Information captured at the client need to be transformed at each layer JSON/CSV/XML

Its not straightforward to build a natively REST/JSON app

Developing an API coupled to the app is a nightmare

Page 3: Jaggery Introductory Webinar

What is Jaggery

A completely Javascript way of writing all parts of the Web applications and services Eliminates the mismatches across different layers

Closes the gap between Web apps from Web services by allowing one to create both applications and APIs at the same time.

Page 4: Jaggery Introductory Webinar

What jaggery offers for multi-tier web app development

A vanilla platformNo heavy frameworksNo restrictionsOnly a set of APIsSmooth & easy deploymentEnterprise grade runtime

Page 5: Jaggery Introductory Webinar

What it has, as of now

A module architectureThe runtime augments the features of a web serverIt talks smoothly in JSONCan handle URL patternsCan talk to databasesA Shell that can execute the jaggery scriptsIts a new platform, we believe everybody will start building

cool things

Page 6: Jaggery Introductory Webinar

How to make things workExtract jaggery-1.0.0-SNAPSHOT_M5.zip to a directory you

prefer. lets call it JAGGERY_HOME

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

Point the browser URL to http://localhost:9763/taskmaster

Page 7: Jaggery Introductory Webinar

The famous "Hello World" in Jaggery

Create a directory called helloapp at {JAGGERY_HOME}/apps/

Create a jaggery file helloworld.jag inside the helloapp directory and add the following code snippet

Thats it! now point to {http://localhost:9443/helloapp/helloworld.jag}

Page 8: Jaggery Introductory Webinar

The APIhttp://jaggeryjs.org/documentation.jag

Page 9: Jaggery Introductory Webinar

The extensibility

Jaggery can be extended using modulesYeah ! go on write some

You can import any script which is written for commonjs as a jaggery module

If nothing for the rescue, you can expose even a JAVA library as a module for Jaggery

Page 10: Jaggery Introductory Webinar

and you can do this !

Page 11: Jaggery Introductory Webinar

It's awesome coz, it's just javascript & JSON end to end

If you simply want to send some JSON to the client

Page 12: Jaggery Introductory Webinar

It's built to write RESTy apps Match URLs at runtime

Design URLs at development time

Page 13: Jaggery Introductory Webinar

It's modular

Its extensible via modulesEven the core is written in modules and bound with

configuration

Page 14: Jaggery Introductory Webinar

It's completely open-source, under Apache 2.0

Mail us at [email protected]

Report your issues at https://wso2.org/jira/browse/JAGGERY

The source is at (which will be soon moved to GitHub) http://svn.wso2.org/repos/wso2/carbon/platform/trunk/products/jaggery/

Page 15: Jaggery Introductory Webinar

Thank You !

Nuwan Bandara [email protected]

http://nuwanbando.com