Re: [Wicket-user] where do I put controller/dispatcher logic?

2005-11-09 Thread Laurent PETIT
Hello,

On 11/7/05, Steven McNeel [EMAIL PROTECTED] wrote:
 I consider this sort of thing as analogous to MVC Front Controller (aka
 Dispatcher) logic.  I'm basically unclear as to where that logic belongs in
 a Wicket app.

The fact is, while I'm still new in the area of Components based web
frameworks, I think there is a mismatch between the Model 2 way of
doing things and the Component oriented way ... ?

Could you precise your need ? Because you original post was so general
I may have missed the point ?

thanks,

--
laurent


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] where do I put controller/dispatcher logic?

2005-11-09 Thread Eelco Hillenius
There sure is a mismatch; component based frameworks emerged because
of the mismatch Model 2 frameworks with page parts. Requests in Model
2 frameworks map to page wide actions. The controller/ view handler
has to ensure the state of all elements of the page are kept in sync
and rendered correctly. That's okay for simple pages, but if you have
pages with multiple, independent parts (think e.g. of a pageable list
being one of those) you're in a mess and generally have to use hackish
solutions like command chaining and 'interception'. With component
based frameworks, you should be able to create isolated parts
(components) that react on events, keep state and render independently
of the other parts of the page, making it easier and more elegant to
write applications with, and also make reuse an option (because
components are self contained). That's the whole idea of Model 2 vs
CBD.

Eelco


On 11/9/05, Laurent PETIT [EMAIL PROTECTED] wrote:
 Hello,

 On 11/7/05, Steven McNeel [EMAIL PROTECTED] wrote:
  I consider this sort of thing as analogous to MVC Front Controller (aka
  Dispatcher) logic.  I'm basically unclear as to where that logic belongs in
  a Wicket app.

 The fact is, while I'm still new in the area of Components based web
 frameworks, I think there is a mismatch between the Model 2 way of
 doing things and the Component oriented way ... ?

 Could you precise your need ? Because you original post was so general
 I may have missed the point ?

 thanks,

 --
 laurent


 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server. Download
 it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] where do I put controller/dispatcher logic?

2005-11-07 Thread Juergen Donnerstag
On 11/7/05, Steven McNeel [EMAIL PROTECTED] wrote:
 Hello,

 I think I've read all of the pertinent articles in the documentation,
 especially
 http://www.wicket-wiki.org.uk/wiki/index.php/Lifecycle.  On
 each request to my app, I first need to run a database query,the parameters
 of which are dependent on the parameters in the Request.  Then I need to
 forward to a page, which also depends on the request parameters.  It looks
 like I'm supposed to override methods on RequestCycle ( i.e.
 onBeginRequest(), request(), and onEndRequest()).

onBeginRequest might be the right please. It gets called just before
the URL gets analyzed. But the URL parameters are already available.


 If this is correct, then my question is:  once I create my subclass of
 WebRequestCycle, how do I integrate that into my application flow?  It seems
 that the instantiation and use of RequestCycle objects is performed by the
 Wicket framework.  Where are my hooks to make the Session return my custom
 RequestCycle?  And how do I handle the initial request, before a Session is
 even created?


Please have a look at the examples. Application.java provides the
hooks. The wiki contains some information about how to do it as well

public final class SignIn2Application extends WicketExampleApplication
{
/**
 * @see wicket.protocol.http.WebApplication#getSessionFactory()
 */
public ISessionFactory getSessionFactory()
{
return new ISessionFactory()
{
public Session newSession()
{
return new SignIn2Session(SignIn2Application.this);
}
};
}

And by subclassing WebSession.getRequestCycleFactory() you can create
your own RequestCycles.

Juergen


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] where do I put controller/dispatcher logic?

2005-11-07 Thread Eelco Hillenius
And you are sure the queries you want to run are page/ component
independent, right? What you are doing is request based, which is
fine, but which is not nescesarily a component based way of doing
things.

Eelco


