My rails life seems to be starting out similar to my php life. It all began with an internal application for my dad. He has a music instrument sales, rental and repair business and he initially did everything on paper to keep track of customers, instruments and billing. I took it upon myself to create a web based application for him to keep track of all of it. It was my first php application written in php3 and run on a small server here in the house. It is amazing that it is still running and he still uses it.
That was 7 years ago and looking back at the code now I cringe. Sometime in between there and now it was upgraded to php4 and it looks like that was a hack of a job. But since then my php life has expanded to the point of it no longer being a challenge. So what else would be a better way to start my Rails life than to revisit my dads billing application and recreate it with rails. Of course fixing all the issues with the current billing process and adding some additional features to make life easier.
To the right is a screen shot of the current functionality and design. I am currently just working on getting the layout squared away so functionality can be added without having to stop and think how it should look. So far only 56 lines of code have been written and about 4 hours have been spent on the project, 2.5 being spent coming up with a design and 1 hour spent implementing and tweaking it. So far rails has been a dream come true.
Coming from php which is mainly mirrored from C++ I have always been use to the long hand conditionals. One thing that rails offers is the “unless” command. Compacting an if statement into one line that can be read without much difficulty. Here is an example of its use, probably not the most efficient but I am sure it will get tweaked once more come into play.
Web Development is a passion and like all passions they can become stale after a while unless you continuously look for a new technique to keep it fresh. I have become officially bored with PHP, dont get me wrong it is a great language but after developing in it for over 8 years you start to look for something new and exciting to get that same rush that you get when you learn and implement some new functionality.
Of course PHPSimpl has been a good release for me, it has really given me an outlet to expand my knowledge and take pride in building something that benefits more than just my development life. I am not stopping development on PHPSimpl, actually I think my additions and bug fixes will get increasingly quicker and better. I cannot leave PHP behind because the web is currently pretty much glued together with it.
I have fallen in love with Rails. After using a ton of PHP frameworks none of them really seamed to be straightforward and seamless. Rails on the other hand is not as get up and go as php it has all the requirements I have been looking for in a framework. Some of the excitement is from getting to learn a new language and the structure of a Rails app just make sense.
My dream has come true, No More Slop! PHP is like a blank piece of paper and a pencil, the graphite stays on the paper but it can go in any direction at any time. Its great for when you are feeling creative but horrible when you have to read someone else’s paper, it might as well be in a different language. I have always tried to create some structure from PHPSimpl since I lead a team of three developers and we maintain 160+ sites.
I played around with Rails about 9 months ago while reading Agile Development with Rails and it really got me thinking about what else is out there. At that time I didn’t take it too serious since I was already deep in a redevelopment which needed it badly. After a few months of PHP development on a large application that was not mine initially I was burned out. This past week I picked up Build Your Own Ruby on Rails Web Applications and read the whole thing, wow 400 pages I know… but the book was well written and went through the basics all the way to deployment. I recommend it for any developer looking for a change, even if you don’t start developing in Rails it gives great insite on how the web should be and can be applied to any language. Agile Development with Rails is a little more intence and is a definite follow up read.
My Current Rails Envy:
MVC with a real structured generator
Database Migrations
Templating engine built in
Testing built in
Plugins
One line Scaffold for those quick apps
Fixtures
Simplicity of WEBrick
Logging like a mad man
I am in the process of changing to a more Rails friendly host and I will most certainly be writing my Rails entries. Its like starting my web development life all over again, its refreshing.