Comments on: Rails vs. PHP: MVC or view-centric? https://quoderat.megginson.com/2005/06/11/rails-vs-php-mvc-or-view-centric/ Open information and technology. Sun, 11 Mar 2007 23:32:15 +0000 hourly 1 http://wordpress.com/ By: Bit a Bit - by kTzAR » Ruby on Rails https://quoderat.megginson.com/2005/06/11/rails-vs-php-mvc-or-view-centric/#comment-233 Sun, 11 Mar 2007 23:32:15 +0000 http://www.megginson.com/blogs/quoderat/?p=51#comment-233 […] En la web de Ruby on Rails hay una serie de screencasts que muestran algos desarrollos. Parecen muy bonitos, pero toda la “magia” que tiene eso por debajo “no es gratis”, parafraseando a un profesor mío de la Universidad. Algo parecido se discute en un post en Quoderat: Rails vs PHP: MVC or view Centric? […]

]]>
By: Quoderat » Sean McGrath’s obit for SOA https://quoderat.megginson.com/2005/06/11/rails-vs-php-mvc-or-view-centric/#comment-232 Fri, 03 Nov 2006 12:55:12 +0000 http://www.megginson.com/blogs/quoderat/?p=51#comment-232 […] I find the last point especially interesting. OO works well for developing many types of interactive applications, but maybe that’s just a fluke, and its principles are not applicable to the world at large. I’ve already mentioned that I find OO a poor fit for database-driven webapps, even though I consider myself primarily an OO developer. The real world doesn’t fit nicely into class hierarchies (yes, I know about aspect-oriented programming; in fact, I remember something similar for LISP called “facets” from late 1970’s or early 1980’s AI literature). […]

]]>
By: Upstream » My infatuation with ruby https://quoderat.megginson.com/2005/06/11/rails-vs-php-mvc-or-view-centric/#comment-231 Wed, 13 Sep 2006 11:54:23 +0000 http://www.megginson.com/blogs/quoderat/?p=51#comment-231 […] some of the discussion on the topic.. http://www.phpdeveloper.org/news/3920 http://clickablebliss.com/blog/2005/…_rails_part_1/ http://blade.nagaokaut.ac.jp/cgi-bin…ruby-talk/5334 http://www.megginson.com/blogs/quode…-view-centric/ […]

]]>
By: Steve’s Log » Blog Archive » MVC and web apps: oil and water https://quoderat.megginson.com/2005/06/11/rails-vs-php-mvc-or-view-centric/#comment-230 Fri, 17 Mar 2006 20:43:11 +0000 http://www.megginson.com/blogs/quoderat/?p=51#comment-230 […] This might just mean finding smarter ways to write view centric code, emphasizing DRY while avoiding spaghetti—consider the “article.php” in this URL. […]

]]>
By: Simone https://quoderat.megginson.com/2005/06/11/rails-vs-php-mvc-or-view-centric/#comment-229 Sun, 12 Mar 2006 03:24:07 +0000 http://www.megginson.com/blogs/quoderat/?p=51#comment-229 I agree with this article for the most part. In fact, I am trying to do some independent research about frameworks in general which will hopefully clarify when a framework stops relieving the developer of tedious tasks so they can concentrate on their problem and starts forcing the developer to fit the problem to the constraints of the framework.

]]>
By: jake https://quoderat.megginson.com/2005/06/11/rails-vs-php-mvc-or-view-centric/#comment-228 Sat, 04 Mar 2006 04:47:45 +0000 http://www.megginson.com/blogs/quoderat/?p=51#comment-228 Obviously, .net is the way to go.

]]>
By: Quoderat » PHP, XML, and Unicode https://quoderat.megginson.com/2005/06/11/rails-vs-php-mvc-or-view-centric/#comment-227 Wed, 01 Mar 2006 17:26:14 +0000 http://www.megginson.com/blogs/quoderat/?p=51#comment-227 […] A couple of weeks ago, Tim Bray posted about PHP and received a firestorm of comments, just as I did when I posted about PHP and Ruby on Rails almost a year ago. PHP generates a lot of passion, for good or for ill: my posting still gets a new comment every week or two. […]

]]>
By: Grrr https://quoderat.megginson.com/2005/06/11/rails-vs-php-mvc-or-view-centric/#comment-226 Thu, 23 Feb 2006 23:17:52 +0000 http://www.megginson.com/blogs/quoderat/?p=51#comment-226 >> I think that the answer has to do with the fact that web applications — whether producing HTML for people or XML for machines — are really about views, not objects. In anything but the most trivial cases, the views involve information from many different types of objects merged together to create a new object type.

