As a LAMP developer, how should I cope with being asked to work on a Microsoft-IIS/6.0 server?
July 24, 2007 2:36 PM   Subscribe

As a LAMP developer, how should I cope with being asked to work on a Microsoft-IIS/6.0 server?

I've been asked to do some significant work for a company (on their web application, on their website with a CMS, on their ecommerce site that needs to be integrated fully into their backoffice system etc).

As a PHP developer I'd be very happy doing it using PHP + MySQL. However, all their current stuff is ASP and MSSQL-based. I know very little ASP, to be honest only Response.Write.

So my question is, I suppose, am I better:
1) Trying to get my ASP and MSSQL skills up and develop using that? Will it just be too long/hard?
2) Trying to get PHP and MySQL up and running on a Microsoft server? I have literally never used a MS server before. Is it easy to do that? I know that, at the moment, PHP scripts do not work on their server.

1) Would be I suppose the more diplomatic and tactically best solution, but I just suspect it will be far too hard work to get up to speed to develop well in ASP.
posted by Hartster to Computers & Internet (19 answers total) 1 user marked this as a favorite
What does 'too hard' mean? Harder than rewriting their entire system to suite your current skillset? Come on, ASP isn't that hard.
posted by trinity8-director at 2:45 PM on July 24, 2007

Don't bother learning ASP; I didn't! I had a web dev job a while ago where the IT guys only knew how to run IIS. I knew PHP but not ASP. I convinced them to install PHP on their server, which installs and works rather easily. The database was MSSQL, which didn't affect me that much since I was used to using the ADOdb database abstraction library for PHP.
posted by marionnette en chaussette at 2:48 PM on July 24, 2007

Then again, rewriting their whole system in PHP would take a lot longer and be a lot harder than just learning ASP.
posted by marionnette en chaussette at 2:50 PM on July 24, 2007

*cracks knuckles*

I was faced with precisely this problem.

1a) MSSQL is actually a fairly decent SQL server. It has some odd quirks, and the management tools are universally point-and-drool GUIs, so if you're accustomed to being able to drop do a command prompt to take care of some particularly gnarly problem, you'll be disappointed.
1b) ASP (not, the old stuff) is..frankly terrible. It makes PHP code written by 10 year olds look positively glowing in comparison, and I say that as someone who's hacked around oscommerce's insanity. It's also...irregularly documented and full of delightful quirks.

2a) MySQL is, and I can't say this enough, excellent at data migration from MSSQL. They have a wizard that uses the JDBC libs and has quite a bit of smarts to migrate both structure and data off of MSSQL onto MySQL. Frankly, it's better than MS' own tools.
2b) I've not yet tried to install PHP in IIS, but my understanding is that it's fairly well documented and not disastrously complicated.

Technical details aside, what you really need to do is pick one. Decide, now (with management approval) if you're going to duct-tape patch the existing system, or rewrite-in-pieces onto PHP. Whichever you decide, you really need to stick to it unless the underlying business case changes.

I ended up learning juust enough ASP to fix the required bugs with the understanding that if any significant new features started trickling down the pipe, it would be more cost-effective to do a partial rewrite of that segment.

If you're going to transition to PHP, I recommend first converting the ASP app to use MySQL. This is actually pretty easy, just make a new ODBC connection, change the DSN and see what breaks because queries use incompatible SQL (standard my ass). Then you can be free to re-implement things in PHP whenever you want because getting at the data is easy.

Things that will drive you mental: if your app was written the way mine was, you'll invent new languages just to curse the original authors in. Having to connect via remote desktop and do everything 'locally' over anything less than a LAN connection is painful. Microsoft sucks.

Do they have any ASP/MSSQL/MS-centric staffers/IT people who a) could help you or b) will resist PHP-izing their beautiful MS apps?

This is getting long-ish, so I'll cut it off here. Feel free to ask more here, or at the gmail in my profile.
posted by Skorgu at 2:52 PM on July 24, 2007

Yeah, I realise that makes me look lazy but: their web application (and ecommerce site) need rewriting from the ground up, so it's not too daft to start again in PHP.

Basically, I suppose one big aspect of this question is: how good and easy is ASP to develop in in 2007? Last time I used ASP was probably 6 years ago. One of the things I love above PHP is the number of libraries around for it: chances are if you need to do something, there's a PEAR module or library for it somewhere. I've heard good things about ASP.NET but have no idea really what things are like and how well it's supported.
posted by Hartster at 2:55 PM on July 24, 2007

