You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by jsanca <js...@gmail.com> on 2012/02/06 23:43:44 UTC

pooling validators

Hi All,

As a common practice in Wicket we create IValidator objects for each
component we need to add a validation, there are some scenarios when we use
the same validator for several objects, so I was wondering if there is any
issue if I create a pooling to provide this validators

Thread Safe issues
Concurrency issues
Any other issue

Thanks,
J

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/pooling-validators-tp4363095p4363095.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: pooling validators

Posted by Jeremy Thomerson <je...@wickettraining.com>.
On Mon, Feb 6, 2012 at 10:38 PM, jsanca <js...@gmail.com> wrote:

> Hi Jeremy
>
> Thanks for your answer, I agree with you (reason why I sent this email, to
> double check my theory)
> I am just trying to find way to optimize the app, I am new with Wicket and
> I feel the Framework creates so much instances just to render a page, so I
> see the validators everywhere might a good idea to pooling it
>

Great.  The JRE has been very efficient at this for a long time.  It's not
really a problem like it was in low versions like JRE 1.1, etc.  You
shouldn't hit any problems where instance creation is the issue.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*

Re: pooling validators

Posted by jsanca <js...@gmail.com>.
Hi Jeremy

Thanks for your answer, I agree with you (reason why I sent this email, to
double check my theory)
I am just trying to find way to optimize the app, I am new with Wicket and
I feel the Framework creates so much instances just to render a page, so I
see the validators everywhere might a good idea to pooling it

Of course if pooling will introduce a new issue I prefer just to keep
following the way we are using so far

thanks again,
J

On Mon, Feb 6, 2012 at 7:52 PM, jeremy@wickettraining.com [via Apache
Wicket] <ml...@n4.nabble.com> wrote:

> On Mon, Feb 6, 2012 at 5:43 PM, jsanca <[hidden email]<http://user/SendEmail.jtp?type=node&node=4363496&i=0>>
> wrote:
>
> > Hi All,
> >
> > As a common practice in Wicket we create IValidator objects for each
> > component we need to add a validation, there are some scenarios when we
> use
> > the same validator for several objects, so I was wondering if there is
> any
> > issue if I create a pooling to provide this validators
> >
> > Thread Safe issues
> >
>
> Potentially.
>
>
> > Concurrency issues
> >
>
> Potentially.
>
>
> > Any other issue
>
>
> Potentially.
>
> Really, the question is: why?  Sounds like premature optimization.  Until
> you see that validators actually cause a problem there's no need to do it.
>  If they do cause a problem, I can almost 300% guarantee that pooling them
> won't be the way to solve it.
>
> --
> Jeremy Thomerson
> http://wickettraining.com
> *Need a CMS for Wicket?  Use Brix! http://brixcms.org*
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/pooling-validators-tp4363095p4363496.html
>  To unsubscribe from pooling validators, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4363095&code=anNhbmNhQGdtYWlsLmNvbXw0MzYzMDk1fC0xMDAyMzAxODY1>
> .
> NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
Saludos,
Jonathan

http://jsanca.blogspot.com/


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/pooling-validators-tp4363095p4363668.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: pooling validators

Posted by Jeremy Thomerson <je...@wickettraining.com>.
On Mon, Feb 6, 2012 at 5:43 PM, jsanca <js...@gmail.com> wrote:

> Hi All,
>
> As a common practice in Wicket we create IValidator objects for each
> component we need to add a validation, there are some scenarios when we use
> the same validator for several objects, so I was wondering if there is any
> issue if I create a pooling to provide this validators
>
> Thread Safe issues
>

Potentially.


> Concurrency issues
>

Potentially.


> Any other issue


Potentially.

Really, the question is: why?  Sounds like premature optimization.  Until
you see that validators actually cause a problem there's no need to do it.
 If they do cause a problem, I can almost 300% guarantee that pooling them
won't be the way to solve it.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*