Skip to navigation
Real World Computing

On the Rails

Posted on 26 Oct 2006 at 12:04

Simon Brock and Ian Wrigley take a look at Ruby on Rails and discuss its strengths, weaknesses, and how to best deploy it on your servers

The other big issue with Rails is that it's what its creator calls "opinionated software". In other words, it does things the way David Heinemeier Hansson believes they should be done and if you want to do them any other way it might be difficult to implement. For example, DHH appears not to believe in compound primary keys for database tables so Rails doesn't really support them. This isn't a major problem if you're creating a web application from scratch, since you can take it into account when developing your database schema, but if you're stuck with legacy data from some other system and have a database schema already in place it can lead to significant pain.

Speaking of databases, Rails works with MySQL, PostgreSQL, Microsoft SQL Server, Oracle, SQLite, DB2, Firebird and SybaseASA. However, there's as yet no ODBC adaptor, and the SQL Server adaptor requires WinOLE, which means it will only run on Windows systems, so you're more restricted in your choice of back-end database servers than you would be with some other development environments (although the vast majority of Rails developers seem to use MySQL anyway).

Finally, Rails is still undergoing some growing pains. Features that were heartily endorsed by the developers in earlier versions are now deprecated, which could potentially lead to problems in the future. The way news of a recent security hole and the fix for it were handled left something to be desired, suggesting that perhaps the developers still have some things to figure out regarding how to communicate important information to users. Still, despite all of the above, Rails is an excellent development framework and future releases can only solidify it as a strong, viable option for web development.

Version control

Subversion is a version control system that's rapidly replacing the ageing CVS, especially for open-source projects. We'll be talking much more about Subversion in a future issue, but we wanted to give at least a taster for those people who haven't yet come across it. The idea behind a version control system is that multiple versions of files are retained, instead of overwriting the current version with a new one whenever it's changed. That way you can roll back changes if you've introduced bugs, or if you decide that your new way of doing things just isn't working out. Many web developers use Subversion, even for storing things like graphics, so that absolutely any change to a website can be undone.

The idea is that all your data is stored in a repository from which you can check out a directory, make whatever changes you need and then check it back in - known as "committing" your changes. At any time, you can access previous versions of your project, and revert back to them if necessary.

Subversion is normally run on a server, which gives access to the repository via a remote client machine. Access is either via SVN's command-line interface or a graphical client - there are graphical clients available for both Mac and Windows, as well as for Unix/Linux boxes. However, it's perfectly possible to run Subversion locally on your own machine if you have a need for maintaining different versions of files and don't always have access to an internet connection, or if you don't have a server on which you can install Subversion. Ian, for example, runs a Subversion server on the laptop that acts as his main machine, so that he can work on projects even while he's flying across the country.

The documentation on the Subversion website is astonishingly detailed, covering installation and use in almost pathological detail - any question you have is almost certain to be answered. There are also several books available on the system, including one from O'Reilly, which is also available free in PDF or HTML format from the authors' website at svnbook.red-bean.com

1 2 3 4
Subscribe to PC Pro magazine. We'll give you 3 issues for £1 plus a free gift - click here
Be the first to comment this article

You need to Login or Register to comment.

(optional)

advertisement

Most Commented Real World Articles
Latest Real World Computing
Latest Blog Posts Subscribe to our RSS Feeds
Latest News Stories Subscribe to our RSS Feeds
Latest ReviewsSubscribe to our RSS Feeds

advertisement

Sponsored Links
 
SEARCH
Loading
WEB ID
SIGN UP

Your email:

Your password:

remember me

advertisement


Hitwise Top 10 Website 2010
 
 

PCPro-Computing in the Real World Printed from www.pcpro.co.uk

Register to receive our regular email newsletter at http://www.pcpro.co.uk/registration.

The newsletter contains links to our latest PC news, product reviews, features and how-to guides, plus special offers and competitions.