Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

What's a good website framework?

by SamCG (Hermit)
on Oct 11, 2005 at 22:10 UTC ( [id://499310]=perlquestion: print w/replies, xml ) Need Help??

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

I'm looking for suggestions on a broad framework of a strategy for developing a website. Here's a bit of a background and what I've considered so far. I admit this question is a tad general -- it's not about which modules to use, or a specific problem, but the general strategy I want to follow.

To date, Perl has been a language which I've used mostly personally, even when my personal purpose was for it to help make my job easier. Mostly, therefore, I've dealt with backend stuff -- getting data from databases, emailing reports around, parsing files, doing downloads from the web, etc., etc. So I'm considering my options...

I'm thinking of developing on my Windows XP box, downloading a web server for testing, and then using MySql for DB operations. The problem is since I'll be using perl (maybe Java or Ruby as well), I think the host environment would probably be Unix/Linux/Apache based, unless anyone would recommend any sites which have Windows IIS servers with capabilities to host perl/cgi driven sites (acronym: WIMP (win-iis-mysql-perl)?). I don't know whether this would create problems in itself. I believe it would keep me from using mod_perl, but don't know whether other options (like ISAPI) would make up for this.

Theoretically I could pay for the MS IDE and use .NET to do development instead, but that's not really palatable to my sensibilities as a developer and I'm not convinced that .NET is really so wonderful. Plus .NET code makes me cringe and causes my stomach to tighten in discomfort.

I could install Linux on my secondary box and use it for development. The only issue with this is that I'm not terribly familiar with Linux, having most of my experience in Windows-driven organizations. I don't know how much of a hurdle this would be. I'm also not familiar with other benefits of using Linux. If considerable, I could justify to myself the extra effort of learning it and getting my ISP to send me a Linux client disk.

Or is it better to work on hosting the thing myself to get the most control? Are there other dangers or major issues I need to beware of? Has anyone developed a perl website primarily on Windows boxes before? Is it a completely foolish idea?

And I figure TMTOWTDI, but there's also likely some bad ways to do it. I don't want to pick any of the bad ways ;).

Update: I also realize someone might (sensibly) ask "What do you want to do?". I don't know entirely, but I'm primarily interested in display of formatted and manipulated data, not e-commerce.

Replies are listed 'Best First'.
Re: What's a good website framework?
by sauoq (Abbot) on Oct 12, 2005 at 01:16 UTC
    I'm looking for suggestions on a broad framework of a strategy for developing a website.

    Choose a platform. That probably going to mean an OS, server software, a database, and a language to write your dynamic pieces in. LAMP is good. If this isn't the right time for you to learn Linux, you might start with WAMP instead. The "P" still means Perl.

    All along, of course, you'll be thinking about the functionality you want to provide and issues like browser support, session management, authentication and authorization, persistent user data, multimedia, client-side dynamics, blah blah blah blah blah. Consider how these issues are going to affect code you need to write. Plan to separate logic, presentation, and data. Think about how you are going to do that. Try to choose ahead of time which modules or libraries you are going to use and which wheels you are going to re-invent. Choose carefully, because you are probably going to be pretty well locked into these choices in short order. Pick a good templating system. Maybe consider a whole framework like Catalyst.

    Oh, and don't forget content. (Don't laugh... it seems to get forgotten all the time.)

    Now, put it all together and wait for hits.

    After you get your first 10,000 hits and then realize that they've all been from search engine crawlers, start thinking about marketing.

    Broad enough?

    † Or PHP. Or Python. But, this is Perl Monks, so what'd you expect?

    "My two cents aren't worth a dime.";
Re: What's a good website framework?
by Tanktalus (Canon) on Oct 11, 2005 at 23:48 UTC

    Paint me suspicious (but if you do, please use water-soluble paint as my wife hates that colour on me), but it feels like you're almost asking someone to convince you to go to Linux. If so, please post your question on /.. They're good at blind linux advocacy.

    That said, as someone who has avoided Windows like the plague for about 10 years with reasonable amounts of success (and attempts going back another 3 or 4 years prior to that with less success), I'll shut up now.

    Well, mostly. I will say that you may want to figure out what you want to focus on - web, perl, or OS - and keep all other things constant. If you don't want to learn Linux, don't. Use Windows. If you don't want to learn .NET, don't. Use Perl. If you're willing and/or interested in trying other things, go ahead. Linux is free anyway, so it's only a commitment of time, not money, to try it. But don't do so because I tell you to do so, do so because you want to spend your time learning Linux. I did, and I like it. But you're not me, much to the world's happiness, and you may not be interested or may not like it, or may not have time. Those are all valid reasons to focus elsewhere.

