Hi

On 4/22/07, Matthias Karlsson <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm about to develop a new e-commerce site and having grown tired of other
> frameworks I have tried, Wicket seems to bring forward a lot that I have
> been missing and wanting to use.
>
> However, I have never used a component-based framework and I have a few
> questions that I hope someone can answer.
>
> I'm still not completely clear of what "server-side state management" means,
> but seeing as Wicket is built on the standard technology, I assume this
> means using HttpSession to store information. Things being Serializable
> seems to be a common technique within Wicket; does this mean that the
> HttpSession will become full of serialized objects? How can this not affect
> memory usage? Or is this the trade-off, that is, if you use a
> component-based framework, you don't have to worry about the session state
> so much, but you better add more memory to the production box(?).
>
> For example, for the new site that I'm developing, the only information that
> I can see is needed to be stored between requests in the session objects is
> whether the user is logged in or not (and his/her user-id). For such a site,
> is something like Wicket overkill in terms of state management? The homepage
> talks about how the "back-button"-problem is solved, but with my
> requirements I can't even see where the problem is. Why should I care where
> the user is when each request is independent?

Well, wicket does uses session, unless you build your entire
application with stateless pages with is neither convenient, nor very
wicket-way :)

As for memory usage, Wicket 1.3 only stores last visited page in
session, all other are stored on disk. Even for complex application,
this shouldn't (under normal circumstances) take more than say 50kb of
session memory for logged in user.

> And one more specific question regarding Wicket template system. For my web
> application, I'll most likely need some part of each page that either
> displays some information about the logged in user, or otherwise a form
> allowing the user to log in. With some other framework, I'd have a
> conditional test and then output the appropriate HTML. None of the examples
> that I have seen on "components" have this kind of conditional output so I
> was simply wondering how one would go about developing such component with
> Wicket?

add(new UserInfoPanel("userInfo") {
  public boolean isVisible() {
    return getSession().getLoggedUser() != null;
  }
};

add(new LoginPanel("loginPanel") {
  public boolean isVisible() {
   return getSession().getLoggedUser() == null;
  }
});

>
> That's it for now, but I'd be very grateful for any feedback I could get.
> Browsing around and reading the (actually rather sparse) documentation
> available, Wicket seems to be a very nice framework, but I think I'm too
> stuck in the "old way" of developing web applications to see all the
> benefits.

That might be the case :) Beware that there is a unlearn phase
alongside the "standard" learningcurve :)

-Matej

>
> Thanks!
>
> Matthias
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to