Page 1 of 1

(Front) controller command object name?

Posted: Sun Mar 25, 2007 2:31 pm
by alex.barylski
I solved my other issue which no one seemed interested in anyways so I updated this to reflect my latest problem:

I have front controller and that front controller (directly) invokes required action controllers (no dispatching, etc). Those action controllers communicate back to the front controller via return values. The front controller checks the return "type" and if it's of a given type uses that return value to further process requests or stops right there immediately.

That object that action controllers return to the front controller would best be called???

Message object? I would say Command object but I wouldn't want to confuse readers with thinking it was somehow an incorrect interpretation of the Command pattern. So I figure naming it a 'Message' object is a safe bet.

Really all it does is act like a structure which contains controller:action pairs. There are no methods. Think C structure, but offers the advantage of RTTI for a more OO friendly design.

So what says you, as a developer (not that my framework will ever see the light of day outside of my own projects) what name would make more sense?

Cheers :)

Posted: Thu Mar 29, 2007 8:20 am
by Benjamin
Hockey,

What if you were to develop a PHP framework which was not only OO, but was engineered like the Linux OS? What if this framework had built in memory management algorithms? What if this framework was so fast and efficient that it didn't require optimizations at all? What if this framework already included SEO features and a CMS. What if I already built this and have it in my code base?

You sure ask a lot of questions, kinda like Condoleezza Rice. But what has been accomplished? What has been completed?

I would encourage you to divert some funds to Amazon.com. They have some really good books. Trust me, I read a bunch. Seriously.

Posted: Thu Mar 29, 2007 9:41 am
by Maugrim_The_Reaper
What you have likely has a specific Pattern name - but I wouldn't guess at it :). Like a C struct, it's just a container, a glorified array. Not a glorified array is bad - using an Object gives it the magical property of a unique Type.

P.S. An object without methods cannot be a Command object. Commands generally allow an object perform an action, where the object is unaware of the second "action" object and relies instead on intermediary Command objects. It's a pretty similar pattern to Strategy - the Command objects themselves are Strategies.

Posted: Thu Mar 29, 2007 11:18 am
by Chris Corbyn
astions wrote:You sure ask a lot of questions, kinda like Condoleezza Rice. But what has been accomplished? What has been completed?
Here here. This Front controller topic appears to be never ending 8O