B4J Question [ABMaterial] Shared Code Module

Harris

Expert
Licensed User
Longtime User
Based on the Feedback example code, and when considering my own page(s) design, which methods of each page would be good candidates to be put into a "shared" code module (UsersPage and OverviewCasesPage)?

In my app, I wish to standardize the many CRUD forms to same size (number of rows), an Add New button, pagination and View/Edit and Delete button in each row.

Of course, the sql queries, table setup (headers, column visible, updating, etc) should stay on each page. Also, custom modal forms based on a specific table may stay with each page. However, even these may benefit from an intelligent shared method.

It just seems that there is so much duplicate code in each page that could benefit from a shared module, since each page will do essentially the same thing.

Looking for community expert advise before I go off half-cocked and create an unmanageable beast!

Thanks and Happy Holidays!!!
 

Harris

Expert
Licensed User
Longtime User
After some reflection, perhaps I am taking the wrong approach?

Instead of many pages doing (essentially) the same thing, create one page that handles similar CRUD tasks.
Create new methods (or objects) that fill and react to the data grid based on which data table is used...
And insert, update and delete based on which table is "in focus".

Working with this new framework, I get confused... I see that it is the same, only different.
 
Upvote 0
Top