Dev - Screenlet rework (comments appreciated)

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

Dev - Screenlet rework (comments appreciated)

cjhowe
Hey all,

I just finished a sort of proof of concept patch that
will allow more reuse of code with the screenlet idea.
 

http://jira.undersunconsulting.com/browse/OFBIZ-833

This patch shows the direction for the ftl files that
I'm wanting to go in that will allow more reuse of
code. Please check it out and let me know if it's a
direction worth applying to the entire order web
application and then to the other OFBiz applications.

1) Separate "screenlets" into their own ftl files  (ie
shouldn't have mutliple screenlets in the same ftl)
2) Remove "screenlet", "screenlet-header",
"screenlet-body" divs from ftl files and the divs.
Instead these should be inserted by screen widget
decorators.


Please check it out and comment.  I have time to
complete this for all of the order application this
week if there is fast positive feedback for this.

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

Re: Dev - Screenlet rework (comments appreciated)

Vinay Agarwal
I like this way of doing ftl under the assumptions that it will allow
building ftl "libraries" for common forms like person name, phones etc. I
would like to further suggest the following if at all possible:

1. Allowing multiple screentlets in one ftl file (possibly using macro)
since some times too many files can become difficult to manage.

2. Support for themes: It can be achieved with some base code modifications
if a screenlet has a theme name associated with it and its path is somehow
derived or searched using the theme name.

Regards,
Vinay Agarwal

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Chris Howe
Sent: Sunday, April 09, 2006 3:23 PM
To: [hidden email]
Subject: [OFBiz] Dev - Screenlet rework (comments appreciated)

Hey all,

I just finished a sort of proof of concept patch that
will allow more reuse of code with the screenlet idea.
 

http://jira.undersunconsulting.com/browse/OFBIZ-833

This patch shows the direction for the ftl files that
I'm wanting to go in that will allow more reuse of
code. Please check it out and let me know if it's a
direction worth applying to the entire order web
application and then to the other OFBiz applications.

1) Separate "screenlets" into their own ftl files  (ie
shouldn't have mutliple screenlets in the same ftl)
2) Remove "screenlet", "screenlet-header",
"screenlet-body" divs from ftl files and the divs.
Instead these should be inserted by screen widget
decorators.


Please check it out and comment.  I have time to
complete this for all of the order application this
week if there is fast positive feedback for this.

Thanks!
 
_______________________________________________
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 - Screenlet rework (comments appreciated)

cjhowe
In reply to this post by cjhowe
Vinay,

Common forms should really use the form widget.  The
only reason that forms are remaining in freemarker is
that the styling features of the form widget is still
limited as well as they're not the squeeky wheel at
this point.  This is a part of a very slow transition
that takes advantage of the current state of the OFBiz
project with the widgets.  

This approach may not reduce the number of ftl files
(only because there are several current ftl files that
would be split into 5-7 smaller ftl files), but it
will certainly reduce the number of lines of code as
there are many sections that are duplicated.

Any scenario that I can think of regarding multiple
screenlets can be accomplished with proper use of the
screen widget.

A screenlet theme can be accomplished simply by adding
a variable to the screenlet screen in the
CommonScreens.xml file or various other decorators.


Thanks for the feedback, keep it coming!
--- Vinay Agarwal <[hidden email]> wrote:

> I like this way of doing ftl under the assumptions
> that it will allow
> building ftl "libraries" for common forms like
> person name, phones etc. I
> would like to further suggest the following if at
> all possible:
>
> 1. Allowing multiple screentlets in one ftl file
> (possibly using macro)
> since some times too many files can become difficult
> to manage.
>
> 2. Support for themes: It can be achieved with some
> base code modifications
> if a screenlet has a theme name associated with it
> and its path is somehow
> derived or searched using the theme name.
>
> Regards,
> Vinay Agarwal
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On
> Behalf Of Chris Howe
> Sent: Sunday, April 09, 2006 3:23 PM
> To: [hidden email]
> Subject: [OFBiz] Dev - Screenlet rework (comments
> appreciated)
>
> Hey all,
>
> I just finished a sort of proof of concept patch
> that
> will allow more reuse of code with the screenlet
> idea.
>  
>
> http://jira.undersunconsulting.com/browse/OFBIZ-833
>
> This patch shows the direction for the ftl files
> that
> I'm wanting to go in that will allow more reuse of
> code. Please check it out and let me know if it's a
> direction worth applying to the entire order web
> application and then to the other OFBiz
> applications.
>
> 1) Separate "screenlets" into their own ftl files
> (ie
> shouldn't have mutliple screenlets in the same ftl)
> 2) Remove "screenlet", "screenlet-header",
> "screenlet-body" divs from ftl files and the divs.
> Instead these should be inserted by screen widget
> decorators.
>
>
> Please check it out and comment.  I have time to
> complete this for all of the order application this
> week if there is fast positive feedback for this.
>
> Thanks!
>  
> _______________________________________________
> 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