[pouyan]
>> httpserver delivered with the Java 6 is only a simple webserver and is
>> not a servlet container. on the other hand I don't think that it would
>> be complicated to imitate some vital functionalities of a servlet
>> container
>> Those for MVC architecture say "Ayeeeee"
[Ian]
> MVC is a nobrainer, the hard question is *which* MVC framework.  Criteria
> are:
>
> Shallow learning curve (since regardless of which we choose, its likely to
> be unfamiliar to some developers)
> Lightweight (so that it doesn't increase the size of Freenet's
> distributable)
> Well supported
> Pleasant to use
> Ian Clarke

We are not "forced" to choose between existing frameworks. IMHO,
Building a lightweight framework tailored for Freenet is the best
solution for the current situation. Following tools are needed:

1. A servlet container (I suggest Jetty) [or adapt already existing
"SimpleToadletServer"]
2. A templating engine (Velocity is suggested)

And following steps must be taken:

i. Build a controller servlet/toadlet which handles http requests and
redirects them to responsible Toadlet. Servlet/Toadlet can be
configurable using a XML file (just like Struts) e.g managing
forwardings.
ii. Adapt Toadlet class to template engine and provide a mechanism to
register desired properties and methods to the templates context (can
be done elegantly using annotations).

After doing so we have our own simple and configurable framework which
is based upon MVC architecture and suits freenet needs. The only
remaining step is to externalize toadlets view in JSP-like HTML pages
(which are processed by template engine). Moreover a toadlet can have
different views for different needs, so you could have all those fancy
javascript effects beside simple lame HTML elements.

In case of Velocity, because of simple notation and tidy syntax, the
learning curve would be minimum, it is well supported however it is
not that pleasant to use :) but its a tradeoff between simplicity and
pleasure!

This way we would make sure that the framework is as big as necessary
and as small as possible by avoiding all unnecessary features provided
by existing frameworks.
_______________________________________________
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to