|A long-time .NET critic, now converted|
Page load time < 1 second, down from > 6 seconds.
I'm one of those guys who picked up programming from creating macros in Microsoft Office in the 1990's. This lead to me creating some pretty successful software in Visual Basic and then a few popular websites using Class ASP / vbScript.
When Classic was discontinued and replaced by .NET, it was obvious to me that .NET couldn't replace the backend of my high-traffic websites. They just couldn't stand up to the load, and besides .NET has never been SEO friendly and my sites have always relied on free traffic from search engines.
Last year everything changed for me (because of Panda) and I had to get a real job. I was able to land a job as a Sr. Programmer in a Microsoft shop because of my years of experience with Microsoft technologies, even though I still wasn't experienced in .NET.
I'm about to pass the 6-month mark of my employment, and over this time I've become pretty proficient at .NET, overcoming the speed, scaling and SEO issues of ASP.NET.
A few weeks ago I had to redesign a 300,000 page site that used LAMP and turn it into a .NET site. I knew the old site was slow and the new site was much faster, but this morning I checked it out using Google's Webmaster tools. The old site averaged over 6 seconds per page load, and the new site is averaging .9 seconds.
I think I'm sold on .NET!
Welcome to the .Net club dataguy.
Can you talk about some of the issues you ran into and solved with your transition from a LAMP bases solution to a .Net solution?
.NET is a great framework and I love working with it.
There are other factors to consider: Database, Servers, How the application was coded.
Both technologies have their pros and cons. I dont think one is necessarily faster than the other.
What I've learned is that raw code on a page, with no database connection, will execute in php in about 0.15 seconds, and in .NET in about 0.015 seconds. An eighth of a second isn't much, but it's consistent.
The biggest issues I had in converting the site to .NET was converting the database from MySQL to MS SQL. It required about a hundred specially formatted .CSV files and the original MySQL database had a few corrupt tables which couldn't be repaired.
Most of the pages in the new .NET site are actually built in the code-behind pages using stringbuilders to concatenate raw HTML. This allows for better scaling than anything else I've tried, and because of my experience in Classic ASP I find it easy to code.
With your testing, is it the same server?
Concatenating raw html in the code behind can big a big maintenance nightmare. Also, depending on your site architecture you may to re-compile to deploy a simple change when you can just push the aspx.
Concatenating raw html in my option would be how a class asp developer new to .net would do.
If you are using webforms, you would typically create re-usable server controls or use the ones that are provided.
What flavour of asp.net are you on? 2, 3.5, 4.0 ?
I found asp.net to require a totally different mindset from classic asp. Separation of code from html for one, OOP for another
And I wonder if a .netsite performs better with mssql or mysql.
The previous server ran Apache, and I'm using asp.net 4.0. There's no doubt the the new server is more robust than the old one, but my previous experience was that even on the most robust servers, .NET just couldn't handle the strain of a high-traffic site.
Most of the pages on the site use typical controls, but here's the catch: using the typical controls on the high-traffic (main content) page resulted in load-testing showing the page could withstand 17 hits per second, which basically means the page would not be functional on this website.
Using the stringbuilder resulted in the page being able to withstand 300 hits per second, which is acceptable. You might say that I've coded this as a nube, but I coded it in a way that works, where otherwise it wouldn't.
As an update to this, I've recently (two months ago) got into jQuery in a big way. I believe what I've found is the technological 'sweet spot'. I can use .NET for the backend functions, i.e. web services, caching, authentication and connecting to the database server, and I use jQuery for the presentation layer.
I've been building websites for 15+ years and I can easily state that I've built pages in the past few weeks that are astounding, pages that function in ways I never thought possible for a web page. I've had co-workers stop by my desk just to watch what I'm working on, literally with their jaws-dropping.
I'm sure there are php/MySQL equivalents to what I'm doing, but I haven't seen them anywhere.
I'm now working in the medical document management industry, and although I have not yet released any of this new software, I'm hearing reports of Dr.'s using the beta versions of my software over and over again just because they say, 'it's so beautiful.' I know jQuery is not a .NET technology, but it sure seems to work well with .NET. I think I've found my niche!
Jquery is officially supported and included in asp.net projects. For MVC projects it is almost encouraged to use it. MS also includes a lot of other great libraries you need to play with. Knockout.js for one is really amazing what you can do. It has eliminated hundreds of lines of jquery for me personally if that tells you anything.