Here is a list of PHP MVC framework for web rapid development, some of this are modeled after Ruby on Rails.
Stop Naming Your Variables "Flag": The Art of Boolean Prefixes
Shallow Focus Flags — Stop Naming Your Variables "Flag" Shallow Focus Flags thatamazingprogrammer.com — Stop Naming Your Variables "Flag": The Art of Boolean Prefixes The Problem You inherit a codebase and find this: public class OrderProcessor { private bool open; private bool flag; private bool done; private bool status; public void Process(bool check) { if (open && flag) { flag = false; status = true; } if (done) { // what happens here? } } } Readable? No. What is open ? Is the store open? Should the file open? What is flag ? That's a variable screaming "I'll fix this later." And is done a question ("is it done?") or a command ("mark it done")? Boolean names are ambiguous land mines. They look innocent until you have to figure out what they mean during a 3 AM outage. ...
Comentarios