Building my cPanel
Posted: Mon Apr 16, 2007 12:25 am
Any good philosophy student knows that answers come only with questions, but one must ask the right questions to get the answers he desires. With that said, I need to paint a vague sketch, and then form the question.
I need to develop a custom cPanel that will handle every user of every function. That is, people who post news use the same cPanel to access modules available to them as general site users or site administrators. What will set it apart is access permissions and module inclusion. A basic user would go to the cPanel and only see relevent modules, such as user preferences, his PM inbox, and a number of other features included in the system. However, a news poster would go to the SAME cPanel, which would authenticate him as such, and see the same modules as the basic user, plus his access to the news engine, and any other special modules he has special access to.
Now, these modules I keep speaking about, refer to the separate functions installed in the software.
Now it must be understood that this program I am writing is a platform that I, and I alone will run. However, we will be creating an SDK for users and other 3rd party developers to create additional "modules" for the platform to increase and diversify usability.
So, keeping that in mind, I realize that there needs to be some sort of separation of global methods (things that every module will have to do, and will have to do the same every time) and the unique modifiers each module will need to execute (for instance, a news engine wouldn't need to make all the same SQL queries as the PM system, but both would need to connect to MySQL in the same way, and they would both connect to the User Info DB in the same way, but they would probably access separate parts of the DB (if they need to add information to the session, that is).).
Discussing MySQL-related classes, specifically, for instance:
There's a "blog" module. The user accesses the cPanel, logs in, receives a session that shows the cPanel they have access to the blog engine. The module is displayed for them to access. They click it, the blog engine verifies they have access and calls upon the "global" method for connecting to the DB, then asks the user if they want to make a new post or edit an old one, they choose, and then the module would assumuhnumuh....
This is where I get screwed up. I need some way to ensure that all calls to the DB from the module will be dependent upon the global DB call...I think.
I'm probably not making much sense at all. I'm sorry.
In general, I'm trying to reason out what would constitute a "global" method that each module is dependent upon, and how do I force the modules to depend upon those global methods. Would this be a good place to use inheritance? I'm really new to this whole OOP thing, I learned PHP 4 when I was like, 16, this is way beyond anything I learned back then.
I need to develop a custom cPanel that will handle every user of every function. That is, people who post news use the same cPanel to access modules available to them as general site users or site administrators. What will set it apart is access permissions and module inclusion. A basic user would go to the cPanel and only see relevent modules, such as user preferences, his PM inbox, and a number of other features included in the system. However, a news poster would go to the SAME cPanel, which would authenticate him as such, and see the same modules as the basic user, plus his access to the news engine, and any other special modules he has special access to.
Now, these modules I keep speaking about, refer to the separate functions installed in the software.
Now it must be understood that this program I am writing is a platform that I, and I alone will run. However, we will be creating an SDK for users and other 3rd party developers to create additional "modules" for the platform to increase and diversify usability.
So, keeping that in mind, I realize that there needs to be some sort of separation of global methods (things that every module will have to do, and will have to do the same every time) and the unique modifiers each module will need to execute (for instance, a news engine wouldn't need to make all the same SQL queries as the PM system, but both would need to connect to MySQL in the same way, and they would both connect to the User Info DB in the same way, but they would probably access separate parts of the DB (if they need to add information to the session, that is).).
Discussing MySQL-related classes, specifically, for instance:
There's a "blog" module. The user accesses the cPanel, logs in, receives a session that shows the cPanel they have access to the blog engine. The module is displayed for them to access. They click it, the blog engine verifies they have access and calls upon the "global" method for connecting to the DB, then asks the user if they want to make a new post or edit an old one, they choose, and then the module would assumuhnumuh....
This is where I get screwed up. I need some way to ensure that all calls to the DB from the module will be dependent upon the global DB call...I think.
I'm probably not making much sense at all. I'm sorry.
In general, I'm trying to reason out what would constitute a "global" method that each module is dependent upon, and how do I force the modules to depend upon those global methods. Would this be a good place to use inheritance? I'm really new to this whole OOP thing, I learned PHP 4 when I was like, 16, this is way beyond anything I learned back then.