Wednesday, 24 February 2010

PHP vs ASP.NET - A Feature List


I do not want to call this as a comparison but a list of equivalent features. You can find a lot of links if you search on the internet regarding 'which is good and which is bad'. Here, I would like to give the same weightage to both technologies as both have its advantages and disadvantages.


Well, I made this list when I was thinking about the right technology for one of my latest requirements. I wanted to make something for a presentation as a part of my Architecture Design job.


Here Goes the List...

The choice of technology is completely dependent on the requirements. The factors that influence the decision of choice are based on the following:

  • Complexity of Business logic
  • Density of contents
  • Expected number of Hits (if it is a website)
  • Budget
  • Size of project, etc.

There are multiple options available for many features. The major ones are listed which are our recommendations.


ASP.NET PHP Comments
Latest Stable Version 4 5.3.3 As of 19 Aug 2010
License MS EULA PHP License v3.01
Price ASP.NET - .NET Framework is free. So ASP.NET also free PHP – Free PHP can be installed on any OS and Web server. But ASP.NET is recommended for IIS only (even though ports to few web servers available)
Web Server – IIS – Not Free. OS cost applicable Web Server – Free
OS – Windows Server – Not Free OS – Linux is free, Windows is costly
Third Party Hosting Price Cost involved Cost Involved Both are not costly but if you compare, PHP is found to be a little bit cheaper
Development Cost Developer cost Involved Visual Studio Express Editions are free Rapid-Application-Development Model. So development takes less time Developer Cost Involved Free/Open Source IDEs available Much coding involved Both are same but ASP.NET is more on Rapid-Application-Development and PHP is more on Coding
Cross Platform Yes Yes Whatever server side language you use, browsers render only as HTML. But development is not cross-platform even though ASP.NET got ports for Linux available
Code Portability Partial Yes For PHP, a code written on Linux/Apache will work on Windows or any OS/Web Server. But .NET, even though we have ports available, you will require some tweaks to make it run.
Cloud Feasibility Possible Possible Additionally, for ASP.NET -SQL Azure is also available for database hosting.
Mode of source Closed Source Open Source Application developers have no benefits for either it is closed or open UPDATE: Microsoft also opened .NET framework code for reference. Note that it is just for reference. You cannot do anything except reading. A real open source must be able to download, make amendments, re-compile. You cannot make your own .NET versions.
Promoted by Microsoft PHP Community
Customer Support by Owner Yes No
Security Fixes Auto Update – part of OS Need to update separately when available Both parties release fixes for bugs and security issues instantly
Developer Help Community Community Both technologies got fans worldwide. They will provide help and guidance through forums, mail lists, news groups, etc.
Languages C# PHP
Jscript, etc.
Database Any Database Good fit: Microsoft SQL Server Any Database Good fit: MySQL Supports most of the databases
Frameworks / OOPs There is an inbuilt framework (called web forms framework) available which will force developers to use OOPs You can write both procedural and OOPs based code
MVC Microsoft ASP.NET MVC Symfony
Development IDE Recommended: Microsoft Visual Studio Recommended: Zend Studio Even Notepad can be used for coding. PHP is more easy for that, but if you can afford Visual Studio, then ASP.NET.
ORM ADO.NET Entity Framework Doctrine
Templating NVelocity Smarty
Extensibility ASP.NET uses Microsoft.NET framework. So you can make use of any functionality available on .NET framework PECL – PHP Extension Community Library
ISASP Extensions, etc.
Easy to learn Yes Yes Personally I found PHP to be easier for a beginner to learn programming
Recommended for Huge systems? Yes No As per my analysis, PHP is recommended for small-to-medium projects and ASP.NET and JSP for medium-to-big applications UPDATE: If you think about Facebook, please understand that:
1. it uses a re-written PHP and a
2. transformer+compiler called HipHop which transforms PHP code to highly optimized C++ code and then compiles with gcc. We are talking here about the PHP we get for application developers from PHP.NET (as it is).
Content Management Systems DotNetNuke Typo3 Wide variety of options
SharePoint Joomla
N2CMS … Magento …
Advancement Growing very fast Growing with limited speed Micorosft’s team is keen to develop and integrate new features. But since PHP is promoted by community, it takes time to reach that level
Backward Compatibility Old code will work on new framework versions without change Old code might need tweaks to make it work on latest versions
Security IIS must be improved from the past and now a days it is one of the secure web servers Major web servers are secure ASP.NET, PHP, Oss and its servers are mostly secure. Now developers need to make sure their coding is secure.
Performance Faster Faster for small programs and slower for medium-to-big programs Very basic old argument – ASP.NET is compiled and PHP is interpreted (line by line compilation and execution)
Deployment Multiple methods available E.g.: Publish, XCopy, MSI You need to copy/paste code to server somehow (e.g.: FTP)
Some useful features WCF (Windows Communication Foundation), Web Service, .NET Remoting etc. Web Service
ASP.NET AJAX Third party Ajax libraries
Built-in Caching features Third party Caching libraries

