SitePoint Sponsor

User Tag List

Page 2 of 4 FirstFirst 1234 LastLast
Results 26 to 50 of 95
  1. #26
    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 12:31.

  2. #27
    chown linux:users\ /world Hartmann's Avatar
    Join Date
    Aug 2000
    Location
    Houston, TX, USA
    Posts
    6,455
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    I honestly have not followed .NET recently because when I first read about it I thought of it as a solution to a problem that didn't exist. I do not think that it is a big innovation.... Just something new to learn

    So if you could explain what problems .NET addresses and solves that would help. 'Cause I do not know of any.

    I have also read that the .NET Community or whatever it was called has been dropped by MS.

  3. #28
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    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.
    Along with my use of the word "byte code" earlier, I put "I believe". That's my ignorance of terminology in lower level languages. For byte code, please replace with the correct term for your respective langauge.

    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).
    Just like ASP v3.0. Also ASP.NET, C#, J# and the rest are also interpreted languages.

    The PHP Accelerator works by caching the compiled version on disk (and in memory I believe?) and using that for future requests.
    Zend built in the "Optimizer" into the C++ code behind PHP 4, to which the Accelerator hooks. In terms of what is does, the steps are still exactly the same as .NET - the Accelerator caches an "interpreted" version of the script in it's own "intermediate langauge" and JIT compliles as well, before execution.

    In the strictest sense, neither is storing (caching) "real" binaries, because a "real" binary has already had all compiling performed it and can be simple "run" without any intermediate steps.

    Both are using a layer which sits between them and the operating system, and when you really think about it, you'll see there's only one solution to this problem, which they've both adopted. The nature of the solution is what makes the end result, this "5x peformanace boost" the same for both - that's no coincidence.

    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.
    They are in many ways equal technologies. The difference is the fine print. And as to people slamming .NET, I've seen just as many claims to the effect "PHP is dead. Long live .NET".
    Last edited by HarryF; Jul 16, 2002 at 14:54.

  4. #29
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Newcastle, England
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry Harry, but I'm afraid you're mistaken - ASP.NET code is not interpreted. Languages like Visual Basic (versions 6 and lower) were interpreted - even C++ compilers used to produce byte code which was interpreted (this is some years ago). The advantage of interpreted code was hardware independence; the disadvantage was slower execution.

    Interpreted code is code which is "compiled" into byte code (or an equivalent, whatever name you wish to give it - VB called it p-code for example - but basically it's all byte code, so let's just call it that). These bytecode executables and libraries had to have each instruction interpreted at execution time, with the inevitable slowdown in execution. This is what the ASP 3.0 scripting engine does, and what PHP does (ignoring Zend Accelerator for now).

    For .NET, code first gets "compiled" into IL which is basically byte code. If that was all there was to it, then .NET would be interpreted. However, there's an additional compilation step. Instead of interpreting this IL bytecode at run time, large blocks of it get compiled into native code. This native code isn't byte code, it doesn't need to be interpreted at all, it runs directly on the system's CPU. Just as modern-day C++ compilers produce code which runs directly on the CPU.

    I can't explain it any clearer I'm afraid. The end result of a .NET page being compiled is lumps of machine code which run straight on the CPU. This isn't exactly the same as, say, a standard C++ compiler's output (which converts the code straight into a huge lump of native machine code), but it's not byte code which needs to be interpreted either.

    In short - interpreted code is code which has to have each byte evaluated at runtime. That's what interpretation is. Compiled .NET code doesn't have to be evaluated byte by byte - it runs straight on the CPU. Therefore, by definition, it's not interpreted code.

    -------

    My post wasn't an attempt to denigrate the Zend Accelerator or PHP or anything, just to clear up a point. I'm not brilliant at explaining these terms, so I'm afraid that if what I've posted above isn't clear then I'll have to stop trying. And as I said, the two (.NET and ZendAccelerator) do arrive at pretty much the same point. They take a different route to get there though. And I imagine that they are very similar performance wise too (still haven't seen any benchmarks to show it conclusively though, could you link to the source which shows it please?)

    My final paragraphs there [edit: in my last post] were only my personal view on these forums. I too have seen a lot of people (stupidly) claim that PHP is now pointless, that .NET is far superior etc. It just so happens that, on these forums, I've seen more posts going the other way. Personally I wish both would stop . I like both technologies and can see real advantages to both; I just dislike it when people shout something down without really knowing anything about it (that works both ways too, and people slam PHP without trying it or learning enough about it).
    Last edited by CrazyCrane; Jul 17, 2002 at 03:55.

  5. #30
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Reckon we're going in circles now. Still think we're talking about the same thing (Zend Accelerator or .NET framework as far as compiling goes) but perhaps our definitions are too lose or different.

    Will see if I can rustle up some people with experience at a lower level to clear things up.

  6. #31
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Newcastle, England
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Probably true . I'm not exactly arguing that the .NET process is better than ZendAccelerator or vice versa you understand - I understand the .NET process reasonably well (not very well!), the Zend process less so. I was only really trying to clear up the "interpreted code" bit, and explain that .NET produces code which executes straight on the CPU without having to be evaluated (interpreted). Maybe Zend does the same thing too? I don't honestly know, which is why I confined my explanation to .NET .

    Perhaps as you say it's merely a difference in meaning - what I think of as interpreted code may not be what you think of as interpreted code.

  7. #32
    SitePoint Zealot
    Join Date
    Dec 2001
    Location
    Ontario, Canada
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it seems to me, as though both do the first step of compilation, just leaving it as an object file, and not doing the "Link" operations that make a truely compiled standalone executable object.
    Last edited by AcidReign; Jul 20, 2002 at 10:44.
    Web Hound
    $x='010000010110001101101001011001000101001001100101011010010110011101101110';
    for($i=0;$i<strlen($x);$i+=8)print(chr(bindec(substr($x,$i,8))));

  8. #33
    SitePoint Zealot jazz's Avatar
    Join Date
    Mar 2002
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well for what it's worth.
    I see a lot of big sites running PHP and they seem to be doing fine. As time progresses hardware is only going to get better, more powerful. ASP.NET may be a great technology but for a small business or a cost conscious big businesses, PHP does its job well for a price that can't be beat. In addition I really like how quickly these open source technologies release security patches and develop new features. Even if ASP.NET is the Ferrari of web applications, PHP would probably be the Porsche of web applications for the price of public transportation.

    Oh, one question:
    Wouldn't ASP.NET be slower on Apache then mod_php with Apache?
    The reward of a thing well done, is to have done it.

    -- Ralph Waldo Emerson (1803-1882)

  9. #34
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by jizz
    Wouldn't ASP.NET be slower on Apache then mod_php with Apache?
    No, that doesn't make any sense.
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com

  10. #35
    SitePoint Zealot
    Join Date
    Dec 2001
    Location
    Ontario, Canada
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    correct me if I'm wrong but ...
    I believe that ASP still does not work with apache.
    Web Hound
    $x='010000010110001101101001011001000101001001100101011010010110011101101110';
    for($i=0;$i<strlen($x);$i+=8)print(chr(bindec(substr($x,$i,8))));

  11. #36
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by AcidReign
    correct me if I'm wrong but ...
    I believe that ASP still does not work with apache.
    No, you are correct - it doesn't. ASP does, kind of, with Chilisoft, I guess, but ASP.NET doesn't.
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com

  12. #37
    SitePoint Member
    Join Date
    May 2002
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Covalent has ASP.NET running on Apache with their "Enterprise Ready Server", but at $1495 I don't think I'll be trying it out anytime soon.

  13. #38
    SitePoint Zealot
    Join Date
    Dec 2001
    Location
    Ontario, Canada
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Chillisoft is not ASP, its a Java Servlet that parses VBS/JS and tries to act like ASP
    Web Hound
    $x='010000010110001101101001011001000101001001100101011010010110011101101110';
    for($i=0;$i<strlen($x);$i+=8)print(chr(bindec(substr($x,$i,8))));

  14. #39
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by AcidReign
    Chillisoft is not ASP, its a Java Servlet that parses VBS/JS and tries to act like ASP
    That's why I said "kind of"
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com

  15. #40
    SitePoint Zealot jazz's Avatar
    Join Date
    Mar 2002
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, that doesn't make any sense.
    I was thinking that if the PHP CGI is slower than the PHP Apache module (mod_php), that any type of system which had to adapt .NET to work under Apache would bring some kind of performance hit. Since it has to pass through an extra conversion layer.(???)
    But maybe that logic is still messed up?
    The reward of a thing well done, is to have done it.

    -- Ralph Waldo Emerson (1803-1882)

  16. #41
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Erm... There's a Suggestions & Feedback forum for this kind of thing. Grabbing a random topic and bringing it back to life isn't the way to do this.

    Post reported.
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  17. #42
    SitePoint Wizard bronze trophy
    Join Date
    Apr 2003
    Posts
    4,095
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which posts in particular are you referring to? Did they contain anything inappropriate?

  18. #43
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Oh yes, and oh no you don't want to know. Though I exerpted some of them on my blog
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  19. #44
    SitePoint Wizard bronze trophy
    Join Date
    Apr 2003
    Posts
    4,095
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now I'm referring to a post that doesn't exist.

  20. #45
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    We're together on this one. Talking to ourselves. Except that it looks like I brought this thread to life again...
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  21. #46
    SitePoint Wizard bronze trophy
    Join Date
    Apr 2003
    Posts
    4,095
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So... this is most peculiar:

    • e-bart is still in the members list.
    • Only one post is shown for him.
    • That post has been deleted.



  22. #47
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You realise we could just stop the madness by not talking to each other, right?
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  23. #48
    SitePoint Addict
    Join Date
    Mar 2002
    Location
    Miami, Florida - Caracas, Venezuela
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sitepoint should move those posts to a "trash" forum and then block the poster out instead of deleting the posts completely.
    Luis

  24. #49
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Posts are never deleted. They're moved to Purgatory.
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  25. #50
    SitePoint Addict
    Join Date
    Mar 2002
    Location
    Miami, Florida - Caracas, Venezuela
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Where's Purgatory?
    Luis


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
  •