[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-23 Thread Matthew Toseland
On Friday 22 Apr 2011 22:51:04 David ?Bombe? Roden wrote:
> On Di, 2011-04-19 at 19:35 +0100, Matthew Toseland wrote:
> 
> > Plus, ideally we'd like Freenet to support multiple logins.
> 
> I?m not quite sure what you mean: Sone already does support multiple
> logins and I am using Fred?s session handling.

I mean with the possibility of not listing them and requiring a password to log 
in. For multi-user systems. And with a separate download queue, and possibly a 
separate client-cache, tunnels and security settings, for each user.

Also, all WebOfTrust based apps should really share a single global login, this 
would allow seamless transition from one to the next.
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: 



[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-23 Thread David ‘Bombe’ Roden
On Di, 2011-04-19 at 19:35 +0100, Matthew Toseland wrote:

> Plus, ideally we'd like Freenet to support multiple logins.

I?m not quite sure what you mean: Sone already does support multiple
logins and I am using Fred?s session handling.


David




Re: [freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-23 Thread Matthew Toseland
On Friday 22 Apr 2011 22:51:04 David ‘Bombe’ Roden wrote:
 On Di, 2011-04-19 at 19:35 +0100, Matthew Toseland wrote:
 
  Plus, ideally we'd like Freenet to support multiple logins.
 
 I’m not quite sure what you mean: Sone already does support multiple
 logins and I am using Fred’s session handling.

I mean with the possibility of not listing them and requiring a password to log 
in. For multi-user systems. And with a separate download queue, and possibly a 
separate client-cache, tunnels and security settings, for each user.

Also, all WebOfTrust based apps should really share a single global login, this 
would allow seamless transition from one to the next.


signature.asc
Description: This is a digitally signed message part.
___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl

Re: [freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-22 Thread David ‘Bombe’ Roden
On Di, 2011-04-19 at 19:35 +0100, Matthew Toseland wrote:

 Plus, ideally we'd like Freenet to support multiple logins.

I’m not quite sure what you mean: Sone already does support multiple
logins and I am using Fred’s session handling.


David

___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl

[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-20 Thread Pouyan Zachar
[Matthew]

> Can you show a small easy to understand example?
> >
> > 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.
>
> Yeah, if this is feasible then it makes sense.
>

I have written a simple small framework which automatizes the procedure of
adding references to Velocity context by utilizing annotations. It is
available under:
https://github.com/pouyanster/SimpleMVC

A sample class is available under:
https://github.com/pouyanster/SimpleMVC/blob/master/src/main/java/com/quaintous/simplemvc/SampleView.java
As you can see, I just annotated the fields which are to be used in context
and the framework took care of all necessary steps to process the template:
(available under:
https://github.com/pouyanster/SimpleMVC/blob/master/sample.html)

You can also dynamically add necessary data to the context which is later
processed by velocity engine.
This way you have a clear division between your data model and its view.

I would appreciate feedbacks,
Regards
Pouyan
-- next part --
An HTML attachment was scrubbed...
URL: 



Re: [freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-20 Thread Pouyan Zachar
[Matthew]

 Can you show a small easy to understand example?
 
  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.

 Yeah, if this is feasible then it makes sense.


I have written a simple small framework which automatizes the procedure of
adding references to Velocity context by utilizing annotations. It is
available under:
https://github.com/pouyanster/SimpleMVC

A sample class is available under:
https://github.com/pouyanster/SimpleMVC/blob/master/src/main/java/com/quaintous/simplemvc/SampleView.java
As you can see, I just annotated the fields which are to be used in context
and the framework took care of all necessary steps to process the template:
(available under:
https://github.com/pouyanster/SimpleMVC/blob/master/sample.html)

You can also dynamically add necessary data to the context which is later
processed by velocity engine.
This way you have a clear division between your data model and its view.

I would appreciate feedbacks,
Regards
Pouyan
___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl

[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-19 Thread Arne Babenhauserheide
On Tuesday 19 April 2011 19:35:41 Matthew Toseland wrote:
> Plus, ideally we'd like Freenet to support multiple logins.

That would be cool! 

Then we could add real gateways to WoT, creating a decentral, anonymizing (as 
long as you can trust your gateway) social network.

?getting even more excited about freenet?s future!

Best wishes, 
Arne
-- 
1w6 sie zu achten,
sie alle zu finden,
in Spiele zu leiten
und sacht zu verbinden.
? http://1w6.org

-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 316 bytes
Desc: This is a digitally signed message part.
URL: 



[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-19 Thread Matthew Toseland
On Tuesday 19 Apr 2011 18:16:25 David ?Bombe? Roden wrote:
> On Tuesday 19 April 2011 15:19:05 Matthew Toseland wrote:
> 
> > > 1. A servlet container (I suggest Jetty) [or adapt already existing
> > > "SimpleToadletServer"]
> > If we are building our own why do we need servlets? Aren't they
> > significantly more complex even than toadlets?
> 
> Because most servlet containers get certain things right, e.g. session 
> handlings (which is kind of broken in Fred).

Well, the WoT apps need session handling, and therefore we will more broadly if 
we embed them.

Plus, ideally we'd like Freenet to support multiple logins.

So I guess that's a good enough reason.
> 
> > Right. The bulk of the work will be converting the code to use the
> > templates.
> 
> Oh yes. HTMLNode and related classes (such as PageMaker) are being dragged 
> through everywhere, including our plugin interface ? this will require a new 
> plugin interface, or we risk massive incompatibilities will all existing 
> plugins.

Right, it will be a lot of work, although the plugin API isn't exactly set in 
stone; we'd like to keep back compatibility for the increasing number of 
out-of-tree plugins, within reason.
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: 



[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-19 Thread David ‘Bombe’ Roden
On Tuesday 19 April 2011 15:19:05 Matthew Toseland wrote:

> > 1. A servlet container (I suggest Jetty) [or adapt already existing
> > "SimpleToadletServer"]
> If we are building our own why do we need servlets? Aren't they
> significantly more complex even than toadlets?

Because most servlet containers get certain things right, e.g. session 
handlings (which is kind of broken in Fred).


> Right. The bulk of the work will be converting the code to use the
> templates.

Oh yes. HTMLNode and related classes (such as PageMaker) are being dragged 
through everywhere, including our plugin interface ? this will require a new 
plugin interface, or we risk massive incompatibilities will all existing 
plugins.


David
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: 



[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-19 Thread Matthew Toseland
On Sunday 17 Apr 2011 19:20:28 Pouyan Zachar wrote:
> [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 "Aye"
> [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"]

If we are building our own why do we need servlets? Aren't they significantly 
more complex even than toadlets?

Not that I'm necessarily opposed. Maybe there is stuff we can use usefully 
which isn't gigantic?

> 2. A templating engine (Velocity is suggested)

Yes, a fast templating engine is definitely a good idea. It would make for 
cleaner code, easier to modify the UI and also faster than HTMLNode's.
> 
> 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.

Currently we just hardcode registrations by URL. This is low priority imho.

> 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).

This is a good idea. If the former is a prerequisite for this then okay.
> 
> 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.

Right. The bulk of the work will be converting the code to use the templates.
> 
> 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!

Can you show a small easy to understand example?
> 
> 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.

Yeah, if this is feasible then it makes sense.

It also leaves out the question of what to do about javascript/GWT, which IMHO 
is separate and can if necessary wait for another GSoC.
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: 



Re: [freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-19 Thread David ‘Bombe’ Roden
On Tuesday 19 April 2011 15:19:05 Matthew Toseland wrote:

  1. A servlet container (I suggest Jetty) [or adapt already existing
  SimpleToadletServer]
 If we are building our own why do we need servlets? Aren't they
 significantly more complex even than toadlets?

Because most servlet containers get certain things right, e.g. session 
handlings (which is kind of broken in Fred).


 Right. The bulk of the work will be converting the code to use the
 templates.

Oh yes. HTMLNode and related classes (such as PageMaker) are being dragged 
through everywhere, including our plugin interface — this will require a new 
plugin interface, or we risk massive incompatibilities will all existing 
plugins.


David


signature.asc
Description: This is a digitally signed message part.
___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl

Re: [freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-19 Thread Matthew Toseland
On Tuesday 19 Apr 2011 18:16:25 David ‘Bombe’ Roden wrote:
 On Tuesday 19 April 2011 15:19:05 Matthew Toseland wrote:
 
   1. A servlet container (I suggest Jetty) [or adapt already existing
   SimpleToadletServer]
  If we are building our own why do we need servlets? Aren't they
  significantly more complex even than toadlets?
 
 Because most servlet containers get certain things right, e.g. session 
 handlings (which is kind of broken in Fred).

Well, the WoT apps need session handling, and therefore we will more broadly if 
we embed them.

Plus, ideally we'd like Freenet to support multiple logins.

So I guess that's a good enough reason.
 
  Right. The bulk of the work will be converting the code to use the
  templates.
 
 Oh yes. HTMLNode and related classes (such as PageMaker) are being dragged 
 through everywhere, including our plugin interface — this will require a new 
 plugin interface, or we risk massive incompatibilities will all existing 
 plugins.

Right, it will be a lot of work, although the plugin API isn't exactly set in 
stone; we'd like to keep back compatibility for the increasing number of 
out-of-tree plugins, within reason.


signature.asc
Description: This is a digitally signed message part.
___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl

Re: [freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-19 Thread Arne Babenhauserheide
On Tuesday 19 April 2011 19:35:41 Matthew Toseland wrote:
 Plus, ideally we'd like Freenet to support multiple logins.

That would be cool!

Then we could add real gateways to WoT, creating a decentral, anonymizing (as
long as you can trust your gateway) social network.

…getting even more excited about freenet’s future!

Best wishes,
Arne
--
1w6 sie zu achten,
sie alle zu finden,
in Spiele zu leiten
und sacht zu verbinden.
→ http://1w6.org



signature.asc
Description: This is a digitally signed message part.
___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl

[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-17 Thread Pouyan Zachar
[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 "Aye"
[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.



[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-17 Thread freenet.10.technomat...@recursor.net
Poyan you're on the right track - adding more girth and complexity to
Freenet in the form of an MVC framework, and a programmatic approach to
producing output will bog things down more when you are only after an MVC
paradigm and a simplified way to manage and produce your content.

Using a simple controller, it should be able to use a decorator pattern to
handle the three(?) types of request: server management pages (a la JMX),
plug-ins, and Freenet Sites. Abstract this, and you can look at this a just
a controller that can direct requests to the correct plug-in, and routes any
output to the request as a response.

Using a servlet container begs the question of thread management in Freenet
- containers are basically, thread management mechanism that speak HTTP. Do
you want to add another thread manager to that's already there (given my
ignorance here, I'm guessing given the NativeThreads classes etc), or just
use an existing HTTP (in J6) interface to the existing thread management
system and route everything through your controller?

Velocity, or rather a templating engine, is the way to go: It will allow all
output to to be managed in the form it will be presented in (i.e. HTML), and
thus simplify it's generation by removing the hardcoded System.out.*
peppered servlet style code that does not lend itself to easily managing
UIs. But take a step back here too - Velocity adds a lot of value, and bulk,
to it's basic function, but the crux of what it does can be easily
replicated using Regex, some simple control logic and in the case of the UI,
a well design bean a la JMX, to get and set system parameters. I say roll
your own templating plug-in using basic Velocity syntax.

SW

>[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 "Aye"
>[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.
-- next part --
An HTML attachment was scrubbed...
URL: 



Re: [freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-17 Thread Pouyan Zachar
[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 Aye
[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


[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-17 Thread freenet . 10 . technomation
Poyan you're on the right track - adding more girth and complexity to
Freenet in the form of an MVC framework, and a programmatic approach to
producing output will bog things down more when you are only after an MVC
paradigm and a simplified way to manage and produce your content.

Using a simple controller, it should be able to use a decorator pattern to
handle the three(?) types of request: server management pages (a la JMX),
plug-ins, and Freenet Sites. Abstract this, and you can look at this a just
a controller that can direct requests to the correct plug-in, and routes any
output to the request as a response.

Using a servlet container begs the question of thread management in Freenet
- containers are basically, thread management mechanism that speak HTTP. Do
you want to add another thread manager to that's already there (given my
ignorance here, I'm guessing given the NativeThreads classes etc), or just
use an existing HTTP (in J6) interface to the existing thread management
system and route everything through your controller?

Velocity, or rather a templating engine, is the way to go: It will allow all
output to to be managed in the form it will be presented in (i.e. HTML), and
thus simplify it's generation by removing the hardcoded System.out.*
peppered servlet style code that does not lend itself to easily managing
UIs. But take a step back here too - Velocity adds a lot of value, and bulk,
to it's basic function, but the crux of what it does can be easily
replicated using Regex, some simple control logic and in the case of the UI,
a well design bean a la JMX, to get and set system parameters. I say roll
your own templating plug-in using basic Velocity syntax.

SW

[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 Aye
[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

[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-15 Thread Ian Clarke
On Mon, Apr 11, 2011 at 6:20 AM, Pouyan Zachar  wrote:

> 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.
> I was aiming to utilize VelocityView which uses Servlet technology,
> thus needs a servlet container (and that's where jetty comes into
> play)
> Those for MVC architecture say "Aye"
>

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

I have experience of two, here is how each stacks up on these criteria:

Wicket (my experience is about 4 years out of date though):

   - Learning curve: Medium, the paradigm takes a bit of getting used to,
   but once you do it makes sense
   - Lightweight: Probably not
   - Well supported: Definitely, years of active development, official
   Apache project
   - Pleasant to use: once you get past the learning curve, yes

Play:

   - Learning curve: Shallow, very easy tol get quick results
   - Lightweight: Probably not, and violates many norms of Java
   architecture, so probably very tricky to embed in Freenet
   - Well supported: Seems to have an active development community
   - Pleasant to use: Very, particularly once you get over the fact that it
   breaks a lot of Java "rules"

In short, neither of these is particularly appropriate.

I would also suggest options like GWT and Sproutcore, but then everyone
flips out at the prospect of inconveniencing the 3 Freenet users that can't
or won't use Javascript-capable web browsers :-/


Ian.

-- 
Ian Clarke
Personal blog: http://blog.locut.us/
-- next part --
An HTML attachment was scrubbed...
URL: 



Re: [freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-15 Thread Ian Clarke
On Mon, Apr 11, 2011 at 6:20 AM, Pouyan Zachar pouyans...@gmail.com wrote:

 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.
 I was aiming to utilize VelocityView which uses Servlet technology,
 thus needs a servlet container (and that's where jetty comes into
 play)
 Those for MVC architecture say Aye


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

I have experience of two, here is how each stacks up on these criteria:

Wicket (my experience is about 4 years out of date though):

   - Learning curve: Medium, the paradigm takes a bit of getting used to,
   but once you do it makes sense
   - Lightweight: Probably not
   - Well supported: Definitely, years of active development, official
   Apache project
   - Pleasant to use: once you get past the learning curve, yes

Play:

   - Learning curve: Shallow, very easy tol get quick results
   - Lightweight: Probably not, and violates many norms of Java
   architecture, so probably very tricky to embed in Freenet
   - Well supported: Seems to have an active development community
   - Pleasant to use: Very, particularly once you get over the fact that it
   breaks a lot of Java rules

In short, neither of these is particularly appropriate.

I would also suggest options like GWT and Sproutcore, but then everyone
flips out at the prospect of inconveniencing the 3 Freenet users that can't
or won't use Javascript-capable web browsers :-/


Ian.

-- 
Ian Clarke
Personal blog: http://blog.locut.us/
___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl

[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-11 Thread Pouyan Zachar
> Java 6 ships with a web server:
>com.sun.net.httpserver
>
> for this, but, again, it's still a lot to take on, given that the needs are
> modest.
>
>
> IMO, best to keep the content separate from mechanics... All content files
> (HTML/JavaScript)
> should be editable using HTML editing tools (TextPad!) and viewable straight
> up.
>

>>>
>>> I have seen struts in action... DON'T DO IT! :)
>>>
>>> IMO it would be *alot* of work to port, for a negative benefit (it
>>> would be bigger, slower to start, slower to run, harder to maintain...).

> Bombe's lightweight templating code is quite interesting too. It's
>> actually faster than our current code, but it'd be a fair bit of work to
>> port it.
>>
>> We should discuss this some more. I think Ian has some experience in these
>> things?
>>
>

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.
I was aiming to utilize VelocityView which uses Servlet technology,
thus needs a servlet container (and that's where jetty comes into
play)
Those for MVC architecture say "Aye"



Re: [freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-11 Thread Pouyan Zachar
 Java 6 ships with a web server:
com.sun.net.httpserver

 for this, but, again, it's still a lot to take on, given that the needs are
 modest.


 IMO, best to keep the content separate from mechanics... All content files
 (HTML/JavaScript)
 should be editable using HTML editing tools (TextPad!) and viewable straight
 up.



 I have seen struts in action... DON'T DO IT! :)

 IMO it would be *alot* of work to port, for a negative benefit (it
 would be bigger, slower to start, slower to run, harder to maintain...).

 Bombe's lightweight templating code is quite interesting too. It's
 actually faster than our current code, but it'd be a fair bit of work to
 port it.

 We should discuss this some more. I think Ian has some experience in these
 things?



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.
I was aiming to utilize VelocityView which uses Servlet technology,
thus needs a servlet container (and that's where jetty comes into
play)
Those for MVC architecture say Aye
___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl


[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-08 Thread Pouyan Zachar
>> > I must agree with the fact that Struts and similar frameworks (Wicket)
>> > are too huge to be delivered with Freenet.
>>
>> I have seen struts in action... DON'T DO IT! :)
>>
>> IMO it would be *alot* of work to port, for a negative benefit (it
>> would be bigger, slower to start, slower to run, harder to maintain...).
>>
>
> Bombe's lightweight templating code is quite interesting too. It's actually 
> faster than our current code, but it'd be a fair bit of work to port it.
>
> We should discuss this some more. I think Ian has some experience in these 
> things?
>

I think we all agree on avoiding Struts or Wicket because they are too
big to be bundled in Freenet. However the motivation is to implement
MVC architecture to have a tidy separation between components
responsible for view and those responsible for managing and processing
data. Being able to manage JavaScript (e.g. AJAX) is only a side
effect.

Regards
Pouyan



[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-08 Thread Matthew Toseland
On Friday 08 Apr 2011 15:36:23 Robert Hailey wrote:
> 
> On 2011/04/06 (Apr), at 4:16 AM, Pouyan Zachar wrote:
> 
> > [freenet.10.technomation]
> >> Struts is a large, complex and largely superseded framework (by  
> >> JBoss, Spring etc) - the .jar is several megs in size, requiring  
> >> considerable configuration. Given the amount of HTML in Freenet,  
> >> then one would think a lightweight templating engine might be more  
> >> in order: Apache Velocity for example. [ http:// 
> >> velocity.apache.org/ ]
> >>
> >> Velocity is ~300K, easy to configure and could run in a single  
> >> servlet. Content could be kept in HTML and other content files that  
> >> could be designed / built / tested outside of the container in  
> >> regular tools.
> >
> > I must agree with the fact that Struts and similar frameworks (Wicket)
> > are too huge to be delivered with Freenet.
> 
> I have seen struts in action... DON'T DO IT! :)
> 
> IMO it would be *alot* of work to port, for a negative benefit (it  
> would be bigger, slower to start, slower to run, harder to maintain...).
> 
> I (for one) like the HTMLNode mechanism, even if it is a bit  
> 'different' it is a more methodical way of making a web page; and you  
> never have to worry about closing your tags. It's even theoretically  
> possible to build the page with multiple threads.
> 
> Surely there is a better way to make it more readable or support  
> javascript better (if that is the issue).
> 
> HTMLTable table = new HTMLTable();
> 
> table.tr();
> table.th("Peer Nodes");
> table.tr();
> table.td(new PeerCicle(data));
> 
> page.add(table);
> 
> ???
> 
> node.code("insert raw html here");

Bombe's lightweight templating code is quite interesting too. It's actually 
faster than our current code, but it'd be a fair bit of work to port it.

We should discuss this some more. I think Ian has some experience in these 
things?
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: 



[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-08 Thread freenet.10.technomat...@recursor.net
Java 6 ships with a web server:
   com.sun.net.httpserver

As Pouyan, you just want to be able to take some basic HTML/JavaScript
and server them up from.
This can be done from a single servlet utilizing a templating engine
aproach. Velocity is great
for this, but, again, it's still a lot to take on, given that the
needs are modest.

It would be fairly simple to borrow Velocity's macro syntax and
substitute properties into
templates (merge as they say in Velocity) using Regex. This would also
likely easy localization.

IMO, best to keep the content separate from mechanics... All content
files (HTML/JavaScript)
should be editable using HTML editing tools (TextPad!) and viewable straight up.

>>* > I must agree with the fact that Struts and similar frameworks 
>>(Wicket)*>>* > are too huge to be delivered with Freenet.*>>**>>* I have seen 
>>struts in action... DON'T DO IT! :)*>>**>>* IMO it would be *alot* of work to 
>>port, for a negative benefit (it*>>* would be bigger, slower to start, slower 
>>to run, harder to maintain...).*>>**>**>* Bombe's lightweight templating code 
>>is quite interesting too. It's actually faster than our current code, but 
>>it'd be a fair bit of work to port it.*>**>* We should discuss this some 
>>more. I think Ian has some experience in these things?*>**
I think we all agree on avoiding Struts or Wicket because they are too
big to be bundled in Freenet. However the motivation is to implement
MVC architecture to have a tidy separation between components
responsible for view and those responsible for managing and processing
data. Being able to manage JavaScript (e.g. AJAX) is only a side
effect.

Regards
Pouyan
-- next part --
An HTML attachment was scrubbed...
URL: 



[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-08 Thread Robert Hailey

On 2011/04/06 (Apr), at 4:16 AM, Pouyan Zachar wrote:

> [freenet.10.technomation]
>> Struts is a large, complex and largely superseded framework (by  
>> JBoss, Spring etc) - the .jar is several megs in size, requiring  
>> considerable configuration. Given the amount of HTML in Freenet,  
>> then one would think a lightweight templating engine might be more  
>> in order: Apache Velocity for example. [ http:// 
>> velocity.apache.org/ ]
>>
>> Velocity is ~300K, easy to configure and could run in a single  
>> servlet. Content could be kept in HTML and other content files that  
>> could be designed / built / tested outside of the container in  
>> regular tools.
>
> I must agree with the fact that Struts and similar frameworks (Wicket)
> are too huge to be delivered with Freenet.

I have seen struts in action... DON'T DO IT! :)

IMO it would be *alot* of work to port, for a negative benefit (it  
would be bigger, slower to start, slower to run, harder to maintain...).

I (for one) like the HTMLNode mechanism, even if it is a bit  
'different' it is a more methodical way of making a web page; and you  
never have to worry about closing your tags. It's even theoretically  
possible to build the page with multiple threads.

Surely there is a better way to make it more readable or support  
javascript better (if that is the issue).

HTMLTable table = new HTMLTable();

table.tr();
table.th("Peer Nodes");
table.tr();
table.td(new PeerCicle(data));

page.add(table);

???

node.code("insert raw html here");

--
Robert Hailey

-- next part --
An HTML attachment was scrubbed...
URL: 



Re: [freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-08 Thread Robert Hailey


On 2011/04/06 (Apr), at 4:16 AM, Pouyan Zachar wrote:


[freenet.10.technomation]
Struts is a large, complex and largely superseded framework (by  
JBoss, Spring etc) - the .jar is several megs in size, requiring  
considerable configuration. Given the amount of HTML in Freenet,  
then one would think a lightweight templating engine might be more  
in order: Apache Velocity for example. [ http:// 
velocity.apache.org/ ]


Velocity is ~300K, easy to configure and could run in a single  
servlet. Content could be kept in HTML and other content files that  
could be designed / built / tested outside of the container in  
regular tools.


I must agree with the fact that Struts and similar frameworks (Wicket)
are too huge to be delivered with Freenet.


I have seen struts in action... DON'T DO IT! :)

IMO it would be *alot* of work to port, for a negative benefit (it  
would be bigger, slower to start, slower to run, harder to maintain...).


I (for one) like the HTMLNode mechanism, even if it is a bit  
'different' it is a more methodical way of making a web page; and you  
never have to worry about closing your tags. It's even theoretically  
possible to build the page with multiple threads.


Surely there is a better way to make it more readable or support  
javascript better (if that is the issue).


HTMLTable table = new HTMLTable();

table.tr();
table.th(Peer Nodes);
table.tr();
table.td(new PeerCicle(data));

page.add(table);

???

node.code(binsert raw html here/b);

--
Robert Hailey

___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl

Re: [freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-08 Thread Matthew Toseland
On Friday 08 Apr 2011 15:36:23 Robert Hailey wrote:
 
 On 2011/04/06 (Apr), at 4:16 AM, Pouyan Zachar wrote:
 
  [freenet.10.technomation]
  Struts is a large, complex and largely superseded framework (by  
  JBoss, Spring etc) - the .jar is several megs in size, requiring  
  considerable configuration. Given the amount of HTML in Freenet,  
  then one would think a lightweight templating engine might be more  
  in order: Apache Velocity for example. [ http:// 
  velocity.apache.org/ ]
 
  Velocity is ~300K, easy to configure and could run in a single  
  servlet. Content could be kept in HTML and other content files that  
  could be designed / built / tested outside of the container in  
  regular tools.
 
  I must agree with the fact that Struts and similar frameworks (Wicket)
  are too huge to be delivered with Freenet.
 
 I have seen struts in action... DON'T DO IT! :)
 
 IMO it would be *alot* of work to port, for a negative benefit (it  
 would be bigger, slower to start, slower to run, harder to maintain...).
 
 I (for one) like the HTMLNode mechanism, even if it is a bit  
 'different' it is a more methodical way of making a web page; and you  
 never have to worry about closing your tags. It's even theoretically  
 possible to build the page with multiple threads.
 
 Surely there is a better way to make it more readable or support  
 javascript better (if that is the issue).
 
 HTMLTable table = new HTMLTable();
 
 table.tr();
 table.th(Peer Nodes);
 table.tr();
 table.td(new PeerCicle(data));
 
 page.add(table);
 
 ???
 
 node.code(binsert raw html here/b);

Bombe's lightweight templating code is quite interesting too. It's actually 
faster than our current code, but it'd be a fair bit of work to port it.

We should discuss this some more. I think Ian has some experience in these 
things?


signature.asc
Description: This is a digitally signed message part.
___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl

Re: [freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-08 Thread Pouyan Zachar
  I must agree with the fact that Struts and similar frameworks (Wicket)
  are too huge to be delivered with Freenet.

 I have seen struts in action... DON'T DO IT! :)

 IMO it would be *alot* of work to port, for a negative benefit (it
 would be bigger, slower to start, slower to run, harder to maintain...).


 Bombe's lightweight templating code is quite interesting too. It's actually 
 faster than our current code, but it'd be a fair bit of work to port it.

 We should discuss this some more. I think Ian has some experience in these 
 things?


I think we all agree on avoiding Struts or Wicket because they are too
big to be bundled in Freenet. However the motivation is to implement
MVC architecture to have a tidy separation between components
responsible for view and those responsible for managing and processing
data. Being able to manage JavaScript (e.g. AJAX) is only a side
effect.

Regards
Pouyan
___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl


[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-08 Thread freenet . 10 . technomation
Java 6 ships with a web server:
   com.sun.net.httpserver

As Pouyan, you just want to be able to take some basic HTML/JavaScript
and server them up from.
This can be done from a single servlet utilizing a templating engine
aproach. Velocity is great
for this, but, again, it's still a lot to take on, given that the
needs are modest.

It would be fairly simple to borrow Velocity's macro syntax and
substitute properties into
templates (merge as they say in Velocity) using Regex. This would also
likely easy localization.

IMO, best to keep the content separate from mechanics... All content
files (HTML/JavaScript)
should be editable using HTML editing tools (TextPad!) and viewable straight up.

*  I must agree with the fact that Struts and similar frameworks 
(Wicket)**  are too huge to be delivered with Freenet. I have seen 
struts in action... DON'T DO IT! :) IMO it would be *alot* of work to 
port, for a negative benefit (it** would be bigger, slower to start, slower 
to run, harder to maintain...).** Bombe's lightweight templating code 
is quite interesting too. It's actually faster than our current code, but 
it'd be a fair bit of work to port it. We should discuss this some 
more. I think Ian has some experience in these things?***
I think we all agree on avoiding Struts or Wicket because they are too
big to be bundled in Freenet. However the motivation is to implement
MVC architecture to have a tidy separation between components
responsible for view and those responsible for managing and processing
data. Being able to manage JavaScript (e.g. AJAX) is only a side
effect.

Regards
Pouyan
___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl

[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-06 Thread Pouyan Zachar
[freenet.10.technomation]
> Struts is a large, complex and largely superseded framework (by JBoss, Spring 
> etc) - the .jar is several megs in size, requiring considerable 
> configuration. Given the amount of HTML in Freenet, then one would think a 
> lightweight templating engine might be more in order: Apache Velocity for 
> example. [ http://velocity.apache.org/ ]
>
> Velocity is ~300K, easy to configure and could run in a single servlet. 
> Content could be kept in HTML and other content files that could be designed 
> / built / tested outside of the container in regular tools.

I must agree with the fact that Struts and similar frameworks (Wicket)
are too huge to be delivered with Freenet.
Although Velocity have the advantage of being small in size (the
core), in order to utilize it in web application you "may" need other
modules (e.g. VelocityViewServlet to avoid calling velocity directly).
Another drawback is its limited functionality, e.g. limited list of
directives.

I would suggest to embed Jetty (http://jetty.codehaus.org/jetty/) with
JSP module and implement a Struts-similar MVC framework . This way we
have the full functionality of Java in JSP pages (when needed) and we
can build up a new lightweight framework which suits our needs.

Regards
Pouyan



Re: [freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-06 Thread Pouyan Zachar
[freenet.10.technomation]
 Struts is a large, complex and largely superseded framework (by JBoss, Spring 
 etc) - the .jar is several megs in size, requiring considerable 
 configuration. Given the amount of HTML in Freenet, then one would think a 
 lightweight templating engine might be more in order: Apache Velocity for 
 example. [ http://velocity.apache.org/ ]

 Velocity is ~300K, easy to configure and could run in a single servlet. 
 Content could be kept in HTML and other content files that could be designed 
 / built / tested outside of the container in regular tools.

I must agree with the fact that Struts and similar frameworks (Wicket)
are too huge to be delivered with Freenet.
Although Velocity have the advantage of being small in size (the
core), in order to utilize it in web application you may need other
modules (e.g. VelocityViewServlet to avoid calling velocity directly).
Another drawback is its limited functionality, e.g. limited list of
directives.

I would suggest to embed Jetty (http://jetty.codehaus.org/jetty/) with
JSP module and implement a Struts-similar MVC framework . This way we
have the full functionality of Java in JSP pages (when needed) and we
can build up a new lightweight framework which suits our needs.

Regards
Pouyan
___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl


[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-05 Thread freenet.10.technomat...@recursor.net
Struts is a large, complex and largely superseded framework (by JBoss, Spring 
etc) - the .jar is several megs in size, requiring considerable configuration. 
Given the amount of HTML in Freenet, then one would think a lightweight 
templating engine might be more in order: Apache Velocity for example. [ 
http://velocity.apache.org/ ]

Velocity is ~300K, easy to configure and could run in a single servlet. Content 
could be kept in HTML and other content files that could be designed / built / 
tested outside of the container in regular tools.




[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-05 Thread Pouyan Zachar
 [Original message from Pouyan]
>> >> I wanted to suggest porting already existing "Toadlets" to normal
>> >> servlets and utilize Apache Struts framework for more simplicity

[Matthew Said]
>> > My recollection is servlets are far more complex and we don't use most of 
>> > their features? On the other hand, maybe we do now. More importantly, they 
>> > don't do anything for us in the areas where we really need help - 
>> > specifically, content generation / templating.

 [message from Pouyan]
>> No, you are not wrong, simple Servlets are as complicated as existing
>> Toadlets in use. ?What makes it easier is the use of some Java Web
>> program application such as Apache Struts or Wicket (as Ian
>> suggested). In case of Apache Struts you can use JSPs as templates
>> (View) while Struts core is taking care of HTTP requests (Controller)
>> and Struts forms (Model) are used as data models. Other put you will
>> have a nice and tidy MVC architecture!


[Matthew Said]
> Does that support sending data to clients that don't have javascript?

Apache Struts and JSP are not JavaScript independent. Since you
implement MVC structure, you can develop different "views" for
different platforms and users. You could even implement generic
interfaces which provide raw data (XML, JSON, etc) to other
applications (if Freenet's data is to be used by third party
applications, e.g. for visualizing) locally and over the network.
The main advantage of Struts lies in its management functionalities.



[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-05 Thread Matthew Toseland
On Tuesday 05 Apr 2011 13:19:10 Pouyan Zachar wrote:
> [Original message from Pouyan]
> >> I wanted to suggest porting already existing "Toadlets" to normal
> >> servlets and utilize Apache Struts framework for more simplicity. This
> >> would make it easier and more intuitive to design and develop the web
> >> interface (fproxy) using JSP pages. However it may not be an easy task
> >> to adapt SimpleToadletServer to struts.
> >>
> [Matthew Said]
> > My recollection is servlets are far more complex and we don't use most of 
> > their features? On the other hand, maybe we do now. More importantly, they 
> > don't do anything for us in the areas where we really need help - 
> > specifically, content generation / templating.
> >
> > Or am I wrong? I'm quite happy to get rid of toadlets and HTMLNode if 
> > something else is better.
> >
> 
> No, you are not wrong, simple Servlets are as complicated as existing
> Toadlets in use.  What makes it easier is the use of some Java Web
> program application such as Apache Struts or Wicket (as Ian
> suggested). In case of Apache Struts you can use JSPs as templates
> (View) while Struts core is taking care of HTTP requests (Controller)
> and Struts forms (Model) are used as data models. Other put you will
> have a nice and tidy MVC architecture!

Does that support sending data to clients that don't have javascript?
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: 



[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-05 Thread Pouyan Zachar
[Original message from Pouyan]
>> I wanted to suggest porting already existing "Toadlets" to normal
>> servlets and utilize Apache Struts framework for more simplicity. This
>> would make it easier and more intuitive to design and develop the web
>> interface (fproxy) using JSP pages. However it may not be an easy task
>> to adapt SimpleToadletServer to struts.
>>
[Matthew Said]
> My recollection is servlets are far more complex and we don't use most of 
> their features? On the other hand, maybe we do now. More importantly, they 
> don't do anything for us in the areas where we really need help - 
> specifically, content generation / templating.
>
> Or am I wrong? I'm quite happy to get rid of toadlets and HTMLNode if 
> something else is better.
>

No, you are not wrong, simple Servlets are as complicated as existing
Toadlets in use.  What makes it easier is the use of some Java Web
program application such as Apache Struts or Wicket (as Ian
suggested). In case of Apache Struts you can use JSPs as templates
(View) while Struts core is taking care of HTTP requests (Controller)
and Struts forms (Model) are used as data models. Other put you will
have a nice and tidy MVC architecture!

Regards
Pouyan



[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-05 Thread Matthew Toseland
On Thursday 31 Mar 2011 09:56:22 Pouyan Zachar wrote:
> Hi everyone:
> 
> I wanted to suggest porting already existing "Toadlets" to normal
> servlets and utilize Apache Struts framework for more simplicity. This
> would make it easier and more intuitive to design and develop the web
> interface (fproxy) using JSP pages. However it may not be an easy task
> to adapt SimpleToadletServer to struts.
> 
> I would really appreciate feedbacks
> Pouyan

My recollection is servlets are far more complex and we don't use most of their 
features? On the other hand, maybe we do now. More importantly, they don't do 
anything for us in the areas where we really need help - specifically, content 
generation / templating.

Or am I wrong? I'm quite happy to get rid of toadlets and HTMLNode if something 
else is better.
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: 



Re: [freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-05 Thread Matthew Toseland
On Thursday 31 Mar 2011 09:56:22 Pouyan Zachar wrote:
 Hi everyone:
 
 I wanted to suggest porting already existing Toadlets to normal
 servlets and utilize Apache Struts framework for more simplicity. This
 would make it easier and more intuitive to design and develop the web
 interface (fproxy) using JSP pages. However it may not be an easy task
 to adapt SimpleToadletServer to struts.
 
 I would really appreciate feedbacks
 Pouyan

My recollection is servlets are far more complex and we don't use most of their 
features? On the other hand, maybe we do now. More importantly, they don't do 
anything for us in the areas where we really need help - specifically, content 
generation / templating.

Or am I wrong? I'm quite happy to get rid of toadlets and HTMLNode if something 
else is better.


signature.asc
Description: This is a digitally signed message part.
___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl

Re: [freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-05 Thread Pouyan Zachar
[Original message from Pouyan]
 I wanted to suggest porting already existing Toadlets to normal
 servlets and utilize Apache Struts framework for more simplicity. This
 would make it easier and more intuitive to design and develop the web
 interface (fproxy) using JSP pages. However it may not be an easy task
 to adapt SimpleToadletServer to struts.

[Matthew Said]
 My recollection is servlets are far more complex and we don't use most of 
 their features? On the other hand, maybe we do now. More importantly, they 
 don't do anything for us in the areas where we really need help - 
 specifically, content generation / templating.

 Or am I wrong? I'm quite happy to get rid of toadlets and HTMLNode if 
 something else is better.


No, you are not wrong, simple Servlets are as complicated as existing
Toadlets in use.  What makes it easier is the use of some Java Web
program application such as Apache Struts or Wicket (as Ian
suggested). In case of Apache Struts you can use JSPs as templates
(View) while Struts core is taking care of HTTP requests (Controller)
and Struts forms (Model) are used as data models. Other put you will
have a nice and tidy MVC architecture!

Regards
Pouyan
___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl


Re: [freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-05 Thread Matthew Toseland
On Tuesday 05 Apr 2011 13:19:10 Pouyan Zachar wrote:
 [Original message from Pouyan]
  I wanted to suggest porting already existing Toadlets to normal
  servlets and utilize Apache Struts framework for more simplicity. This
  would make it easier and more intuitive to design and develop the web
  interface (fproxy) using JSP pages. However it may not be an easy task
  to adapt SimpleToadletServer to struts.
 
 [Matthew Said]
  My recollection is servlets are far more complex and we don't use most of 
  their features? On the other hand, maybe we do now. More importantly, they 
  don't do anything for us in the areas where we really need help - 
  specifically, content generation / templating.
 
  Or am I wrong? I'm quite happy to get rid of toadlets and HTMLNode if 
  something else is better.
 
 
 No, you are not wrong, simple Servlets are as complicated as existing
 Toadlets in use.  What makes it easier is the use of some Java Web
 program application such as Apache Struts or Wicket (as Ian
 suggested). In case of Apache Struts you can use JSPs as templates
 (View) while Struts core is taking care of HTTP requests (Controller)
 and Struts forms (Model) are used as data models. Other put you will
 have a nice and tidy MVC architecture!

Does that support sending data to clients that don't have javascript?


signature.asc
Description: This is a digitally signed message part.
___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl

Re: [freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-05 Thread Pouyan Zachar
 [Original message from Pouyan]
  I wanted to suggest porting already existing Toadlets to normal
  servlets and utilize Apache Struts framework for more simplicity

[Matthew Said]
  My recollection is servlets are far more complex and we don't use most of 
  their features? On the other hand, maybe we do now. More importantly, they 
  don't do anything for us in the areas where we really need help - 
  specifically, content generation / templating.

 [message from Pouyan]
 No, you are not wrong, simple Servlets are as complicated as existing
 Toadlets in use.  What makes it easier is the use of some Java Web
 program application such as Apache Struts or Wicket (as Ian
 suggested). In case of Apache Struts you can use JSPs as templates
 (View) while Struts core is taking care of HTTP requests (Controller)
 and Struts forms (Model) are used as data models. Other put you will
 have a nice and tidy MVC architecture!


[Matthew Said]
 Does that support sending data to clients that don't have javascript?

Apache Struts and JSP are not JavaScript independent. Since you
implement MVC structure, you can develop different views for
different platforms and users. You could even implement generic
interfaces which provide raw data (XML, JSON, etc) to other
applications (if Freenet's data is to be used by third party
applications, e.g. for visualizing) locally and over the network.
The main advantage of Struts lies in its management functionalities.
___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl


Re: [freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-04-05 Thread freenet . 10 . technomation
Struts is a large, complex and largely superseded framework (by JBoss, Spring 
etc) - the .jar is several megs in size, requiring considerable configuration. 
Given the amount of HTML in Freenet, then one would think a lightweight 
templating engine might be more in order: Apache Velocity for example. [ 
http://velocity.apache.org/ ]

Velocity is ~300K, easy to configure and could run in a single servlet. Content 
could be kept in HTML and other content files that could be designed / built / 
tested outside of the container in regular tools.

___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl


[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-03-31 Thread Pouyan Zachar
[Excerpts from original message]
>> I wanted to suggest porting already existing "Toadlets" to normal
>> servlets and utilize Apache Struts framework for more simplicity.

[Excerpts from Ian's message]
> I'll all for moving to a standard web framework, rather than our current
> home-grown solution. ?However there are a lot of options to choose from.
> ?Why Struts, and not another option (like, for example, Apache Wicket)?
> Ian.

Well, that's a good point indeed. I suggested Struts because I already
had experience working with Struts in WebApp development. The bottom
line is to decouple Java code from web interface (as much as possible)
so designing web interface would be a little bit easier (even for
those who are not familiar with Java language). The question is which
framework to choose?

Regards
Pouyan



[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-03-31 Thread Pouyan Zachar
Hi everyone:

I wanted to suggest porting already existing "Toadlets" to normal
servlets and utilize Apache Struts framework for more simplicity. This
would make it easier and more intuitive to design and develop the web
interface (fproxy) using JSP pages. However it may not be an easy task
to adapt SimpleToadletServer to struts.

I would really appreciate feedbacks
Pouyan



[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-03-31 Thread Ian Clarke
On Thu, Mar 31, 2011 at 9:08 AM, Pouyan Zachar  wrote:

>  [Excerpts from Ian's message]
> > I'll all for moving to a standard web framework, rather than our current
> > home-grown solution.  However there are a lot of options to choose from.
> >  Why Struts, and not another option (like, for example, Apache Wicket)?
> > Ian.
>
> Well, that's a good point indeed. I suggested Struts because I already
> had experience working with Struts in WebApp development. The bottom
> line is to decouple Java code from web interface (as much as possible)
> so designing web interface would be a little bit easier (even for
> those who are not familiar with Java language). The question is which
> framework to choose?
>

Well, there is nothing wrong with choosing a tool on the basis that its what
you are most familiar with provided that you are willing to commit to seeing
it through to completion :-)

It doesn't make sense to choose a tool on that basis if other people will
then need to do the actual implementation.

Ian.

-- 
Ian Clarke
Personal blog: http://blog.locut.us/
-- next part --
An HTML attachment was scrubbed...
URL: 



[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-03-31 Thread Ian Clarke
On Thu, Mar 31, 2011 at 3:56 AM, Pouyan Zachar  wrote:

> Hi everyone:
>
> I wanted to suggest porting already existing "Toadlets" to normal
> servlets and utilize Apache Struts framework for more simplicity. This
> would make it easier and more intuitive to design and develop the web
> interface (fproxy) using JSP pages. However it may not be an easy task
> to adapt SimpleToadletServer to struts


I'll all for moving to a standard web framework, rather than our current
home-grown solution.  However there are a lot of options to choose from.
 Why Struts, and not another option (like, for example, Apache Wicket)?

Ian.

-- 
Ian Clarke
Founder, The Freenet Project
Email: ian at freenetproject.org
-- next part --
An HTML attachment was scrubbed...
URL: 



[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-03-31 Thread Pouyan Zachar
Hi everyone:

I wanted to suggest porting already existing Toadlets to normal
servlets and utilize Apache Struts framework for more simplicity. This
would make it easier and more intuitive to design and develop the web
interface (fproxy) using JSP pages. However it may not be an easy task
to adapt SimpleToadletServer to struts.

I would really appreciate feedbacks
Pouyan
___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl


Re: [freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-03-31 Thread Ian Clarke
On Thu, Mar 31, 2011 at 3:56 AM, Pouyan Zachar pouyans...@gmail.com wrote:

 Hi everyone:

 I wanted to suggest porting already existing Toadlets to normal
 servlets and utilize Apache Struts framework for more simplicity. This
 would make it easier and more intuitive to design and develop the web
 interface (fproxy) using JSP pages. However it may not be an easy task
 to adapt SimpleToadletServer to struts


I'll all for moving to a standard web framework, rather than our current
home-grown solution.  However there are a lot of options to choose from.
 Why Struts, and not another option (like, for example, Apache Wicket)?

Ian.

-- 
Ian Clarke
Founder, The Freenet Project
Email: i...@freenetproject.org
___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl

[freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-03-31 Thread Pouyan Zachar
[Excerpts from original message]
 I wanted to suggest porting already existing Toadlets to normal
 servlets and utilize Apache Struts framework for more simplicity.

[Excerpts from Ian's message]
 I'll all for moving to a standard web framework, rather than our current
 home-grown solution.  However there are a lot of options to choose from.
  Why Struts, and not another option (like, for example, Apache Wicket)?
 Ian.

Well, that's a good point indeed. I suggested Struts because I already
had experience working with Struts in WebApp development. The bottom
line is to decouple Java code from web interface (as much as possible)
so designing web interface would be a little bit easier (even for
those who are not familiar with Java language). The question is which
framework to choose?

Regards
Pouyan
___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl


Re: [freenet-dev] [GSoC 2011] Idea : Porting to Apache Struts

2011-03-31 Thread Ian Clarke
On Thu, Mar 31, 2011 at 9:08 AM, Pouyan Zachar pouyans...@gmail.com wrote:

  [Excerpts from Ian's message]
  I'll all for moving to a standard web framework, rather than our current
  home-grown solution.  However there are a lot of options to choose from.
   Why Struts, and not another option (like, for example, Apache Wicket)?
  Ian.

 Well, that's a good point indeed. I suggested Struts because I already
 had experience working with Struts in WebApp development. The bottom
 line is to decouple Java code from web interface (as much as possible)
 so designing web interface would be a little bit easier (even for
 those who are not familiar with Java language). The question is which
 framework to choose?


Well, there is nothing wrong with choosing a tool on the basis that its what
you are most familiar with provided that you are willing to commit to seeing
it through to completion :-)

It doesn't make sense to choose a tool on that basis if other people will
then need to do the actual implementation.

Ian.

-- 
Ian Clarke
Personal blog: http://blog.locut.us/
___
Devl mailing list
Devl@freenetproject.org
http://freenetproject.org/cgi-bin/mailman/listinfo/devl