Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror

Comment Play framework is the way... (Score 2, Interesting) 253

Rails? Been there. Grails? Done that. Both are decent. Rails is very good, but the abuse of open classes gets old quickly. Grails is ok, but it's really just a thin veneer over a complex mix of Java projects, and God help you if you run into any problems, because you'll be dealing with a stack trace that's 1000s of lines long, and you be troubleshooting these underlying complex java libs. For me, the play framework (http://www.playframework.org) is the best Rails-like approach on a Java platform. It stays very close to rails, so if you know rails learning it is easy. It's very pragmatic and very fast. It doesn't require a compile step to see your changes. It just works. Best of all, the code is clean and easy to troubleshoot. I suggest you check it out.

Comment Re:Err... (Score 3, Insightful) 279

Um....there's over 70 committers to PostgreSQL. And even the top 20 work for a wide range of companies. Buying them out would be virtually impossible. PostgreSQL is an open source database done right, both technically and politically. You MySQL apologists simply refuse to acknowledge that you hitched your wagon to the wrong horse, even when your horse may be put down soon.

Comment Re:the answer: it depends (Score 1) 469

(1) Schemas, entity-relationship diagrams, and queries tell me how an application works -- with Active Record this information is strewn across a whole bunch of files (especially in Rails);

Um...somehow, I seriously doubt your claim to have actually used RoR for anything substantial. If you had, you'd know that, while migrations allow you to define your schema it separate files (usefully so), these files are used to generate the file db/schema.rb, which contain the entire database definition in ruby syntax. If you wish to have the DDL, again, it's very very easy. Simple issue "rake db:structure:dump" from your project root. How difficult is that?

(2) Database-independence is a nice idea, but in reality, how often over the lifetime of your website will you migrate to a different database? Usually your database is chosen for you. Usually a switching databases involves coordinating with a lot of people who you'd usually rather not have to deal with -- those issues will take far more time and energy than differences between MySQL and Oracle;

Again, bullshit. I've heard this argument again and again, but we have many customers, each of which have their own preferred database. We typically develop and use PostgreSQL ourselves, but being able to offer MySQL, Oracle or MSSQL support to our customers, so that they can leverage existing resources, is invaluable. If you live in your own closed-wall little world, then perhaps you'll only ever use one database. Or, if you're developing a web app which will remain under your complete control. BUT, if you have paying customers and distribute your app to them, database independence becomes extremely important.

(3) a pretty common design pattern for web pages is to have a form that let's you fill in a few parameters (date, maybe geographical information) into a huge multi-table select statement -- you can do that in Active Record, but basically all you gain is a marginally fancier wrapper than you would have with DBI.

huge multi-table select statement versus sending objects messages? I know which I'd choose.

This entire discussion is pretty entertaining. As a developer of PHP since the later versions of 2, I can safely say from experience that it just is an AWFUL, hacked together language. Anything you develop ends up being hacked together as well (hacks are contagious). It works, sure, but as with all dirty hacks, you suffer pretty quickly. The hacks spread, the ugliness grows, and pretty soon you feel guilty even opening up the source and looking at the crap you've been encouraged to write.

Ruby on Rails has warts here and there, sure, but it does encourage you to write clean code. And, Ruby, more than Rails, gives you such immense flexibility that you find yourself having to unlearn bad habits you were forced to follow by PHP.

Trust me, PHP's days are numbered. Sure, it'll hang around like a bad rash for some years (even COBOL is still widely used), but only because the cost of migrating far outweighs the value in the legacy. Folks using PHP for greenfield applications today, when options like RoR, Grails, or even Django exist, should really check if their heads are on straight.

Slashdot Top Deals

Staff meeting in the conference room in %d minutes.

Working...