Every current and new php framework, ever.

Here’s a (dramatized) conversation between a mere mortal php developer and one of the developers/gurus/ascetics/nerds that wrote/uses/has marital relations with a current or upcoming php framework:

“Oh, you want a database connection? First, create the Query object by accessing the GetInstance method of the DIC, then use the GetFactory method to get a factory that you then call GetActualObject(NotReally $notreally) where $notreally is a NotReally object that contains the DIC configuration that you request from the GetInstance method of the ConfigureDIC service, which you then call GetNotReally on with the object name as an argument…”

“Why do I have to have all that before I can run a query on the database?”

“What are you, a moron? This is clearly better than having a simple, clear, intuitive method for getting something as basic as a database connection! Oh, and you want to run an *actual query*?

“Then instantiate a GetQuery object… I’m kidding, you really have to go to the GetQueryServiceManagerFactoryInstance::GetInstanceQueryServiceManagerFactory() static method (I know the order is different, but if you don’t see why, you’re an idiot and you should go back to using something like LOGO or BASIC or VB.NET, since clearly you don’t deserve to use php) in order to get the PleaseLetMeDoAFuckingQueryFactoryServiceManager object, then call the GetQuery() method to get the QueryHaHaThatsFunnyYouWantToDoAnActualQueryAndGetSomethingConstructiveDone object…

“Then you have to go to www.obscurefreakingsiteinromania.ro and search the forum for a thread that may or may not be there that has the secret formula for the order of methods that you have to call on the QueryHaHaThatsFunnyYouWantToDoAnActualQueryAndGetSomethingConstructiveDone object in order to get an object that you can build a query with. If you call the methods in the wrong order, it deletes everything on the server’s hard drive and emails obscenties to your grandmother (That’s a bug, but it’s only been open for three years, what do you want)…

“And then here’s what you have to do to run the query: Get the QueryRunnerInstanceFactoryNamespaceSessionFnord object from the DIC, which you do by calling the GoodLordPleaseKillMeNow() method on the ConfigureDICWithFlintTools object, then monkeypatch the push() php construct because the way it worked before was too simple and we wrote a replacement for it, but in order to do that you have to recompile php with the –secret-sauce-that-nobody-knows-about-because-we-are-special-and-you-are-not flag…

“Oh, and did we mention that you can’t use arrays in this framework? You have to use WhyTheHellAmIUsingThisFrameworkWhenICouldHaveWrittenItMyselfByNowInterfaceCollectionIterator object for any group of .. things.. you want to manipulate. If you try to use something like ‘$a = array();’ then we strangle a kitten…”

Yes, I’m a little frustrated.

One Comment

  1. DafT says:

    I’m probably right in guessing you were talking about Symfony2 there right? I’ve been having the exact same dilemma; some things just seem way too long-winded in some of the more “modern” frameworks, like ZF2 and Symfony2… Being decoupled is awesome, but if it makes development a mission, something’s definitely not right…

Leave a Reply