Re: What's a good website framework?
by shiza (Hermit) on Oct 11, 2005 at 22:18 UTC
Re: What's a good website framework?
by hawtin (Prior) on Oct 12, 2005 at 00:35 UTC

    As you said the real answer is "it depends on what you want to do". If you just want to display formatted data (and you have few security worries and not too much bandwith requirement) you could consider HTTP::Daemon.

    If you want a quick display of data it is the business. I run it on Windows machines (it just requires Perl with no need for Apache or IIS). In addition the resulting web servers generally run on Linux without needing any modification.

    Merylyn has written some really good articles about using HTTP::Daemon.

    Of course if I am serving up lots of pages, or crunching lots of data, or worried about security then I would go with LAMP. Personally I think that setting up a web server on Linux is much simpler than a Windows one, there are lots of good books out there (of course this could be because I have been using Linux for some time).

Re: What's a good website framework?
by TGI (Parson) on Oct 12, 2005 at 06:50 UTC

    Are we talking about a huge site that serves millions of hits a day, or are we talking about a personal site that sees a few hits a week?

    I particularly like HTML::Mason, but it can be a bit overkill for a small site. It's very powerful and blah, blah blah, but it runs best under mod_perl, and cheap hosting isn't all that common. To get around these problems, you can use it to build static pages for upload, or run in CGI mode (with some serious overhead).

    Web frameworks for Perl are almost as common as logging and text templating modules. Choosing one is difficult. Consider you requirements carefully, look at the major contendors, and go with what seems best.

    TGI says moo

Re: What's a good website framework?
by aufflick (Deacon) on Oct 12, 2005 at 07:59 UTC
    If you are interested in using some linux, your suggestion of a secondary server is a good one. You can keep a windows workstation, so you have your familiar ide/editor/whatever, and mount the linux filesystem as a windows drive using samba. It really is quite easy - I know windows people who have done it without too much trouble by following a simple linux for dummies type book.

    As for the development environment, you really have a double barrelled language/development choice. My biased opinion is that you should consider the following combinations:

    NB: the number of stars indicate's my experience with the environment which is not necessarily the same as how I would rank them.

    Each of these has different pro's and con's and are good/better/best for different purposes. Ideally play with all of the above - they can all run on Windows or Linux.

Re: What's a good website framework?
by pajout (Curate) on Oct 12, 2005 at 08:16 UTC
    We use LAMP too, but we read it as Linux, Apache, Modperl, PostgreSQL :) Imho, WAMP in that meaning is possible too.

      I like that interpretation ;-)

      I've been trying to think how to get PostgreSQL into the mix, as we don't use MySQL either.

      Walking the road to enlightenment... I found a penguin and a camel on the way.....
      Fancy a Just ask!!!
Re: What's a good website framework?
by tphyahoo (Vicar) on Oct 12, 2005 at 09:02 UTC
    You could purchase a windows root server, install apache on it (eg, with xampp), and write perl cgi scripts to your heart's content. A little more expensive, a little less secure, but doable. My partner did that, since he's familiar with windows, and he figured the added expense and security hit was worth it for continuing to deal in an environment he was familiar with.
Re: What's a good website framework?
by Moron (Curate) on Oct 12, 2005 at 08:36 UTC
    Windows only benefit is that it is GUI-user friendly. But, being descended from a primitive single-user architecture, it should still be considered unsuitable for server environments, especially web-servers. But that doesn't mean you need to format your C-drive and install linux. The advantage of linux is that it is very cheap on resources for server installations. You could get an old second-hand box for less than $100 without even a monitor, stick a screen on it temporarily while installing a non-gui linux that you can subsequently load up and maintain from your Windows box via putty or Exceed.


    Free your mind

Re: What's a good website framework?
by nicholasrperez (Monk) on Oct 12, 2005 at 14:53 UTC
    Not to be pedantic, but .NET is a framework with multiple languages targeting the common language runtime, not necessarily just C#. With that said, you can actually get a Perl.NET add-in for Visual Studio from ActiveState and build your web applications using ASP.NET (think drag and drop web forms). Then you can have your comfortable Windows environment, your comfortable perl code, and even leverage the .NET write-once-run-anywhere abilities (think Mono) if you ever did want to move over to a linux environment (there is a mod_mono).

    While this doesn't really answer "What should I use?" it does make you aware that your intial negative reaction to .NET could be easily soothed over. Ideally, you want to use whatever it is that makes your job easier. And using Microsoft technologies on Microsoft platforms can ease development. Remember that you want to be doing development rather than fighting with learning a new platform.
      For a _website_ i would go with HTML::Mason For a _webapp_ i would go with Catalyst Oh and you can use HTML::Mason as the View in Catalyst too :)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://499310]
Approved by Jenda
Front-paged by aufflick
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-06-17 06:45 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.