Hi everyone;I want to propose the following framework changes after 1.4 branches off:
1. Database connections should be handled by a separate class so we can get rid of duplicate code between LedgerSMB.pm and LedgerSMB::Form.pm.2. LedgerSMB->new() needs to be simplified and modularized. Right now it is 170 lines long and rather hard to follow.
3. Split open/check/close_form into a separate module for handling form id's.
4. Move to PGObject::Simple (for 1.3 code) and PGObject::Simple::Role (for 1.4 code). This requires some very simple changes to db call routines and allows a lot more flexibility if we need it.
5. LedgerSMB->get_user_info should be moved to LedgerSMB::DBObject::User
6. I would like to remove the following methods:LedgerSMB->debugLedgerSMB->escape (this is better handled by the Template macros)LedgerSMB->is_blank (use LedgerSMB->required(...) instead)LedgerSMB->redirect(). We shouldn't need this at all.LedgerSMB->format_amount(). Not needed with new code.LedgerSMB->parse_amount(). Use LedgerSMB->numbers instead.LedgerSMB->round_amount(). Just round the number using ffround instead.LedgerSMB->call_procedure() would be gone (in favor of PGObject interface).LedgerSMB->is_allowed_role()LedgerSMB->date_to_number()-- do we even need this?Move web error handling to LedgerSMB::Request for code sharingLedgerSMB->get_default_value_by_key should be removed in favor of LedgerSMB::Setting->get
Eventually I would like the LedgerSMB module to go away.
I would also like to rewrite our current auth modules as they have accumulated a fair bit of cruft in 1.4. I would also like to rewrite LedgerSMB::App_State to use singletons and accessors instead of direct variable access.
Some of the above (in particular removing unused LedgerSMB functions) I might get to before the branch.