Using Jade for the web?

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Using Jade for the web?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:45 pm

by Anonymous >> Wed, 1 Oct 2003 5:15:12 GMT

I was wondering what kind of experiences people have had with building websites using Jade. Do you usually sit all of your webpages inside of Jade, and access them from there? Are there other approaches?

I'm looking at implementing Jade on a website which currently uses ASP for server-side scripting and SQL Server for the database. It looks like Jade will just be one part of the website, and therefore needs to interface nicely with the existing technology. Has anyone had experience with getting Jade to happily co-exist with a scripting language? Anyone using a scripting language like VBScript to call Jade?

I'm looking forward to hearing about the experiences of others. Thanks!

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Using Jade for the web?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:45 pm

by allistar >> Wed, 1 Oct 2003 7:01:44 GMT
I was wondering what kind of experiences people have had with building websites using Jade. Do you usually sit all of your webpages inside of Jade, and access them from there? Are there other approaches?

There are other approaches, most of which are less expensive from a licensing point of view and also easier to implement than "standard" JADE approaches.

One approach is to use SOAP. This will require you to have a SOAP server (probably written in JADE) that responds to SOAP requests send from the web server in a server side scripting language like ASP or PHP.

Another approach is to use JHP, which allows you to embed JADE code in an html file (just like you do with ASP). Think of this embedded JADE code like a JadeScript. You have complete access to the JADE database and all objects/methods in it. (Disclaimer: I am biased - I wrote the JHP module).
I'm looking at implementing Jade on a website which currently uses ASP for server-side scripting and SQL Server for the database. It looks like Jade will just be one part of the website, and therefore needs to interface nicely with the existing technology. Has anyone had experience with getting Jade to happily co-exist with a scripting language? Anyone using a scripting language like VBScript to call Jade?

I'm looking forward to hearing about the experiences of others. Thanks!

The JHP module works as either as module for Apache running on Linux, or as an IIS module. It would be quite easy to hook up an existing ASP type application with jhp pages that then integrate to the JADE database.

There is a demo up and running which you can view here:

http://jhp.silvermoon.co.nz/index.jhp

Regards,
Allistar.

------------------------------------------------------------------
Allistar Melville
Software Developer, Analyst allistar@silvermoon.co.nz
Auckland, NEW ZEALAND

Silvermoon Software
Specialising in JADE development and consulting
Visit us at: http://www.silvermoon.co.nz
*NEW* Simple web access to Jade at: www.silvermoon.co.nz/jhp.html ------------------------------------------------------------------

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Using Jade for the web?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:45 pm

by dcooper@jade.co.nz >> Wed, 1 Oct 2003 7:28:24 GMT

The JADE 6 Q3 consolidated patch release (to be released very shortly) provides support for Web Services (XML, SOAP, WSDL). It provides Web Service publishing (the ability to expose JADE functionality as Web Services that can be invoked from any Web Service client) and a beta of Web Service consumption (the ability to "import" Web Services into JADE and invoke them from JADE code). JADE 6 also implements a new licensing scheme that will make the cost of JADE's Web Service and HTML frameworks very competitive with other approaches.

Cheers,
Dean.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Using Jade for the web?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:45 pm

by allistar >> Wed, 1 Oct 2003 8:30:38 GMT

Hi dean,
Thanks for the update, I look forward to having a look at it when we move to JADE 6.

Regards,
Allistar.

------------------------------------------------------------------
Allistar Melville
Software Developer, Analyst allistar@silvermoon.co.nz
Auckland, NEW ZEALAND

Silvermoon Software
Specialising in JADE development and consulting
Visit us at: http://www.silvermoon.co.nz
*NEW* Simple web access to Jade at: www.silvermoon.co.nz/jhp.html ------------------------------------------------------------------

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Using Jade for the web?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:45 pm

by Anonymous >> Wed, 1 Oct 2003 12:08:36 GMT

Thanks Dean - that will definitely be worth looking into!

Allistar, I've just had a quick look at JHP (great work!). I'm curious how JHP would integrate with an existing website built with ASP. Obviously, running on IIS it would be possible to have separate JHP and ASP pages, connecting to Jade and SQL Server respectively. But would it be possible to combine the two? Ie. if I had a webpage that needed to run Jade code to access data in Jade AND run VBScript to get data from SQL Server. (Let's assume that having the entire page in Jade isn't a possibility - maybe I don't want to go through Jade to access SQL Server, or I have a ton of VBScript that I don't want to convert over to Jade, or I have VBScript functions that I need to use on every single page.) I'm guessing perhaps it would be possible to parse the page twice, once for Jade and once for VBScript, but is there a better way to do something like this?

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Using Jade for the web?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:45 pm

by allistar >> Wed, 1 Oct 2003 21:28:26 GMT

The easiest way would be to, as you say, have seperate .jhp pages and separate .asp pages. You could easily get one to call another though. It is possible that you could convince IIS to do a double process on the asp file, by passing it through the JHP module as well. I hsve never trie this before, I know you can do this in the Apache web server.

The other possibility is, as you say, to do the SQL querying using JADE in the .jhp file.

Another idea is to embed a JHP page into an ASP page as an iframe (an embedded frame). The JHP page will still get processed by the JHP module, but will display inside the ASP page. All standards compliant browsers should support this, older browsers may not.

Regards,
Allistar.

------------------------------------------------------------------
Allistar Melville
Software Developer, Analyst allistar@silvermoon.co.nz
Auckland, NEW ZEALAND

Silvermoon Software
Specialising in JADE development and consulting
Visit us at: http://www.silvermoon.co.nz
*NEW* Simple web access to Jade at: www.silvermoon.co.nz/jhp.html ------------------------------------------------------------------

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Using Jade for the web?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:45 pm

by Cheeky Darkie >> Thu, 2 Oct 2003 22:20:13 GMT

That JHP stuff looks cool, and easy enough for a novice like me to grasp. It'd be nice if the Jade plant picked up the idea.


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 18 guests

cron