Building a Web Application: Technology Choices

In building a web application from scratch, you’ve got the flexibility to choose any language and platform to develop in. How do you choose? There are numerous factors that go into making that decision.

Cost

Cost is obviously a huge issue but cost can be measured in many ways. There’s the cost of the hardware and software; the cost of development; and the cost of maintenance. Software is the big differentiator here. Some are free while others cost thousands of dollars. The cost of development and maintenance are dependent on the resources that you acquire. In general, however, these costs will likely be consistent across the board.

Comfort

There’s the comfort factor. Everybody learns to develop in a particular language and may find it quicker and easier to develop in that instead of trying to pick up something new. A person who learned PHP first would be reluctant to develop a new project in Java.

Luckily, I’ve used a few languages and I’ll have the flexibility to choose which language I want to develop in. I’d like to develop this in Java, PHP or .Net.

Web Standards

The goal of this application is to have it be able to generate code that conforms to web standards. Certain technologies make this harder than others. This is the least important of the factors but is still something to consider.

Performance

This is where things matter. Users don’t care what language you developed in. They just want it to work. Performance of the language itself is only one facet of the issue. Performance of how it interacts with external technologies such as the file system or database is also extremely important. Doing an IF statement faster will be a moot point if database connectivity brings your server to your knees.

The Big Picture

Ultimately, you have to understand the big picture before you can make a decision on what technologies to use.

If this were an open source web application product then you’d likely want to select more popular technologies to garner interest. The more closed the environment, the less of an issue it becomes as to the language you develop in.

What do you feel would be the best direction to go in and why? Back up your argument with links to performance or security comparisons, if you got 'em!

Published October 22, 2004 · Updated September 17, 2005
Short URL: https://snook.ca/s/254

Conversation

13 Comments · RSS feed
Derek Featherstone said on October 23, 2004

If it was me, I'd be torn in a few different directions.

I'd choose PHP if I wanted it to be most likely to be used by a lot of people - it seems there are a lot of people that are able to easily work with PHP these days, so an open source PHP project would probably get some decent usage, and contributions.

I'm also working on a few contracts with one company and all of their software is Java based, so I'm doing a lot of JSP right now, and to be honest, I'm loving it...

However, it I was looking at it from purely a personal standpoint, I'd very seriously look at something like Ruby.

In every project I do (either for a client or for myself), I always add something new -- incorporate new techniques, new strategies, and in some cases new languages.

I've been aching to build something with Ruby, so that would likely be my choice, but it would be primarily for personal reasons.

Kevin said on October 23, 2004

If you're inspired by basecamp, work on a CMS using the same thing it's created on - ruby on rails.

It's picking up a lot of speed and popularity, and there's always a chatroom of 50 people help you figure things out. Lots of us have been talking about creating a rails CMS. Veen's suggestions are a great place to start...

MrRight said on October 26, 2004

Firefox plugin: There is only xul!

ak said on October 26, 2004

Ignore the technology. I've had to build many systems and the success of the project wasn't what technology you used, but how the features were implemented.

I have not had a client come to me and say "I want an ASP/SQL or PHP/MYSql website". They said they need something that can be easily updateable.

My choices are not based on technology, but on hosting companies. What are their pricing? Can I switch hosts? Do they have restrictions? Do I have time or should I repackage something I already have.

Look at Basecamp. They used Ruby. never heard of it outside of the academic circles until now.

Jonathan Snook said on October 26, 2004

I often run into technology requirements handed down from a client because they have an existing infrastructure that I'm building within -- but that's not really the issue at hand.

Determining a hosting company has a lot to do with the technology choices you make. Putting together an ASP/SQL solution for a client could end up costing them more in hosting costs since most ISP's charge more for Windows hosting. Likewise, Java isn't as popular of a hosting solution. That's why PHP/MySQL is so popular. It's darn cheap, there's a huge existing codebase to build off of, and a great pool of resources to work with.

