Looking for feedback regarding HttpKernel implementation, please join in, this is a show stopper!!!

45 views
Skip to first unread message

Jesse Burns

unread,
Apr 17, 2014, 2:19:54 AM4/17/14
to
Hello everyone!

Right now further development is at a halt until we can work out the details regarding AllianceCMS's main flow of execution.

After a lot of research and a lot of testing I feel that we should adopt the HttpKernel Symfony Component, which relies on the EventDispatcher Symfony Component. This powerful combination will allow us to define a concrete flow of execution while at the same time allowing us to leverage the power of an Event system.

If you are not familiar with Event systems, also known as Hook systems, I think you're going to love this. This allows us to create an Event, and then 3rd party module developers can create Event Listeners that will be triggered/executed when the Event is dispatched.

An example:

Let's say I want to give other modules the chance to react before a comment to a blog post is inserted into the database. What I do is create a 'pre_insert_comment' Event, and then I dispatch this Event right before the comment is inserted into the database. Well, luck has it that the Spam module has an Event Listener that is listening to the 'pre_insert_comment' Event. The Spam Event Listener hears the 'pre_insert_comment' Event was dispatched and can now analyze the content of the comment. If the contents of the comment fails to pass muster the comment is redirected to a quarantine table, a message is logged, and an email is sent to an admin or moderator. Once the Event Listener is done with it's job the flow of execution continues as usual.

I've spent some time to document this issue, please take a look: HttpKernel Implementation Details

I have also created a Google Doc that states some goals and documents AllianceCMS's current flow of execution: Flow of Execution gDoc

What we need to do is brainstorm and merge the two, while altering anything that we need to due to the differences in how HttpKernel works and what it offers.

We also need to brainstorm and define a list of events that we think will be helpful for core developers, modules developers and theme developers (not sure they would need any, but that's what brainstorming is all about).

As I know this system intimately I encourage everyone to hammer me with questions as much as possible. I am available for one-on-one or group sessions on Skype, Google Hangouts on Air and Mikogo (or any other means that is free). I think I can mainstream everyone's understanding of the problem and what we are trying to accomplish, even though I do believe I've included enough links to pertinent documentation.

ALRIGHT, IT'S TIME TO GO GIFD!!!

Jesse Burns

unread,
Apr 19, 2014, 11:53:33 PM4/19/14
to
For anyone that might be interested, I am going to work on this a little bit tonight, but instead of working on it back to front, I'm going to work on this from front to back.

I'm going to play around in the 'dev/symfony/kernel' branch and start fleshing a dummy module the way I want to be able to create modules, and define what I want available to me as a module developer.

If anyone is interested in taking a look tonight let me know and I'll upload what I get done.

This is just a little brainstorm session at the moment, playing around, creating an API wish list and what ever else pops into my head.

owen beresford

unread,
May 3, 2014, 8:50:25 AM5/3/14
to allia...@googlegroups.com
um, Jesse, please tell me how you build this without a DI manager?

If you would like me to work in this, I guess it would be logical.

Reply all
Reply to author
Forward
0 new messages