Welcome to Discuss Everything Forums...

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.


 

Tags for this Thread

+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Shreyans's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Dec 2009
    Posts
    3
    Downloads
    0
    Uploads
    0
    PHP and ASP.NET are two of the most widely used languages for development of web applications. Both allow development of complex and sophisticated sites, but both are very different.

    PHP is a language. PHP consists of a platform-independent engine that parses PHP scripts. This language also provides common web application functionality such as database connectivity.

    ASP.NET is not a language, but a technology and is a small part of the .NET Framework. The Dot NET Framework consists of a) CLR – Common Language Runtime which manages execution of the code b) a hierarchical set of class libraries. These libraries are extensive and provide a great deal of functionality both for web-based applications and well as windows-based.

    ASP.NET framework is built entirely on an OOP paradigm and OOP concepts while PHP is not.

    PHP does not follow the OOP paradigm entirely. It only supports partial encapsulation, and partial polymorphism.


    Compilation is also different in PHP and ASP.NET.

    In PHP, when a page is requested, the HTML and inline PHP script is compiled to binary format called Zend Opcodes. Once compiled, the opcodes are run by the Zend Engine and HTML is generated which is sent to the client. Commercial products are available that increase the speed at which PHP pages are executed.

    In contrast, when an ASP.NET page is first requested it is converted into an intermediate language called MSIL (Microsoft Intermediate Language). The CLR then converts this MSIL to machine code. Conversion to machine code only takes place once for each page request (unless code has been modified). All subsequent requests use the already generated machine code. In ASP.NET no optimization product is required as the MSIL generated is already in its most optimized form.

  2. #2
    Shreyans's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Dec 2009
    Posts
    3
    Downloads
    0
    Uploads
    0
    PHP and ASP.NET are two of the most widely used languages for development of web applications. Both allow development of complex and sophisticated sites, but both are very different.

    PHP is a language. PHP consists of a platform-independent engine that parses PHP scripts. This language also provides common web application functionality such as database connectivity.

    ASP.NET is not a language, but a technology and is a small part of the .NET Framework. The Dot NET Framework consists of a) CLR – Common Language Runtime which manages execution of the code b) a hierarchical set of class libraries. These libraries are extensive and provide a great deal of functionality both for web-based applications and well as windows-based.

    ASP.NET framework is built entirely on an OOP paradigm and OOP concepts while PHP is not.

    PHP does not follow the OOP paradigm entirely. It only supports partial encapsulation, and partial polymorphism.


    Compilation is also different in PHP and ASP.NET.

    In PHP, when a page is requested, the HTML and inline PHP script is compiled to binary format called Zend Opcodes. Once compiled, the opcodes are run by the Zend Engine and HTML is generated which is sent to the client. Commercial products are available that increase the speed at which PHP pages are executed.

    In contrast, when an ASP.NET page is first requested it is converted into an intermediate language called MSIL (Microsoft Intermediate Language). The CLR then converts this MSIL to machine code. Conversion to machine code only takes place once for each page request (unless code has been modified). All subsequent requests use the already generated machine code. In ASP.NET no optimization product is required as the MSIL generated is already in its most optimized form.

  3. #3
    Tristan's Avatar
    Senior Member

    Status
    Offline
    Join Date
    May 2009
    Posts
    150
    Downloads
    0
    Uploads
    0

    Differences between ASP.NET and PHP?

    hi im looking to start building my first web app. i have researched in ASP.NET and PHP but still can find out which would be better to use.

    i looking for what differences they have to each other, eg database connections, security implications etc.

    also what are the advantages to using either and is there disadvantages for examples problems im likely to encounter.

    if any one could help me out it would be hugely appriciated.

  4. #4
    ASP.NET is Microsoft and PHP is Open Source. You don't need a license for PHP, you join the majority of installations out there on the web, you gain a community ready to help you. Linux is the better web development platform. Period. And the combination of LAMP is a quick install of Linux, Apache, MySQL, python-PHP-perl, with the equivalent WAMP for Win platforms.

    No matter what other arguments about ASP.NET, it is still Windows and susceptible to viruses and the whims of the LICENSE that Microsoft grants you. Read the EULA on any Microsoft product and they grant you a License and not ownership. Furthermore, they reserve the right to discontinue service at any time without notice and do give the government access to your work(s). It takes forever and a day for a Windows product to warm up while it runs virus scans and file inventory before granting you full access.

  5. #5
    PhonicUK's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jul 2009
    Posts
    6
    Downloads
    0
    Uploads
    0
    The biggest difference is that ASP.Net is a lot faster than PHP. This is because .Net code is compiled as .Net CLR (Common-Language-Runtime) which is JIT compiled to native machine code.

    PHP is interpreted at runtime, making it slower.

    Also, PHP has no concept of 'code-behind' , which is where code to generate the page itself (purely from a design and looks perspective) is kept separate from the underlying logic.

    Also ASP.Net controls allow for triggered events. For example you can have a piece of code that executes when a button is pressed, without having to set up a form - write a handler when the page is loaded, and display the result.

    ASP.Net also has better support for parametrized queries, and strongly typed data (Infact, PHP is loosely typed) which makes it much easier to write secure backend code that connects to a database that dosen't get hit by SQL injection attacks.

    I have to code in PHP full time, but would much rather use ASP.Net.

 

 

Quick Reply Quick Reply

Click here to log in


What comes after M0nday

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 01-09-2010, 11:02 AM
  2. Differences between ASP.NET and PHP?
    By Tristan in forum Discuss ASP
    Replies: 0
    Last Post: 12-12-2009, 09:13 AM
  3. Differences between ASP.NET and PHP?
    By Shreyans in forum Discuss PHP
    Replies: 3
    Last Post: 12-04-2009, 10:34 PM
  4. Replies: 0
    Last Post: 04-18-2009, 06:45 PM
  5. Replies: 1
    Last Post: 04-16-2009, 01:46 AM

Bookmarks

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •