Ruby on Rails

The Reg sits down with David Heinemeier Hansson

Internet Security Threat Report 2014

Ruby on Rails is an open-source application framework which has won praise for its elegance and high productivity. Its creator, David Heinemeier Hansson of 37signals, was in London for the Carson conference on the Future of Web Apps.

So what’s so good about Rails? David Heinemeier HanssonI’ve billed Rails in the past as PHP meets Java. You get the clean, structured approach from J2EE and Java, but at the same time you get the quick, short feedback loop, instant results from PHP. We have a lot of people coming from J2EE because it’s just too complex, they can’t get anything done. Then we have a ton of people coming from PHP because they’re realising, it's simply too unstructured. I can’t figure out my code after I’ve written it, I have decreasing productivity over time. Getting those two factions together is the big goal of what we’re doing with Rails.

And why Ruby?

Ruby is a language unlike any other I’ve tried. Matz, the Japanese creator of Ruby, wanted to create a programming language that was optimised for programmer happiness, instead of being optimised for machines. So instead of being a slave to the compiler you’re making the compiler a slave to you. I tried it out for a week and really liked it, and got something done, and within a month there was just no way I would ever go back to a language like PHP or Java.

A key feature of Ruby is its dynamic typing, in contrast to the static typing of C/C++ or Java. If you give up the safety of static typing, then is a rigorous testing methodology necessary in compensation?

That’s the wonderful thing that’s been working out so well for dynamic languages like Ruby and Python and the others. We’ve had this resurgence of programmer-driven tests. If you have no tests, then static typing gives you something. I don’t agree that it gives you very much, because it’s usually not compile errors but the logic of your program that is wrong. Unit testing and functional testing catch all types of errors, including logic errors. In a world where testing is considered a good, I think static typing is like a ball and a chain.

Ruby on Rails may be flavour of the year, but is it secure? Will it scale?

Security vulnerabilities are logic errors. You can have just as many security violations in a Java program or a Perl program or something else.

So would he recommend Rails for a highly secure application like online banking?

Definitely. But what gets used is not necessarily decided on technical excellence but more: ‘I wouldn’t get fired for using Java.’ It’s a political concern more than it’s a technical concern. As for scalability, we didn't try to solve that problem with Rails, because it is already solved. How is Yahoo scaling? They’re doing billions of page views a day, and they’re using PHP. The thing about PHP, Perl, Python and Ruby is that they can all be architected in the same manner, which is this notion of not having session state in the application layer. You push that down to the database, or you push it down to a shared memory store. That gives you the freedom of adding new application servers at will. You have load balancers, then you have web servers, then you have load balancers, then you have application servers. Rails is intensely scalable in that fashion.

Security for virtualized datacentres

More from The Register

next story
Microsoft WINDOWS 10: Seven ATE Nine. Or Eight did really
Windows NEIN skipped, tech preview due out on Wednesday
Business is back, baby! Hasta la VISTA, Win 8... Oh, yeah, Windows 9
Forget touchscreen millennials, Microsoft goes for mouse crowd
Apple: SO sorry for the iOS 8.0.1 UPDATE BUNGLE HORROR
Apple kills 'upgrade'. Hey, Microsoft. You sure you want to be like these guys?
ARM gives Internet of Things a piece of its mind – the Cortex-M7
32-bit core packs some DSP for VIP IoT CPU LOL
Microsoft on the Threshold of a new name for Windows next week
Rebranded OS reportedly set to be flung open by Redmond
Lotus Notes inventor Ozzie invents app to talk to people on your phone
Imagine that. Startup floats with voice collab app for Win iPhone
'Google is NOT the gatekeeper to the web, as some claim'
Plus: 'Pretty sure iOS 8.0.2 will just turn the iPhone into a fax machine'
prev story


Forging a new future with identity relationship management
Learn about ForgeRock's next generation IRM platform and how it is designed to empower CEOS's and enterprises to engage with consumers.
Storage capacity and performance optimization at Mizuno USA
Mizuno USA turn to Tegile storage technology to solve both their SAN and backup issues.
The next step in data security
With recent increased privacy concerns and computers becoming more powerful, the chance of hackers being able to crack smaller-sized RSA keys increases.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.
A strategic approach to identity relationship management
ForgeRock commissioned Forrester to evaluate companies’ IAM practices and requirements when it comes to customer-facing scenarios versus employee-facing ones.