You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Hans Bakker <ma...@antwebsystems.com> on 2013/06/17 08:15:38 UTC

similar components with different names

The problem:
Sometimes we would like to demo similar components to different 
customers on the same multi tenant installation.
The same problem will come up if we want to install it in a SAAS 
environment.

Presently we can write:
     component://order/widget/order/......

Would be nice if we could also write:
     component:/widget/order/......
and use the current component name as component name in this url ?

Anybody want to comment on this?

Regards,
Hans Bakker
AntWebsystems.com



Re: similar components with different names

Posted by Scott Gray <sc...@hotwaxmedia.com>.
Surely you'd use one of the components as a base component and the other would include the controller and re-reference the custom uris/views?  But regardless, I guess I understand what you're trying to do even if I don't understand why.

Anyway for a solution you'd want to create a new class that extends location resolver and then add it along with a new prefix to FlexibleLocation (eventually that should be configurable without code changes).  I would *not* use the same "component://" prefix but instead use something new and obvious e.g. localcomponent://widget/...

Regards
Scott

On 17/06/2013, at 8:22 PM, Hans Bakker wrote:

> Scott,
> 
> we currently ONLY develop components in hot-deploy which can be operated in a SAAS multi tenant environment fr GrowERP.
> 
> In this multi tenant environment we have different customers using similar components installed in the hot-deploy directory which need to function at the same time for different customers with slightly different functionality.
> 
> That is why we need to rename a component and still have it functional without  having to rename all "component://" references.
> 
> hope this helps?
> 
> Regards,
> Hans
> 
> On 06/17/2013 03:10 PM, Scott Gray wrote:
>> Thanks Hans.
>> 
>> I guess what I don't understand is why you would rename the OOTB component?  It seems like you're creating a headache for yourself unnecessarily.
>> 
>> Regards
>> Scott
>> 
>> On 17/06/2013, at 8:03 PM, Hans Bakker wrote:
>> 
>>> Thanks Scott for you reply,
>>> 
>>> perhaps not explained good, another try:
>>> 
>>> Presently we can write:
>>>   component://order/widget/order/......
>>> 
>>> Would be nice if we could also write:
>>>   component:/widget/order/......
>>> 
>>> which should be translated into:
>>> 	component://order/widget/order/......
>>> when the url was physically located within the order component.
>>> 
>>> When we have this ability and then rename the order component to something else in ofbiz-component.xml
>>> Then this renamed component would still work and can operate in the same system as the original order component.
>>> 
>>> The reason we want this is, that we create sometimes modified components for different customers which should work in the same SAAS multi tenant environment.
>>> 
>>> bit more clear now?
>>> 
>>> Regards, Hans
>>> 
>>> 
>>> On 06/17/2013 01:52 PM, Scott Gray wrote:
>>>> What would the current component be once the screen/form (I assume you're talking about screens/forms) was included from a different component?  Would it be local to the component it is defined in or local to the component it was referenced from?
>>>> 
>>>> I can't really offer any alternative solutions because I don't really understand the problem at all.
>>>> 
>>>> Regards
>>>> Scott
>>>> 
>>>> On 17/06/2013, at 6:15 PM, Hans Bakker wrote:
>>>> 
>>>>> The problem:
>>>>> Sometimes we would like to demo similar components to different customers on the same multi tenant installation.
>>>>> The same problem will come up if we want to install it in a SAAS environment.
>>>>> 
>>>>> Presently we can write:
>>>>>    component://order/widget/order/......
>>>>> 
>>>>> Would be nice if we could also write:
>>>>>    component:/widget/order/......
>>>>> and use the current component name as component name in this url ?
>>>>> 
>>>>> Anybody want to comment on this?
>>>>> 
>>>>> Regards,
>>>>> Hans Bakker
>>>>> AntWebsystems.com
>>>>> 
>>>>> 
> 


Re: similar components with different names

Posted by Hans Bakker <ma...@antwebsystems.com>.
Scott,

we currently ONLY develop components in hot-deploy which can be operated 
in a SAAS multi tenant environment fr GrowERP.

In this multi tenant environment we have different customers using 
similar components installed in the hot-deploy directory which need to 
function at the same time for different customers with slightly 
different functionality.

That is why we need to rename a component and still have it functional 
without  having to rename all "component://" references.

hope this helps?

Regards,
Hans

On 06/17/2013 03:10 PM, Scott Gray wrote:
> Thanks Hans.
>
> I guess what I don't understand is why you would rename the OOTB component?  It seems like you're creating a headache for yourself unnecessarily.
>
> Regards
> Scott
>
> On 17/06/2013, at 8:03 PM, Hans Bakker wrote:
>
>> Thanks Scott for you reply,
>>
>> perhaps not explained good, another try:
>>
>> Presently we can write:
>>    component://order/widget/order/......
>>
>> Would be nice if we could also write:
>>    component:/widget/order/......
>>
>> which should be translated into:
>> 	component://order/widget/order/......
>> when the url was physically located within the order component.
>>
>> When we have this ability and then rename the order component to something else in ofbiz-component.xml
>> Then this renamed component would still work and can operate in the same system as the original order component.
>>
>> The reason we want this is, that we create sometimes modified components for different customers which should work in the same SAAS multi tenant environment.
>>
>> bit more clear now?
>>
>> Regards, Hans
>>
>>
>> On 06/17/2013 01:52 PM, Scott Gray wrote:
>>> What would the current component be once the screen/form (I assume you're talking about screens/forms) was included from a different component?  Would it be local to the component it is defined in or local to the component it was referenced from?
>>>
>>> I can't really offer any alternative solutions because I don't really understand the problem at all.
>>>
>>> Regards
>>> Scott
>>>
>>> On 17/06/2013, at 6:15 PM, Hans Bakker wrote:
>>>
>>>> The problem:
>>>> Sometimes we would like to demo similar components to different customers on the same multi tenant installation.
>>>> The same problem will come up if we want to install it in a SAAS environment.
>>>>
>>>> Presently we can write:
>>>>     component://order/widget/order/......
>>>>
>>>> Would be nice if we could also write:
>>>>     component:/widget/order/......
>>>> and use the current component name as component name in this url ?
>>>>
>>>> Anybody want to comment on this?
>>>>
>>>> Regards,
>>>> Hans Bakker
>>>> AntWebsystems.com
>>>>
>>>>


Re: similar components with different names

Posted by Scott Gray <sc...@hotwaxmedia.com>.
Thanks Gil, I'm asking why not what. It doesn't make any sense to me why you'd want to rename an existing component, it's difficult to do and I'm not sure of the reason to try.

Regards
Scott

On 17/06/2013, at 8:22 PM, gil portenseigne wrote:

> Hi,
> 
> I guess that Hans want to rename a duplicated component of order. Then with this new way to write the component://, it won't necessary to make a global replacement of component://content by component://neworder in the duplicated component.
> 
> Do the global replacement in the new component is dangerous ?
> 
> My 0.02
> 
> Gil Portenseigne
> 
> Le 17/06/2013 10:10, Scott Gray a écrit :
>> Thanks Hans.
>> 
>> I guess what I don't understand is why you would rename the OOTB
>> component?  It seems like you're creating a headache for yourself
>> unnecessarily.
>> 
>> Regards
>> Scott
>> 
>> On 17/06/2013, at 8:03 PM, Hans Bakker wrote:
>> 
>>> Thanks Scott for you reply,
>>> 
>>> perhaps not explained good, another try:
>>> 
>>> Presently we can write:
>>>  component://order/widget/order/......
>>> 
>>> Would be nice if we could also write:
>>>  component:/widget/order/......
>>> 
>>> which should be translated into:
>>> 	component://order/widget/order/......
>>> when the url was physically located within the order component.
>>> 
>>> When we have this ability and then rename the order component to something else in ofbiz-component.xml
>>> Then this renamed component would still work and can operate in the same system as the original order component.
>>> 
>>> The reason we want this is, that we create sometimes modified components for different customers which should work in the same SAAS multi tenant environment.
>>> 
>>> bit more clear now?
>>> 
>>> Regards, Hans
>>> 
>>> 
>>> On 06/17/2013 01:52 PM, Scott Gray wrote:
>>>> What would the current component be once the screen/form (I assume you're talking about screens/forms) was included from a different component?  Would it be local to the component it is defined in or local to the component it was referenced from?
>>>> 
>>>> I can't really offer any alternative solutions because I don't really understand the problem at all.
>>>> 
>>>> Regards
>>>> Scott
>>>> 
>>>> On 17/06/2013, at 6:15 PM, Hans Bakker wrote:
>>>> 
>>>>> The problem:
>>>>> Sometimes we would like to demo similar components to different customers on the same multi tenant installation.
>>>>> The same problem will come up if we want to install it in a SAAS environment.
>>>>> 
>>>>> Presently we can write:
>>>>>   component://order/widget/order/......
>>>>> 
>>>>> Would be nice if we could also write:
>>>>>   component:/widget/order/......
>>>>> and use the current component name as component name in this url ?
>>>>> 
>>>>> Anybody want to comment on this?
>>>>> 
>>>>> Regards,
>>>>> Hans Bakker
>>>>> AntWebsystems.com
>>>>> 
>>>>> 
>>> 
> 
> 


Re: similar components with different names

Posted by gil portenseigne <gi...@nereide.fr>.
Hi,

I guess that Hans want to rename a duplicated component of order. Then 
with this new way to write the component://, it won't necessary to make 
a global replacement of component://content by component://neworder in 
the duplicated component.

Do the global replacement in the new component is dangerous ?

My 0.02

Gil Portenseigne

Le 17/06/2013 10:10, Scott Gray a écrit :
> Thanks Hans.
>
> I guess what I don't understand is why you would rename the OOTB
> component?  It seems like you're creating a headache for yourself
> unnecessarily.
>
> Regards
> Scott
>
> On 17/06/2013, at 8:03 PM, Hans Bakker wrote:
>
>> Thanks Scott for you reply,
>>
>> perhaps not explained good, another try:
>>
>> Presently we can write:
>>   component://order/widget/order/......
>>
>> Would be nice if we could also write:
>>   component:/widget/order/......
>>
>> which should be translated into:
>> 	component://order/widget/order/......
>> when the url was physically located within the order component.
>>
>> When we have this ability and then rename the order component to 
>> something else in ofbiz-component.xml
>> Then this renamed component would still work and can operate in the 
>> same system as the original order component.
>>
>> The reason we want this is, that we create sometimes modified 
>> components for different customers which should work in the same SAAS 
>> multi tenant environment.
>>
>> bit more clear now?
>>
>> Regards, Hans
>>
>>
>> On 06/17/2013 01:52 PM, Scott Gray wrote:
>>> What would the current component be once the screen/form (I assume 
>>> you're talking about screens/forms) was included from a different 
>>> component?  Would it be local to the component it is defined in or 
>>> local to the component it was referenced from?
>>>
>>> I can't really offer any alternative solutions because I don't 
>>> really understand the problem at all.
>>>
>>> Regards
>>> Scott
>>>
>>> On 17/06/2013, at 6:15 PM, Hans Bakker wrote:
>>>
>>>> The problem:
>>>> Sometimes we would like to demo similar components to different 
>>>> customers on the same multi tenant installation.
>>>> The same problem will come up if we want to install it in a SAAS 
>>>> environment.
>>>>
>>>> Presently we can write:
>>>>    component://order/widget/order/......
>>>>
>>>> Would be nice if we could also write:
>>>>    component:/widget/order/......
>>>> and use the current component name as component name in this url ?
>>>>
>>>> Anybody want to comment on this?
>>>>
>>>> Regards,
>>>> Hans Bakker
>>>> AntWebsystems.com
>>>>
>>>>
>>



Re: similar components with different names

Posted by Scott Gray <sc...@hotwaxmedia.com>.
Thanks Hans.

I guess what I don't understand is why you would rename the OOTB component?  It seems like you're creating a headache for yourself unnecessarily. 

Regards
Scott

On 17/06/2013, at 8:03 PM, Hans Bakker wrote:

> Thanks Scott for you reply,
> 
> perhaps not explained good, another try:
> 
> Presently we can write:
>   component://order/widget/order/......
> 
> Would be nice if we could also write:
>   component:/widget/order/......
> 
> which should be translated into:
> 	component://order/widget/order/......
> when the url was physically located within the order component.
> 
> When we have this ability and then rename the order component to something else in ofbiz-component.xml
> Then this renamed component would still work and can operate in the same system as the original order component.
> 
> The reason we want this is, that we create sometimes modified components for different customers which should work in the same SAAS multi tenant environment.
> 
> bit more clear now?
> 
> Regards, Hans
> 
> 
> On 06/17/2013 01:52 PM, Scott Gray wrote:
>> What would the current component be once the screen/form (I assume you're talking about screens/forms) was included from a different component?  Would it be local to the component it is defined in or local to the component it was referenced from?
>> 
>> I can't really offer any alternative solutions because I don't really understand the problem at all.
>> 
>> Regards
>> Scott
>> 
>> On 17/06/2013, at 6:15 PM, Hans Bakker wrote:
>> 
>>> The problem:
>>> Sometimes we would like to demo similar components to different customers on the same multi tenant installation.
>>> The same problem will come up if we want to install it in a SAAS environment.
>>> 
>>> Presently we can write:
>>>    component://order/widget/order/......
>>> 
>>> Would be nice if we could also write:
>>>    component:/widget/order/......
>>> and use the current component name as component name in this url ?
>>> 
>>> Anybody want to comment on this?
>>> 
>>> Regards,
>>> Hans Bakker
>>> AntWebsystems.com
>>> 
>>> 
> 


Re: similar components with different names

Posted by Scott Gray <sc...@hotwaxmedia.com>.
Sounds great in theory, I'd be interested to see what the reality would look like in OFBiz.

Regards
Scott

On 18/06/2013, at 8:51 AM, Ean Schuessler wrote:

> I don't know that I would say that. You could have a set of implementations that all map into a particular namespace and have different customers select different combinations on a user by user basis. That flexibility would actually let you run a larger set of customers on a single shared infrastructure rather than forcing you into setting up special case servers just to allow those overrides. 
> 
> ----- "Scott Gray" wrote: 
>> Not really SaaS once you start heading down that road huh. Personally I'd focus on designing for the 90% and if necessary, improving the framework to get customizations for the 10% into the db. 
>> Regards 
>> Scott 
> 
> -- 
> Ean Schuessler, CTO 
> ean@brainfood.com 
> 214-720-0700 x 315 
> Brainfood, Inc. 
> http://www.brainfood.com 


Re: similar components with different names

Posted by Ean Schuessler <ea...@brainfood.com>.
I don't know that I would say that. You could have a set of implementations that all map into a particular namespace and have different customers select different combinations on a user by user basis. That flexibility would actually let you run a larger set of customers on a single shared infrastructure rather than forcing you into setting up special case servers just to allow those overrides. 

----- "Scott Gray" wrote: 
> Not really SaaS once you start heading down that road huh. Personally I'd focus on designing for the 90% and if necessary, improving the framework to get customizations for the 10% into the db. 
> Regards 
> Scott 

-- 
Ean Schuessler, CTO 
ean@brainfood.com 
214-720-0700 x 315 
Brainfood, Inc. 
http://www.brainfood.com 

Re: similar components with different names

Posted by Scott Gray <sc...@hotwaxmedia.com>.
Not really SaaS once you start heading down that road huh. Personally I'd focus on designing for the 90% and if necessary, improving the framework to get customizations for the 10% into the db.

Regards
Scott

On 18/06/2013, at 2:43 AM, Ean Schuessler <ea...@brainfood.com> wrote:

> Do you really want per-tenant hot-deploy directories?
> 
> ----- "Hans Bakker" wrote: 
> > Thanks Scott for you reply,
> > perhaps not explained good, another try:
> > Presently we can write:
> >     component://order/widget/order/......
> > Would be nice if we could also write:
> >     component:/widget/order/......
> > which should be translated into:
> >         component://order/widget/order/......
> > when the url was physically located within the order component.
> > When we have this ability and then rename the order component to something else in ofbiz-component.xml
> > Then this renamed component would still work and can operate in the same system as the original order component.
> > The reason we want this is, that we create sometimes modified components for different customers which should work in the same SAAS multi tenant environment.
> > bit more clear now?
> 
> -- 
> Ean Schuessler, CTO
> ean@brainfood.com
> 214-720-0700 x 315
> Brainfood, Inc.
> http://www.brainfood.com

Re: similar components with different names

Posted by Ean Schuessler <ea...@brainfood.com>.
Do you really want per-tenant hot-deploy directories? 

----- "Hans Bakker" wrote: 
> Thanks Scott for you reply, 
> perhaps not explained good, another try: 
> Presently we can write: 
>     component://order/widget/order/...... 
> Would be nice if we could also write: 
>     component:/widget/order/...... 
> which should be translated into: 
>         component://order/widget/order/...... 
> when the url was physically located within the order component. 
> When we have this ability and then rename the order component to something else in ofbiz-component.xml 
> Then this renamed component would still work and can operate in the same system as the original order component. 
> The reason we want this is, that we create sometimes modified components for different customers which should work in the same SAAS multi tenant environment. 
> bit more clear now? 

-- 
Ean Schuessler, CTO 
ean@brainfood.com 
214-720-0700 x 315 
Brainfood, Inc. 
http://www.brainfood.com 

Re: similar components with different names

Posted by Hans Bakker <ma...@antwebsystems.com>.
Thanks Scott for you reply,

perhaps not explained good, another try:

Presently we can write:
    component://order/widget/order/......

Would be nice if we could also write:
    component:/widget/order/......

which should be translated into:
	component://order/widget/order/......
when the url was physically located within the order component.

When we have this ability and then rename the order component to something else in ofbiz-component.xml
Then this renamed component would still work and can operate in the same system as the original order component.

The reason we want this is, that we create sometimes modified components for different customers which should work in the same SAAS multi tenant environment.

bit more clear now?

Regards, Hans


On 06/17/2013 01:52 PM, Scott Gray wrote:
> What would the current component be once the screen/form (I assume you're talking about screens/forms) was included from a different component?  Would it be local to the component it is defined in or local to the component it was referenced from?
>
> I can't really offer any alternative solutions because I don't really understand the problem at all.
>
> Regards
> Scott
>
> On 17/06/2013, at 6:15 PM, Hans Bakker wrote:
>
>> The problem:
>> Sometimes we would like to demo similar components to different customers on the same multi tenant installation.
>> The same problem will come up if we want to install it in a SAAS environment.
>>
>> Presently we can write:
>>     component://order/widget/order/......
>>
>> Would be nice if we could also write:
>>     component:/widget/order/......
>> and use the current component name as component name in this url ?
>>
>> Anybody want to comment on this?
>>
>> Regards,
>> Hans Bakker
>> AntWebsystems.com
>>
>>


Re: similar components with different names

Posted by Scott Gray <sc...@hotwaxmedia.com>.
What would the current component be once the screen/form (I assume you're talking about screens/forms) was included from a different component?  Would it be local to the component it is defined in or local to the component it was referenced from?

I can't really offer any alternative solutions because I don't really understand the problem at all.

Regards
Scott

On 17/06/2013, at 6:15 PM, Hans Bakker wrote:

> 
> The problem:
> Sometimes we would like to demo similar components to different customers on the same multi tenant installation.
> The same problem will come up if we want to install it in a SAAS environment.
> 
> Presently we can write:
>    component://order/widget/order/......
> 
> Would be nice if we could also write:
>    component:/widget/order/......
> and use the current component name as component name in this url ?
> 
> Anybody want to comment on this?
> 
> Regards,
> Hans Bakker
> AntWebsystems.com
> 
>