Do a website including individual members and merchant member Merchant member's function including merchant login to modify business information change merchant account password Business Forget password merchant submit order and other functions write these functions into a class for example, the merchant class writes these functions in the form of methods and then partially complex functions are then separated into another A class or the next method to write to this merchant class want to ask this is not high cohesion if not how to be considered high cohesion simple functions such as display business information to modify business information business forgot password and business change Password write to business class in this does not calculate the cohesion
Reply to discussion (solution)
We all come up with a website that you've done. How to achieve high cohesion and low coupling
Plan the function module there's something you need to do while you're doing it, and just start thinking about it unless you have a lot of experience. Next, if it's a new project, then you might not be able to write anything. High cohesion low-coupling code still needs modification modification
Don't think about it much. You should think more about modularity (not what is called a function module), how to classify layers, and how to distill reusable code.
Many PHP developers use a class to implement the XX function as the starting point, itself has gone wrong.
http://blog.csdn.net/phpnewnew/article/details/6896582 This is the book recommended by Phpnewnew Blog
In the afternoon to find information when found a blog that wrote very wonderful also share to everyone http://blog.csdn.net/yunhua_lee?viewmode=contents