Jump to content

drcphd

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

drcphd's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. deadimp: thanks for the motivating words 448191: I thought I was missing the 'view' (for now). Wouldn't the Modhandler and modules be the controller? Mastodont: Yeah, I'm gonna do that: site.com/module/action/parameters So it's the OOP and whole idea I'm worried about. I don't want it to get dirty.
  2. (I hope I've not posted this in the wrong forum: I'm actually looking for input on my approach, not the coding directly). I want to write my own CMS (with basic features I always need) for my future projects. I've tried two times before but had to stop due to lack of planning. Lately I've been reading about MVC (Model-View-Controller) designs and registry patterns. I've come up with a solution that I think might work. I have a registry class to store all objects and a module handler which fetches output from the different modules (like a router). But in this example you can load several modules simultaneously. That means you can assign module-output anywhere on the page (as main content, block content, etc). The 'main module' (requested by user, think $_GET['mod']) will always be responsible for the main content (the body of the page). But every other module can also be loaded and create output for other parts of the page (like a poll in a block). My approach is best explained by looking at a simplified framework I wrote. http://pastebin.org/2655 - View code Comments? Is this a stupid idea? Also, if anyone has something to say about the object oriented programming in this example, that would be great. I'm still learning, and it would be nice to know if I've grasped the basics, e.g. how the registry object should be treated. Thanks in advance.
  3. I'm planning on writing my own simple MVC (model-view-controller) framework but I have a question. Let's say I have two controlles/modules: 'news' and 'polls'. On the page that displays news, I also want a box with a poll., Or let's say I always want a 'web_links' controller displayed on the bottom of the page? Do MVC frameworks generally have a procedure for this? Should I instantiate two controllers? Or is there a preferable method? Thanks in advance. PS: I'm not too familiar with these frameworks yet, but I'm learning : )
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.