I would disagree with that. Maybe my programming has not been proper MVC, but I have found that for something more complex than a couple of webpages put together – I spent about 6 months helping convert a legacy Foxpro app to PHP/MySQL – the separation is essential.
Imagine – we had like 10 developers in 3 countries, all trying to convert different parts of an around 120 screen Foxpro app (they defined the job amount by the “screens” converted).
Not separating Model into classes independant of controller/view pages would have been suicidal.

A typical page that user would call, would fulfill the role of Controller – getting input, validating it, and then depending on input and general app state, calling the appropriate actions in different models, assembling all the presentation info received into a structure, which then gets passed to a View (we used Smarty for Views, and it worked quite OK).

something like (pseudoPHP):

AddressEntryManagement.php (controller class):

if (user input action is delete && $id is sane and some other checks)
{
$addr = new AddressEntry($id);
$addr->delete();
$VIEW[‘result’]=’Success’;
}
… // other actions

$tpl= new Smarty(‘AddressEntry.tpl’);

$tpl->assign(‘DATA’,$VIEW);
$tpl->display();
=============
not entirely proper MVC maybe, but definitely loads better than the default approach used of simply making all the DB calls in the same place as presentation and controller.

]]>
By: litiumOnline » it’s all about web app https://quoderat.megginson.com/2005/06/11/rails-vs-php-mvc-or-view-centric/#comment-225 Sat, 18 Feb 2006 04:58:39 +0000 http://www.megginson.com/blogs/quoderat/?p=51#comment-225 […] to prevent this, i’ve tried not to use MVC yet but i ve tried a popular php template engine; named as smary but it’s sucks. it is complex(some say it’s a behemoth), slow, and doesn’t work when the page has java scripts and other irritating miscelleneous codes in it. today, i meet savant. i hope it is not as bad as smarty. as i took a glimpse on the codes, seems like even worse… other than php, there are web frameworks which is Ruby on Rails and Django. both are popular open source web application framework. hoping from page to page, i found out this page which is good to read and i love the comments coming from the rest of the readers. check it out: Rails vs. PHP: MVC or view-centric? […]

]]>
By: smt https://quoderat.megginson.com/2005/06/11/rails-vs-php-mvc-or-view-centric/#comment-224 Thu, 16 Feb 2006 23:57:58 +0000 http://www.megginson.com/blogs/quoderat/?p=51#comment-224 even if I love php, I feel the lack of what cpan is for perl and rails is now for ruby, i think the php comunity’s real problem is that pear is not as good as php itself. too concerned of beeing perfectly designed… none uses it.

]]>
By: mroq https://quoderat.megginson.com/2005/06/11/rails-vs-php-mvc-or-view-centric/#comment-223 Tue, 14 Feb 2006 15:09:13 +0000 http://www.megginson.com/blogs/quoderat/?p=51#comment-223 rotfl,

cakephp vs. ruby on rails -> GOOD!

PHP vs. ruby on rails -> BAD!

]]>
By: Mohamed Elyas https://quoderat.megginson.com/2005/06/11/rails-vs-php-mvc-or-view-centric/#comment-222 Sat, 11 Feb 2006 14:25:23 +0000 http://www.megginson.com/blogs/quoderat/?p=51#comment-222 what is better ??
this type of questions are not applicable in the software field , because the best is the best for that particular problem as an example my company is devoloping e-learning materials and tools and we devoloped all the projects using php becase
1- the all team knew it very well.
2- whe were dealing the database in a very low level.
3- we dealed with multimedia files in very low level format , creating swf,image and audio files from php.

after we produced our application we needed to have all those tools as a cd based applcation so we crafted apache,mysql,php together and with some addiotional exe’s whalllla we had a custom version that works in a cd.

could this be done in ruby ??? i doubt but it still possibel.
does that make ruby bad ??? of course no but in this particular situation i think it would be a bad choice

]]>
By: Rinie https://quoderat.megginson.com/2005/06/11/rails-vs-php-mvc-or-view-centric/#comment-221 Fri, 27 Jan 2006 15:40:32 +0000 http://www.megginson.com/blogs/quoderat/?p=51#comment-221 PHP feels good by accepting that you don’t have to hide the SQL.
For persistent ‘objects’ I like visible SQL (queries and views for your abstractions). PHP is scalable as long as your SQL is scalable.

