is fine by me as long as the current stuff keeps working
like the system property which i use all the time
because i always set it directly in deployment but in my launch configs i
set it back with a system property

johan


On 5/31/07, Al Maw <[EMAIL PROTECTED]> wrote:

Hi folks,

I've been thinking a lot about this lately.

Current issues:
===============
  - We default to DEVELOPMENT and we should make it more obvious that you
    should set DEPLOYMENT for production servers.

  - We currently provide the following methods to configure which mode
    you run in:
      - Set a System property.
      - Set a servlet context param.
      - Set a filter param.

    If you don't fit into any of those, it makes life difficult - you
    don't want to just call configure(DEPLOYMENT) in your init() method,
    because then configure() is called twice - once by Wicket internally,
    probably in default DEVELOPMENT mode, and once by you manually. This
    results in a bunch of DEVELOPMENT mode stuff running on your live
    environment, and it's not that obvious that this is what's going on.
    (See WICKET-6, where even JBQ doesn't seem to entirely get this.)
    To avoid this, you need to override internalInit(), which is a right
    pain, as although the one in WebApplication doesn't do much, the one
    in Application does (adds all the component resolvers, etc.) and
    you'd need to keep things in sync. Ugh. All the configure() methods
    are final, too, so it's not an option to munge the value and then
    call super() with it, either.


Proposal:
=========
I think we should have a pull model for this. In other words, we should
make Application#getConfigurationType() abstract and call that to get
the type. We then let people handle this however they want.

Advantages:
  - More discoverable as it's an abstract method, like getHomePage().
  - Much more flexible for configuration.
  - More "Wicket-like".
  - Less code for us to maintain.

Disadvantages:
  - The 1.3 migration guide gets a little larger. ;-)

Err, can I call a vote on this please?
  [ ] Yes, great idea, let's get it into 1.3.0-beta2
  [ ] No, that's rubbish, because...



Regards,

Al

--
Alastair Maw
Wicket-biased blog at http://herebebeasties.com

Reply via email to