all.
I am getting to know more about PHP and design patterns. My question might be simple. I have two views (side by side). One list all the title of a music album in a menu list box. As user select one of the title, the detail for that album is shown in the another view. Currently i don't use any class and all the code for mysql is within the views themself. I have two questions.
1. how can you tell me how can I write a generic class that can be used for both the views. The problem is both the views have different requirements. First view requires all the title and id only, but the second view only requires one id and all the attribute for that row
- If i am using php class, then what will get shared between the two views
Regards,
Ritesh