Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: More on Web Application Frameworks

by Ryszard (Priest)
on Apr 09, 2002 at 03:41 UTC ( [id://157649]=note: print w/replies, xml ) Need Help??


in reply to More on Web Application Frameworks

I've done some similar stuff and my preference is:
  1. CGI.pm - Nice easy way of both generating HTML, parsing forms, cookies et al.
  2. CGI::Application - Great framework for providing a structured application, altho care should be taken so your application doesnt become spaghetti.
  3. HTML::Template - Easy peasy method of templating HTML.
  4. DBI - say no more.
  5. Some ancillary modules (ala Digest::MD5 etc)

I wrote my own session management, user management and access control becuase:

  • I could
  • I learned more
  • I could taylor it to specifically how/what I wanted.

    As a side (read personal) project I'm developing a web portal. Thus far it has an address book, date book, and an mp3 playlist manager. I'm also working on a photo album function, which will slot into the application framework with virtually no effort.

    The way I've structured the application is to have one CGI::Application application per concept, all in seperate directories. So I've got a directory containing the application for the address, date, and playlist functions. They are all tied together with session management and access control, ie each time a user fetches a page, the function that returns the page will check their session and whether they can access the function and branch accordingly.

    The access control is pretty handy as you can have an arbitrary level of granularity, and displays only menu functions the user has access to.

    My own session managemnt handles the authentication to a Postgres database, altho' I've only implemented a cookie based approach (and the key will last the length of the session (ie until it times out or the user logs out)). Doing your own session management is pretty damn easy to do well, altho' I'm sure you know what they say about the tried and the true. As the session management is my own module creation, It's really easy to modify (ie reissue a new key each view) without changing the upper "business" functionality.

    My form validation, ie taint checking, validity checking is done internally to each function (or method call) as i find when i'm doing form stuff its pretty specific to the function (or method).

    View management is handled via "run modes" in the CGI::Application framework.

    I found when I 1st started my project I was a bit bam-boozled by the endless possibilites etc etc, and quickly settled on this combo becuase its just so damn easy to use. Its just not rocket science.

    Good luck with the project, I'd be interested to hear what application framework you settle for, and why.

    Why use CGI::Application?
    Choosing a templating solution

  • Log In?
    Username:
    Password:

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

    How do I use this?Last hourOther CB clients
    Other Users?
    Others imbibing at the Monastery: (9)
    As of 2024-04-26 08:53 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found