Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Php vs Perl vs ASP

  • 25-07-2007 3:06pm
    #1
    Closed Accounts Posts: 909 ✭✭✭


    Why was PhP developed when PERL does all the same things? Why use one over the other and which is the best?

    Also, Ive never used ASP. How does this work and what are its advantages/disadvantages.

    This is just out of interest and perhaps desire to learn either PhP or ASP if there are many advatages in doing so.

    :) G


Comments

  • Closed Accounts Posts: 45 CelloPoint


    Gareth37 wrote:
    Why was PhP developed when PERL does all the same things? Why use one over the other and which is the best?

    Also, Ive never used ASP. How does this work and what are its advantages/disadvantages.

    This is just out of interest and perhaps desire to learn either PhP or ASP if there are many advatages in doing so.

    :) G

    PHP is the best. Free, efficient, powerful, easy-to-use. Lots of free support out there too.

    PERL is becoming archaic. Not very time-to-market friendly. Still plenty of hacks knocking around though.

    ASP requires that you pay microsoft lots of €€€ for the most up-to-date development environment and server software. ASP ties in with business logic very well and you can rapidly deploy reasonably stable (not so efficient) solutions.


  • Closed Accounts Posts: 4,943 ✭✭✭Mutant_Fruit


    CelloPoint wrote:
    ASP requires that you pay microsoft lots of €€€ for the most up-to-date development environment and server software. ASP ties in with business logic very well and you can rapidly deploy reasonably stable (not so efficient) solutions.
    ASP is ancient technology at this stage. You probably mean ASP.NET. That's as good a choice as any, it's up to yourself really. The advantage of ASP.NET is the rich class libraries behind it. It's also cross platform, and doesn't require any payments to MS (directly or indirectly) if you want to use it. There are free IDE's from both MS and alternative people on both windows, macos an linux if you want to develop in an IDE.


  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    CelloPoint wrote:
    PERL is becoming archaic. Not very time-to-market friendly. Still plenty of hacks knocking around though.

    Sorry, but this statement is massively general and therefore just wrong. Perl for complex web programming is outdated, sure. PHP is the man now. But....

    The huge advantage that learning perl has is that you can basically be certain that it's installed on any unix box (it comes with the minimal RHEL install for example). The other huge advantage that it has is that there is an ENORMOUS library of libraries on CPAN. We needed to do a ranking system for fun in work recently. I didn't even consider PHP because I knew there'd be something pre-rolled on CPAN.

    Oh...Also, it's sh*t fast. For text parsing it's actually hard to code c / c++ code that's faster. :eek:

    Basically, for general scripting, for the reasons outlined above, perl > * IMO.


  • Registered Users, Registered Users 2 Posts: 68,317 ✭✭✭✭seamus


    Khannie wrote:
    The huge advantage that learning perl has is that you can basically be certain that it's installed on any unix box (it comes with the minimal RHEL install for example).
    ...
    Basically, for general scripting, for the reasons outlined above, perl > * IMO.
    I'd generally agree with this. If you're writing a web application that does some heavy processing (particularly in terms of text), or systems administration (say an admin web front end), then you'd be hard pushed to do better than Perl.

    In Windows, ASP.NET also has massive integration into the OS, and is much more of an application programming environment than the scripting languages.

    For web programming, you really can't beat PHP from a pure speed POV - that is the speed that you can produce code. PHP was designed for writing websites, and that's what it's good at. I find that inline coding (writing the PHP and HTML code in the same file) makes for much cleaner code which is easier to debug. Afair, Perl can't do this.
    It's other major benefit now is portability. Moving the code from one machine to another or from one OS to another, goes flawlessly 99% of the time. I've had trouble moving ASP.NET pages from one windows box to another, and perl can be a hassle if the original box and the new box are configured differently.

    Personally, I've always found PHP much more accessible than Perl or any of the .NET languages. That may just be me though - I remember when I first saw it, it looked just like Java except without strict typing or class usage.


  • Registered Users, Registered Users 2 Posts: 304 ✭✭PhantomBeaker


    I have to say, I used to be a big PHP head, but after doing some bespoke work, I found it easier to throw something together in a perl/cgi script. If nothing else, referring the your own page with $0 is a lot easier than what PHP needs to see to do it.

    I do like perl for webscripting with the CGI.pm module because it provides functions to write out html. You may ask why I'd want to do that rather than write it myself - well, if web standards change dramatically, all I need to do to keep my html up to date is upgrade that CGI.pm module. If I do the mixed html/php stuff, I have a problem.

    The other argument against it would be that CGI can be slow, but if you use something like mod_perl that gets rid of the performance problem again (although I have to admit to never having to use it - the scripts that I wrote aren't exactly taking really heavy loads and aren't likely to any time soon).

    To be honest, I find php to be a bit of a weird munge, with no real namespaces to speak of, which always makes me wary.

    That said, that's just my own preference... and it's not much of one as I'm beginning to look into scgi these days, which looks like a poor man's app server (available in python, perl or scheme - and I'm sure others will follow), and seems to be kind of shiny.

    Regards,
    Aoife


  • Advertisement
  • Moderators, Science, Health & Environment Moderators Posts: 9,035 Mod ✭✭✭✭mewso


    Khannie wrote:
    Sorry, but this statement is massively general and therefore just wrong.

    You mean like all of his statements.
    When someone start by saying "PHP is the best" I turn on ignore. There are pros and cons to all of these technologies. Citing PHP as being free doesn't wash anymore unless you assume every single person asking about these things needs to factor in the cost of buying operating systems because they intend to host their own site. Otherwise ASP.Net is also free, hosting costs are similar to PHP, development software is free and going by the initial criteria for php being the best it must also share this honour. Most of the time it comes down to personal preference and programming skillsets.


  • Registered Users, Registered Users 2 Posts: 1,393 ✭✭✭Inspector Gadget


    Right, time for one of those "my 2c" posts.

    Perl is in many ways an extremely good language, it's powerful, it's feature-riched, it's fast, there's a huge library of stuff out there for it to prevent a lot of the usual reinventing the wheel shenanigans (CPAN), but it's designed primarily as a text processor. It can do pretty much anything else as well, but that's its primary focus.

    Personally, I'm not Perl's greatest fan, because I think the syntax is very hard to read - on this score, I'm a relatively recent convert to Python for the kind of things I'd consider writing Perl scripts for, and I'm very pleased.

    I write PHP every day as my bread and butter job thing. To me, it's kinda like chess - a minute to learn, a lifetime to master (I certainly haven't, despite hacking away at it for several years now). It's very easy to get "my first page" up and running, and there are a bunch of useful tools for it (Pear, ADODB, Smarty, etc...) that make using it easier, but it's only just growing something resembling OO capability. It has one particular advantage, though; provided your scripts run in PHP 4, pretty much every web host on the planet can do the deed for you. One of my pet peeves about it is the tendency for there to be quirky little bugs, and that sometimes the behaviour of parts of the language and its feature set can change without much in the line of notice (I seem to remember XML support being a particular issue in v4).

    With respect to ASP, I haven't written any of this since the .NET variant came along. It's changed dramatically, I'm told for the better, but it's something I'm not qualified to comment on. What I did, I had to do using VBA as a language, and I didn't enjoy it.

    Don't know if this helps, but...
    Gadget


  • Registered Users, Registered Users 2 Posts: 2,931 ✭✭✭Ginger


    Didnt we already do this thread last week????

    PHP Vs ASP.NET that time round.. Its like WWF .. the same people battling week in week out :P


  • Moderators, Science, Health & Environment Moderators Posts: 9,035 Mod ✭✭✭✭mewso


    Well my point has been and always will that there should be no need to battle over this kind of thing. Use what you like but please don't post blatant untruths about any of these technologies. I'm a .net developer who has used php in the past and as such would not be qualified to compare them as I'm sure php has improved no end since I used it. It just bugs me when i see the arguement for using php based on those old nutshells of it being free, great support, easy to write and so on when I know asp.net answers yes to all of those claims too. Use what you want without claiming it's the best thing ever.


  • Registered Users, Registered Users 2 Posts: 2,931 ✭✭✭Ginger


    Agreed I have worked in ASP, PHP, ASP.NET,Python,PERL and now I am looking at IronRuby and IronPython just for fun.

    My whole thing is use whatever suits the task at hand.


  • Advertisement
  • Closed Accounts Posts: 909 ✭✭✭Gareth37


    Khannie wrote:
    Oh...Also, it's sh*t fast. For text parsing it's actually hard to code c / c++ code that's faster. :eek:

    Yes, Ive noticed this alright. I am not an efficient coder but it very fast. Faster than any other online login systems Ive seen using PhP etc. I have commented several times on how fast it seems. Thought it was my imagination.


  • Closed Accounts Posts: 909 ✭✭✭Gareth37


    CelloPoint wrote:
    Still plenty of hacks knocking around though.

    Can you explain the term "hacks" here?

    I am using PERL to dynamically create PDF and Excel documents on a UNIX server. Is this illegal and is this what is meant by the word "hack"?


  • Closed Accounts Posts: 909 ✭✭✭Gareth37


    Also, what is the cost for a business for using ASP.NET and I take that it is not installed on most dedicated or shared hosting packages by default?


  • Registered Users, Registered Users 2 Posts: 68,317 ✭✭✭✭seamus


    Gareth37 wrote:
    Can you explain the term "hacks" here?

    I am using PERL to dynamically create PDF and Excel documents on a UNIX server. Is this illegal and is this what is meant by the word "hack"?
    "Hacks" in this context I think are meant as, "pieces of script which allow you to do things which the language has no inbuilt support for or that the language doesn't do easily". Usually it talks about when some new technology or idea comes out, and someone develops a way of getting an existing language to do this new thing.
    There's absolutely nothing illegal about it - The term "hackers" has been warped by the media to have illegal connotations. In computing terms, a hacker is someone who programs. A "cracker" is someone who breaks into computer systems.

    Creating PDFs and Excel documents isn't illegal. Simple as.
    Also, what is the cost for a business for using ASP.NET and I take that it is not installed on most dedicated or shared hosting packages by default?
    Most large hosting companies give you the option between Windows hosting or Linux hosting. You need Windows hosting to use ASP.NET (well, mostly), but most Windows & Linux hosting packages cost about the same - Microsoft provide massive discounts to hosters to provide Windows hosting.


  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    The biggest problem I've seen with ASP.NET is that the development environment does things that work in IE but not in Firefox or other browsers; then, if you adjust the display, you end up with a dilemma if you need to change the code, since Visual Studio will re-insert the IE-specific crap and break the page.

    So your development cycle is A LOT more convoluted than should be required.

    My preference is PHP/MySQL combo, with some jQuery/AJAX thrown in for advanced stuff......but yeah, it depends on what you're doing; you wouldn't use a screwdriver to hammer home a nail!


  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    AFAIK that was only really a problem with ASP.Net 1.1 and visual studio 2003. ASP.net 2 with visual studio 2005 doesn't have that problem (well, I've never seen it anyway)


  • Registered Users, Registered Users 2 Posts: 14,149 ✭✭✭✭Lemming


    stevenmu wrote:
    AFAIK that was only really a problem with ASP.Net 1.1 and visual studio 2003. ASP.net 2 with visual studio 2005 doesn't have that problem (well, I've never seen it anyway)

    Indeed, the only time I've ever really encountered issues beween IE and Firefox when developing with .Net (2.0) has been with IE's implementation of CSS standards (or lack perhaps). And this is considering I spent quite a bit of time working on Encarta of all beasts that exist the web.

    I've seen (internal MS) sites that are hobbled in FF but work in IE, but I have no idea of the underlying implementation so cannot speak for those other than to guess that a) they're older sites and b) much of it comes down to checking active directory for user authentication - which is more to do with IE and the O/S being so heavily integrated rather than something beween IE and FF. I've also used ADSI * for implementing web-apps and not had a problem once authentication challenge was made on FF as well, so to say it might be all down to Active Directory would also be wrong.


    * Active Directory Services Interface


  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    Gareth37 wrote:
    Yes, Ive noticed this alright. I am not an efficient coder but it very fast. Faster than any other online login systems Ive seen using PhP etc. I have commented several times on how fast it seems. Thought it was my imagination.

    Yeah, it's very highly optimised alright. The test we did was for parsing very very large text files (at the time). They were 4G+ in size. For files that large, a fairly optimised (by us) c++ implementation using a few different search algorithms got basically the same time as the perl script, with the perl being faster on some files. Gobsmacking stuff.


Advertisement