I always over-think things. If I’m ever going to get even a rough draft of inklog working, then I’m going to have to convince myself that I can’t accommodate everything from the very beginning. My thought process is pretty crazy, right now:
A weblogging application? Okay, that’s pretty easy, really. Just build a model to access the data and work from there. Well, what should the model include? Weblogging stuff, obviously. How about comments, trackback and pingback? I guess I could stuff that in here, but that might be overloading things a bit. They should be their own models. That’s easy enough. I’ll start with just the weblogging piece and add the other pieces afterward. This means I need to write modularly so that these features can easily be added and removed in the future by any user who chooses to do so. How should I do that? I guess I can have the controller detect what modules are available and then assign those pieces to the view accordingly. But what if a piece is available but the user doesn’t want to use it? I guess I should have each model announce it’s capabilities in a systematic way. This way an administration interface can be built to be very extensible. It merely asks the models what they do, and presents those options to the user. Each model will export certain features, and those features can be plugged into each and every page, if desired. The administration interface (for this part) will merely built constructs representing the requested actions for each page. All a user has to do is administrate the controller itself to decide how things will show up in different places. But that might be slightly complicated. I should allow for predefined controller configurations. This way, if a user doesn’t understand how to manipulate the controller, they can merely find a controller “theme” that they like and install it. And then, if they choose to do so, they can tweak it from there. This means I need to be able to accept configuration documents (in XML?) that will not only install the various views, but configure the controller as well. Wait. What if a particular configuration requires modules that the user doesn’t have? Hmmm. I could implement a centralized server to hold all of the available modules. Each configuration for the controller will declare its dependencies. If those modules don’t exist, the controller administration panel will contact the central server to find the location of that module, download it, and install it. Maybe I can use XML-RPC for that part. Actually, I could let view themes install the same way. This way, not only will the URL structure be configurable via a simple download, but the actual HTML structure will be as well. All from within the administrative control panel. Oh shit. I wanted to make the views flexible, so that users could use any template engine they desired or straight PHP if they wanted to. I guess each template engine could be “installed” as a view module. That way, if a particular view theme required a different template engine, that would be listed as a requirement and it could be installed easily. Oooh, I just thought of a great idea. What if it were possible to install non-weblogging modules via this same interface? You know… like a static page module, or a wiki module, or a discussion forum module, or a photograph gallery module. These modules would interface directly with the controller just as the weblogging model does, configuring their output by altering views and adding the components to each “URL” via the controller. That would make a lot of sense. Everything would just plug in that way. Actually, what would be best is if users just installed ONE PHP script manually. This was the controller administration core. It would then configure their system and install all the components they desire. So really, what I need is a controller administration panel AND a weblog application that plugs into it. They should be two separate entities.
Ahh shit. Look what I’ve done. By the time I finish thinking about this the application will be so complex that I’ll never be able to finish coding it. I need to do this in phases. Phase one: write a weblogging application. Phase two: write a controller. Phase three: take over the world. The real question is, can I stop thinking about the controller long enough to write the weblogging application?