2 ms·
Oddly I didn't expect the "property/object" one to be the most contentious! Who knew? Perhaps that one suffers more from brevity than all the others. The obser
by senorprogrammer 18y ago
Oddly I didn't expect the "property/object" one to be the most contentious! Who knew? Perhaps that one suffers more from brevity than all the others.
The observation stems from seeing reams of web app code that take in form data (or raw database data) and then proceed to move it around the app without encapsulating it in any way. The result is functions like:
function display_user( user_first_name, user_last_name...user_valid)
Look at twenty or thirty functions like that in an app and one starts to think "perhaps you need a user object?"
I certainly didn't mean to suggest we should all start tightly coupling all our classes together willy-nilly.
- raganwald 18y agoIt suffers from resembling a bikeshed ;-)