Glese Posted January 3, 2012 Share Posted January 3, 2012 I have built a website where everything comes together one can think of regarding building sites for the internet and now I would like to separate the functionalities into their own so I can use them again in the next projects. Be it the commenting, favoriting, rating, profile, sign in, sign up system and et cetera - I simply want all systems to be separated for later re-use. I am wondering what would be the best way to approach this? Any recommendations? I did consider to use neutral and abstractive terminology when coding the scripts so it is not specific to the current project. Link to comment https://forums.phpfreaks.com/topic/254292-recommendations-to-separate-the-website-parts-into-their-own/ Share on other sites More sharing options...
scootstah Posted January 3, 2012 Share Posted January 3, 2012 I would build a mini framework and use a modules system. Each thing (commenting, favoriting, rating...) would be its own module and completely independent of one-another. This way you can just drop in whatever module you want and you're good to go. Link to comment https://forums.phpfreaks.com/topic/254292-recommendations-to-separate-the-website-parts-into-their-own/#findComment-1303848 Share on other sites More sharing options...
Glese Posted January 3, 2012 Author Share Posted January 3, 2012 I am having troubles to imagine that. I am using the MVC model, and as you can tell it is a bit spread across. Do you have any example showcasing your suggestion? Link to comment https://forums.phpfreaks.com/topic/254292-recommendations-to-separate-the-website-parts-into-their-own/#findComment-1303880 Share on other sites More sharing options...
scootstah Posted January 3, 2012 Share Posted January 3, 2012 Look at the HMVC pattern. Link to comment https://forums.phpfreaks.com/topic/254292-recommendations-to-separate-the-website-parts-into-their-own/#findComment-1303883 Share on other sites More sharing options...
ignace Posted January 4, 2012 Share Posted January 4, 2012 re-usable as in php code? or as in the entire thing (images, css, js, ..)? The first scenario means a strong abstraction. The second implies the use of modules (or mini-app): module1 - css - js - img - something.php - manifest.xml module2 - css - js - img - something.php - manifest.xml Link to comment https://forums.phpfreaks.com/topic/254292-recommendations-to-separate-the-website-parts-into-their-own/#findComment-1304100 Share on other sites More sharing options...
Glese Posted January 4, 2012 Author Share Posted January 4, 2012 I think the HMVC model seems to be a well solution, once the development has finished, simply consider moving the whole folder into the new projects. Link to comment https://forums.phpfreaks.com/topic/254292-recommendations-to-separate-the-website-parts-into-their-own/#findComment-1304160 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.