Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 27, 2012 05:40 PM by Abhishek Luv
Nov 23, 2012 08:37 PM|LINK
Hi, I realize these are two different animals, but I'm wondering if all things are equal such as hardwaqre, etc, woudln't Webpages using Razor and Wmatrix be faster since they are compileed the first time? I mean faster than PHP which I think is interpruted?
Just asking. I ask this because I notice how popular PHP is, and I'm wondering if there's a reason as far as speed goes anyway in serving pages, etc, where one would use one platform or the other? I realize that PHP is typically used on Apache, etc, but not
all the time, etc, and this maybe the reason it would be used, etc,. But, I'm just curious..
Nov 24, 2012 01:11 AM|LINK
I don't think the popularity has to do with speed as much as it does the cost to host and develop at least until recently when open source and a more open and helpful community towards others became a more popular concept in the Microsoft developer world. That
and the shear amount of freely available mature applications out there. Also the fact people are able to run PHP on most any web server out there goes a long way towards it's popularity.
As far as speed goes you hit it on the nose. ASP.NET does have a speed advantage over PHP being it is compiled as opposed to an interpreted language. ASP.NET is already if precompiled or after the first request at which time it is compiled written as machine
specific instructions. Interpreted languages such as PHP have to be written into machine specific instructions at runtime.
Keep in mind there are things out there to help speed this process up when it comes to PHP such as APC which caches data and compiled code from the PHP bytecode compiler saving it into memory so as to overcome this drawback making any speed advantage no
Nov 24, 2012 05:31 PM|LINK
I agree to jporchazka.
PHP is almost a father to all coding. Every developer know PHP. ASP.NET is a modern and simple language.
Speeding up the server and client boxes you can use caching and AJAX and some other techs.
As far the difference is concerned. Only language is change all of the work is same. You should see that the server is supporting the language (asp.net) or not. Because PHP is 99% accepted to servers.
Also webPages is not a server side script. Its a client side one. Server side is Razor code used in web pages.
Nov 24, 2012 07:22 PM|LINK
"PHP is almost a father to all coding."
Very true fzaal.Ahmad.Zeeshan and one of the reasons C# was created to make migration from C based programming languages such as PHP and Java to .NET more easy for those who use such languages.
Nov 25, 2012 07:36 AM|LINK
Yes and somehow razor (C# integrated) is a short form coding. Human read-able and human understandable too. Variables are short. So speed is better in ASP.NET while writing the code and displaying the code. Both!
Nov 25, 2012 04:05 PM|LINK
Keep in mind there are things out there to help speed this process up when it comes to PHP such as APC which caches data and compiled code from the PHP bytecode compiler saving it into memory so as to overcome this drawback making any speed advantage no longer
Thanks so much, but ASP.Net has these same things for speeding up correct? So, compiled code will always be faster all things being equal.. Thanks so much.. PHP reminds me of classic ASP. Almost identical in the way it works I mean.. I'm an old ASP guy,
but became ill and now just do this stuff part time.. But I still love it.. Programming is programming and I love it.. :-)
Nov 25, 2012 04:43 PM|LINK
Lately i have been working around with ASP.NET MVC Apps with EF Code First, HTML5, and jQuery...,MVC pattern ,HTML5 and awesome client side jquery...also doing some Razor websites....Razor with Webmatrix helps me to build a website very quick and i am up
and running . :)
Nov 25, 2012 04:53 PM|LINK
Yeah, the reason I'm working with Webmatrix is that MVC uses Razor I understand and that's the way I want to go with Agile development practices.
Thanks so much..
Nov 25, 2012 05:36 PM|LINK
Yes exactly..for the same reason i am using razor with webmatrix. The main main thing is Orchard CMS uses razor as its view engine.
So benefits of working with razor - webpages , MVC pattern, and Orchard cms.
Nov 27, 2012 04:46 PM|LINK
You say Orchard uses Razor? That's exactly what I'm looking for in a CMS. I've not had the chance to review many of the CMS workings, but I'm glad you told me that. Do you like Orchard?