News | About | Projects | Contact
Browsing posts tagged with: Ruby on Rails
Mash up's for mobile devices
Some weeks ago I build my first mash up. A mash up is a site which takes existing data and services from websites and uses them in a new way. I implemented two things. First I built a mobile view of the RSS feed of the SAP Developer Network which can be found here. Second I implemented a small search engine for the SAP Developer Network which can be found here. Again, it is optimized for mobile devices. The idea for both sites came from Matt Harding whom I met at the SAP Community Day in Melbourne.

SDN Mash Up

I learned two things by building these sites. First, Ruby on Rails is still an incredible framework for building data driven websites even if you use web services instead of a database backend. I was able to build both sites in a day. In the end testing and releasing them took way more time. Second, Yahoo's REST search API is highly recommendable. It is interesting to see that Yahoo basically gives their search away for free and Google does not even have such a product anymore (they stopped offering their SOAP based search API). Competition is a great thing to have.

It was also interesting to design an interface especially for mobile devices. The constraints imposed by the screen sizes can be quite refreshing.

I wrote two articles about the site on SDN, too. You can find them here and here.
Now 100% faster
In January I launched this site. It was running horrible slow because I never found the time to get into the whole fastcgi thing. This basically means that every time somebody accessed the site a new CGI process was created. Not really fast...

Fortunately my hosting service is using mongrel for rails hosting, now. Today I made the switch and hopefully you are already feeling the difference. The mongrel process was very easy to setup and so far I am really impressed by the performance boost.

But wait there is more. I also moved my RSS feed over to Feedburner. Feedburner allows you to gather some statistics about your feed and should be more reliable. Do not worry the old address will automatically redirect you to the new one.

On a side note did you now that the domain http://thegreatest.com is owned by a janitorial service company. Strange world...
Spam...
I launched the new version of this site at the end of January. Everything was going fine but some weeks ago I received my first comment spam. At first I only deleted it but of course the problem got worse. There are various solutions for fighting spam. The most popular one is the usage of so called Captchas. They work well but annoy most of the users. Over at Sam Ruby's weblog I learned about another solution. There is a service provider called akismet. You send the new comments to them and they will tell you whether it is spam or not. The webservice is easy to use and there is already a ruby wrapper class available. I nearly implemented akismet but in the last minute decided to try something else at first.

The bots who are responsible for the comment spam usually are not able to use javascript for posting. My comment system already uses Ajax so I decided to limit posting to Ajax requests. In other words you have to enable javascript if you want to post a comment. Lets see if this will solve the problem. The code for checking the request type is easy:

#Ajax request?
if request.xhr?
#add comment
else
#Hey javascript required
end
Railsconf keynotes
Two railsconf keynotes were published here. I truly enjoyed the one from Martin Fowler. He gives a nice overview about what he finds interesting in software development and comments on lots of programming languages and technologies. The whole talk is more about the future of software development than rails. So even if you are not interested in rails give it a try.
RailsConf and german perfectionism
It's RailsConf time and of course people started blogging about it. I love this quote from Chris McAvoy:

"The Rails Optimization session was great. It solidifies my long held belief that if you're going to have an optimization talk, try and get a German to do it. There's something about benchmarking that begs to be explained in a German accent. Stefan Kaes runs http://railsexpress.de, and is clearly into benchmarking and streamlining software. I have three pages of notes from his talk. Stefan was very critical (in a good way) of Rails, and is clearly committed to making big performance improvements."

Yep, this sounds like a German developer :)