The GoalRedesign Openbiz presentation layer. The Problem1. The default BizForm includes list, edit, new, search in one metadata. a. Multiple Display Mode + single Control definition limits the flexibility of configure different UI elements for different modes. b. This default metadata is tuned for highly interactive data centric administration applications like CRM, HRM. It is not intuitive to use it on consumer applications. c. Display Mode management in the BizForm introduces messy logic. d. No detail page is defined. The detail page is useful for bookmark and drilldown e. User can't use browser back/forward button to navigate between Display Modes f. Web page is not search engine friendly 2. HTMLControl class includes all common HTML element rendering logic a. This makes it hard to develop a custom UI element b. All elements have to share the same XML element attribute 3. Display popup in a new browser window a. Open a new window is slow b. A new window has inconsistent style with the main page The Solution1. Redesign the BizForm with EasyForm on both metadata and class. a. Drop Display Mode from EasyForm. Developer don't need to worry the different configuration of the elements on different display mode. b. Limit single display on one page is easy to develop consumer facing applications. c. Assign different Form class for different purpose of the page. For example, ListForm is to show data in grid, while InputForm is for data input page. d. Define a new schema for Form metadata. This is to avoid confusion between the 2.3 BizForm metadata and the new metadata e. Define Search panel to allow easy search on list page f. Implement the commonly used data management flow.See screen below
g. The new flow is browser and search engine friendly h. Still keep the advanced UI features like parent/child association, value picker ¡ 2. Assign each UI element with its own class a. Each element's metadata may have different attributes 3. Replace the heavy new window with light in-page window Some DetailsClass Diagram
EasyView (base view class)
- DynaView (dynamic view class, dynamic view can be given any form to display)
EasyForm (base form class)
- InputForm (form class for editing data)
- NewForm (form class for creating data)
- ListForm (form class for listing data set)
- PickerForm (form class for list data set in a picker popup)
Element (base UI element class)
- InputElement (base input element class)
- InputText (Editbox element)
- Textarea (Textarea element)
- Password (Password element)
- File (File upload element)
- Button (Image/Text button element)
- HTMLButton (Standard button element)
- ResetButton (Standard Reset button element)
- SubmitButton (Standard Submit button element)
- RichText (Rich Text Editor element)
- AutoSuggest (Auto Suggestion input element)
- InputDate (Date input element)
- InputDatetime (Datetime input element)
- InputPicker (Input element with picker)
- OptionElement (base option element)
- Listbox (listbox, combobox element)
- Checkbox (Checkbox element)
- Radio (Radio element)
- Hidden (Standard Hidden element)
- RowSelector (Row selection checkbox element)
- LabelText (Label field element)
- ColumnText (Data field element as table column
Screenshots1. New section defined in an EasyForm
3. Drilldown to Detail page
6. New in-page picker popup
Typical EasyForm Metadata
<?xml version="1.0" encoding="UTF-8"?>
<EasyForm Name="f_EventList" class="ListForm" jsClass="jbForm" Title="Sports Events" Description="Event BizForm" BizDataObj="easy.d_Event" PageSize="10" DefaultForm="Y" TemplateEngine="Smarty" TemplateFile="list.tpl">
<DataPanel>
<Element Name="fld_id" Class="ColumnText" FieldName="Id" Label="Event Id"/>
<Element Name="fld_name" Class="ColumnText" FieldName="Name" Label="Name" Sortable="Y" Link="controller.php?view=easy.v_EventDetail&fld:Id={@:Elem[fld_id].Value}"/>
<Element Name="fld_host" Class="ColumnText" FieldName="Host" Label="Host"/>
<Element Name="fld_loc" Class="ColumnText" FieldName="Location" Label="Location"/>
<Element Name="fld_start" Class="ColumnText" FieldName="Start" Label="Start"/>
<Element Name="fld_end" Class="ColumnText" FieldName="End" Label="End"/>
<Element Name="fld_desc" Class="ColumnText" FieldName="Description" Label="Description"/>
</DataPanel>
<ActionPanel>
<Element Name="btn_edit" Class="Button" Text="Edit" CssClass="button">
<EventHandler Name="onclick" Event="onclick" Function="EditRecord()" RedirectPage="controller.php?view=easy.v_EventEdit&fld:Id={@:Elem[fld_id].Value}"/>
</Element>
<Element Name="lnk_new" Class="LabelText" Text="New" CssClass="button" Link="controller.php?view=easy.v_EventNew" Style="padding: 1 10 1 10; color:black;">
</Element>
<Element Name="btn_delete" Class="Button" Text="Delete" CssClass="button">
<EventHandler Name="onclick" Event="onclick" Function="DeleteRecord()"/>
</Element>
<Element Name="btn_excel" Class="Button" Image="excel.gif" Text="Excel Export" CssClass="button">
<EventHandler Name="onclick" Event="onclick" Function="CallService(excelService,renderCSV)" FunctionType="Popup"/>
</Element>
</ActionPanel>
<NavPanel>
<Element Name="btn_first" Class="Button" Image="prevfirst.gif" Enabled="{(@:m_CurrentPage == 1)?'N':'Y'}" Text="First" CssClass="button">
<EventHandler Name="onclick" Event="onclick" Function="GotoPage(1)"/>
</Element>
<Element Name="btn_prev" Class="Button" Image="prev.gif" Enabled="{(@:m_CurrentPage == 1)?'N':'Y'}" Text="Previous" CssClass="button">
<EventHandler Name="onclick" Event="onclick" Function="GotoPage({@:m_CurrentPage - 1})" ShortcutKey="Ctrl+Shift+Left"/>
</Element>
<Element Name="txt_page" Class="LabelText" Text="{'@:m_CurrentPage of @:m_TotalPages '}">
</Element>
<Element Name="btn_next" Class="Button" Image="next.gif" Enabled="{(@:m_CurrentPage == @:m_TotalPages )?'N':'Y'}" Text="Next" CssClass="button">
<EventHandler Name="onclick" Event="onclick" Function="GotoPage({@:m_CurrentPage + 1})" ShortcutKey="Ctrl+Shift+Right"/>
</Element>
<Element Name="btn_last" Class="Button" Image="nextlast.gif" Enabled="{(@:m_CurrentPage == @:m_TotalPages )?'N':'Y'}" Text="Last" CssClass="button">
<EventHandler Name="onclick" Event="onclick" Function="GotoPage({@:m_TotalPages})"/>
</Element>
</NavPanel>
<SearchPanel>
<Element Name="qry_name" Class="InputText" FieldName="Name" Label="Name"/>
<Element Name="btn_dosearch" Class="Button" text="Search" CssClass="button">
<EventHandler Name="onclick" Event="onclick" Function="RunSearch()" ShortcutKey="Enter"/>
</Element>
</SearchPanel>
</EasyForm>
|
|||








wow, phpOpenBiz exelence i
wow, phpOpenBiz exelence
i have advice: on search panel, there are two (2) tabs, for standard search and advanced search (like SUgarCRM)
The advanced search can be
The advanced search can be doable by adding support for a new attribute like AdvancedSearch="Y" for example.
The plan of 2.4 to build the solid base which supports current 2.3 UI functions. Then move to some advanced features. You are welcome to contribute more ideas and implementation. Thanks.
Another couple
Another couple thoughts...
How do you want to divide up the coding? I can jump in and help a little.
Also, Boeki and I were creating updated user docs for the 2.3 series but I'm wondering if our time would be better spent trying to make 2.4 our most polished version yet.
Thanks for help offering. I
Thanks for help offering. I will create a SVN branch for 2.4 this week and we start from there.
I think the time for documenting is better on 2.4 now.
I wanted to add a couple of
I wanted to add a couple of thoughts to your planning Rocky.
Regarding the EasyForm as compared to the older BizForm, I am wondering if it is possilbe to preserver backwards compatability. This sounds like a tall order or would we developer a different set of classess like ListForm, EditForm, NewForm, DetailForm to support EasyForm rendering?
Also, I would like to preserve the ability to display these different forms in Modal or JS Windows. For example, I could see users wanting to click a Drill Down link and see the resulting Details form in a JS Popup instead of disturbing the ListForm.
Will a new OpenBiz plugin be developed? Is it worth considering a Web based builder instead of Eclipse? I'm not campagining for a web based builder but I figured I'd toss it out there.
I like the idea of a different class for each HTML control!
Is now the time to rethink the navigation buttons in favor of a scrollbar and lazy loading records?
Another feature would be an in place editor from within the ListForm display.
Thanks for adding your
Thanks for adding your thoughts :)
How much is the backwards compatability? The EasyForm has diff metadata than BizForm. And EasyForm is the parent class of ListForm, EditForm, NewForm, PickerForm. Please give more explanation of your questions.
Display the forms in Modal or JS window is very doable. It just like the way showing a picker form in the screenshot. There are some small changes on the normal form class (or metadata) - refresh the parent form who pop it up and close the current popup window.
You are right on the tool. Web based tool will attract more users than Eclipse tool. It may be used in other purpose as well. But building the tool will be a big project. Maybe the first step is to have a script (command line is ok too) to generate the do+form+view from given table.
I like the UI of scrollbar and in-grid edit. My concern is that they are not commonly used components, but cost long development time. Is it worth doing that?
I'm thinking about future
I'm thinking about future maintenance. The BizForm has multiple responsibilities like Validation, Rendering logic, CRUD operations ETC.
It sounds like an EasyForm and its descendants would break up the responsibilities. For example ListForm wouldn't need Validation logic and EditForm would only need a subset of Rendering logic.
So with these types of changes in the works, I'm wondering what our long term plan is for BizForm. Since BizForm supports all these types of DisplayModes, will we find that we are maintaining two types of Forms architectures in the future? Here is a specific example...
Consider the BizForm:EditRecord() function. It won't be needed in a ListForm or NewForm but we would need it for EditForm. So I am wondering will we need to maintain two version of EditRecord() going forward. One for BizForm and one for EditForm.
This is a good question. The
This is a good question. The actual main difference is that the new EasyForm and its subclasses don't have the logic of switching display modes. And some logic of BizForm is dropped or simplified in EasyForm (you will see it from the SVN later). I'd think leave BizForm as it with only bug fixing and move forward with EasyForm approach.
Looks great! What's the
Looks great! What's the eta?
In the picker form, how about adding in an Add button so we can add records on-th-fly? This is one feature I sorely miss from my C/S app development.
On the drilldown link page, how does the session data behave? In the 2.3 that I use, I was forced to use a subclass of the main form for use in drilldowns.
What happens is that when I drill down to a particular record, the drilldown form displays, say, record #2. Then when I later manually open the form (from a menu) that I used for drilldowns, only record #2 shows. The rest apparently disappeared.
On Picker form, you can add
On Picker form, you can add record for sure. It is because the picker form is displayed in a iframe. You can treat it as a separate window.
Per drilldown question, as per 2.4, drilldown targets to a detail page, the issue you mentioned is no longer there.