Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I'm looking foward to building a online community website that offers personal homepages for people. I'm planning to include it all, buddy list, instant messaging, profiles, polls, counters, message board, etc.

Now I'm Pretty good w/ perl and would be able to build such a site with it. I'm also good with databases too. I'll be using a Apache with mod_perl to handle such a site.

But lately, more and more sites like these are using ASP. Whats the difference? I can't seem to find any where that just gives a flat out explanation on the difference between ASP and Perl. I know Perl can do much more then just web developing, but when a project requires just "web development", which language should I use, Perl or ASP? Are there any benefits with ASP in web developing that can not be used with Perl?

Thanks,
Any suggestions or feedback will be greatly appreciated.

Replies are listed 'Best First'.
Re: Perl OR ASP
by simon.proctor (Vicar) on Jan 18, 2006 at 00:30 UTC
    I think its clear that you mean ASP.NET. ASP is its older brother and you should really avoid using ASP now.

    ASP.NET is a platform rather than a language (well in my experience). Normally, sites for .NET are written in C#.

    The normal design is based on using the "Page Controller" pattern as a basis. So you have a single template and a single class for that template. The two combine to form a page on your site. The class is a normal code and handles the logic for the page. Hence this is called 'code behind'.

    Doing things like feedback, POSTS etc can be done between pages or to the same page. Irrespective, it is called a POSTBACK. The mechanism normally is to first send the info back to the page code which then determines what to do with it.

    Finally, you will find that most ASP.NET pages (or ASPX pages) will be wrapped in one uber form tag to allow this mechanism. It isn't mandatory but watch out for it. Where it does exist it does create usability and accessibility issues (according to a fellow colleague).

    ASP.NET also allows you to create request handlers and filters. If you work with these then you can overcome the constraints of the Page Controller mechanism but then you are left looking for an Open Source API or writing your own. A direct example of a competing product for this would be something based on Ruby on Rails.

    I don't think anyone who is good with Perl should necessarily find it hard to build a website in ASP.NET. In fact a lot of it can be done through RAD tools. However, this is also its weakness. Heavy reliance on Javascript and poorly implemented HTML can create problems where careful use of Template::Toolkit or HTML::Template and an MVC framework like Catalyst or the one from Merlyn can give you what you want.

    Realistically, I would stick with Perl until your clients want to use ASP.NET and are willing to pay for it. Then test the hell out of it when its built.

    PS: The overview of ASP.NET is very highlevel and simplified but I hope it serves.
      Hey,

      thanks, that pretty much gives me an idea of what route to go with. I'll stick w/Perl for developing web pages for now. Just didn't know if there was a real positive advantage that ASP.NET had.

      Thanks
Re: Perl OR ASP
by dorward (Curate) on Jan 17, 2006 at 23:15 UTC

    ASP is just a different language (well, a host enviroment for a number of different languages).

    Perl has quite a few things going for it though...

    • CPAN
    • You know it already. Learning new languages can be fun, but learning a new language while attempting a major project isn't the greatest of ideas.
    • ASP has very strong Windows lock-in (You can use it on other platforms, but its not something you see often)
    • CPAN

    The big obvious difference is that in ASP you generally start writing HTML and then escape into ASP and start writing program code in the middle of your markup. This is considered by many to be A Bad Idea.

    That said, while it is normal in ASP, it is possible in Perl (e.g. with HTML::Mason).

Re: Perl OR ASP
by esskar (Deacon) on Jan 17, 2006 at 22:23 UTC
    ASP stands for Active Server Pages. If you say ASP, it is mostly MS ASP or MS ASP.NET MS ASP is pretty much the same as PHP. You combine your logic and your design in one single file. I do not like these technique. I stricly seperate logic and design - i'm a programmer, not a designer. So i like ASP.NET, but it is also just a programming language and actually just makes sence to use it if you have the MS Visual Studio. but, if you want, you can also do ASP using Perl. Apache::ASP