Saturday, September 15, 2007

Comparing PHP/Linux and ASP.NET/Win from a economic perspective

Nowadays two of the most common technologies to develop web applications are PHP and ASP.NET. The first one used to be applied in small projects while ASP.NET used to be employed in corporate projects. This post try to analyse the costs implications of both from a qualitative perspective defining some aspects that we should take into account when deciding which technology fits better in your project. The concrete figures of this analysis shouldn't be taken as exact values because most of them are not based in objective analyses, but you can change the parameters as you consider to view the effects derived of them.

The cost of deploying of a new service can be split mainly in hardware equipment, software licenses and developers' costs.

Hardware equipment:
The hardware costs are influenced by the choosen technology due to the fact that the performance (and then the amount of needed machines) varies depending on the performance of this technology.
It's commonly accepted that ASP.NET has a better performance than PHP thanks to the application of Just in Time compilation and native execution in the .NET framework.
Windows: X
PHP: 1.05X - 1.20X
Machine cost: 2000$

Software licenses:
The software licenses costs dependes basically on the operating system license (we are comparing ASP.NET under Windows vs. PHP under Linux) and the costs of other tools (IDEs, monitoring tools...). For the sake of simplicity we will take into account only the operating system license and we will asume that the maintenance costs do not depend on the selected O.S.
Windows: 1000$ per machine
Linux: 0$ per machine

Development cost:
Development cost depends on the days needed for the development and the cost per developer per day. Due to the language, the architecture, the precompiled nature of ASP.NET and the available IDEs, in my opinion ASP.NETdevelopment is faster than the PHP development.
Windows: X
Linux: 1.10X - 1.50X
Developer cost: 50$ - 400$ (depending on the country and the kind of company)

Projects clasification:
Depending on the complexity of the system: Low complexity (20 working days) to High complexity (500 working days)
Depending on the load of the service: Low load (1 machine) to High load (20 machines)

Best case for PHP (opinion of PHP freaks):
PHP Performace 1.05 ASP Performance
PHP Development 1.10 ASP Development
Cheap developers: 50$

[Hardware + Software + Development = Total]

1.
ASP.NET: 2000$ + 1000$ + 1000$ = 4000$
PHP: 2050$ + 0$ + 1100$ = 2160$
2.
ASP.NET: 40000$ + 20000$ + 1000$ = 61000$
PHP: 42000$ + 0$ + 1100$ = 43100$
3.
ASP.NET: 2000$ + 1000$ + 25000$ = 28000$
PHP: 2050$ + 0$ + 27500$ = 29550$
4.
ASP.NET: 40000$ + 20000$ + 25000$ = 85000$
PHP: 42000$ + 0$ + 27500$ = 69500$

Best case for ASP.NET (opinion of MS "MVP"s):
PHP Performace 1.20 ASP Performance
PHP Development 1.50 ASP Development
Expensive developers: 400$

[Hardware + Software + Development = Total]

1.
ASP.NET: 2000$ + 1000$ + 8000$ = 11000$
PHP: 2400$ + 0$ + 12000$ = 14400$
2.
ASP.NET: 40000$ + 20000$ + 8000$ = 68000$
PHP: 48000$ + 0$ + 12000$ = 60000$
3.
ASP.NET: 2000$ + 1000$ + 200000$ = 203000$
PHP: 2400$ + 0$ + 300000$ = 302400$
4.
ASP.NET: 40000$ + 20000$ + 200000$ = 260000$
PHP: 48000$ + 0$ + 300000$ = 348000$

1 comment:

Amalia said...

Well written article.