PHP 5.0 Goes For Microsoft's ASP-dot-Net
Dozix007 writes "Uberhacker.Com reports : Zend Technologies quietly announced last week the final release of the open source PHP version 5. An interesting article reports the different strengths and weaknesses of ASP vs. PHP, and it becomes quite clear that with the release of PHP5, Zend has taken a shot at ASP's heart. The differences from PHP4 to 5 has created a clear advantage for the new preprocessor over Microsoft's proprietery ASP."
Interesting how the head-to-head with PHP 5.0 and ASP.NET is hosted on Oracle's site. I guess it's not like Microsoft and Oracle make competing products or anything.
We might as well Get the Facts on Windows and Linux.
Casual Games/Downloads
So...I have to pay for features that I can get from the competitor for free, I have to pay (my employees) to insure that I am paying what I need to (for a product wich offers comparable services as the competitor) and I get to continually be pressed to upgrade and give them more money in licensing fees.
[sarcasm]Gee whiz, mister; where do I sign up?[/sarcasm]
As a former PHP hacker now forced by the corporate world to program in ASP.NET, the article is forgetting the number one advantage ASP has over PHP. A killer IDE.
I really dislike ASP and Visual Studio, but PHBs tend to like pointly clicky interfaces. It makes them feel like if they have to fire the whole development staff, they can take over coding; after all, it is just a GUI.
Visual Studio is Microsoft's real killer app. That is what Monkey Boy was dancing around screaming developers about. Most developers are mediocre, and if you give them a handholding tool that keeps them from doing anything too stupid (or too great), they will love you for giving them some job security.
Alright PHP guys, can you give us that? Can you save us from having to think for ourselves? I may have filled my last remaining unallocated brain cells reading the man page for gcc.
Please bid on this Karmann Ghia! Please pleas
In this article I'll focus on PHP, the technology Oracle has chosen to incorporate into its products, and ASP.NET.
Yup, I expected a completely unbiased article after reading this in the second paragraph..
I am the maverick of Slashdot
Also read this interesting article about PHP trying to take over the world. While a bit long it's really interesting and spawn quite insightful discussions.
This makes complete sense, looking at how PHP has taken so much of the bloat out of server side scripts compared to ASPs megahousal approach. Add in the fact that PHP is free/open and continuously developed, it could be a no brainer; if the market(ing?) allows for it!
How does one update from PHP4.x to PHP5.0? I'm running Drupal/Squirrelmail and the like at home, and want to see the diffs between the two, as well as understanding how to update them.
PCB$#
free ipod and free gmail!
There was an article detailing the zend release on kuro5hin a few days ago. Quite a good read...
I use php all the time, but php is more like the old asp than .Net. .Net is much richer in exeception handing and allows me to use any language I want. Php is great but not a stab at the heart of .Net. They have nothing like VStudio.
Than why do you bring it up?
"Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
From the article:
I've heard this same song from a few developers who work at Oracle shops - and I could not disagree more! Database independence in your code should absolutely be a goal! We can encapsulate our database-specific features into stored procedures or functions without having to pollute our application code with them.
... I had to conclude the writer barely knows what he is talking about. I am not flaming him, but someone who mentions only the ODBC drivers for ASP.NET and has never even heard about a Managed Provider, additionally puts this in a summary table: ...
Speed:
PHP4: strong PHP5: strong ASP.NET: weak
Efficiency:
PHP4: strong PHP5: strong ASP.NET: weak
has some serious reading to do
The article states that Visual Basic .NET is Microsoft's default .NET programming language. I've always thought it was C#, because VB.NET lacks some of the features in C#.
I liked the way the article talked about ODBC being a downside, then showed sample code which used ADO.Net with the native OracleClient instead.
Apart from that, the main differences between ASP.Net and PHP5 appear to be platform related, rather than anything to do with the respective languages (or processors, if you prefer).
Don't forget some of us actually like a little bondage from the toolkit, so we can maintain the code afterwards. Its nice to have all the page manipulation code in page_load() where you can happily mangle everything using syntax similar to the XML DOM, rather than having chunks of code all over the place to insert the various dynamic elements.
Why do people think they can write these sort of articles and make performance claims in them without any sort of supporting evidence? Some quick numbers? A link to a study? Anything?
For me, the choice is clear. You can compare the relatively minor pros and cons of PHP and ASP for days, but really they're both very similarly capable and you'd do about as well with one as with the other. The big difference I see is that PHP is cross platform and ASP is not. To me, that makes PHP the "winner", hands down. It makes it so that you can change platforms with your application later on and if you're writing code for other people to run then it means more people will have the opportunity to use it (whether this is an open source project or a commercial project you're doing).
ASP runs on Windows and really only runs well with IIS. PHP runs on pretty much any platform you would ever want to run it on (and plenty of platforms you wouldn't) and works just as well with any webserver I've ever considered using.
So while there may be small areas where ASP excels or where PHP is deficient, I think that those points are largely insignificant when you realize the platform limitations of ASP. Oddly enough though, I'm not sure I've ever heard anyone cite this as an advantage of PHP, whereas I come across an article comparing esoteric differences every few weeks.
Looks like this article is full of it. Slow .NET code? ASP.NET can be compiled into DLLs, and at my old job we upgraded many of our ASP and PHP projects to .NET with a large speed increase. Only works on IIS? Try out the mono project.
Also seems like everyone is complaining about ASP. ASP and ASP.NET are two completely different beasts. ASP was buggy and a pain in the rear to work with. ASP.NET, however, was amazingly simple to use with an amazing debugger (VS.NET). Please keep on the subject and leave out ASP.
I do C# development, for ASP.NET, where I work. I do php development (hacking phpbb), for my personal website.
For large scale projects (e.g. a messageboard), I would greatly prefer to use C# over ASP.NET... I strongly dislike IIS, and I suppose that's a stumbling block, but on the other hand, C# is a strongly typed, compilable language. I'm not clear on how all the benefits of scripting (faster output from looser coding) apply to large scale projects, or projects where things like OOP and Exception handling are useful.
OOP and Exceptions rely on, you know, strong, well concieved design. If you're going to take the time to design your large project, why the hell would you throw away the benefits of strong types and compile time debugging (incredibly useful in a large and/or shared project), not to mention things like unit testing and automatic documentation (things C# has).
The code example in the article makes little sense to me. For one, they use VB... which looks ugly no matter how you slice it. C# would have been more directly comparable, and it should be available in MSDN... but regardless, the code looks almost identical. Is the point that there really is little difference, or that PHP is better? In both languages, it seems you could abstract away the Oracleness of the behavior (negative on both fronts), and you'd be at square one regardless.
Eh, I don't see any real useful comparison in this article. Yes, it sucks that ASP.NET only works with IIS. I'll be happy to run mono when the opportunity presents itself. But this article was pretty useless.
-Greg
The article implies that CLR code is interpreted. All .NET runs compiled code, either JIT or AOT compiled. And there's an unsubstantiated remark about efficiency and "Long code paths". That looks like FUD to me, and without something substantial it seems suspicious.
Seriously this is probably priority 100 on his list. ASP already has had such a long foothold on server side scripting that it'd take a lot to convince existing pages to change over to PHP.
I found the article quite interesting, but lacking in supporting evidence for many claims. Specifically, he states that on both speed and efficiency (not quite sure the difference, but I'm guessing that he's referring to memory usage for the latter) ASP.NET is weak. I'd be interested to see comparisons showing the difference between equivalent sites written with PHP5 and ASP.NET to see the difference.
Also, he mentions (a few times) about IIS insecurities (at posts a link to bugtraq), however I'm unable to check since the site seems to be crawling. How does PHP5+Apache's security record compare to ASP.NET+IIS6?
-- Cyrus (http://blogs.msdn.com/cyrusn)
Another weakness is that PHP's function names are case insensitive. Some programmers might find this feature annoying, though this isn't a serious drawback.
How is this a drawback at all?
In my opinion, it prevents programmers from perhaps accidentally naming their own functions the same as a built-in, which is a good thing since there are so many, its useful to know as many as possible. However "annoying" this maybe to some people, its actually a good idea.
I worked as the web admin to my student association when I was in college, and a job opening came up to redesign the programmers site, bringing online a bunch of new tools for students of that department. This was basically a summer job, and they had interviews where myself and four other students made it through the selection process to the final interview.
[...]
Did they ever get screwed. The guy who they hired was a Korean exchange student, who I happen to think was a great choice for the job, but the problems started cropping up with the ASP code. It was buggy as hell. The system took all summer to code out the object oriented code, and it was never opened because it was never quite good enough.
[...]
In my opinion, this was not the fault of the guy they hired at all, it's just that ASP takes a lot more time to get together than PHP. You can "know what you're doing" all you want, but when your boss wants you to make changes to core behaviours, there is nothing faster or more efficient than PHP for handling anything web related. It's just easier to whip together any site with any behaviour and get it working and stable.
Why isn't there a "-1, Jumping to conclusions" moderation option on Slashdot? Let's reiterate. This was a student body, hiring a student for the summer to hack some website, alone I might add. And the fact that it all went miserably wrong is supposed to imply that the Microsoft ASP platform is fundamentally flawed and everything would have magically worked with PHP?
I do a substantial amount of ASP.Net coding and they seemed to just give a weak gloss over the actual technology they were comparing here. First, IIS & Win32 are *not* the only places where you can run ASP.Net. The mono project is getting better and better fairly quickly. This is mentioned briefly in their "security" section.. which is also a load of crap. Price: PHP has a habit of becoming very perl-esque over time because of the language. Maybe 5 changes this, but I doubt it's enforced. So an IDE that's going to clean your code vs. cost in man-hours spent debugging some "super efficient php code" (read: "looks like perl") bleh.. I'll take the IDE The database code samples *Don't do the same thing* .. but they DO show the people who wrote the article don't know ASP.Net, because they're using the old and insecure form of database connections as opposed to parameterized queries.
Nice to know that both sides of the fence are as equally capable of FUD.
..... so we have no ASPs, but plenty of Pythons!
Je fume. Tu fumes. Nous fûmes!
Need to find a good PHP Editor ?
All of them (commercial,free,OSS) reviewed and classified: http://www.php-editors.com/
My personnal (and free) favorite : PHP EDIT: http://www.waterproof.fr/
Need a PHP Debugger? DBG can do remote debugging and it can be integrated with the PHP Edit IDE, which is very nice : http://dd.cron.ru/dbg/
Now, who need Visual Studio? Almost every (php) editors now has code insight, integrated help, code completion, skins and whatnot. Hell, I sometimes go back to Notepad for quick fixes because its faster to fire up. But if you said PHP need an IDE, I think that you have not looked around very much.
Now people start your eng-uh editors and go code some PHP!
This is a stolen sig.
The review states that ASP.NET only works on
Windows, which is incorrect. Mono brings ASP.NET
to Linux, MacOS, BSD, HP-UX, Solaris and many more.
Mono's ASP.NET can be hosted in Apache (through the
mod_mono module) or as a standalone server (xsp).
The platform price is also wrong (by extension),
Mono's ASP.NET runs on pretty much anything.
The source code to Mono's ASP.NET is also available.
And I have to say, am puzzled by the "Speed"
column. If ASP.NET has something going for it
in terms of dynamic pages is speed: they have
all kinds of tricks:
* page generation code is running at native speed.
* caching is provided at the control level,
page level, database connection level.
And of course, there is no evidence to back any
of the performance claims.
I love PHP as much as the next guy, but that review
was done by someone that did not understand ASP.NET.
The code they posted to compare PHP vs ASP.NET
talking to Oracle is uneven, as the rest of the
article: in one case it shows data being rendered
from the database, and even has a connection string.
The other example only shows a class that wraps
reading and writing, but does no actual job.
A bit deceiving.
The author is miles off when he talks about the speed and efficiency of asp.net - he simply says "because there is more code and it's OO, it will take longer to run, and that slows web pages down".
Well I would agree that on first execution of a page (the first time a page is loaded after a reboot or restart, or the document is changed) asp.net is slower than ASP or PHP - however on every SINGLE subsequent page execution asp.net is considerably faster in my experience. Programming intranets and deploying/testing them has proved it to me - when the latency across the network is tiny the difference is notable on all non-trivial pages to the HUMAN eye, and the test suite backs this up.
Of course, code execution speed depends to a large extent on the coder and his techniques, but a good coder will be able to achieve much more rapidly responding web applications with ASP.NET than he would with Classic ASP or PHP 3 or 4. I can't talk about PHP5 because I moved exclusively to ASP.NET some time ago due it's superb libraries, saleability (clients like to hear MS and buzzwords) and the fact it's truly OO - just a personal preference.
To counter this, we have one ASP programmer in our company. He's been knocking out fairly complex database-driven web sites in ASP for us for several years. He's fast, his work is reliable and there are no complaints. What's your point?
It sounds to me like they made a poor hiring choice, not a poor choice of technology. If you'd given them a PHP+MySQL solution, it might have worked well by itself, but how would it have fit in to the overall picture? How much extra would it have cost them in maintenance and training for their IT department supporting a new or different/additional platform?
Are you saying that you are willing to dish out $$ for an MS product, but not for some other company's product?
It is actually quite sad to see such superficial attempts to justify an open-source product merely on the "merits" of not being produced by Microsoft. I mean, using criteria like "strong", "weak", "$$" is not what I would consider professional. I good way to compare products actually would be to get the experts to implement a relatively real-life project (like the famous Pet Store) in both languages and then compare the development time, speed, code metrics, scalability, and potential for extensions. That would be a true comparison, not the "metrics" used in the article.
Now back to personal preferences. Being a UNIX programmer with about 16 years of experience, I can assure you ASP.NET blows any other Web framework out of the water. Yes, it is that good. You get a very nice and consistent object model with full .NET power behind it. JSP and servlets shouldn't bother either as all HTML is generated transparently - in many cases you don't have to write a single line in HTML! As a result, you write less code, it is easier to maintain, with fewer opportunities for bugs or security holes. All are considered best practices in my book. I'd love to see PHP mature to the ASP.NET level but it is simply not there yet and even the attempts of PHP 5 to tackle these problems is a step in right direction, there is still a very long way to go.
If Tyranny and Oppression come to this land,
it will be in the guise of fighting a foreign enemy. -James Madison
ASP.NET (and the Java equivalent, JavaServer Faces) have a much different, (arguably) more sophisticated approach to web development. There is actually a pretty good story for UI/logic separation, eventing, and maintaining state. You can have your HTML tags constituted into a mutable object graph before rendering (example).
The end result is a development style that lets one write web apps the same way one writes desktop GUI apps, and as a bonus you get far more compile time guarantees than before (even vis-a-vis compiled scripting languages like JSP). Whereas in most scripting languages, getting a dynamic <select> to default to the proper selection and remember its selection across page redraws takes an annoying kludge of code, it's trivial in ASP.NET.
You don't have to like the direction MS has taken with ASP.NET, but the fact that the author didn't even mention the fundamentally different programming model it offers vs. PHP says to me that he didn't bother doing much research into it.
The author completely ignored one of ASP.NET's greatest advantages - it is an abstraction from writing HTML (which I guess they think makes it inefficient, just like C is less efficient than machine language). When I write:
TextBox t = new TextBox();
t.Text = "Hello World";
I do not know, nor care, what actual markup will be returned to the client. Before you start worrying that you need absolute control - consider the problem of delivering to multiple browsers/devices. ASP.NET will render different markup, depending on the browsers capabilities. When browsing from a PDA or phone, it will render appropriate markup. Does PHP do that?
PHP5 is available under the PHP license, version 3.0: http://www.opensource.org/licenses/php.php. This is a variant of the Apache license 1.1: http://www.opensource.org/licenses/apachepl.php. The Zend engine license 2.0 also is a variant of this license.
I can't see why this is a problem for you - is the Apache license also problematic for you?
The Apache license and the PHP/Zend licenses are incompatible with the GPL, but they do qualify as free licenses under the DFSG guidelines.
Where can I get some of this crack you're smoking???
.NET CLR is packed full of more classes than you'd ever know what to do with. I rarely have to buy any 3rd party components other than for interface-related things.
1. We're talking ASP.NET, not ASP. Welcome to the conversation.
2. How does ASP give you nothing? Last time I checked the
3. It is VERY feasible to run ASP.NET on a totally free platform using Mono.
4. If you think ASP.NET is inferior than PHP then you know nothing about web development. They both have strengths & weaknesses, but ASP.NET is by no means inferior.
Someone MOD this FUD-believing sheep down please.
I am a leaf on the wind. Watch how I soar.