I do not claim all I stated above are true, but all that I believe to be true. Also this list is in no way complete. It is time consuming to build a full list, so I included the major points only.

Correct me if any point is wrong or if I missed any important points.

Tuesday, 23 February 2010

Increase Performance of Computer by disabling Unnecessary Services

Windows automatically starts up some services in the background. Most of these services are unused by common PC users. This tends to slow down the booting time and it can also be heavy on important resources like CPU and RAM. Here are some listed unnecessary services which you can safely disable (if not used) which can speed up the performance of your computer to a certain extent. Try them at your own risk. We would suggest that you check the description of each service on the Internet before you disable them and also try disabling them one at a time.
In order to disable these services..

  1. Go to Control Panel > Administrative Tools > Services
  2. Choose the required service you want to disable
  3. Double Click on the service
  4. Under startup type, Select disable.
In this way you can stop the starting of this unused services which will speed up your computer. The list of unnecessary services is as follows..
  • Alerter,
  • Application Management,
  • Background Intelligent Transfer Service,
  • Clipbook,
  • Error Reporting Service,
  • Fast User Switching,
  • IMAPI CD-Burning COM Service,
  • Indexing Service,
  • IP SEC,
  • Messenger,
  • Net Logon,
  • Network DDE,
  • NT LM Security Support Provider,
  • Performance Logs and Alerts,
  • Portable Media Serial Number,
  • Remote Desktop Help Session Manager,
  • Remote Registry,
  • Routing & Remote Access,
  • Secondary Login,
  • Smart Card,
  • Smart Card Helper,
  • SSDP Discovery Service,
  • TCP/IP NetBIOS Helper,
  • Telnet,
  • Uninterruptible Power Supply Service,
  • Universal Plug and Play Device Host,
  • Upload Manager,
  • Volume Shadow Copy Service,
  • Web Client,
  • Wireless Zero Configuration,
  • WMI Performance Adapter.

Saturday, 13 February 2010

Things You Need to Know About Mac OS X Snow Leopard

Apple’s next operating system, Mac OS X 10.6, aka “Snow Leopard,” hits stores Friday. If you’re already a Mac user, you’re probably going to get the upgrade sooner or later, thanks to its low $30 price tag.
But it’s not a major upgrade. Apple has stressed that this OS mainly delivers a performance boost for Macs equipped with 64-bit Intel processors. Thus, many of the changes aren’t going to be immediately obvious.
Apple did not provide with an official review copy, but we did have a chance to test drive the “Gold Master” version of Snow Leopard, which should be functionally identical to what’s in stores Friday. Based on our tests, here’s a list of things you should know about the OS before installing it on your machine.


It’s a Performance Boost, Not a Roaring Upgrade
The changes in Snow Leopard are, for the most part, invisible. This OS is built to take full advantage of faster 64-bit Intel Macs. That means all apps included with Snow Leopard have been rewritten for 64-bit processors. Apps coded by third-party developers who opt to rewrite their software with 64-bit support will also be snappier.
If your activities are not very processor-intensive, then you won’t notice a huge difference. If you’re editing movies or photos regularly, you’ll immediately be able to feel the improvement. We tested movie exporting in iMovie and photo editing in iPhoto, and both apps ran much more smoothly than on Leopard.
There are a number of other performance improvements that aren’t obvious. For example, when you wake up a MacBook from sleep, the AirPort connection will only take about a second to reconnect to your Wi-Fi network, compared with a few seconds on Leopard. Also, the Finder, which you use to navigate your files, is a lot less laggy than before: Thumbnails display almost immediately, and scanning through folders is smooth.  Subtle and sweet.

