Starting Your Own Online Business Video – DHH

This video was originally recorded in 2008 and I watched it way back when it was first done but I think it is a very good presentation that pushes through the shit and gets down to the basics – which is to start a business that provides a product that is useful and you can actually charge for – yeah charge for! In the web world that may seem crazy but it’s what myself and Carl have been banging on about forever now it would seem. People will and should pay for something that is useful for them.

Anyway, find the time to watch this presentation from the Startup School 08 by David Heinemeier Hanson. For those that don’t know him he created the Rails framework and has some very successful products (basecamp) over at 37Signals. It is also quite a funny presentation.

Java Rocks (and Sucks)

I have been helping out a friend by creating some software for a business that he is starting. Once again I have been going through the process of choosing a suitable platform but, to be honest I wish I hadn’t bothered now. I had been trying to convince myself to use Java because I love it – mainly because it is ace, has the potential to rock and because I know it best (perhaps the last one is more of an objective reason). So why is it that I have not yet used it for any of my own web projects? Developing Java web apps? Because I think it is just too much hassle to get going. There is so much stuff to setup even before you actually start coding it puts me off every time. I want to be able to get going immediately with what’s in my head. The last time I gave Java a chance I got that bored after having set everything up and learning what everything was that I gave up with the project pretty much soon after. I just keep wishing that someone would start a Java framework/platform from the ground up that is not based on JEE (well perhaps just some of the best bits). There are no reasons why Java could not have a framework that would trample all over Rails/Django or in the very least be as enjoyable.

It is worth noting though that if I were writing software that was ultimately critical (such as banking software etc) I would not use anything else (.Net would be suitable but it would take a while for me to get to the same level of experience) because this is where all that configuration and power makes sense and allows applications to scale easily, allowing disparate groups from different locations to easily work on the software. The sheer amount of professional tools available for Java projects is also amazing and I have gotten so use to some of them that when writing in another language I miss them. Eclipse is a god send (Netbeans is not too shabby either) and I miss it greatly when working in other languages. This even includes when an eclipse plugin is available to use. They are just never as polished as the standard Java editor, even though a lot of them are very good (so don’t take this as some sort of insult).

Let’s face it, in reality most web applications that you work on these days are relatively simple in nature. Usually you are taking information -> processing -> displaying in some simple fashion. For this kind of use why would you need to be running a JEE server + Spring + Framework(struts et al) + ….. ? Let’s face it, most companies ditch the full stack servers and go with a plain servlet engine (tomcat). For most projects it always seems like an overkill. I would prefer to see a very simple (but production capable) web server that is capable of running a variety of simple but powerful frameworks that adhere to some standard (like WSGI on python) all written in Java. I think this would increase the use of Java in the web space by a huge amount. Companies that trust Java would choose it over buzz word frameworks any day of the week and for good reason as well.

By the way, all this moaning does not mean that I am saying that any of the other languages or frameworks are rubbish. Quite contrary actually because they have managed to fill this gap that Java could have so easily filled years ago. In the end I decided to use RoR for my friends business just because I could start work on it immediately and show him results. Everyone seems happy with that. For the kind of app it is, it will never go crazy and need to scale like your facebook or twitter so that’s one less thing to worry about. The application has already been designed so that nothing is shared from the beginning allowing requests to be forwarded to any server providing enough scale for what it will be used for. Using RoR (would be the same with Django) I have managed to get the main application skeleton (different users, authentication, signups with verification/states/file upload, admin sections and much more) up and running within a week of working in my spare time. The last time I tried using Java it took this long just to get up and running.

Some of you might be shouting that it could be that I am lacking experience developing Java web apps, and you would be both right and wrong. I develop software for Java web applications all day long but, they have already been setup and I just add new functionality and fix bugs etc. But why is it that my most experience is with Java but I find it tiresome developing web apps for it? Yet I had no Ruby/Python experience at the time but found the whole experience developing with Rails/Django a much easier and enjoyable experience??

So what does all this mean?? Well if anybody is perhaps interested in rectifying this situation and working on a Java open source web server and framework then leave a comment expressing your interest. If we can get enough people interested (I am guessing about 3-4 people to start with) we might as well go ahead and do it ourselves. It would be interesting, we will learn loads and it will finally shut me up moaning about Java frameworks all the time.

Rails Scales (Or Does it?)

Having developed with Rails for a little bit now I have been eager to find out whether Rails in its current 2+ form will actually scale after having heard so much bad press from different areas. I thought that it might be interesting to jot down in one place my findings. One thing that I would like to say first though is that I am not a great believer in reinventing the wheel. I find that I lot of things that already work fine are being “railsified” just for the sake of it, rather than for any particular reason.

1. Speed and Scalability

Firstly Ruby is slower than some of the other popular languages. A fact not entirely missing in the world, but as most things it is being worked on as we speak. I remember not to long ago people bitching about the speed of Java, but over the many years it’s been out it has managed to get faster with each new version. A very good article is “On Ruby on Rails Criticism” is a very good article and should be read. He has a very good discussion based on how communities should embrace honest criticism, allowing them to focus on what should be corrected. Read more »

Merb Rules

Well I came across a “problem” the other day in Rails. It turns out that Rails is not exactly thread safe at the CGI level. What this really means is that it waits for a file upload to finish before another can happen, which for a busy file uploading site is not actually good. But, since I have read that this is not as big of a deal as you would have thought if using Mongrel because it magically handles multithreading requests and only offloads the request to Rails once it has finished, meaning that it is only blocked whilst being mime parsed etc, which is not that bad. But whilst thinking oh shit I came across Merb, which is another Ruby framework that is really cool and extremely lightweight meaning its nice and fast. It also allows you to pick from a selection of ORM providers such as Sequel, Datamapper and of course ActiveRecord. The main advantage is that it has its own CGI handlers and effectively handles multiple file uploads concurrently which is big benefit.

This does not mean that I am now going to switch over to Merb – infact not a chance. Rails is now very very good at what it does and has a million plugins that are very useful (most can also be used in Merb) and it is very useful for the actual application side of the system. It has so many useful features that its hard to explain them all. But it does mean that I can use Merb for all file handling activities. Its fast and allows me to handle multiple files effectively. In fact it was my original plan that we would someday move file handling off the main app to another server just so that the system can run the application so much faster. As it turns out, this is what some very heavy traffic sites have begun to do which means the idea isn’t totally crazy. You might as well let things do what they are good at hadn’t you? :) Another good thing is that we can share code between the Rails and Merbs apps. Like I said, Merb lets you use ActiveRecord which means all the models are available in both apps without any code duplication so it makes sense.