The title of this post is a bit misleading. I have to say that we are still a bit far from starting real implementation of our ideas. However, we're advanced enough to start thinking about architecture, load balance, distributed services, testing, best practices, other quality assurance topics and so on.
So, we've spent the most part of this week analyzing and researching languages, frameworks that will help us get up and running while at the same time providing us with some stability, a good components library, possibility of properly documenting our work and also while fitting into the whole Web 2.0, Ajax and all those other "kewl things" out there.
Let's get into the substance of the post.
PHP
Eventually, we started by evaluating a technology we are familiar with and with which we have done a good amount of work over the past few years. PHP is a great scripting language. I have personally been using it for almost 5 years and it's been a fantastic experience. It had enabled me to develop web applications that I wouldn't have dreamed of if it weren't for it. Besides that, I remember when I started with PHP. It took me about 5 working days to build a complete content management with it. At the time I didn't know the language at all but this shows that the learning curve is almost non-existent. Finally, after such a long experience with PHP and many things that I've seen colleagues do with it and things that I've accomplished with it, I can say that it's been the most flexible language I ever got the chance to play with. However PHP has many downside:
- It is a hack language.
- OOP support is very poor and totally hacked into the language. This makes OOP implementation dirty and non-consistent.
- The language evolves too fast, is not always backward compatible and the amount of keyboard hammering required to get specific things done is massive!
- Since PHP implementations do not seem to be stable at the moment and for the foreseeable future, it will be a mistake to build a company and its products on such technology.
Java
PHP has been a fantastic adventure. However, when I first met Java, I thought: oh my God! Java turned out to be the language of choice for most of my programming for the past 2 years. I absolutely loved it. The main reasons were as follows:
- Structured language.
- OOP support is fantastic: basically designs and architectures could be transformed into code without any modification whatsoever.
- It's a language that enforces documentation. It supports UML and all those nifty things that we software engineers love.
- Testing is easy and there is a good and mature framework available to do just that.
- Developing for the web in Java is awesome. With the right architecture, software can be developed and plugged into any type of interface, whether it be pure HTML (JSPs), or RCP interfaces or even better Ajax-enabled interface. The huge advantage here is that, if your users don't like your interface, you can iteratively remodel it with a fast turn over and keep on building on it till it appeals to your users and all this without the slightest modification to application source code (business, logic, database, model, whatever it is called these days): what a beauty!
- Finally programming in Java is an absolute pleasure: large amount of IDEs and Software Engineering environments available. Some of them have to be paid for, most of them are totally free and increase productivity quite a notch.
However, despite all those advantages, Java can turn out to be quite difficult to work with as the application grows. I also had major concerns about performance in general and how the application will handle itself if we had to serve a good 7 to 10 million pages a month/a week/a day? And finally, if the startup grows and we had to recruit more programmers, java skills aren't as popular as one may think. Actually it seems that many people tend to stay away from it.
So, here's the situation: we had PHP and Java. We needed to pick one of them and that hadn't been easy. After further analysis, we realized that what we needed was a platform that had the best of both worlds while minimizing on their weaknesses. So we dug a bit further and the story goes as follows:
Groovy
groovy is a combination of what we needed: as flexible as PHP and with the embedded maturity of Java. More details on Groovy here. It seemed totally adequate and well maybe still is. We considered it for a while and were very excited about it. It had support for everything and I mean everything we needed. However we didn't take it further because of the following reason:
- Groovy is extremely young. Community support is not big enough and almost no one knows about it. Eventually, it might grow and become very popular the way Ajax is today. Till then, it would be a risky decision to base our code on a language or technology which is still immature and for which we have no idea how long it will be around.
RoR or Ruby on Rails
RoR? Sure why not? I bet most of the readers were already asking themselves why I haven't touched on the topic yet. Well we did have a look at RoR. Even better, we took it for a full 1-day test drive. Writing an application with it and understanding how things work in there. Here's what we have to say:
- Although we might get criticized and flamed for saying this: there's too much magic going on in RoR. Of course it sounds totally stupid to say this when most "innovative and hot" startups seems to be using it and when it increases productivity so much. However, we're engineers (albeit still undegrads in Uni) and even better we're pure computer animals, total geeks and this makes us do one thing: we don't like to relinquish control of our code to some scripts and background magic.
- Due to the "magic" discussed earlier, it is difficult to customize things. The moment we start deviating from what the "framework" wants us to do, we will run into serious problems that will turn to be quite counter-productive.
- RoR can support a set of simplified data models but from what we've seen, the moment the data models turns out to be very complex, RoR performs quite badly.
- We're looking into building a product that can be used by anyone in any language. This means that we need full internationalization (localization?) support as well as a few other things in which RoR or should I say Ruby fails.
All in all, unless we writing an application as simple as a Blog or a ToDo list or whatever, RoR has been out of our choice list.
So here we are, back at level 0 of the choice game. The digging continued and here's what we've come up with at last.
Python
As mentioned earlier, we need PHP flexibility and power, Java's structure and maturity and an overall clean language. Although we didn't like RoR, we sort of liked Ruby. So we decided to look into something that had the best of all three worlds to offer and that's when Python came up.
- Python is structured.
- Python magnificiently supports OOP and the core of Python is OOP. No hacks here as in PHP, no Java primitive data types; just real pure OOP.
- Python will allow us to port our design and architecture straight into code: Java benefit!
- Python supports shell scripting (running background processes on the web server? Absolutely lekker!)
- With mod_python, we can develop for the web without a problem.
- Python just like PHP does not force developers into using specific frameworks although there is a bunch of them out there: this is good. I don't really trust frameworks or don't like being constrained by them.
- The Python learning curve is non-exisitent. Python can be picked up in a matter of a couple of hours past midgniht and a cup of coffee. ;-)
Anyways, we wanted to put this out there, let you guys comment on it and give us your opinion and maybe if you've had experienced this dilemna before, let us know how you solved it, what your criteria were for the final selection, etc...
Regards.
No comments:
Post a Comment