On 11/7/05, Steven McNeel [EMAIL PROTECTED] wrote:
 Hello,

 I think I've read all of the pertinent articles in the documentation,
 especially
 http://www.wicket-wiki.org.uk/wiki/index.php/Lifecycle.  On
 each request to my app, I first need to run a database query,the parameters
 of which are dependent on the parameters in the Request.  Then I need to
 forward to a page, which also depends on the request parameters.  It looks
 like I'm supposed to override methods on RequestCycle ( i.e.
 onBeginRequest(), request(), and onEndRequest()).

 If this is correct, then my question is:  once I create my subclass of
 WebRequestCycle, how do I integrate that into my application flow?  It seems
 that the instantiation and use of RequestCycle objects is performed by the
 Wicket framework.  Where are my hooks to make the Session return my custom
 RequestCycle?  And how do I handle the initial request, before a Session is
 even created?

 I consider this sort of thing as analogous to MVC Front Controller (aka
 Dispatcher) logic.  I'm basically unclear as to where that logic belongs in
 a Wicket app.

 Thanks in advance!

 -Steven McNeel



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] where do I put controller/dispatcher logic?

2005-11-07 Thread Christian Essl
It confused me just until 10 minutes ago. I agree with you that it should 
be renamed if it is not already a too late.


Christian

I also think it is confusing if not misleading.

On Mon, 7 Nov 2005 23:53:16 +0100, Johan Compagner [EMAIL PROTECTED] 
wrote:



ahh yes i see it
Got confused with the method names and calls and where they where on.
(We have also a Page begin and end request which is called in the 
response

phase)

On 11/7/05, Christian Essl [EMAIL PROTECTED] wrote:


I do not understand this now. But when I just went through the code I
think RequestCycle.onBeginRequest() is called before the interpretation 
of

the url and the call of the listeners.

However Component.onBeginRequest() is called only before the render 
phase.

Is this right?


On Mon, 7 Nov 2005 23:10:38 +0100, Johan Compagner 
[EMAIL PROTECTED]

wrote:

 onBeginRequest is not the first thing that is called
 IT is the first thing that is called in the response/render phase.
 But what i call the request/invoke phase is before that.
 And the only hook there really is in a Listener call is as far as i 
know

 the:
 ((WebPage)page).beforeCallComponent(component, method);

 But we should really stream line all the hooks

 johan

 On 11/7/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:

 On 11/7/05, Steven McNeel [EMAIL PROTECTED] wrote:
  Hello,
 
  I think I've read all of the pertinent articles in the 
documentation,

  especially
  http://www.wicket-wiki.org.uk/wiki/index.php/Lifecycle. On
  each request to my app, I first need to run a database query,the
 parameters
  of which are dependent on the parameters in the Request. Then I 
need

 to
  forward to a page, which also depends on the request parameters. It
 looks
  like I'm supposed to override methods on RequestCycle ( i.e.
  onBeginRequest(), request(), and onEndRequest()).

 onBeginRequest might be the right please. It gets called just before
 the URL gets analyzed. But the URL parameters are already available.

 
  If this is correct, then my question is: once I create my subclass 
of
  WebRequestCycle, how do I integrate that into my application flow? 
It

 seems
  that the instantiation and use of RequestCycle objects is performed
by
 the
  Wicket framework. Where are my hooks to make the Session return my
 custom
  RequestCycle? And how do I handle the initial request, before a
 Session
 is
  even created?
 

 Please have a look at the examples. Application.java provides the
 hooks. The wiki contains some information about how to do it as well

 public final class SignIn2Application extends 
WicketExampleApplication

 {
 /**
 * @see wicket.protocol.http.WebApplication#getSessionFactory()
 */
 public ISessionFactory getSessionFactory()
 {
 return new ISessionFactory()
 {
 public Session newSession()
 {
 return new SignIn2Session(SignIn2Application.this);
 }
 };
 }

 And by subclassing WebSession.getRequestCycleFactory() you can create
 your own RequestCycles.

 Juergen


 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server.
 Download
 it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




--
Christian Essl





___
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier
anmelden: http://mail.yahoo.de



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





--
Christian Essl 






___ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de




---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user