The A.C.M students chapter at NIT Trichy were kind enough to invite me to take an introductory class on web development for the first year M.C.A. students , php was the proposed language but I find that rather cumbersome so I asked them if I could instead teach sinatra.They were on board and I had the class today. I used reveal.js for the slides, feel free to download and use them as you so please. A student asked me why sinatra and not php. I have no intention to start a ruby vs php flame war for they have been fought many a times with no winner. I started web development with perl and cgi, learning server side development blew my mind. Php was the next obvious destination, it’s syntactic similarities to C made it really easy and it was a lot of fun in the beginning but a lot of pain for anything even slightly complex. The mixing together of code and presentation made maintenance and addition of new features exceptionally hard. I never really enjoyed working with php frameworks, my interest in web development dipped.
I wanted to learn a scripting language, narrowed my choice down to python and ruby. I chose ruby and obviously tried learning rails, it seemed so awesome; at least the screencasts that I watched made me think so, but sadly I just don’t get rails. It seems almost like magic, you type in a few commands and boom something happened that I never fully understood. I realized that rails is the ultimate framework but it wasn’t for me; not just yet.
I dabbed in some more ruby learned to write gems and got better with the fundamentals when I came across sinatra. It was perfect! It was like this was what I was looking for all this while and it appeared out of the blue. Sinatra does very few things when compared to rails and yet it does enough to make development pleasant and for me that is the most important factor. Programming should be fun, not a monotonous chore.
That’s my sinatra story, I plan to move my blog from wordpress to a small sinatra app. The only real concerns that I have is akismet that kills spam for me effortlessly. Share your sinatra stories or recommendations for alternatives to akismet in the comments. Please refrain from posting recommendations for php frameworks or anything that is on the lines of why php is better than ruby and vice-verse.