Comments on: The MVC Paradox http://bradley-holt.com/2012/04/the-mvc-paradox/ Mon, 29 Sep 2014 19:50:55 +0000 hourly 1 https://wordpress.org/?v=4.6.1 By: MattiMatti http://bradley-holt.com/2012/04/the-mvc-paradox/comment-page-1/#comment-4888 Thu, 21 Jun 2012 08:48:12 +0000 http://bradley-holt.com/?p=1503#comment-4888 I’m using Slim + Redbean + (Twig)* to create simple services for flash apps. especially if i don’t have svn support and console access on the production server.

I’m used to develop php using zend + doctrine + (smarty|twig) and for sure are oversized for this kind of projects.

About testing, it depends on you practice. i’m used to it so i develop all the business logic into worker classes, leaving to the microframework just the routing and input validation.

That’s my experience!

]]>
By: Roditakis.P http://bradley-holt.com/2012/04/the-mvc-paradox/comment-page-1/#comment-4791 Sat, 19 May 2012 07:03:39 +0000 http://bradley-holt.com/?p=1503#comment-4791 I find the full toolset of Asp.Net Mvc (asp.net environment, model binders, action filters, view engines, path resolvers, html helpers, routing) as the reason to get involved with this type of mvc framework. The rest are all well known issues for the community. But from my experience, things are changing fast so its better to ‘go standard’ and don’t get very theoretical if you know what i mean.

]]>
By: Anna Filina http://bradley-holt.com/2012/04/the-mvc-paradox/comment-page-1/#comment-4740 Tue, 10 Apr 2012 13:14:28 +0000 http://bradley-holt.com/?p=1503#comment-4740 Supporting multiple clients is only one of many advantages. MVC’s main purpose is to separate concerns, hence the name. This enables you to grow your codebase while maintaining flexibility. It also makes your code easier to understand for other developers, because they can quickly recognize the pattern and guess where this and that process occurs. And the list goes on.

]]>
By: Lukas http://bradley-holt.com/2012/04/the-mvc-paradox/comment-page-1/#comment-4739 Mon, 09 Apr 2012 19:38:46 +0000 http://bradley-holt.com/?p=1503#comment-4739 “This bring me to The MVC Paradox. Modern MVC web frameworks inadvertently encourage the coupling of domain logic and user interface. If you don’t need to support multiple types of clients, then decoupling the domain logic from the user interface is the only reason left to use the MVC design pattern.”

I dont understand this paragraph. The 3rd sentence does not provide any support for the claims of the 2nd sentence, leaving the 2nd sentence kind of without basis.

]]>
By: lepine kong http://bradley-holt.com/2012/04/the-mvc-paradox/comment-page-1/#comment-4736 Sun, 08 Apr 2012 22:48:38 +0000 http://bradley-holt.com/?p=1503#comment-4736 I can’t see how MVC supposedly “Support for multiple types of clients” from accepted definition of MVC like the one from Wikipedia: “Model–View–Controller (MVC) is an architectural pattern that splits interactions between users and applications into three roles: the Model (business logic), the View (user interface), and the Controller (user input).[1][2] This separation of concerns facilitates the independent development, testing, and maintenance of each role.”

]]>
By: Till http://bradley-holt.com/2012/04/the-mvc-paradox/comment-page-1/#comment-4733 Sat, 07 Apr 2012 10:36:28 +0000 http://bradley-holt.com/?p=1503#comment-4733 I think frameworks like Slim and Silex “support” spaghetti code too much. 😉 IMHO, there is no clear separation of anything. Nothing you can’t do yourself, but then you might be better off with another framework.

On debugging – Silex is kind of annoying in this regard – especially phar’d. Then I’d argue it’s not at all micro if you happen to need something other than routing you step through two dozens of Symfony2 components. 😉

On Slim – they lost me with PHP 5.2 compat. PHP 5.4 is out.

]]>
By: Systho http://bradley-holt.com/2012/04/the-mvc-paradox/comment-page-1/#comment-4728 Fri, 06 Apr 2012 07:09:24 +0000 http://bradley-holt.com/?p=1503#comment-4728 let’s say that most “simple” app do not need CLI intervention, what about automatic testing ?

It looks like your approach leaves only the blackbox acceptance testing option, while MVC enables you to deeper unit test parts of your app

]]>
By: Larry Garfield http://bradley-holt.com/2012/04/the-mvc-paradox/comment-page-1/#comment-4726 Fri, 06 Apr 2012 04:14:14 +0000 http://bradley-holt.com/?p=1503#comment-4726 I very much agree! I’ve written before about how MVC doesn’t even apply on the web, no matter how much Rails folks and Sun Microsystems like to pretend it does: http://www.garfieldtech.com/blog/mvc-vs-pac

Slim looks an awful lot like Silex, which is sort of Symfony2 Junior. I haven’t built anything with it directly yet, but the main issue I see with it, and with Slim (from the one code sample above), is that it’s not going to scale to controllers that have to be complex (lots of form handling) and/or lots of controllers. Drupal (my main development system) has over 300 routes out of the box; it’s not unusual for a site to have nearly 1000 routes by the time you’re done, and yes they all have a purpose. Defining all routes and controllers inline at that point is completely unsustainable, especially from a performance perspective. You’re creating hundreds of closures, only one of which you’ll ever use.

Also, if all of your controllers are defined inline as closures, you cannot unit test them. For a project with a half dozen controllers you can probably get away with that. Anything bigger and you’re really short-changing yourself.

]]>
By: Moldován Eduárd http://bradley-holt.com/2012/04/the-mvc-paradox/comment-page-1/#comment-4724 Thu, 05 Apr 2012 18:44:56 +0000 http://bradley-holt.com/?p=1503#comment-4724 Interesting point. I mostly aggree with you, but I think that MVCis not important only because of these reasons. If you follow this pattern, your code is going to be easier to maintain, easier to understand.
On the other hand, I am not familiar with Slim, I will give it a try.

]]>
By: Bradley Holt http://bradley-holt.com/2012/04/the-mvc-paradox/comment-page-1/#comment-4723 Thu, 05 Apr 2012 18:07:17 +0000 http://bradley-holt.com/?p=1503#comment-4723 @lucifurious: Out of curiosity, can you tell me a bit more about the maintenance and debugging issues that you’ve run into?

]]>