Thursday, March 19, 2009

PHP in the corporate world

It's been a LONG time since my last post so let's get on with it...

A new group was formed in our division tasked to create and implement new methodologies to improve employee efficiency and productivity. Although it was not my supervisor's original plan for me, I quickly proved myself as a very promising Automation Engineer and have since solidified my position as one. I guess I fell in love with programming all over again given the opportunity and having the unique background of knowing the operations and maintenance side of the group gave me an edge.

When I began thinking of creating an automation tool I was faced with the question: What usage model should I aim for? I could just make a series of VBA macros for Excel but this would limit the scope to the particular workbook the code was embedded in. I could create a desktop application using VB/C#.NET. This would remove the dependency on Excel but ensuring that the code ran on each and every laptop/desktop configuration is not something I would like to waste time on or am equipped to do. Being a high-tech company we are all have desktops/laptops connected to the company intranet so I investigated the web application platform.

There are several advantages to creating web applications over the traditional desktop application. First, once you set it up on a web server, the application is available to all the thousands of employees worldwide 24x7. No need to install per computer because all you need is a web browser and you're up and running. Maintenance would be simpler as I would only have to program on and maintain a single system. Flexibility, I would have the freedom to choose and even switch what programming language to use on the server and the end user would care less since all they care about is what they see on the browser. Great!

Now, I had zero knowledge on programming for the Web. Even HTML was new to me. But Google is my best friend and he did not disappoint. I did some reading-up and aside from learning HTML, CSS and Javascript, I determined that I had to choose between the two most popular web programming paths, PHP and ASP.NET. I read further and looked at the Pros and Cons. In the end, I picked PHP.

Why PHP, you may ask? Surprisignly, cost was not really a factor in my decision. This is a major selling point going for PHP. But we already have a Windows server available serving up a simple static group website plus we have VERY close ties with MS so we have access to VS.NET for free (or you can use the SDK). What's going for ASP.NET is it's tight integration with all thing Windows which makes it the ideal choice in big companies that have invested heavily in MS due to the extensive use of MS Office.

This is where my personal agenda came in. I was not an IT person and there are probably close to a hundred highly experienced ASP.NET programmers already employed by our IT division. So how effective would I be being an ASP.NET newbie where the experienced coder would probably take just a couple of hours what would take me a week to do. Might as well just let the Pros do it. But if I invested my time in PHP I would have a unique competency and would be a more valuable asset (I hope this is true). Also, I would be able to capitalize on the differences of ASP.NET and PHP where what would probably be more difficult or impossible (maybe not) to do in ASP.NET is easier or possible to do in PHP. Luckily for me, and as I would find-out soon, there are great capabilities built into PHP that did set it appart. So, I would be filling-in the gaps that no one else could do. Cool!

Then there is the long-term view to take into account. What would I like to do with my career once I leave this company? ASP.NET programmers would arguably be paid more than PHP ones in general. But PHP, being an open-source and low-cost development platform, really won me over. Small web sites (blogs) and big social networking sites like Facebook all run on PHP. So I would be catering to a larger customer base. I would also have the option of being unemployed. What!?! you may ask... Hold on your horses. What I meant to say was more of a self-employed, consultant, or work from home kind of setup. I likey!

So, there you have it. The reason I chose to use PHP in a MS dominated corporate world. I believe it was the right choice and presents an interesting challenge. The challenge of finding unique uses of PHP to bring together various data sources and bind them together in a company's internal network.

No comments: