Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web Programming For The Non-Web Programmer (in Perl)

Tags:

perl

I am looking to start Web Programming in Perl (Perl is the only language I know). The problem is, I have no prior knowledge of anything to do with the web, except surfing it. I have no idea where to start.

So my question(s) is...

Where do I start learning Web Programming? What should I know? What should I use?

I thank everybody in advance for answering and helping.

like image 609
Dynamic Avatar asked Aug 21 '11 20:08

Dynamic


1 Answers

The key things to understand are:

What you can send to browsers

… or rather, the things you intend to send to browsers, but having an awareness of what else is out there is useful (since, in complex web applications in particular, you will need to select appropriate data formats).

e.g.

  • HTML
  • CSS
  • JavaScript
  • Images
  • JSON
  • XML
  • PDFs

When you are generating data dynamically, you should also understand the available tools (e.g. the Perl community has a strong preference for TT for generating HTML, but there are other options such as Mason, while JSON::Any tends to be my goto for JSON).

Transport mechanisms

  • HTTP (including what status codes to use and when, how to do redirects, what methods (POST, GET, PUT, etc) to use and when).
  • HTTPS (HTTP with SSL encryption)

How to get a webserver to talk to your Perl

  • PSGI/Plack if you want modern and efficient
  • CGI for very simple
  • mod_perl if you want crazy levels of power (I've seen someone turn then Apache HTTPD into an SMTP spam filter using it).

Security

How to guard against malicious input (which basically comes down to knowing how to take data in one format (such as submitted form data) and convert it to another (such as HTML or SQL).

Web Frameworks

You can push a lot of work off to frameworks, which provide structured ways to organise a web applications.

  • Web::Simple is simple
  • Dancer seems to be holding the middle ground (although I have to confess that I haven't had a chance to use it yet)
  • Catalyst probably has the steepest learning curve but comes with a lot of power and plugins.
like image 155
Quentin Avatar answered Oct 13 '22 20:10

Quentin