Dev - move of the bsh location from the 'WEB-INF/action' directory

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Dev - move of the bsh location from the 'WEB-INF/action' directory

Hans Bakker
A proposal to change the directory standard:

Currently all bsh scripts are stored as follows:
/applications/applName/webapp/webappName/WEB-INF/actions/subwebappName/bshName.bsh

in the applications which do not use jpublish, can't we move these a bit
higher up like:
/applications/applName/webapp/webappName/subwebappName/bshName.bsh

together with the ftl files ?

they are then easier to find and not so far down the directory tree....

any opinions?

--
Regards,
Hans Bakker
ANT Websystems Co.,Ltd (http://www.antwebsystems.com)

If you want to verify that this message really originates from
from the above person, download the public key from:
http://www.antwebsystems.com/hbakkerAntwebsystems.asc

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Dev - move of the bsh location from the 'WEB-INF/action' directory

cjhowe
I think this goes along with the progression of the
move to widgets which is a massive undertaking best
taken by little steps absent a specific need.  The
elimination of jpublish was just the begining.

I personally have a desire for continuity in the
project which would include tranforming all of the
freemarker templates to screen/menu/form/tree widgets
even as there are specific instances where the widgets
fall short.  (The existance of freemarker files would
thus show where the widgets are falling short) An
additional transition is to move the beanshell to
minilang.  This would hopefully breed more predictable
results as you have more generic services, etc.  

The opposition to this makes a lot of sense as well.
That is, OFBiz lacking any specific need should just
work.  If beanshell is working, why rewrite it in
minilang, etc.  I would agree with that as well
especially how much effort is needed to rewrite some
things.

Because jpublish has for the most part been
eliminated, why would beanshell scripts even need to
be in the webapp folder?  Why not move it to
applications/applName/actions?  I agree that I often
get tired of writing the entire path out :)



--- Hans Bakker <[hidden email]> wrote:

> A proposal to change the directory standard:
>
> Currently all bsh scripts are stored as follows:
>
/applications/applName/webapp/webappName/WEB-INF/actions/subwebappName/bshName.bsh
>
> in the applications which do not use jpublish, can't
> we move these a bit
> higher up like:
>
/applications/applName/webapp/webappName/subwebappName/bshName.bsh

>
> together with the ftl files ?
>
> they are then easier to find and not so far down the
> directory tree....
>
> any opinions?
>
> --
> Regards,
> Hans Bakker
> ANT Websystems Co.,Ltd
> (http://www.antwebsystems.com)
>
> If you want to verify that this message really
> originates from
> from the above person, download the public key from:
>
http://www.antwebsystems.com/hbakkerAntwebsystems.asc
> >  
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - move of the bsh location from the 'WEB-INF/action' directory

Jacopo Cappellato
In reply to this post by Hans Bakker
Hans,

it could be a good idea, but there are a few issues we have to take into
account:

a) all the bsh scripts that depend on http related resources (request,
response etc...) should not be moved outside of the webapp folder

