cmgmyr Posted October 18, 2007 Share Posted October 18, 2007 I've been working on an admin section that I've been using in a handful of websites so far. I have a structure that works pretty well so far. I would like some insight on how to make a "module". Right now I have a few options in my admin section: - Catalog/Products - Customers - Orders - Files ect... I would like to make these more modular...almost like a plugin where I can upload a directory into "plugins" or something like that and that whole plugin with function 100% (something like wordpress?). Have you guys done something like this before? Any ideas? Suggestions? Problems? Thanks! -Chris Quote Link to comment https://forums.phpfreaks.com/topic/73851-making-modules/ Share on other sites More sharing options...
cmgmyr Posted October 19, 2007 Author Share Posted October 19, 2007 *bump* Quote Link to comment https://forums.phpfreaks.com/topic/73851-making-modules/#findComment-373281 Share on other sites More sharing options...
NixNod Posted October 19, 2007 Share Posted October 19, 2007 I'm interested on it too, will be very helpful for me. But it depends of how you program your app, you must program your app thinking that you will put one plug in for the app expect one plug in. For example: You must create the admin menu, you must think that if you put some plug-in that menu will be automatically read the menu from plug in too. Quote Link to comment https://forums.phpfreaks.com/topic/73851-making-modules/#findComment-373338 Share on other sites More sharing options...
dbo Posted October 19, 2007 Share Posted October 19, 2007 I mean, if you're familiar with object oriented programming a module can just be a class. You create the class one time... you do it right and then you have a "module" that can be plugged in and reused. Object oriented programming/designs promote the reuse of code much more so than sequential programming practices do. That being said... depending on the application you can do it a lot of ways. For a lot of the stuff I've built in the past I've got one or more tables in a database for managing a certain part of an application (users, permissions, etc). I think write a class that "sits on top" of these tables and instead of writing queries against the database I'm calling functions. $myObj->createUser('username','password','role'); Or something to that affect. I've shoved the implementation into the class and I'm able to abstract the details from the usage. To me doing this is one way to create reusable "modules." But it really depends on your application and what you're trying to accomplish. Quote Link to comment https://forums.phpfreaks.com/topic/73851-making-modules/#findComment-373420 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.