2008. 01. 30, szerda keltezéssel 13.01-kor Greg Donald ezt írta: > On Jan 30, 2008 12:15 PM, Zoltán Németh <znemeth@xxxxxxxxxxxxxx> wrote: > > > It's opinionated software and is certainly not for everyone. > > > > ok it's not for everyone, certainly not for me. but what is it from your > > point of view that makes it a 'more interesting advance'? > > 1) Test driven development is built-in, and not just unit tests, but > functional tests and integration tests too. In addition there's > several plugins that extend your tests into realms you may not have > thought of. There's Rcov which will tell you what code you haven't > written test for. I know, you don't write tests. It's perfectly > natural to not write tests when your framework doesn't support them > out of the box. nowadays I write tests, as I use symfony and it support tests. I also use Selenium tests for functional testing. > > 2) Prototype and script.aculo.us are built-in. Not just included in > the download but fully integrated into the models. > > Symphony tried to pull off the same thing with it's framework but it's > fairly messy in my opinion. > > update_element_function('foo', array( > 'content' => "New HTML", > )); > > Compared to the Rails equivalent: > > page.replace_html 'foo', :html => 'New HTML' > > The other Javascript helpers like observers for example are similarly > very small. well, symfony has prototype and script.aculo.us built-in. some of the helper functions may be clumsy a bit, but the ones I use most of the time (link_to_remote, remote_function and the other ajax stuff) are perfect for what they do > > 3) Database migrations that allow for versioned SQL. I can roll out > new sql or roll back my broken sql with a single command. > > rake db:migrate VERISON=42 > > I can rebuild my entire database from scratch: > > rake db:migrate VERISON=0; rake db:migrate > > The migrations are Ruby code that are very tight in syntax: > > class CreateSessions < ActiveRecord::Migration > > def self.up > create_table :sessions do |t| > t.string :session_id, :null => false > t.datetime :updated_at, :null => false > t.text :data > end > add_index :sessions, :session_id > add_index :sessions, :updated_at > end > > def self.down > drop_table :sessions > end > > end that sounds good, I wish I would have it in symfony ;) > > 4) Capistrano which is fully integrated with Subversion (and soon Git > I heard) allows me to roll out a versioned copy of my application with > a single command: > > cap deploy > > And then I can also rollback just as easily in case of an error: > > cap rollback we use Git here, and for me a 'git clone' is perfect > > 5) Ruby on Rails has a built-in plugin architecture for adding vendor > code. I can add new functionality to my app as easy as > > gem install acts_as_taggable > > or > > gem install pagination > > It's a bit like Perl's CPAN if you're familiar. > > There are also plugins, engines, and components depending on the level > of integration you want the vendor code to have. you can install plugins to symfony as well > > 6) Model validations extend into the view. No re-mapping of variables > like with Smarty or some others I've tried. > 7) The REST architecture is built-in to Rails. No more SOAP, unless > you want it of course. No one's using it but it's there. > if I need it I can make it with symfony. if I don't need it I don't want it there to be built in... and, besides this, for smaller projects no damn framework would be needed ;) in that case I'm sure php is better. greets Zoltán Németh > > > -- > Greg Donald > http://destiney.com/ > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php