Performance is still a key factor in all of this. You're right in that the user only cares if his or her site is easily updateable. But if their site is sluggish then they'll walk away with a negative impression of your application.

Hosting, as it turns out, isn't really a factor for me since I'll be looking at co-locating. Therefore I'd look to a technology that can help me develop faster. Basecamp likely chose Ruby for that very reason.

ak said on October 26, 2004

Based on your comments, my recommendation would be PHP/MySQL. It's a proven platform with a large knowledge/code/user base.

If you're already worried about performance, you may be getting ahead of yourself. Do you really have that many users that would take the down the system? Are you implementing something so involved that it takes a long time to process? Wouldn't you be worried about this after you've reached capacity?

If you are worried, the solution that I liked is publishing the website as HTML. The majority of the server load will come from people accessing the public web site. Maybe even have them on a dedicated web server?

If the performance issue is on the CMS application, I would look into creating pre-compiled pieces rather than using scripted languages.

Jonathan Snook said on October 26, 2004

Performance may seem like a moot point but the more users that can be managed off of one machine (both from a site user and site admin pov), the more I can maximize my hardware costs. Which in the end means more profit for me and cheaper pricing for the end user.

Allowing site users to generate static HTML is always an option but then if there's a template change, rebuilding 10,000 (or even 1,000) pages would take time.

Pre-compiling logic is a good idea. I'll also be looking into caching as a way to boost performance.

It may seem like I'm nitpicking on performance specifically and I'm not trying to. With the article, I really tried to touch on the fact that there can be multiple factors that go into a decision and that it's important to think the process through thoroughly before settling on a specific technology. Because once you begin programming, it'll simply be time wasted to switch in the middle.

Ray said on October 28, 2004

Just a suggestion, but if you're looking to use ASP/C# without the cost of a windows server or visual studio, be sure to take a look at the mono project. I find C# to be a great language, but can't stand visual studio. It seems that most of the problems people have with the .net platform (including the site you cited) stem from the VS IDE. If you have shell access to the server, it is actually quite simple to get mono compiling code right away.

If you end up with others working on the code, C# is nice in that it doesn't take much to get a java developer writing decent C#.

I look forward to reading the rest of this series, it's great being able to gain the insight into how another developer approaches such a project.

David McCreath said on October 28, 2004

I'm about to start a project for a non-profit and pondering this same question. The guy I'll be working with is an ace with C#/ASP.NET, and would have to learn PHP if we went that route. I know he's capable of it, but I really feel like I'd be doing the client a disservice if we didn't write the app in the language we know best.

One of our primary goals is the standards-compliance and we're actually hoping to use this side project as a test bed for our day jobs, which is an all-Microsoft environment.

ASP hosting seems to be getting more competitive, too. Webhost4life and Websecurestore both provide pretty reasonable packages in the $20/month range.

Jason Jystad said on October 31, 2004

In reference to Kevin's comment about Ruby I would like to add my endorsement.

I have been wanting to do a large project in Ruby myself, ever since I ran into the language the first time.

Blogware, made by Tucows, is also built completely in Ruby and it is targeted at the large scale ISP reseller environment. Seems to work both well and fast.

Jason Jystad said on October 31, 2004

Whoops, forgot the link:

http://blog.blogware.com/blog

Scott said on November 02, 2004

I recall reading some time ago that you were considering providing this CMS as a hosted solution. If that's the case, then What I'm about to say won't really apply. If you're selling it to be run on other hosts, however, target market might be a factor worth considering. If you're targeting large corporations or otherwise reasonably wealthy organizations, the added robustness you might get with an oracle database and the top-of the-line-language du jour could be worth it. If you're going after the little guys, PHP/MySQL is pretty homogenous across most web hosts. $0.02

said on November 17, 2004

cgi::application

Sorry, comments are closed for this post. If you have any further questions or comments, feel free to send them to me directly.