Slashdot Mirror


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."

19 of 478 comments (clear)

  1. Update? by Chuck+Bucket · · Score: 4, Interesting

    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$#

  2. After reading the FA ... by cablepokerface · · Score: 5, Interesting

    ... 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 ...

  3. Databases, Platforms, my opinions on using ASP.Net by Ollierose · · Score: 3, Interesting

    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.

  4. Object Oriented Scripting?! by Desult · · Score: 4, Interesting

    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
  5. Re:PHP 5.0 Goes For Microsoft's ASP-dot-Net by superpulpsicle · · Score: 4, Interesting

    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.

  6. Re:It's Visual Studio, not the languages! by PhrostyMcByte · · Score: 1, Interesting

    I will continue to do so until someone makes an IDE on Linux that compares to Visual Studio (and no, Eclipse is not that IDE, especially for non-Java projects). Who knows, maybe I'll even develop it, if I can find the time that is :)

    Like MonoDevelop? It is based off SharpDevelop.

  7. lies lies and more untruths by pc-0x90 · · Score: 5, Interesting

    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.

  8. Pros and Cons - Speed and Efficiency by Afty0r · · Score: 4, Interesting

    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.

  9. Re:Performance Claims by Chester+K · · Score: 2, Interesting

    and make performance claims in them without any sort of supporting evidence?

    I thought it was particularly laughable that they just do some handwaving and declare ASP.NET slower than PHP because "there is a lot more code to run through to execute the same ASP page than ... an equivalent PHP page".

    It's total bullshit.

    ASP.NET JITs to native code. The extra baggage of the extent of the ASP.NET Framework has zero performance penalty after the initial compilation stage. PHP is interpreted, every request unless you buy their commercial solution, which gives PHP the "$$" they lovingly placed under "Platform Price" for ASP.NET.

    They also take the easy potshots at IIS as a security weakness (IIS6, a rewrite of IIS which has been out and in production for well over a year, has zero security vulnerabilities); and they just poo-poo the fact that Mono/Apache runs ASP.NET just as well, if not better, than Windows/IIS.

    --

    NO CARRIER
  10. I try to like PHP but... by joeykiller · · Score: 2, Interesting

    It may be right that PHP5 is targetting ASP.Net, but I can't say I think PHP5 and ASP.Net will appeal to the same audiences.

    PHP shines because it's not so much a language, as it is a front end for different C libraries. This is PHP's strength, but it's also it's main weakness. It lacks a coherent object model, or even a coherent naming system for the different libraries it integrates. As such it is a mess, and difficult to learn -- though it's more feature packed than you can dream of in ASP.Net.

    Both .Net and Java are better in this way, things look and feel like ASP.Net/Java from library to library. Even Perl are better in this respect. (PHP is becoming a little bit better, with the new DB classes in Pear, but the core is still very function oriented).

    So even though I'm "born and raised" (as a web developer) in the Unix/Linux/OSS world, I can't bring myself to quite like PHP. It's a mess (but a lot of people doesn't seem to mind, so I guess the problem lies with me, not PHP).

  11. I don't trust Zend. by JessLeah · · Score: 2, Interesting

    I really can't believe I'm the only person out there who doesn't trust Zend. The Linux kernel is backed by kernel dot org, Perl is Larry Wall (an individual hacker) and his Merrye Bande of Hackers, and no one company "owns" C (contrary to what some might think re: Microsoft Visual C++ ;) ), but PHP is "owned" (read: controlled) by a commercial entity, Zend.

    What's to say PHP6 won't be released with a MS-style EULA? Do we really trust the company called Zend? Frankly, I wouldn't be at all surprised if Microsoft would start working with Zend-- much like how they have worked with those guys who made "ActivePerl"... MS likes to dip their fingers in every pie, so long as it's commercial-- and Zend is commercial.

    Again, why should we trust these guys? They're just another company out to make money, and in this day and age, this likely means that they'd get in bed with Microsoft in a heartbeat if BillG or MonkeyBoy came a-knocking. So perhaps my question should be: Will Zend sell out? (Remember: Even Sun sold out.)

    1. Re:I don't trust Zend. by imroy · · Score: 2, Interesting

      Perhaps just as important as the licensing issue is that of performance. Zend makes (or made, not sure now with PHP5) a PHP compiler and optimizer. Just buy the Zend product and make your PHP site faster and more efficient! But what about the free version? Would they cripple the performance of the free version just to sell more copies of the compiler/optimizer? Perhaps not. But I wouldn't be surprised to find them simply neglecting peformance problems in the free version.

      I'll stick with Perl, thankyouverymuch. Python's looking interesting as well...

  12. The new SimpleXML module is worth it alone by ShatteredDream · · Score: 2, Interesting

    I have been playing around with this module a bit and have found it to be damn good at what it does. It really makes it easy for people to take advantage of XML for simpler operations which takes away an advantage of ASP.NET.

    For many operations, SAX and DOM are simply too convoluted or complex. As long as you have an idea of what the document structure will be like in advance, you can quickly handle documents.

    Here is an example from my site of what it looks like

    <?php
    $xml = simplexml_load_file("test.xml"); //where test.xml contains the XML from up above
    print $xml->statement[0];
    print "<br/>";
    print $xml->statement[1];
    ?>
  13. Re:PHP vs. ASP.NET by NulDevice · · Score: 2, Interesting

    Really an apples/oranges kind of comparison.

    NObody's going to argue the cross-platformability of php. Not even MS.

    And despite Mono and so forth, ASP.NET and the rest of the .NET development platform is created by Microsoft for Microsoft so developers can write Microsoft apps for Microsoft servers. .NET encompasses windows apps too, not just web apps. The codebase between the two is almost identical - okay, a winForm is stateful and a WebForm is stateless and the UI widgets are different, but the rest of the backend database/XML/IO stuff is the same. I don't think you'll want to use PHP to write a desktop app, or a suite with desktop/web integration. On the flipside, ASP.NET would be complete overkill for a majority of web-apps. .NET's main competitor isn't PHP. It's Java. The way the architectures and libraries are set up, the target audience, even the langauge skills requred. Hell, C# and Java resemble each other so much that switching back and forth is a dawdle (well, almost. I just came off a 5-mo C# contract and am now on a java gig and I keep accidentally swapping keywords). I realize PHP5 has added some OO functionality, but I'm doubtful that it's as ground-up OO as either Java or C#/VB.NET etc.

    PHP is great, I love it and use it all the time. But for the kind of work where ASP.NET would be an option, PHP wouldn't be. Regular old ASP? Sure, and I'd choose PHP over ASP in a heartbeat. But .NET is a different beast entirely. ASP.NET is as different from ASPclassic as it is from PHP.

    --

    ----
    "I used to listen to Null Device before they sold out."

  14. Re:It's Visual Studio, not the languages! by Slime-dogg · · Score: 2, Interesting

    My company shells out for VS.NET and SQL Server. I initially tried to sway them away from this, mostly because I know that I can handle the administration of Linux based stuff, but my boss had other ideas, and we have an MCSE network admin now.

    Anyway, I have to say that VS.NET is fantastic. Not only is the integrated debugging a godsend, SQL Server integrates well into VS.NET. I can debug stored procedures from within VS.NET, something that I haven't experienced anywhere else. I can also directly edit the database from within the development environment.

    Just recently, I realized that I wanted to add a bit field to a table. With VS.NET, I just right click on the table in the "Data Connections" explorer, and click on "Edit." Then I just go to the data code and classes and add the boolean. I also would have to modify the stored procedures, which is just a matter of double clicking in the "Data Connections" explorer.

    If I didn't have VS.NET, I'd have to open Enterprise manager, and do all of the changes there, or just type the SQL into Query Analyzer. I have no problem doing the straight SQL method, but it's not as fast as working with VS.Net. If I want to verify that it works, without VS.Net, I'd have to do a lot of testing SQL in the Analyzer.

    The article doesn't go in-depth about the ways you can optimize ASP.NET. They thoughfully skip over ASP.NET's page caching, and they also seem to leave out the fact that an ASP.NET page gets compiled to machine code on it's first execution, and is optimized by the JIT compiler. The "long code" that they refer to isn't really that long in the end.

    Another huge issue is the "platform." Mono serves as a cross-architecture platform for .NET, including ASP.NET. You can connect to a multitude of databases with Mono as well. ASP.NET is not limited to IIS, nor is it limited to Win32. IIS is also not required for ASP.NET to work, as they do note, but they fail to mention that it's incredibly easy to write an ASP.NET web server with .NET (look at Cassini, which is limited but functional).

    --
    You need to restart your computer. Hold down the Power button for several seconds or press the Restart button.
  15. Re:It's Visual Studio, not the languages! by nuggetboy · · Score: 2, Interesting

    Don't mistake the design faults of this version to be "VB-style" properties being a fad. Indeed, there are some issues with the design and UI, some quite glaring. However, the property page paradigm is quite useful. They just need to get it right, your multi-property example being good. Also, your numbered points are all pretty much rooted in the core flaw with "round-trip" HTML editing that has been present since v2002. [asbestosSuit] As I understand it, this is to be fixed in the upcoming release. [/asbestosSuit] Granted, if they let this one slip by again, I think you'll see a mass exodus of web developers from the product.

  16. Re:This says it all by space_man51 · · Score: 2, Interesting

    The article was biased in that it compared ASP.NET with PHP in the areas that PHP is designed and works for. But the article was correct that for the things PHP is used for, it is definitely the better choice.

    And the one thing that PHP does have over ASP, as the article mentions, is cross-platform and cross-server compatibility. Plus no complex licensing and being open-source helps.

    Also, since HTTP is a stateless protocol, I would consider a client-side solution if the application is so complex it requires an event-driven interface.

    I would recommend reading about the upcomming Perl 6, which amongst other things has a complete Object Oriented design.

    --
    Anton Markov
    *** Linux - May the source be with you! ***
  17. Re:This says it all by EllisDees · · Score: 5, Interesting

    >4.) Unified coding model. No more fiddling with half the code in JavaScript and half on whatever you use on server side.

    I call complete Bullshit on that comment. I use ASP.net on a daily basis, and if you want to do anything - and I mean *anything* - outside of the little tool box Microsoft has given you, you will have to use javascript on the client side and various tricks on the server side.

    --
    -- Give me ambiguity or give me something else!
  18. Re:It's Visual Studio, not the languages! by Skim123 · · Score: 2, Interesting
    For example, try changing 1 property on 10 text boxes. You must click each text box, then click on the property page, scroll down to the proper value, click on it, highlight the existing contents, then change it. It's terribly inefficient.

    Actually, if you are changing a property that is common to all selected controls, such as the BackColor, you can select multiple controls, and the Properties window will display just those properties that are common to the selected controls. At least you can do this in VS.NET 2003.

    I agree that the code-behind model leaves a lot to be desired. It is a hack, really, and despite the fact that MS has touted it as a clean separation of code and content, it's there solely because they could not get VS.NET to work any other way. With Visual Studio 2005 and ASP.NET 2.0, the code-behind model, while still available, will likely be left behind for the code-beside approach.

    You can read more about code-behind's hackiness at this blog entry. There's also a good blog entry on the same topic by Andy Smith.

    --

    I could not justify my existence if I were a turkey farmer. Would I terminate myself? Undoubtably, yes.