Installing php on Windows is easy. ASP is super simple to learn, but it's a dying language. Don't spend a lot of time learning it if you can avoid it. Finally, one thing to keep in mind is that if they have a legit MS SQL license, they may have paid $10,000 for it. Sometimes people get a little touchy if you tell them to abandon an investment of that size.
posted by TungstenChef at 3:01 PM on July 24, 2007

Classic ASP (not ASP.NET) is nigh obsolete.

However, this question really is more about the company than it is about you. If it's a tiny company and they're giving you free run to upgrade their application, and if the IT department is behind you on supporting a LAMP environment, then go for the rewrite. If they have an existing infrastructure that's strongly based around ASP, then you're screwed, just bite the bullet, because that's one fight you'll never win.

How is your relationship politically with the system administrators/IT department?
posted by matildaben at 3:02 PM on July 24, 2007

To answer your followup question, ASP and are completely different animals despite the similar names. As much as it pains me to say it (I'm a ColdFusion programmer), is a rapidly growing language with a thriving development community. You will only help your resume if you learn it.
posted by TungstenChef at 3:05 PM on July 24, 2007

Here's one thing in favor of starting from scratch. As an ASP newbie, you are limited in your ability to judge the quality of the existing codebase. My current project is cleaning up a monster of undocumented spaghetti code. To give you an idea of how bad it is, the previous "developer" didn't know how to create a function. Every single time he wanted to reuse code, he copied and pasted it from another file. You read that right, he wrote 120,000 lines of code and didn't actually reuse a single one. Needless to say, I'm quickly going insane and rue the day I said "no, you've already invested too much into this, we won't have to rewrite it from the ground up."

I would suggest you read this article as a start and come up with a formal way to assess the code. I would include paying an ASP expert for a few hours of time reviewing the code. It might not be worth it at all for you to use the existing code, and if it's bad you have some solid ammo for convincing them of a rewrite.
posted by TungstenChef at 4:06 PM on July 24, 2007

Ew. ASP is yuck-city. I wouldn't want anyone to program in such a language.

See if they'll migrate to .NET. There's a pretty good upgrade path, in that IIS can run both ASP and .NET code.

Personally, I'm a fan of the C#/.NET/SQLServer 2005 stack. It's every bit as good as VBScript/ASP/SQLServer 7 is suck.
posted by Afroblanco at 5:56 PM on July 24, 2007

"As a LAMP developer, how should I cope with being asked to work on a Microsoft-IIS/6.0 server?

SIMPLE you become a MISP developer..short for M$, IIS, SQL and PHP :)
posted by at 1:50 AM on July 25, 2007

Thanks a lot for all your answers to what's a (neccessarily) slightly vague question.

In terms of the political angle: not sure. Am basically being employed by management over the heads of their current small web team. Of their skillbase, I think one person has decent ASP skills, with which he has developed the application. Their website was done in ASP by a third party and is updated by a CMS, and I think most of the rest of their webteam (i.e. people in marketing responsible for the site) just have basic HTML skills.

Tungstenchef is right in my inability to assess third party code; having looked at some of the code for the web app it a) looks a right mess to me and b) I'm not sure how much of that is just ASP which I do have a visceral dislike to.

So basically, the conclusions I have drawn so far are:

1) Learning ASP is probably not the right way forward
2) If I can get them to accept running a mish-mash of ASP and PHP I can get them to install PHP on their server
3) If not, I need to learn ASP.NET, which would be the easiest thing from the point of view of working with their existing code at least.

This whole is basically very annoying, in that otherwise it would be the perfect long term contract for both me and them (I know the specialist industry well so from their management's POV I'm perfect, having the background and, from what they can tell the technical skill as they obv. don;t understand the PHP/ASP thing).

Coming from a purely PHP background it's just a bit daunting going into a big project having to learn things on the fly. Like, this morning it took 20 minutes to write a page to take a customer's details and question, validate the details, stick it in a database, send customer service and the customer an email, and have a web page for customer service to answer the question. I have no idea how I'd go about doing the same thing in ASP.NET. I know you can do it obv., but without HTML_Quickform and Mail::Mime and code I can reuse etc it's just a heap more difficult.
posted by Hartster at 2:07 AM on July 25, 2007

the management tools are universally point-and-drool GUIs

Find and love the Query Analyzer. Direct SQL manipulation of the SQL system.

ASP 3.0 applications written in VBScript are very similar to PHP applications. The basic sort of application flow is extremely similar, so if it looks like spaghetti code, it is spaghetti code. Your PHP knowledge is directly applicable to ASP 3.

ASP 3 is mature, well-documented and has a very large number of third parties and libraries for it, but they might be hard to find and almost certainly the best ones (and most of the mediocre ones) cost money.

ASP.NET is even better supported and more developers have released freely available libraries.

