I have a prototype website written in PHP. Lately i've rewritten code to separate logic from layout and database operations. So now I have something like MVC code design.
Now what bothers me, is that in MVC I'll have many files and each will display something when combined with other (model+view+controller). So I figured out that it would be usefull to create something like widgets of my MVC parts.
For example when I have MVC of products view than I would create a PHP file that combine MVC part files in such fashion to display products based on GET values I pass to this new PHP file.
What I would acomplish in this way is that any widgets, subparts of website would be available to view separately and use separately from other parts. So it would be something like widgets or like Firefox browser design.
So I would be able to test every part of website separately, and than only combine these parts into current actual website page design. So user testing would be easier too, and the presentation files would be very short and easy to understand.
I would like to know what do you think about it. I don't want to fall into any hole in the design-things and I think that this is the moment that will be important in future to keep maintaining website code easy.
Am I correct?