How the Ubuntu Templates implement the MVC Model

(Difference between revisions)
Jump to: navigation, search
m
Line 17: Line 17:
 
Here is an example of how the framework simplifies the creation of templates
 
Here is an example of how the framework simplifies the creation of templates
  
<code lang="html">
+
<code >
 
<html><head>
 
<html><head>
  

Revision as of 03:37, 28 October 2009

One of the Industry objectives when developing JSP’s is to have separation between code and HTML.

This resulted in the MVC model which the Ubuntu project strives to realize Instead of having templates the have complicated Java code on them we have "pure html templates"

We have a sepperate JSP the Controller JSP which has all the Java code for processing and delivering all the required aspects of the page as object properties

A third JSP is provided that uses a HashMap to keep pointers to all the site specific content so that common images, logos banners can be placed on any other web server and rendered as partt of the same page. It even handles limited internationalization so that you can switch between default language (English) and another (Zulu)

With all this complexity removed from the "Template Writer" making new template is now a simple task

We only have to place small scriptlets like this <%=Object.ProperyValue > on the template to render values stored in a hidden layer of Java code

The framework provide all the property values needed to create , breadcrumbs (hierarchical and same-site ) , body content …and even our special high-performance Imageless Style-sheet Rollover Button Menus

Here is an example of how the framework simplifies the creation of templates

Invalid language.

You need to specify a language like this: <source lang="html">...</source>

Supported languages for syntax highlighting:

actionscript, ada, apache, applescript, asm, asp, autoit, bash, blitzbasic, bnf, c, c_mac, caddcl, cadlisp, cfdg, cfm, cpp, cpp-qt, csharp, css, d, delphi, diff, div, dos, eiffel, fortran, freebasic, gml, groovy, html4strict, idl, ini, inno, io, java, java5, javascript, latex, lisp, lua, matlab, mirc, mpasm, mysql, nsis, objc, ocaml, ocaml-brief, oobas, oracle8, pascal, perl, php, php-brief, plsql, python, qbasic, reg, robots, ruby, sas, scheme, sdlbasic, smalltalk, smarty, sql, tcl, text, thinbasic, tsql, vb, vbnet, vhdl, visualfoxpro, winbatch, xml, z80

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox