[jira] [Commented] (OFBIZ-11456) MacroFormRenderer refactoring

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

[jira] [Commented] (OFBIZ-11456) MacroFormRenderer refactoring

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-11456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17352371#comment-17352371 ]

ASF subversion and git services commented on OFBIZ-11456:
---------------------------------------------------------

Commit d16bef46dc599308475129991c11c2d536bd173e in ofbiz-framework's branch refs/heads/trunk from Daniel Watford
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=d16bef4 ]

Improved: MacroFormRenderer refactoring of field group open and close elements

(OFBIZ-12124)

Part of the OFBIZ-11456 MacroFormRenderer refactoring effort.

Rather than MacroFormRenderer producing and evaulating FTL strings, it now
uses RenderableFtlElementsBuilder to create RenderableFtlMacroCall objects
which are then passed to an FtlWriter for evaluation.


> MacroFormRenderer refactoring
> -----------------------------
>
>                 Key: OFBIZ-11456
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11456
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework/widget
>    Affects Versions: Trunk
>            Reporter: Daniel Watford
>            Assignee: Daniel Watford
>            Priority: Minor
>
> Class MacroFormRender is 3400 lines long and performs the following:
>  * Renders the various form structure parts and field widgets to FTL macros calls.
>  * Configures the FTL environment.
>  * Executes the FTL macro calls to generate HTML and write it to a caller provided Appendable.
> Implementing the above means that MacroFormRenderer does not meet the Single Responsibility Principle. The current implementation of multiple responsibilities makes unit testing difficult.
> As discussed on the dev mailing list https://markmail.org/message/adtkk6cb6o7mmy7f it is proposed that MacroFormRenderer is refactored.
> Refactoring should separate the rendering of form structure parts and field widgets to FTL macro calls from the execution of those macros.
> To support the refactoring effort JMockit is being introduced (OFBIZ-4035) to allow test creation against the current implementation of MacroFormRenderer, helping to ensure functionality is preserved once refactoring is complete.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)