b) I think that it is important to store webapp's scripts and
configuration files under the WEB-INF folder because all the resources
under this special folder are not publicly served by the application
servers (it's one of the J2EE specifications)

Jacopo

Hans Bakker wrote:

> A proposal to change the directory standard:
>
> Currently all bsh scripts are stored as follows:
> /applications/applName/webapp/webappName/WEB-INF/actions/subwebappName/bshName.bsh
>
> in the applications which do not use jpublish, can't we move these a bit
> higher up like:
> /applications/applName/webapp/webappName/subwebappName/bshName.bsh
>
> together with the ftl files ?
>
> they are then easier to find and not so far down the directory tree....
>
> any opinions?
>
>
>
> ------------------------------------------------------------------------
>
>  
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - move of the bsh location from the 'WEB-INF/action' directory

David E. Jones
In reply to this post by cjhowe

While for the most part we do intend to eliminate FTL files there are some exceptions:

1. in ecommerce we do _not_ want to use the form widget at all because this application is meant to be visually customized and if the form widget were used the first step of that customization would often be to rewrite it in an FTL template...

2. there are many pages with more complicated forms than we intend to support in the form widget; this sort of parameterized tool is not meant to be applicable 100% of the time as that is nearly impossible to write a tool for that is anything more efficient than a plain old template; in other words we add efficiency by narrowing the scope of what it supports and do so efficiently by targeting a certain domain (this is true of all OFBiz tools)

-David


Chris Howe wrote:

> I think this goes along with the progression of the
> move to widgets which is a massive undertaking best
> taken by little steps absent a specific need.  The
> elimination of jpublish was just the begining.
>
> I personally have a desire for continuity in the
> project which would include tranforming all of the
> freemarker templates to screen/menu/form/tree widgets
> even as there are specific instances where the widgets
> fall short.  (The existance of freemarker files would
> thus show where the widgets are falling short) An
> additional transition is to move the beanshell to
> minilang.  This would hopefully breed more predictable
> results as you have more generic services, etc.  
>
> The opposition to this makes a lot of sense as well.
> That is, OFBiz lacking any specific need should just
> work.  If beanshell is working, why rewrite it in
> minilang, etc.  I would agree with that as well
> especially how much effort is needed to rewrite some
> things.
>
> Because jpublish has for the most part been
> eliminated, why would beanshell scripts even need to
> be in the webapp folder?  Why not move it to
> applications/applName/actions?  I agree that I often
> get tired of writing the entire path out :)
>
>
>
> --- Hans Bakker <[hidden email]> wrote:
>
>> A proposal to change the directory standard:
>>
>> Currently all bsh scripts are stored as follows:
>>
> /applications/applName/webapp/webappName/WEB-INF/actions/subwebappName/bshName.bsh
>> in the applications which do not use jpublish, can't
>> we move these a bit
>> higher up like:
>>
> /applications/applName/webapp/webappName/subwebappName/bshName.bsh
>> together with the ftl files ?
>>
>> they are then easier to find and not so far down the
>> directory tree....
>>
>> any opinions?
>>
>> --
>> Regards,
>> Hans Bakker
>> ANT Websystems Co.,Ltd
>> (http://www.antwebsystems.com)
>>
>> If you want to verify that this message really
>> originates from
>> from the above person, download the public key from:
>>
> http://www.antwebsystems.com/hbakkerAntwebsystems.asc
>>>  
>> _______________________________________________
>> Dev mailing list
>> [hidden email]
>> http://lists.ofbiz.org/mailman/listinfo/dev
>
>  
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - move of the bsh location from the 'WEB-INF/action' directory

David E. Jones
In reply to this post by Jacopo Cappellato

Jacopo is correct about these points. The convention in OFBiz right now is to put FTL files in the directories directly under a webapp root, though they of course don't _have_ to go there technically. The same thing applies to BSH scripts being under the <webapp-root>/WEB-INF/actions directory. They don't have to go there, but for people who are used to working with J2EE Servlet based webapps that sort of place is the expected location, and that is the target audience for such things.

Also, the separation of the location of FTL files from BSH scripts is intentional as in larger teams some of those who work with FTL files never touch the BSH scripts, or never should, and this makes it easier to set up source tools and such to make such restrictions possible.

If typing it is annoying then maybe some creative copy-paste is in order?

-David


Jacopo Cappellato wrote:

> Hans,
>
> it could be a good idea, but there are a few issues we have to take into
> account:
>
> a) all the bsh scripts that depend on http related resources (request,
> response etc...) should not be moved outside of the webapp folder
>
> b) I think that it is important to store webapp's scripts and
> configuration files under the WEB-INF folder because all the resources
> under this special folder are not publicly served by the application
> servers (it's one of the J2EE specifications)
>
> Jacopo
>
> Hans Bakker wrote:
>> A proposal to change the directory standard:
>>
>> Currently all bsh scripts are stored as follows:
>> /applications/applName/webapp/webappName/WEB-INF/actions/subwebappName/bshName.bsh
>>
>> in the applications which do not use jpublish, can't we move these a bit
>> higher up like:
>> /applications/applName/webapp/webappName/subwebappName/bshName.bsh
>>
>> together with the ftl files ?
>>
>> they are then easier to find and not so far down the directory tree....
>>
>> any opinions?
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>>  
>> _______________________________________________
>> Dev mailing list
>> [hidden email]
>> http://lists.ofbiz.org/mailman/listinfo/dev
>
>  
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev