Home  >  Blogtronics  >  To PHP or Not to PHP



Apple, Inc.


View all posts by: John Ward | View all posts in category: Blogtronics

Ever since we moved Vectronic's Apple World from a small Dot Mac site to a real hosting provider, we have struggled to explain our use of ASP on an Apple site. We receive lots of email chiding us for using Microsoft technology. Furthermore, the use of ASP denotes the use of Microsoft Internet Information Services (IIS). Apple purists consider this hypocritical. We have tried to rationalize it by saying that it is the right tool for us. Well, we are about to change all that. It is clear that an Apple site that uses ASP or any other Microsoft technology will not long survive.

Over the next few months we are going to rewrite VAW starting with the front end and moving backwards. VAW will be totally converted to PHP. This will take some time and amounts to converting several thousand lines of code from ASP to PHP. Some of the older content might be left in ASP for a while, but no new ASP pages will be added to the site. As soon as we convert the major components of the site to PHP, we will convert every older ASP page to PHP.

Vectronic's Apple World began life in late 2002 as a small Dot Mac site. It was mostly static. The move to an IIS started slowly. I had just completed a capstone class for college that required me to intern with a company. During the internship, I designed a reservation system using ASP, modeled with an Access database and running on IIS. As a side note, I did this using a G4 iMac running Virtual PC and Windows 2000. My group was able to do some interesting things, so I took the next step with VAW and moved it to a similar arrangement. We soon discovered that using Access with a production site was a big mistake. The site constantly locked up, so we converted from Access to MySQL. As the site grew and our dependence on ASP increased, we began to notice increasing criticism of our apparent hypocrisy. Don't get me wrong. I like ASP. It is extremely easy to use and it has great error handling. But using ASP on an Apple site is like sleeping with the enemy. Sure the sex might be good, but you feel lousy in the morning.

Vectronic's is divided into four major components:

  • Blogtronics - our controversial blogging section, which has a robust homemade content management and comment system.

  • Linktronics - our news and site linking system.

  • Apple Profile Specs - our Apple specs section that serves great images and technical data on all Apple desktop and laptop computers.

  • Everything else - mostly static HTML pages that don't fit into any one of the major components.

Apache
Major components of the site are driven by a MySQL database. We intend to move to an Apache server as soon as we convert the major components, but that will not occur any time in the immediate future. That is a sticky process involving database migration and some changes to our code that is currently optimized for IIS.

This page is our first Blogtronics page to be generated using the newly converted content management and comment system. We converted the ASP into PHP almost line for line and it was fairly easy. Although I must admit, working in PHP reminds me of my first couple of semesters in college struggling through introduction to programming classes using the C programming language. The syntactical requirements of PHP are much more rigid than ASP. We do anticipate some issues converting Linktronics and Apple Profile Specs, but hope to roll out the changes over the next few months.

   Rate this article:





 Comments:

Comments page 1 of 1:
Click here to add a comment
PHP Rocks :
Posted 505 days ago
Your site will run faster with less server issues. Good choice. Keep up the good work. Vectronic's has just gone up in my book.
The North Wind :
Posted 534 days ago
Yea, but if you go down the road of implementing an ASP.NET site, than you get even further in league with the evil empire. You have made the right choice. Welcome to the light!
B.L. :
Posted 534 days ago
ASP is really a deprecated server technology anyway. Microsoft has moved on to ASP.NET, which supports full Visual Basic, not just VBScript. ASP.NET is a lot more powerful and faster. ASP.NET code on each page is compiled on the server and kept in a cache in memory, thus greatly increasing performance.
Jason Ray :
Posted 534 days ago
Good decision. If you use ASP, you are stuck with IIS. PHP is supported on multiple operating systems, including Linux, Windows, and Solaris.
David P :
Posted 534 days ago
One thing about ASP you didn't mention: PHP is faster and more stable than ASP. ASP is built on a COM-based architecture so whenever a program tries to connect to a database or calls a COM object there is additional overhead on the server. All this COM overhead adds up and slows things down. Under PHP, everything runs in PHP's memory space. ASP is slower and more memory intensive than PHP because each ASP language compiler runs in its own process.
 






  11/16/2008 Apple II Hardware:  Vectronic’s Silentype Printer

  11/9/2008 Apple II Hardware:  Apple II Drives

  11/3/2008 Macintosh Hardware:  Vectronic’s Power Macintosh 7200/75

  10/5/2008 Macintosh Hardware:  Vectronic’s PowerBook 5300cs/100

  9/14/2008 Macintosh Hardware:  Vectronic’s PowerBook 3400c/180

  9/7/2008 Macintosh Hardware:  Vectronic’s Macintosh Centris 610

  9/1/2008 Apple II Hardware:  Vectronic’s Apple IIc Plus

  8/24/2008 Macintosh Hardware:  Vectronic’s Macintosh LC II

  8/11/2008 Macintosh Hardware:  Vectronic’s Macintosh Performa 5440

  8/2/2008 Macintosh Hardware:  Vectronic’s PowerBook 145B