class hierarchy design - order of classes
What is the best way to order a a group of classes. I've already made the decision to put them in one file. An opcode caching application well ensure efficiency.
Is alphabetical O.K? Does it matter? Here is the list.
/*CLASS LIST*/
/*bookm开发者_开发问答ark*/
/*database*/
/*import*/
/*one_db*/
/*post*/
/*route*/
/*session*/
/*signup*/
/*table_maintain*/
/*tweet*/
/*upload*/
/*validate*/
/*view_html*/
Classes like "one" and "tablem" seem to be a bit confusing. When someone looks into your application, even first line of class has to tell him/her, what does it do, what is that class for.
You need to put parent classes before child classes. So alphabetical with classes moved to take into account parent/child relationships.
精彩评论