SitePoint Sponsor

User Tag List

Results 1 to 25 of 95

Threaded View

  1. #14
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Newcastle, England
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Regarding the compilation question, ASP.NET code is compiled into native binary. It's first compiled into IL (Intermediate Language), not machine code. The output from the compilers (csc.exe, vbc.exe etc.) is in IL. However, this IL is JIT compiled into machine code before execution. That is, the IL isn't interpreted; it isn't converted to byte code (like Java) or p-code (like VB6); it's compiled into native machine code then executed. Probably the critical difference between the JVM and .NET's CLR is that the CLR compiles into native code.

    PHP is an interpreted language; every time a page is requested the script must be interpreted (effectively the page is opened, parsed, and compiled on every access). The PHP Accelerator works by caching the compiled version on disk (and in memory I believe?) and using that for future requests.

    The two work in significantly different ways, with strikingly similar outcomes (basically, a compiled version of the page can be used straight off for future requests, eliminating the most time-consuming parts of the process).

    The comment ".NET or Zend Accelerator simply optimise the process of interpreting scripts" is incorrect, because .NET is not a scripting language and does not use a scripting engine; hence it cannot be interpreted. It is always natively compiled.

    Regarding speed, I'd love to see the benchmarks which prove that ZendAccelerator is faster than .NET. I don't doubt the two will be close, and I wouldn't even be surprised if ZendAccelerator was faster; I just haven't seen any conclusive (or even inconclusive) comparisons. As it's apparently established fact I'd be interested in seeing it myself.

    -----

    As far as the original post goes, anyone who claims .NET is better than PHP (or vice versa) without giving good reason isn't making much of a point. Unfortunately, from what I've read these last few weeks on the forums, there seem to be more people slamming .NET without knowing what they're talking about than the other way round. I can respect people who back up their objections with reasonable arguments of course, but the number of false statements or blind objection without any first-hand experience ("it's MS ergo it sucks") I've seen is staggering. I know that MS pump out PR like there's no tomorrow, and some people follow it blindly and sing MS's prasies without really knowing why, but (on these forums at least) it seems the anti-.NET crowd are, with a few notable exceptions, the ones unable to open their minds.

    .NET is a great technology. So is PHP. They have advantages and disadvantages compared to one another, many of which depend on your personal circumstances and preferences. The advice I'd offer is not to get too hung up on one thing to the exclusion of everything else. There's room in the world for more than one good technology, and there's room in most developers' heads for knowledge of more than one language / platform / technology. Personally, if I had to choose between learning PHP and learning .NET I'd choose the latter... but the great thing is, I don't have to choose. I simply learn both, and get the best of both worlds; use PHP when it's the best choice, and .NET when that's more suitable. It's a win-win situation, as long as you don't mind keeping an open mind .
    Last edited by CrazyCrane; Jul 16, 2002 at 11:31.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •