-
Introduction
What is it? Why another framework ? Struts compatibility ?
Yawda is an MVC Web development application framework based on Struts. With it, you can easily output HTML, SVG, PNG, JPEG, PDF, RTF, XML, JS, CSS (and any text file) with data from several sources. It uses cayenne ORM (or another tool like jaxor, hibernates, jdbc or even flat files) and rhinoJS or Java for the model, Struts for the controller, and Velocity/iText/Batik for the view component.
It is composed of several modules addressing each part of the MVC model :
-
Controller: As controller yawda make use of the struts Action Servlet. The action servlet is responsible for routing request to the correct action handler. The action handler is the bind part between the Controller and the Model.
-
Model: The model can be viewed as three parts :
-
The physical store of the data. (ex: a database, flat files, ...)
-
The method to retrieve the data from the physical store. (ex: an ORM (cayenne,...), jdbc, standard stream reading, ...)
-
The bussiness logic which does something with the data. This bussiness logic can be either in the action handler, or other classes called by the action handler.
Yawda provides two built-in action handler :
-
CJSModelExecutor: This action handler permits to write your action handler in javascript. It compiles automatically the scripts. You do not have to restart the server. Script are located in 'WEB-INF/jsmodel'.
-
CJavaModelExecutor: This action handler permits to write your action handler in java, for this you just have to implements 'yawda.data.model.java.IJavaScrtip'. It compiles automatically the classes. You do not have to restart the server. Java source files are located in 'WEB-INF/javamodel'.
-
-
View: Yawda provides 6 views handler, these handler all use xml templates with defined syntax.
-
CVelocityView: This component use vt templates and can output in HTML,PDF and RTF format.
-
CTextView: This component use textt templates and can output text files (with different mimetypes).
-
CXmlView: This component use xmlt templates and can output xml files (with different mimetypes).
-
CSvgView: This component use svgt templates and can output in svg (xml), png, jpeg and PDF format.
-
CPDFView: This component use pdft templates and can output in PDF, RTF and HTML format.
-
CJooTemplateView: This component use oot templates and can output in HTML,DOC,XLS,SXW,SXC and PDF format. You need OpenOffice.org running in listening mode for this component.
You can still use jsp for the view part.
-
As a yawda developper, your responsability is to create the model (physical strore), choose an access method, write action handlers, write the view templates and write the repository file (modules.conf.xml, it is the file that binds everything).
As it is based on struts, you can reuse existing actio handler written for struts. One backside is if you use the parameter attribute of the action tag in the struts-config.xml, you will have a little modification to do to make it work with yawda.
Yawda has full UTF-8 and I18N support.
Why another framework ?
I made another framework because existing framework did not address all the part of the MVC pattern, but it was possible by regrouping different framework to cover them all (I think). And so why not :) ?