Tuesday, June 30, 2009

The Componentized Website Project

When I started out as a web designer/developer (was a bit of both!), the web was looked upon as something that provided information. A lot of my clients believed that information needs to be as detailed as in a book and ran into pages sometimes. At most times, the design itself needed to be changed into something very simple and straight forward. For example – A header-based/left-hand sided navigation and the rest of the page was left for the vast content. These sites were, what we called, as "Open end websites".

Things changed a bit when we got into what we called "Themed sites". It was something we borrowed in concept from 2Advanced. They had theme names for their websites, like, for example, the current website is called "Attractor". Clients were still pretty optimistic about the usage of Flash, so, it was all mainly HTML/PHP/CF/ASP. Design took the centre stage and everything had to fit into the design elements. Basically, we presented the clients with stunning designs and asked them to fit their content into it..or..else.. it would look crappy! It was a good success!

As Flash climbed the client charts, we started doing the entire site in Flash. Let us just say that my experiments made me what I am today!

In the beginning, I was laying out the pages in frames..like a banner and jumping to and fro on interaction. It was kind of stupid considering that Flash could, by then, load content from text files. My websites were very static. It was a money making idea. I could not only charge for creating the website, but also the actual updates and maintenance. Well, my brains were boxed and I was kinda fed up with the constant emails. So, I started making things more dynamic. Yeah, "prototypes" and "Smart MovieClips" to the rescue!

By the time AS 2.0 was in, my world revolved around "dynamic". APIs, Web 2.0, streaming, XML, web services..well.. these terms meant that I could create "Pods/Components" that displayed specific information on the website. The information could be pulled from feeds on the same server or other servers (with some help from .NET/PHP) and displayed using a custom textdisplay component, Images can be pulled from my Picasa or Flickr account, Tweets or Social networking info can be aggregated and displayed in other components. These components can be skinned and reused with ease. In fact, the client himself could do it with a bit of training on the XML config files.

Currently, my project is to create custom components for the website that are commonly used –

  1. Text/Content area that would load and display rich textual content from external files.
  2. Feed pods aggregating some feeds from other sites.
  3. Links component that will display links of friends etc
  4. Social Networking pods for Facebook, Twitter and MySpace(?) displaying the latest feeds from the platforms
  5. Photo Gallery component can be configured for either using public streams such as Picasa or Flickr, or, display from a custom XML based feed.
  6. Contact component that will contain text based information, contact form and/or "Connect with me" links to directly open IM windows.
  7. Last but not the least the UX container component that will load the backgrounds and other UX elements.

These components can be enabled or disabled from a "Website Template Configuration" file. Nah! It won't be something that people will have to do editing code chunks or XML tags. It can all be done from the admin console with a few clicks. The engine will take care of the rest.

Kewl, huh? So, how far is this Project gone? Well, parts of it are already under development. The Admin side is a whole huge chunk! L

Monday, June 08, 2009

Installing PHP on IIS 7.0?

Installing PHP on IIS 7.0 (Vista) for the first time? It is quite a rollercoaster ride. I struggled for about 30 minutes and finally got around to solving it after quite a bit of googling around. Here's the easy way then:

  1. Download and extract the latest Windows ZIP package from: http://www.php.net/downloads.php. Don't download the installer.
  2. Extract the contents of the zip file to your web root folder. It would be something like C:\inetpub\wwwroot\PHP for example.
  3. Now, first rename the php.ini –recommended file to php.ini
  4. Open the php.ini file to edit
  5. Uncomment:
  • fastcgi.impersonate
  • cgi.fix_pathinfo
  • cgi.force_redirect
  • open_basedir – Put the physical php application path here withing double quotation marks. For example – "C:\intepub\wwwroot\php"
  1. Install Hotfix from: http://download.microsoft.com/download/3/0/c/30ce6281-59e5-4315-9d9f-0a14bec95bbf/Windows6.0-KB954946-x86.msu. You will be prompted for a restart at the end.
  2. Once the machine is back after the restart, open the IIS Manager (type inetmgr in your Start > Run). With the Home location selected, click on Handler Mappings.
  3. If FastCGIModule is already present, remove and once again click on Add Module Mapping and enter the following:

    Request Path: *.php

    Module: Select FastCGIModule (if this is not present follow the steps given in point 9 to follow)

    Executable: click the button with the "..." to browse to the location of your PHP app path – for example, "C:\intepub\wwwroot\PHP" and select the PHP-CGI.exe file

    Name: PHPViaFastCGI

  4. If the FastCGIModule is not present in the Module drop down, follow these steps:

    1) Go into "Modules" dialogue at the Home location,

    2) Choose the "Configure Native Modules" option on the right pane,

    3) Choose "Register" on the next window, and

    4) Insert "FastCgiModule" in the Name textbox and "%WINDIR%\system32\inetsrv\iisfcgi.dll" (Replace %WINDIR% with your Windows path. For example C:\Windows). Easier is to use the navigation button to navigate and select the file mentioned above.

Once these 9 steps are done, create a php file to check if it works. It should.. otherwise there must be something else that has gone nuts! J

Now, people who know me must be asking the big question – "Arun? PHP? Not .NET? What happened???" Well! Let us just say that it was a fortunate turn of events that occurred. J