Not All Third-Party Software Is Guaranteed to Work
As is often the case with OS upgrades, there are going to be some third-party developers who procrastinated on testing their software to ensure compatibility with Snow Leopard. Most applications working on Mac OS X 10.5, aka Leopard, will most likely work in Snow Leopard. Leopard was a 64-bit system that also supported 32-bit software, and Snow Leopard is still compatible with 32-bit applications.
If a developer hasn’t rewritten his or her application for Snow Leopard, that most likely means it’s just not 64-bit capable. It’ll still work, but just not as fast as it could be if it were optimized for 64-bit computing.
However, if you’re running third-party software that you absolutely need, it’s always smart to check the developer’s website to see if the app has been tested on Snow Leopard. Adobe, for example, has already stated that Creative Suite 3 has not been tested on Snow Leopard and may have compatibility issues. We were able to test Adobe Photoshop CS 3 on Snow Leopard and thus far have had no problems. We also tested QuickSilver, App Zapper, Adium, Tweetie and Evernote, and all seemed to work fine. But do some research and pretest on a nonproduction system if you’re concerned.
Apple has promised that after installing Snow Leopard, the OS will note which applications are incompatible with it. On the test machine we saw, none of the apps became incompatible after upgrading from Leopard to Snow Leopard.
In short, if you’re running relatively new software, you probably won’t have to worry. With more dated apps (three years or older) you should consider double-checking.

Minor Tweaks to Interface, Usability
Don’t expect this to be a brand new experience: Most of the UI changes are small. For example, Exposé, the window-management tool, has been implemented into the Dock. Clicking a Dock icon and holding it down will show only the windows of the selected app, which could be useful if you’re a digital clutterbug like I am. (See screenshot at right.)
Another small but good change: When snapping screenshots, the images are assigned a file name containing a time stamp of when they were taken.
The most significant refinement to built-in software occurs in QuickTime, now dubbed QuickTime Player X. The player interface gets a makeover — a gray-and-black gradient (see screenshot at right). Other than that, there are new tools including movie recording from your webcam, audio recording from your microphone, and screencasting.

Hardware Requirements: No Support for PowerPC Macs
If you own an older Mac powered by a PowerPC chip (rather than Intel), then you’re out of luck: Snow Leopard won’t run on your machine. The requirements are as follows: You must own an Intel Mac equipped with at least 1GB of memory, and the install requires at least 5GB of free hard drive space for the install. And of course, you’ll need a DVD drive to be able to read the disc and run the installation. (MacBook Air owners: We hope you have an external optical drive.)
Not sure what kind of processor you own? Click on the Apple icon in the upper-left corner and select “About This Mac.” If the word “PowerPC” comes up in the “Processor” field, then you can not run this upgrade. If it says “Intel,” you’re fine.

You Get up to 7 GB More Hard-Drive Space
Snow Leopard is less bloated with system files than its predecessor, so after upgrading to it, you’ll get some free space. Apple promises the install “frees up to 7 GB of drive space.” The upgrade freed up only 3.5 GB of space for our test machine, but hey — we’re not complaining. More space is always better.

The Upgrade Only Costs $30
Apple is advertising Snow Leopard as a $30 upgrade “for Leopard users.” If you’re upgrading from Tiger, Apple advises you to purchase the full Mac Box Set for $170. However, there don’t appear to be technical reasons preventing a Tiger-to-Snow Leopard upgrade. was able to confirm that the Snow Leopard upgrade can be installed on a machine running Tiger. Of course, the transition isn’t guaranteed to be as smooth as it would be from Leopard to Snow Leopard, and that’s because some older, Tiger-only third-party applications need to be upgraded to newer versions that work with Leopard or Snow Leopard.
Separately, Lifehacker has confirmed that it was able to erase a hard drive and install Snow Leopard. That means if you backup your files on Tiger, you should be technically able to buy Snow Leopard for $30, install it on a clean drive and then migrate your files over. Again, you’ll likely have to download newer versions of third-party software that are Leopard — or Snow Leopard — compatible. That extra work is probably worth it, because this OS is a pretty big performance upgrade if you’re switching from Tiger.
Of course, using the $30 upgrade to go from Tiger to Snow Leopard may violate Apple’s terms of service. We were unable to confirm this with Apple, which did not respond to our queries about Snow Leopard pricing.

This upgrade won’t deliver any radical interface changes to blow you away (not that we would want it to), but the $30 price is more than fair for the number of performance improvements Snow Leopard delivers.