You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Nourredine Khadri <no...@atosorigin.com> on 2011/03/09 11:07:55 UTC

Prevent overriding services implementation

Hi,

Is there a way to prevent overriding some custom tapestry services
implementation?

I would want to provide to the developer a third-party library that contains
some not-overridable services for security issues (prevent from another
implementation, decorators , advisors, ... ). Thus, i would restrict the
usage of my services to some functionalities.

Thanks.

Nourredine.

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Prevent-overriding-services-implementation-tp3415241p3415241.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Prevent overriding services implementation

Posted by Howard Lewis Ship <hl...@gmail.com>.
I can see some of this, but I think it's still a process problem, not
something that can be fixed by changing the container.

BTW preventDecoration() (which also prevents advice) exists to prevent
certain types of recursive builds (where a service needed for
decorating/advising services ends up decorating/advising itself).

On Fri, Mar 11, 2011 at 1:49 AM, Nourredine Khadri
<no...@atosorigin.com> wrote:
> Hi Howard,
>
> Some precisions. I think the term "security" that i've used can be
> misleading and maybe inappropriate here.
>
> Actually, the purpose is to share an existing common complex business layer
> (BL) and to expose parts of it depending on the GUIs that uses it (admin,
> front, segmented by sector/business, ...).
>
> It can be useful for big projects, with lot of developers, to be sure that
> services are used in the dedicated context to help them in their
> development, frame the process and for a better maintenability without
> modifying the existant BL.
>
> In my mind, it's more a matter of "Is the service or method I'm using suits
> to the GUI i'm developing ?" (In the GUI developer point of view as a
> "service user", not mine as a "service provider").
> In development mode, an error message can help him to know : "This service
> or method is not suitable for this GUI...". (a simple advisor in a module
> that we would provide for the concerned GUI)
>
> But, here , thanks to the easy tapestry extensibility, the developer can
> redeclare the service in its appModule and works around the rule (even
> unintentionally :)).
>
> So, providing a preventOverriding() method in the ServiceBinder class could
> be a plus in tapestry-ioc ? or, to a lesser extent, a preventAdvice() method
> (like the existing preventDecoration()) ?
>
> Just a suggestion.
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Prevent-overriding-services-implementation-tp3415241p3424766.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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


Re: Prevent overriding services implementation

Posted by Nourredine Khadri <no...@atosorigin.com>.
Hi Howard,

Some precisions. I think the term "security" that i've used can be
misleading and maybe inappropriate here.

Actually, the purpose is to share an existing common complex business layer
(BL) and to expose parts of it depending on the GUIs that uses it (admin,
front, segmented by sector/business, ...).

It can be useful for big projects, with lot of developers, to be sure that
services are used in the dedicated context to help them in their
development, frame the process and for a better maintenability without
modifying the existant BL.

In my mind, it's more a matter of "Is the service or method I'm using suits
to the GUI i'm developing ?" (In the GUI developer point of view as a
"service user", not mine as a "service provider"). 
In development mode, an error message can help him to know : "This service
or method is not suitable for this GUI...". (a simple advisor in a module
that we would provide for the concerned GUI)

But, here , thanks to the easy tapestry extensibility, the developer can
redeclare the service in its appModule and works around the rule (even
unintentionally :)).

So, providing a preventOverriding() method in the ServiceBinder class could
be a plus in tapestry-ioc ? or, to a lesser extent, a preventAdvice() method
(like the existing preventDecoration()) ?

Just a suggestion.


--
View this message in context: http://tapestry.1045711.n5.nabble.com/Prevent-overriding-services-implementation-tp3415241p3424766.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Prevent overriding services implementation

Posted by Howard Lewis Ship <hl...@gmail.com>.
I marked the issue as invalid. Sorry, but if you have a process where
you don't trust some of the code you are running, that's a process
problem, not a Tapestry problem.

On Wed, Mar 9, 2011 at 6:36 AM, Nourredine Khadri
<no...@atosorigin.com> wrote:
>
> Thiago H. de Paula Figueiredo wrote:
>>
>>
>> I don't think so. You can file a JIRA for that.
>>
>
> Done : https://issues.apache.org/jira/browse/TAP5-1471
>
> Thanks for the answer
>
> Nourredine.
>
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Prevent-overriding-services-implementation-tp3415241p3415666.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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


Re: Prevent overriding services implementation

Posted by Nourredine Khadri <no...@atosorigin.com>.
Thiago H. de Paula Figueiredo wrote:
> 
> 
> I don't think so. You can file a JIRA for that.
> 

Done : https://issues.apache.org/jira/browse/TAP5-1471

Thanks for the answer

Nourredine.



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Prevent-overriding-services-implementation-tp3415241p3415666.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Prevent overriding services implementation

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Wed, 09 Mar 2011 07:07:55 -0300, Nourredine Khadri  
<no...@atosorigin.com> wrote:

> Hi,

Hi!

> Is there a way to prevent overriding some custom tapestry services
> implementation?

I don't think so. You can file a JIRA for that.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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