[OFBiz] Users - New App Best Practice

Hans Bakker h.bakker at antwebsystems.com
Wed Jun 1 06:17:44 EDT 2005


or like my earlier proposal, to include the decorator like the stylesheet in 
the productStore table.....

On Wednesday 01 June 2005 13:24, Chris Howe wrote:
> One slight problem with this practice.  The decorator
> concept.  You would have to copy all of the screens
> and change them so that it's using the local decorator
> instead of the copied application's decorator.  The
> "easiest" way I could see to resolve this is to
> include additional <context-param> in the web.xml
> =======================================
>     <context-param>
>         <param-name>localapp</param-name>
>         <param-value>myapp</param-value>
>     <description>Variable that customizes other
> applications code for use inside this
> webapp</description>
>     </context-param>
> =======================================
> files so that variables can be used in the
> *screens.xml files.
>
> ie from
> ecommerce/widget/ContentScreens.xml#defaultcontent
> ----------------------------------------------------
> <decorator-screen name="main-decorator"
> location="component://ecommerce/widget/CommonScreens.xml">
>     <decorator-section name="body">
> ---------------------------------------------------
> to
> +++++++++++++++++++++++++++++++++++++++++++++++++++
> <decorator-screen name="main-decorator"
> location="component://${localapp}/widget/CommonScreens.xml">
>     <decorator-section name="body">
> +++++++++++++++++++++++++++++++++++++++++++++++++++
>
>
> In theory, would that work?
> --------Original Message----
>
> Very interesting, thanks Chris, and David for the
> confirmation.
>
> Jacques
>
> ----- Original Message -----
> From: "Chris Howe" <cjhowe76013 at yahoo.com>
> To: <users at lists.ofbiz.org>
> Sent: Tuesday, May 31, 2005 6:46 AM
> Subject: [OFBiz] Users - New App Best Practice
>
> > Could someone please confirm if the following is the
> > best practice of creating a new application and if
> > not, what the fallout of doing this would be?
> >
> > Lets say that I want to create an application that
> > most closely matches the ecommerce app.  I should
> > start with copied versions the following files only.
> >
> > ofbizhome/specialized/myapp/build.xml
> > ofbizhome/specialized/myapp/ofbiz-component.xml
>
> ofbizhome/specialized/myapp/webapp/myapp/WEB-INF/controller.xml
>
> ofbizhome/specialized/myapp/webapp/myapp/WEB-INF/web.xml
>
> > ofbizhome/specialized/myapp/webapp/myapp/index.jsp
> >
> > from this I should edit the following
> > build.xml:
> > find "ecommerce"
> > replace with "myapp"
> >
> > ofbiz-component.xml:
> > find "ecommerce"
> > replace with "myapp"
> >
> > web.xml:
> > change display name and description from "ecommerce"
> > to "myapp"
> >
> > Then change specialized/component-load.xml to load
> > "myapp"
> >
> >
> > This should give you an exact duplication of
> > functionality of the copied ecommerce application
> > without the hundreds of thousands of lines of code.
> > Then by simply copying/creating the files that need
>
> to
>
> > be changed and changing the requests and views in
> > controller.xml you will have your new application,
>
> but
>
> > still benefit from svn updates.
> >
> > What is the potential downside of this?
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.ofbiz.org
> > http://lists.ofbiz.org/mailman/listinfo/users
>
> _______________________________________________
> Users mailing list
> Users at lists.ofbiz.org
> http://lists.ofbiz.org/mailman/listinfo/users

-- 
Regards,
Hans Bakker
ANT Websystems Ltd (www.antwebsystems.com)


More information about the Users mailing list