Showing posts with label MVC. Show all posts
Showing posts with label MVC. Show all posts

Thursday, October 20, 2016

PHP vs ASP.NET Comparison

Things that need to observe before finalize between PHP and ASP.NET on any project.

ASP.NET code executes a lot faster compared to PHP. In general most of time of pages rendering time dependent on accessing DB and querying database.

In connecting database ASP.NET is a lot better - in asp.net we typically use LINQ which translates our object queries into stored procedures in SQL server database. Also connection to database is persistent, one for one website, there is no need for reconnecting.
PHP, in comparison, can't hold SQL server connection between request, it connect, grab data from DB and destroys, when reconnecting the database is often takes 20-30% of page rendering time.

ASP.NET have two main frameworks designed for it (Web forms and MVC), installed with environment, where in PHP you must get a open-source framework. There is no standard framework in PHP like in ASP.NET.
Since PHP is open source, its popularity differs based on people usage. So every year a new framework will come up for PHP in top list.

Whereas ASP.NET language is so rich, standard library has solutions for very much common problems, for PHP its standard library very open to public and any one can override.

Regarding Costing, PHP, MySQL server, PostgreSQL server, Apache server, and Linux OS are all free and upgrades are also free. 
ASP.NET and IIS are free if you purchase Windows OS. There is a substantial licensing cost for a Microsoft Windows Server, Microsoft SQL Server and future upgrades. For example, Microsoft Server 2008 R2 Standard - 64-bit cost is about approximately $1029 and Microsoft SQL Server 2008 Standard Edition For Small Business cost approximately $1038.

For Hosting, Now a days both hosting of PHP and .NET websites are no different. Both a similar or more over same when compared Windows and Linux environments.
PHP requires LAMP (Linux, Apache, MySQL and PHP) which is popular among hosting companies. ASP.NET requires Windows hosting.

Until a few years ago, Windows hosting used to be significantly more expensive than Linux web hosting. This is hardly true today; you can easily find Windows hosts for almost the same price as Linux web hosts. When we have PaaS, Platform as a Service all hosting provides are offering Pay as you service. Ex: Azure, Amazon WS etc.,

PHP is platform independent and can run on any platform — Linux, Unix, Mac OS X, Windows.

ASP.net is built to run only on Windows platform.

There has been much debate about this subject and most of the debates have been biased and have been tailored to promote one of the programming languages instead of informing the audience.
Scalability and ease of maintenance have nothing to do with whether you select PHP or ASP.NET platform. Web Application scalability and ease of maintenance primarily depend on:

  • Programmers' experience
  • Using the best programming practices
  • Using a solid programming framework
  • Following programming guidelines and standards

In my experience ASP.NET can certainly compete and surpass PHP in terms of raw speed. My personal opinion is that a ASP.NET-MVC compiled web application would run more efficiently/faster than the same project that would be written in PHP.

And this debate goes on and on!!!
 
Thank you

Wednesday, February 16, 2011

Download: ASP.NET MVC 3

ASP.NET MVC 3 is a framework for developing highly testable and maintainable Web applications by leveraging the Model-View-Controller (MVC) pattern. The framework encourages developers to maintain a clear separation of concerns among the responsibilities of the application – the UI logic using the view, user-input handling using the controller, and the domain logic using the model. ASP.NET MVC applications are easily testable using techniques such as test-driven development (TDD). The installation package includes templates and tools for Visual Studio 2010 to increase productivity when writing ASP.NET MVC applications. For example, the Add View dialog box takes advantage of customizable code generation (T4) templates to generate a view based on a model object. The default project template allows the developer to automatically hook up a unit-test project that is associated with the ASP.NET MVC application. Because the ASP.NET MVC framework is built on ASP.NET 4, developers can take advantage of existing ASP.NET features like authentication and authorization, profile settings, localization, and so on. Go through this help to get started MVC 3.

MVC stands for model-view-controller. MVC is a pattern for developing applications that are well architected and easy to maintain. MVC-based applications contain:

  • Controllers: Classes that handle incoming requests to the application, retrieve model data, and then specify view templates that return a response to the client.
  • Models: Classes that represent the data of the application and that use validation logic to enforce business rules for that data.
  • Views: Template files that your application uses to dynamically generate HTML responses.

Download MVC 3