Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Web Programming: For Beginners

by chrestomanci (Priest)
on Aug 26, 2011 at 15:21 UTC ( #922673=note: print w/replies, xml ) Need Help??

in reply to Web Programming: For Beginners

That is a big vague question. The kind I would ignore if it came from a newbie, but seeing as you are known around here, I will bite.

Firstly, unless you want to do everything the hard way, you need to use some modules from CPAN, so make sure it is warmed up and ready to go. :-)

What are you trying to achieve? Do you just want to learn, or do you have something specific in mind? I find that when learning it is always best to have a project in mind.

For example, for a simple project you could just wrapper the output of a system command on your computer and serve it up through the web server. For a simple project like this the CGI module will work well.

For example if you have a linux computer, you could wrapper a command like free or uptime and return it nicely formatted.

If CGI feels to primitive, or you want to work with templates or databases, then you need a web framework such as Catalyst or Dancer. (There are probably others). Personally I have used Catalyst quite a bit, and like it, and I have no experience with Dancer. Others here will be able to offer their opinions on which is better.

To suit one of those powerful frameworks, you need a more advanced project, and I suggest you look at one that makes use of a database back end. For example you might build a database of your MP3 collection. Music::Tag::MP3 Will read ID3 tags from your music files and DBIx::Class::Manual::Example has detailed examples of how to construct a database schema of a record collection. Once you have done the exercises in Catalyst::Manual::Tutorial you should be able to create a Catalyst application that will let you search your music collection, by title, artist, album etc.

Replies are listed 'Best First'.
Re^2: Web Programming: For Beginners
by perl.j (Pilgrim) on Aug 26, 2011 at 15:30 UTC
    Sounds simple enough. Just one thing. How would I "serve it up through the web server"? What is a web server?
          What is a web server?

      Offsite link: full definition of a web server

      Google is your friend.....

      Peter L. Berghold -- Unix Professional
      Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
        Cool. Thanks!
      A web server is the system that listens for web requests and serves up the responses. Your browser is making requests almost every time you click on something, and then the browser displays the response.

      In this context a web server is a computer program that listens for requests coming from the internet, and responds to them.

      To use CGI you need to install one on your computer. I recommend Apache. If you are running linux then it should be easy to install. If you are not running linux, (or Mac OS X) then everything will be much harder.

      If you chose to use a framework like Catalyst, then they usually come with a built in web server that is suitable for debugging and very light traffic.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://922673]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2022-05-21 08:22 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (76 votes). Check out past polls.