Over the last couple of weeks I decided to re-familiarize myself with the Ruby programming language. I was first introduced to it back in 2002-2003 at OOPSLA (or was it the Software Development Conference?) when I took a full day workshop with the Pragmatic Programmers, Dave Thomas and Andy Hunt.
Back then I loved the language, but decided not to focus on it since the support in the form of libraries just weren’t there like they were for Python at the time. I wrote a few programs in Ruby, but left it to the side and focused on Python.
Well, those days are over. When I started with Ruby, I decided to take a look at Ruby on Rails as well. Over the last couple of weeks all of my spare time has been focused on learning the Ruby language and this completely awesome framework, even at the expense of regular podcasts.
First off, I’m absolutely enamoured by the language. So much so that with Rails piled onto it I couldn’t imagine programming in any other language. For quite a while I’ve hated Java and the complexity that it brings to projects. There’s just too much work involved in doing Java development anymore.
Ruby combines complete object orientation with the flexibility of a scripting language. Some of the features it has baked into it, such as iterators and blocks make life so much easier.
Now pile Rails on top of it. Rails is an elegant MVC framework written in the Ruby Language by the folks over at 37 signals. These two things combined make for the perfect programming environment for web applications.
I’m still on the steep end of the learning curve. I’ve got the Programming Ruby : The Pragmatic Programmers’ Guide and Agile Web Development with Rails : A Pragmatic Guide (The Facets of Ruby Series) constantly at my side as I pull my hair out trying to learn all of this stuff.
But the cool thing is, even with my unfamiliarity with the language I’m still productive. If that isn’t the sign of a great development environment, I don’t know what is.
I’m working diligently to become proficient in the language. Rails is a little complex and I’m still struggling to learn all of the conventions. However, I think most of my programming moving forward will be with these tools. Its just a lot easier to spend time thinking about the problems you are trying to solve and being able to express them eloquently rather than struggling with the complexity and code/compile/run process baked into Java development.
{ 8 comments }
More than anything, you can actually have fun with scripting languages. Java’s too much like a job. Our son come home on Friday talking about how in “geek club” they were learning about C++. My first inclination (which I held back on) was to say “what are you learning that for when Python, PHP, and Ruby are out there?”.
What do I mean? Well, I can use the JVM as a host. The JVM gives me a well defined target for management as well as a large selection of APIs. On top of that I can define a number of different runtimes and host my applications there. Basically, I can create domain runtimes.
The runtime may contain a java class conforming to a rigorous interface. The runtime may contain a rules engine such as jess with the entire application living within jess. Or, the runtime can consists of scripts written in python, ruby, scheme, etc…
The magic is in the runtime and how it communicates with the outside world. Once you have that, you can write your applications without touching another line of java sans for a call to a java api that you make available through your runtime.
They’re getting really close to having rails running in jruby.
I wish RoR the best of luck though… I’m trying to start a new side project using Java/Spring/Hibernate and I’m shocked to find that getting started with these technologies is _more difficult_ than it was doing J2EE programming 5 years ago. wtf?! This is progress?
One of my systems uses Hibernate now and I really wish that it didn’t. It seems like a heavy handed answer to a question that no one asked.
I don’t do a lot of web development so I’m not sure what the answer is but I’m pretty sure it is not Java. Back end, sure… an http interface into a system, sure, front end, no way.
I agree with Tony’s scripting ideology. I think that front-ends need that flexibility and JSP just doesn’t cut it. I don’t want to spend a lot of time on configuration. I just want things to work.
“One of the attractive things about Rails (once you get used to it) is the conventions that are assumed around the application.” What I like about Rails is that it showcases the poswer of domain languages and domain environments. When you build up a language and a runtime to your problem you can express the programs that you write ontop of it in a much more concise way.
Of course, doing so limits you to the expressibility in the domain language that you have created. So you can get into the case where you are limited by your assumptions. You will see “My analysis is that if you play in the Rails sandbox, life is good. As soon as you need to break out and do something to distinguish your application from everyone else’s, you find yourself making compromise after compromise to keep from deRailing.” Nothing is perfect.
Comments on this entry are closed.