If you're a hired gun coming in and are stomping over an existing web team's territory I would be very cautious about suggesting an entirely new stack. They theoretically have their career invested in it.
posted by cCranium at 4:21 AM on July 25, 2007 [1 favorite]

Get them to upgrade to ASP.NET. It'll appeal to business types, you can use 'good' languages (C# isn't brilliant, but VB is the most braindead language I have ever encountered).

Maintaining a LAMP infrastructure takes some work. If it goes down, you'll get blamed. And it's not your job to maintain it.
posted by tmcw at 5:59 AM on July 25, 2007

Yeah; I'm definitely trying to avoid stomping. Basically, the reason they're calling me in is they're sort of stuck. The web app has progressed as far as it can with their current skill set. They're not superhappy with their website and want to redo it totally. I have a big meeting in a month or so, where I have to say what I can do for them, and I'm trying to work out different options and timescales.

(Like, they already have a separate website (on a separate shared server) running a Simple Machines Forum, because they couldn't find a decent ASP one. But as nobody there knows PHP (or MySQL) they can't do anything other than a vanilla install so it has no connection to their main website, not even the colour scheme. So I can at least hack that around for them and demonstrate how they can bind their thriving web community into their site if they shift to a PHP-driven solution)

(I mean, some stuff will be brand new sites, so if I can avoid having to learn a new language to code a new transactional website I will)
posted by Hartster at 6:23 AM on July 25, 2007

cCranium is a voice of sanity here. ASP is very similar to PHP4, just with much crappier regex support. ASP's OOP is fairly limited, so that may (or may not) have led to what appears to be spaghetti code. You can install PHP on IIS fairly easily and it will certainly talk to SQL Server (which is a fantastic database with plenty of command-line tools, query analyzer, osql, isql).

ASP.NET is a huge leap forward and C# is a fine language. Having worked with PHP and ASP extensively, the last couple of years in C# have been much more fun. However, there was a big learning curve in moving to a compiled language and the code-behind nature of .NET, so I don't know that you'd want to go that route.

I guess I'm still not that clear on the question/ problem. The issue really seems to be you're coming in as an outsider to a company whose management team isn't happy with their current development staff. Whether or not you intend this ot be a long-term relationship and whether you intend to work with their dev staff should probably drive your tech decisions. If you're going to come in and start everything over from scratch, you'd better be good and you'd better be friendly, because otherwise you're taking a heck of a risk.
posted by yerfatma at 6:43 AM on July 25, 2007

yerfatma: I think, to clarify things, I'm trying to work out what routes and options I have open for me when I meet up with the whole team. To a large extent this is obviously going to be driven by them and their desires: if they want their ASP web app rebuilt from the ground up, do they mind it being in PHP and shifting to a new architecture or if they want it progressed incrementally, then can I do it in ASP.NET rather than just ASP, and convert the code over in time.

Similarly, if I'm building a new site, can I do it on their IIS server in PHP and MSSQL? I assume you can run PHP sites on an IIS server alongside ASP (and ASP.NET?) sites? You don't need to do anything funky with IP addresses etc?

Has anybody had any experience using Phalanger? That seems, unless I am misreading to allow me to use PHP as the development language for ASP.NET, which seems a sort of compromise/cheat path if they do go the ASP.NET route.
posted by Hartster at 9:05 AM on July 25, 2007

I assume you can run PHP sites on an IIS server alongside ASP (and ASP.NET?) sites?

Yes. You can set it up as CGI or as an ISAPI Filter; it shouldn't affect anything else on the box. Might be a good idea, if the version of IIS allows, to put the PHP stuff in its own memory pool so if it crashes it doesn't hose IIS. Just a good neighbor policy that might ease others' minds.

That seems, unless I am misreading to allow me to use PHP as the development language for ASP.NET

One caveat here, and it might not apply: I wanted to use IronPython for part of a .NET application, but quickly discovered you can't (or couldn't at the time) talk to a .NET DLL built in a dynamic language from code in C#/VB.NET.

Given they out-sourced their old CMS and your description of their current team, it sounds like you may be way ahead of them and your approach seems sound. Good luck.
posted by yerfatma at 10:00 AM on July 25, 2007

Yes, you can easily run multiple sites in multiple languages, or multiple languages on one site on an IIS server. You can give each site its own IP, run both over the same IP but different ports, or run both over the same IP but with different domain names (which MS calls host headers). I recommend that you get this book if you want to learn a little about IIS.
posted by TungstenChef at 10:19 AM on July 25, 2007

« Older resume writing   |   Russia: is it really that bad? Newer »
This thread is closed to new comments.