In Java I like iBatis instead of Hibernate.
Comes down to ‘I use PHP/Ruby/Java whatever to acces my SQL data’ versus ‘I use SQL to store my PHP/Ruby/Java objects’.
What I find lacking in object oriented programming are (SQL) views. In SQL I can combine several tables/queries into one view and then treat that view as the basis for other queries.

]]>
By: klaus https://quoderat.megginson.com/2005/06/11/rails-vs-php-mvc-or-view-centric/#comment-220 Thu, 19 Jan 2006 10:09:52 +0000 http://www.megginson.com/blogs/quoderat/?p=51#comment-220 Please consider that if only requirement to WEB server is to publish XML then what is the position of Spring or Structs os Rails?

In my point of view, PHP is ok, mod_python is ok, snakelets is ok, servlet is ok. JEE or Rails may be good but useless. Everything for build page is XSLT or AJAX which runs within browser.

]]>
By: fabio https://quoderat.megginson.com/2005/06/11/rails-vs-php-mvc-or-view-centric/#comment-219 Sat, 31 Dec 2005 15:03:39 +0000 http://www.megginson.com/blogs/quoderat/?p=51#comment-219 You may consider http://www.achievo.org is a RAD in PHP, in few line you can code a CRUD application. They started in 2000 and there is a version 5.5.3 of their framework ready for download.

]]>
By: SitePoint Blogs » MVC and web apps: oil and water https://quoderat.megginson.com/2005/06/11/rails-vs-php-mvc-or-view-centric/#comment-218 Thu, 22 Dec 2005 11:38:43 +0000 http://www.megginson.com/blogs/quoderat/?p=51#comment-218 […] This might just mean finding smarter ways to write view centric code, emphasizing DRY while avoiding spaghetti—consider the “article.php” in this URL. […]

]]>
By: sosa https://quoderat.megginson.com/2005/06/11/rails-vs-php-mvc-or-view-centric/#comment-217 Tue, 22 Nov 2005 06:33:47 +0000 http://www.megginson.com/blogs/quoderat/?p=51#comment-217 You should really, really try CakePHP (www.cakephp.org) it has all of the advantages of PHP, many advantages from Rails and a few little more things that make life easier.

]]>
By: Dean https://quoderat.megginson.com/2005/06/11/rails-vs-php-mvc-or-view-centric/#comment-216 Sun, 20 Nov 2005 05:13:49 +0000 http://www.megginson.com/blogs/quoderat/?p=51#comment-216 In reference to the original post, I find it ironic that a Java developer is complaining about the “deep layering” of Rails apps. Java, and all its Three Letter Acronyms (TLAs), have become the essence of superflous complexity. Ruby-on-Rails, by contrast, is very lightweight.

]]>
By: SitePoint Blogs » Looking at Catalyst https://quoderat.megginson.com/2005/06/11/rails-vs-php-mvc-or-view-centric/#comment-215 Fri, 18 Nov 2005 22:32:51 +0000 http://www.megginson.com/blogs/quoderat/?p=51#comment-215 […] So for a long time have been avoiding anything MVC and sticking to page centric designs because they work and stuff get’s done. Side note: those that scream “spagetti” should evolve—with self discipline (yes—something that doesn’t usually scale to team development) you can write stuff that you can live with this way. […]

]]>
By: M Saleh EG [dotone] https://quoderat.megginson.com/2005/06/11/rails-vs-php-mvc-or-view-centric/#comment-214 Thu, 17 Nov 2005 23:04:48 +0000 http://www.megginson.com/blogs/quoderat/?p=51#comment-214 Eventhough I haven’t used Ruby on Rails, I have seen their promotion video. Been on PHP boat since 2002, and I must say It’s just up to you! It’s OO now with PHP5 and it has matured to the level that it’s become enterprise level. Check Zend.com the official & commercial back of PHP. Lately IBM, Oracle, and others been partnering with Zend for PHP integration. SAP is in the game too! And with introduction of Zend Platform there is no excuse why not to use PHP.

PHP5 has all that you’re used on in Java, XML libraries, unicode, and many MVC frameworks that are available and waiting for you to grab them such as Mojavi, ZNF, Prado, BlueShoes, etc…

And if you’re worried about IDE or deployment tools, then check out Zend Studio at Zend.com

One very important point about PHP is that it’s joint the big players, we’ve got PHP certification now!

To conclude, use what makes sense for your job, project, and prefrence. I beleive you could never compare apples & oranges! Rails is a framework while PHP is a language and a platform.

]]>