Hypertext Preprocessor for JADE taken further

The use of specific JADE features and proposals for new feature suggestions
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Hypertext Preprocessor for JADE taken further

Postby ConvertFromOldNGs » Fri Aug 07, 2009 10:53 am

by Brett >> Wed, 11 Jun 2003 3:56:48 GMT

I've just had a look at the Hypertext Preprocessor for JADE (.jhp) in that it operates in a similiar way to PHP and ASP.

There is still the problem of embedding the business logic into HTML code. Meaning that after a Web Developer has developed the HTML page the Jade developer must go in and insert the relevant Jade code into the correct spots, without upsetting the current HTML code. This can be time consuming tracking down errors caused by either party.
I see the Browser/Web Server operating in a two step process, 1) web server collates information from the Jade database (containing HTML code and Jade code) and 2) passes the HTML code back to the browser.

From my understanding Java has recognised the above problem and solved this using the Model-View-Controller pattern. The business logic is split from the graphic interface, by using a three step process, 1) information is collected from Jade database and placed into variables (In Java called a servlet), 2) the information is passed onto the web server and setup by using HTML tags and the Parameters populated from Step 1, and 3) passes the HTML code back to the browser.

I would like to see the Business Logic separated from the Web GUI.

What do you think?

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

Re: Hypertext Preprocessor for JADE taken further

Postby ConvertFromOldNGs » Fri Aug 07, 2009 10:53 am

by cnwdad1 >> Wed, 11 Jun 2003 4:18:42 GMT

JADE 6 will allow this by importing an HTML file, then creating an "interface" class for the imported file. Attributes and event methods are automatically provided according to the contents of the HTML.

regards,
darrell.

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

Re: Hypertext Preprocessor for JADE taken further

Postby ConvertFromOldNGs » Fri Aug 07, 2009 10:53 am

by allistar >> Wed, 11 Jun 2003 8:41:31 GMT

Hi Brett,
I agree with the separating of layout from business logic. The JHP demo site is constructed using shell scripts that combine many .inc files into one .jhp file using the "cat" command (a .inc file is simply a portion of a ...jhp file). This allows for heavy reuse of .inc files (like for common page elements like navigation etc). It also allows you to define the jhp section (that contains the Jade code) in a .inc file all by itself and the HTML developer doesn't need to know about it.

Also using cascading style sheets is a good way to separate business logic from layout (although the Jade developer would need to know which css "class" to use). At the end of the day the Jade developer would need to know something about HTML, although the HTML developer doesn't need to know anything about Jade. Even better if they are the same person.

I haven't looked into the way Java works around this issue, I may do some investigation and see how they come up with a solution. From what you describe it sounds like using a SOAP interface to a Jade database, but you still need an intermediate language like PHP or ASP to assemble the data from the Jade database into html format.

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: Hypertext Preprocessor for JADE taken further

Postby ConvertFromOldNGs » Fri Aug 07, 2009 10:53 am

by JensRichnow >> Wed, 11 Jun 2003 23:16:30 GMT

I just had a look at the Struts framework. Amazing stuff, very easy to learn and a very clean MVC implementation. Also clear separation of roles (web designer vs. developer). A 'simple' Java-Jade bridge (essential data base driver for Jade) will do the trick to facilitate existing data in a Jade DB. As both are OO languages it takes the hassle off object-relational mapping.

Cheers

Jens


Return to “Feature Discussions”

Who is online

Users browsing this forum: No registered users and 2 guests