4 ms·
The best thing about OO in app development is that it lets you abstract the main routines of your program into what is effectively business logic. For example,"
by ninjaa 18y ago
The best thing about OO in app development is that it lets you abstract the main routines of your program into what is effectively business logic. For example,"
$customer = new cp_customer();
$customer->add($customer_form_data);
/* Customer_Info => Customer_Storefront*/
$customer->link_to_storefront($SID);"
Earlier this was a garbled mess, full of functions like
custID = addCustomer(form_info)
updateAddress(custID, "Billing", some_args) and so on ...
On the flip side, OOP is trickier (b/c of encapsulation) to debug esp when object model gets complicated. In terms of programming the only way to do it better (and this is frankly v debatable, esp when you consider management of DB connections and API administration etc) is "LISP style", where you effectively concoct a DSL for your specific app.