I forgot, there is no initialization!

January 22nd, 2010

I’m guilty, I have forgotten everything about the initialization file. True, I’ve been so focused on other matters that are also quite important. Yet I had no plan to “boot” the application, or on how I should call all the things needed to initialize, to put it bluntly, there was no dispatcher. So here I am cracking my head, there is also a problem on configuring OpenType Threads, it seems users will have to open a file to state the Absolute Path of the library, not so hard, but it’s going to be annoying for a few new users.

I started to enumerate what I needed for my controllers and logic models to work, right now I have these

0. Set default time zone

1. Setting the path of the library
2. Registry to collect all the data I need, but I need to do a ini file reader, shouldn’t be a problem
3.  Set up doctrine in our way.
4. Load Access Lists and Roles and apply exceptions (the whitelist) from the database
5. Register routes.
6. Start localization with GETTEXT (probably won’t be implemented in this prototype)
7. Finally, the dispatcher

Now there was a problem though, I left out Sessions, data filters and some other stuff. but then I started thinking “I don’t need all of them…” Sessions will be called in the instance mainController is called and check for existing sessions and and that voodoo stuff.  That means we will have quite a light dispatch, not with unneeded objects.

I should tag all this project related talk… peace out

Events, events and more events!

January 22nd, 2010

After thinking, thinking, thinking and thinking. I just had to admit, it’s hard to make your web application to support (plug-ins/add-ons/modules/extensions) whatever you prefer to call it, for me they are extensions. So I had to go over and see some patterns and finally I came with a few ideas. It included a registry (protected one of course), and events(name) and listeners(extensions) and a handler to manage the injections.

I’m aware I left templates “manipulation” out, and I still won’t care for it yet. It is not the time to bother with such fancy features if I don’t have a solid extension base to work with. I’m seriously hoping to pull this one off. I want to get STARTED to code more, but I can’t code blindfolded with just ideas on mine and no blueprint to guide me, which is why I analyze, design, implement, test (you should know what I’m talking about :) ).

Extensions in a bulletin board is hard to see, I mean, there is so MUCH data to process. So many “events” to place, like on the one I placed “prePostLoop” which if injected, instead of calling my default model, all the raw data will be gone to your extension for you to process. Of course, you don’t have choose “prePostLoop” to just change ONE thing, there will be of course, other events to be placed.

Yet, a bigger problem to overcome is making the extension database layer and choosing the right database user, and also determining the extension’s “templatebits”, “routes”. It all requires a lot of “injections” to routes, doctrine (yes, I chose Doctrine ORM), views. One thing for sure is that, in the end you will have to place your function in the template. That’s a no brainer for many people, but I’m attempting to do something else.

To be honest, while it looks overwhelming for me. I still know I can do it if I keep my mind cool. I mean, it’s not HARD, like it was for me that I had to take a few days off after I designed how ACL (Access lists), ACL_Roles, ACL_Roles_Whitelist, ACL_Items. All I know is that the initialization of the board is going to be quite heavy.

To end this post, talking about events made me think of “Sections” as in “Link sections”. Where everyone want to keep it nice and neat. The problem with link sections is that I have to take care of administration pages and other things. It means, many and “Iterate” object comes to mind, such an eventful semester, I’m hoping it gives good results :)