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..
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
longer noticable.
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.
Please "Marks As Answer" if any answer helped you out!
~~! FIREWALL !~~
Marked as answer by DotNetTim on Nov 25, 2012 04:05 PM
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.
Marked as answer by DotNetTim on Nov 25, 2012 04:05 PM
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!
Please "Marks As Answer" if any answer helped you out!
~~! FIREWALL !~~
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
noticable.
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.. :-)
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 . :)
Thanks
With Regards
Abhishek Rajiv Luv
"Helpful then please Mark as Answer"
http://www.codeabstract.com/
http://pluralsight.com/training/users/abhishekluv
Marked as answer by DotNetTim on Nov 25, 2012 04:52 PM
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.
Thanks
With Regards
Abhishek Rajiv Luv
"Helpful then please Mark as Answer"
http://www.codeabstract.com/
http://pluralsight.com/training/users/abhishekluv
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?
DotNetTim
Member
384 Points
136 Posts
web pages vs php? Speed?
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..
Thanks
Tim
jprochazka
Contributor
4812 Points
733 Posts
Re: web pages vs php? Speed?
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 longer noticable.
Afzaal.Ahmad...
Contributor
2660 Points
1039 Posts
Re: web pages vs php? Speed?
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.
~~! FIREWALL !~~
jprochazka
Contributor
4812 Points
733 Posts
Re: web pages vs php? Speed?
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.
Afzaal.Ahmad...
Contributor
2660 Points
1039 Posts
Re: web pages vs php? Speed?
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!
~~! FIREWALL !~~
DotNetTim
Member
384 Points
136 Posts
Re: web pages vs php? Speed?
Nov 25, 2012 04:05 PM|LINK
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.. :-)
Tim
Abhishek Luv
Participant
1736 Points
468 Posts
Re: web pages vs php? Speed?
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 . :)
With Regards
Abhishek Rajiv Luv
"Helpful then please Mark as Answer"
http://www.codeabstract.com/
http://pluralsight.com/training/users/abhishekluv
DotNetTim
Member
384 Points
136 Posts
Re: web pages vs php? Speed?
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..
Tim
Abhishek Luv
Participant
1736 Points
468 Posts
Re: web pages vs php? Speed?
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.
With Regards
Abhishek Rajiv Luv
"Helpful then please Mark as Answer"
http://www.codeabstract.com/
http://pluralsight.com/training/users/abhishekluv
DotNetTim
Member
384 Points
136 Posts
Re: web pages vs php? Speed?
Nov 27, 2012 04:46 PM|LINK
Abhishek.
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?
Thanks
Tim