1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

What differentiates ASP from PHP?

Discussion in 'C#' started by minimumrage, Apr 16, 2007.

  1. #1
    All of my sites are written in PHP and I'm curious as to what ASP users like about it, why they think it is better (or just different) than PHP, etc. I know nothing about ASP, and am just curious as to your thoughts.
     
    minimumrage, Apr 16, 2007 IP
  2. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #2
    Syntax... ASP is a much older scripting language (classic anyways). ASP.NET 2.0 or 3.0 completely crushes PHP though... It has the entire power of the Windows API inside it.
     
    ccoonen, Apr 16, 2007 IP
  3. jimrthy

    jimrthy Guest

    Messages:
    283
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #3
    This is really just a "Yeah, ccoonen, that's right!" kind of post.

    Yes. I feel very sorry for anyone stuck using classic ASP. PHP blows it away.

    ASP.NET 2.0 turned it into a real, usable, viable way to create mega-powerful websites. (1.1 was, IMO, an Abomination unto The Lord. Or something like that).

    For simple sites, PHP's much easier to just hack something together. Once things start getting complex, it's really time to go looking for a different tool. (Yes, complex sites can be done in PHP, but it's going to be a lot harder than if you took the time to learn a more powerful language/paradigm).
     
    jimrthy, Apr 16, 2007 IP
  4. MarkusJ_NZ

    MarkusJ_NZ Well-Known Member

    Messages:
    240
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #4
    Yep, I agree with the posts above; ASP is just a scripting language much like PHP (e.g., it is not compiled).

    The .NET framework is just a bunch of libraries (Think header files in C/ C++) which provide "out of the box" functionality which you can extend and reuse.

    .NET also has OOP capabilites (Inheritance, overloading, Interfaces etc) so you can really reuse code that you have in websites or in windows apps. Basically .NET allows you to build proper 3 tier applications abstracting the presentation layer away from the business layer (In PHP/ ASP the logic/ business layer was usually inline with the actual GUI, sometimes, even the database code is in there as well!!).

    Hth
    Cheers
    MarkusJ
     
    MarkusJ_NZ, Apr 16, 2007 IP
  5. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #5
    oye, we talkin the troubles of 1.1 are we? Remember Boxing all variables? What a bloody pain... 2.0 was a true life-changer. PHP still has its plusses though as in nice clean html markup :)
     
    ccoonen, Apr 17, 2007 IP
  6. MarkusJ_NZ

    MarkusJ_NZ Well-Known Member

    Messages:
    240
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #6
    :) Yeah, coming from a C++ background when I started doing web stuff I could not believe that all code was placed in line and that COM was really the only way to reuse stuff.. urghh. At least with 1.1 there was the ability to seperate layers and no more (real) dll hell lol
     
    MarkusJ_NZ, Apr 17, 2007 IP
  7. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #7
    Yes, DLL hell was a nightmare for a lot of people... thank you true versioning of DLL's :)
     
    ccoonen, Apr 18, 2007 IP
  8. jimrthy

    jimrthy Guest

    Messages:
    283
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I'm not making any value judgments. It just strikes me as interesting that the .net "solution" to dll hell is to require every app to specify exactly which version of each dll with which it's compatible.

    Which, really, in a lot of ways, totally destroys the reason behind dll's in the first place.

    But asp.net vs. php is really arguing totally different paradigms. Classic asp vs. php is a no-brainer: use php unless you have tons of money to throw at your IT department, and you're technologically illiterate. PHP vs asp.net...two completely different tools for two (really) completely different purposes.
     
    jimrthy, Apr 20, 2007 IP
  9. minimumrage

    minimumrage Peon

    Messages:
    655
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Finally. Now that is what I am wondering. Exactly how are they different, what are the reasons you would use one over the other etc. I guess I assumed .net didn't need to be specified.
     
    minimumrage, Apr 20, 2007 IP
  10. jimrthy

    jimrthy Guest

    Messages:
    283
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Sorry, sometimes my computer-programming mind takes things a bit too literally. :eek:

    PHP is great for quick, down and dirty, let's hack some stuff together. The basic idea is that you have a really simple language, tons of libraries, extensions and add-ons, and generally intermingle your code right into the mark-up of your page.

    There are templating systems like Smarty that let you break things up a bit. But there's still really a feel that you're creating a web page and throwing some code at it to do the extra stuff that it should also do.

    There are also a ton of free CMS' out there, written in PHP, that take you up to the next step. Someone else has already done pretty much all the work for you. You (or someone you hire to do it for you) just have to understand PHP and that CMS system well enough to customize any particular piece you might need.

    PHP is much more open and available to someone with a hacker's mindset. Up to a degree.

    ASP.NET (esp. C#) is geared totally to the IT mind-set of n-Tier Enterprise Development (TM). Lots of time spent up-front designing your classes, choosing design patterns, etc. There's generally a huge emphasis on breaking things out into "controls" (which are basically groups of HTML elements that you re-use over and over again).

    VB.NET seems to be something of a middle ground between the two. It tends to generally be preferred by the people who prefer RAD drag & drop development tools while writing as little code as possible. I think they probably still wind up writing at least as much code as the C# people, but maybe they don't spend as much time up front thinking about it. (Disclaimer: I don't know. I'm not a VB.NET guy, I know very few VB.NET people in real life, and this description could be completely wrong).

    Now, it's possible to program in these different ways in any given language. You can set up PHP code to build your website out of a bunch of individual controls, with each control being tied to a set of hard-core object-oriented code files that really control the way the page gets built. I'm not aware of any IDE's (although there's probably some CMS that fills this niche) that really support this model, and I doubt there's anything that compares to Visual Studio. (More about that later).

    You can also get a lot of the free-flowing just-hack-it-together sort of feel when you're working with C#. But you can't ever really get away from the fact that everything must be an object, and a few other details that almost force you to do everything in a particular way (although there's a lot of wiggle room in there).

    Finally, Visual Studio is a huge difference. For years, I just switched back and forth between vim, emacs, and a command-line compiler/interpreter, depending on what language I was using at the time. I have to admit that Visual Studio is really slick. It probably makes up the productivity difference for working in a language as low-level as either VB or C# compared to higher-level interpreted languages like PHP.

    I hadn't dealt with Intellisense in about 5 years. Back then, it was just a slow, annoying thing that wasted my time and got in my way. Now, especially when dealing with a set of libraries that are as big and complex as .NET, it's a lifesaver. It takes some getting used to, but it really is an amazing tool.

    Intellisense is arguably the coolest thing about Visual Studio. But the automatic refactorings, excellent debugger, and simple plug-in support are also awesome. The graphical page designer is pretty neat, too.

    I, btw, generally despise everything Microsoft does. I'm shocked to learn that I have this many nice things to say about any of their products. :eek:

    So, in a nutshell: PHP is much simpler and easier for small projects. I've worked with a couple of fairly large projects in PHP, though, and both times I walked away swearing "never again." ASP.NET is geared more towards big, complex projects. (What the corporate world doesn't understand is that it's really not geared towards the really complex projects...but that's another topic).

    Whew! Did anyone bother to read this far?

    Is that sort of what you had in mind?
     
    jimrthy, Apr 21, 2007 IP
  11. minimumrage

    minimumrage Peon

    Messages:
    655
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #11
    That is exactly what I had in mind! Thank you so much for the info. :)
     
    minimumrage, Apr 21, 2007 IP
  12. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #12
    Actually, it depends entirely on your skillset; I know how asp works, if someone forced me to I could use it to write a website, only the very though of it makes me feel sick, much the same as jm was feeling after his php projects, nothing to do with asp.net or php being a "better" language, just personal preference, and experience I suppse.

    I can't deny that the development tools that are available for microsoft prodcuts are far superior to that available for php or ruby, however that is directly because microsoft ( untill recently ) required you to pay for a liscence, and not a cheap one either.

    I think if you or the people who do your web development are good at php, then they should use that, if they are good at asp.net they should use that, and if you're good at both my opinion is php should be used over ASP, just to slap microsoft in the face with a big fuck you ........
     
    krakjoe, Apr 21, 2007 IP
  13. jimrthy

    jimrthy Guest

    Messages:
    283
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Heh. In a lot of ways, I agree completely. I'd much rather be using either python or lisp (which I do for most of my personal projects). But it's difficult to find a job that will pay me to use either of those.

    (Yes, I know. I need to quit spending so much time on things like DP, get my side-projects making money, and tell The Man to shove it).
     
    jimrthy, Apr 21, 2007 IP
  14. johnwoof

    johnwoof Peon

    Messages:
    911
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #14
    hi

    it depends upon which langauge u better comfortable.

    if php then php is good else asp is good.

    as a professional view if u purchase hosting from brinkster etc they provide many addon / dlls which can fill the gap of php power.

    trasferering php sites are hell.many version of php & mysql is install on different server which make coder life hell.

    and both are unsecure :)

    thanks
     
    johnwoof, Apr 22, 2007 IP
  15. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #15
    what is insecure ???
     
    krakjoe, Apr 22, 2007 IP
  16. surfcrs

    surfcrs Active Member

    Messages:
    94
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    98
    #16
    I only a few small websites, think I will stick with php based on this info.
     
    surfcrs, Apr 22, 2007 IP