Tags:
create new tag
view all tags

RIFE Templating Engine and Web Application Framework

The framework has some interesting concepts and templating framework. Though it is in java, the ideas can help create simplified and reusable web-application modules in twiki.

Framework

RIFE framework is intended to create web-applications using paradigm of electronic circuitry: Model your application as elements (i.e. IC's, transistors etc.), and connections/flows between these elements. The XML specification allows the incoming/outgoing connection points for each element, and for each connection, how control flow (along with corresponding data flow from output of one element to another element) should occur.

The elements can be designed to be completely independent within a web application framework, and therefore completely reusable. For example, if someone designs a good table editor, it can be plugged in into twiki or any other wiki system without any change. The reason is: URLs and other info are generated by the framework rather than by the programmer.

Continuations

This type of web-application programming is facilitated by incoporating continuations in the framework. Continuations are a way to overcome fundamental problem of designing a web-based application as a simple program flow application as opposed to event-based model, where it becomes very clumsy to decide next URl and to pass data around. See discussion at serverside for some starting points. (See http://library.readscheme.org/page6.html for academic treatment.)

Templating engine

The templating engine provided by RIFE, a Java-based Web application framework is unconventional model than usual template engines (such as PHP, JSP etc.). It allows topics to have only two types of tags (put as part of HTML comments):

  • B tag: Defines a named block where some data can be stored. It is completely removed in final rendering.
  • V tag: Defines a named placeholder which can be set to some value, which will be displayed when rendered.
And no other constructs such as loops, conditionals, INCLUDEs etc.

This model requires all the logic to be put in the code(java) itself, and therefore, the templates can be very "clean" i.e. rendering will be fast . Checkout the userguide: http://rifers.org/docs/usersguide/ which gives detailed examples.) (http://rifers.org/blogs/gbevin/2004/5/11/bidirectional_template_engine has some explanation of the concepts.)

(And some discussion at http://rifers.org/blogs/gbevin/2005/1/22/re_hype_ruby_on_rails - see comments.)

How it could help twiki

If templating engine principles are adopted:

  • We can work with concept of twiki topic as structured data objects at same time as they hold unstructured markup.
  • Variable expansion (such as INCLUDE) triggered and handled much easily from code rather than be triggered by rendering engine.
  • Rendering engine will therefore be much simpler. The engine would have to handle only wiki tags and not variables.

Not all aspects are investigated, but there are enough clues that the methodology might be useful to look at in more detail.

-- VinodKulkarni - 07 Feb 2005

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2005-04-11 - GeertBevin
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.