Fig1. Business layer and presentation layer have their own data and logic.
figure of kwartz
Fig2. Kwartz vs. Other template system: Kwartz separates presentation logic from presentaion data(=HTML).
figure of kwartz

Kwartz is a template system which realized the concept of 'Independence of Presentation Logic'(IoPL).

It is available to separate the presentation layer from the main program with any template system. In addition, Kwartz enables you to separate the presentation logic (such as iteration or conditional branching) from the presentation data (HTML file).

In a broad way, application can be divided into two layers: Business layer and Presentation layer. These layers have their own data and logic. It is important that presentation layer should have it's own logic and that presentation logic should not be in business layer (Fig1).

Traditional template system, such as Jakarta Velocity or Smarty, forces you to mix presentation logic and presentation data in a template, and breaks HTML design in the result. Some other template system, such as Enhydra XMLC or amrita, doesn't break HTML design but they mix presentation logic into business layer(=main program). Kwartz divides template into presentation logic and presentation data. Therefore Kwartz doesn't break HTML design at all and keep main program 'clean' (Fig2).

In addition, Kwartz has more features:

  • Separates presentation logics from both business logics (= main program) and presentation data (= HTML file).
  • Runs very fast
  • Supports multiple programing languages: Ruby(eRuby), PHP, Java(JSP)
  • Doesn't break HTML design at all
  • Handle any text file
  • Supports auto-sanitizing and partial-sanitizing

See users' guide for details.



  • Kwartz-ruby
    • Just type 'gem install --remote kwartz'
  • Kwartz-php
    • Download Kwartz-3.1.1.tgz from and just type 'pear install Kwartz-3.1.1.tgz'.



  • LGPL 2.1

    If you need looser license, please suggest me.

    Output scripts kwartz command generates are outside of the license.


  • makoto kuwata <kwa(at)>
    (If you send me a mail, please make it's subject starting with '[Kwartz]'. Otherwise, I may miss your mail.)


  • Bug reports and enhance requests are welcome.
  • This project was subsidized by Exploratory Software Project of IPA (Information-Technology Promotion Agency Japan).