|
[ https://issues.apache.org/jira/browse/OFBIZ-10772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16736980#comment-16736980 ] Pierre Smits commented on OFBIZ-10772: -------------------------------------- Hi [~mbrohl], You're absolutely right in that this kind of improvement can't be implemented in a broad-strokes approach when it comes down to the lowest level context. As an example, if we want to bring both invoice amount and order amount to the user into one screen we can't suffice with saying the label for both is 'Amount'. That is the area where the context defines the application: if the main context is an 'invoice' object the generic label should be applied and the exception/extension should have a specific applied. This does happen marginally on transaction forms and templates, and more on overviews (grids, lists). > OFBiz On a Diet > --------------- > > Key: OFBIZ-10772 > URL: https://issues.apache.org/jira/browse/OFBIZ-10772 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Affects Versions: Trunk > Reporter: Pierre Smits > Priority: Minor > > OFBiz is laden with superfluous redundancies and approaches for 'novice' developers, when it comes to handling labels (titles) for screens and fields in forms in both Freemarker templates and widgets. > In screens we have defined elements such as: > {code:java} > <set field="titleProperty" value="ManufacturingCreateProductionRun"/> > {code} > and > > {code:java} > <screenlet title="${uiLabelMap.PageTitleAddFeatureInterAction"}"> > {code} > Equally so we have defined elements in widget forms and templates, such as: > {code:java} > ${uiLabelMap.FormFieldTitle_<WhatEverTheFieldNameIs>} > {code} > or > {code:java} > ${uiLabelMap.<ComponentName><VeryLenghtyExplanationAsLabelForAField>} > {code} > This all has led to a situation where we have a product that, label-wise, overflown with exceptions on exceptions, and unnecessary 'explanations' - such as the 'componentName', or 'PageTitle' or 'FormFieldTitle_', in any of the files. > Equally so, having to have the name of the component in the identifier of a label is unnecessary and reduces reuse. An 'Amount' label has the same meaning everywhere (given its context), so there is no need to have definitions like: > * AccountingAmount > * PaymentAmount > * ProductAmount > * OrderAmount > * TermAmount > * FormFieldTitle_amount > * etc. > Having done a quick assessment I get to over 90.000 unnecessary identifiers in our files that hampers us in reusing labels as much as possible. > We can save 100.000s of bytes in our product by removing these unnecessary 'novice' developer requirements, resulting in cost- and time-saving benefits for our adopters, their developers and our contributors. > This is the umbrella ticket to capture related sub-tasks (tickets/sub-tasks). -- This message was sent by Atlassian JIRA (v7.6.3#76005) |
| Free forum by Nabble | Edit this page |
