Desperately Seeking a lightweight Perl web framework - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Desperately Seeking a lightweight Perl web framework

Description:

Explain about the processes and decision making involved in assessing, selecting ... use Carp ; $Carp::Internal{ __PACKAGE__} ; $Carp::Internal{__PACKAGE__. ... – PowerPoint PPT presentation

Number of Views:105
Avg rating:3.0/5.0
Slides: 17
Provided by: perlDrago
Category:

less

Transcript and Presenter's Notes

Title: Desperately Seeking a lightweight Perl web framework


1
Desperately Seekinga lightweight Perl web
framework
  • Peter Edwards

2
Introduction
  • Peter Edwards background

Subject
  • Explain about the processes and decision making
    involved in assessing, selecting and using a Perl
    web framework

3
Aims
  • Learn what frameworks are out there
  • Technical considerations
  • Business tools for decision-making
  • Audience What is your background and interest?

4
Topics
  • Define the problem
  • Example requirements
  • Attributes of frameworks
  • Business decision making tools
  • Architecture
  • Application components
  • Perl application frameworks
  • Roll your own
  • Summary

5
Define the Problem
  • Why do you need a web app?
  • What functionality / how complex?no. screens,
    other features, e.g. search engine, integration
    to other apps/components/company infrastructure,
    server platform
  • Business settingProject length, size Developer
    expertise, skill sets Integration to network,
    database type, existing frameworks e.g. ADS
    authentication Capacity plan - no. of users and
    required performance

6
Example
  • http//merlinfootball.com
  • ComponentsFlash front end, sending XML
    transactions toPerl back endPerl XHTML admin
    system
  • ElementsHuge volume of users and
    transactionsStreaming videoPicture upload and
    approval to galleryFAQ submission, approval and
    editing into FAQ list

7
Attributes of Frameworks
  • Size -gt complexity
  • Learning curve
  • Vertical vs. horizontal
  • Functionality, flexibility
  • Monotheistic/"One True Way" vs. agnostic
  • Increased power, reduced performance
  • Cost of testing new code 50 of time
  • By extension DRY KISS

8
Business Decision Making Tools
  • The point of businessIncreased shareholder value
    - cash
  • William of Occam, 14th century logician and
    Franciscan friarentia non sunt multiplicanda
    praeter necessitatementities should not be
    multiplied beyond necessity"All things being
    equal, the simplest solution tends to be the best
    one.It often happens that the best explanation
    is much more complicated than the simplest
    possible explanation because it requires fewer
    assumptions.
  • Pareto Principle, by Joseph M. Juran named after
    Vilfredo Pareto, Italian economist"for many
    phenomena, 80 of the consequences stem from 20
    of the causes-- en.wikipedia.org
  • Cost Benefit AnalysisEstimate days for
    developmentEstimate hidden costs and benefits
    e.g. of more stable frameworkCost comparison -gt
    decisionPerfection vs. pragmatism

9
Architecture I
  • Web ProtocolHTTP request/responseURI, REST, URL
    parameters http//server.com/client/view/FRED?vie
    wxmltabsallWeb 2.0, AJAX
  • Web ServerApache, IIS, lighttpdCGI/mod_perl,
    FastCGI
  • Controller ProcessingApache registry style
    stacked phase handlersMVC Model View
    ControllerSingle entry point vs. separate CGI

10
Architecture II
  • SessionCGISessionApacheSessionCatalystPlu
    ginSession -gt CacheFastMMap
  • Security AuthenticationGroup permission
    rolesHTML field and SQL field encoding
  • Database layerDirect DBISimple ClassDBIORM
    Object Relational Mapper DBIxClass
    RoseDBPerformance considerations - DBI 10-100x
    fasterData object attributes - data dictionary -
    screen dictionary

11
Architecture III
  • TemplatesTemplateToolkit (TT2) variable
    merge, not too complex, encourages using Perl in
    app modulesHTMLMason inline codePersonal
    preference understandable by Web
    designersXHTML, accessibility,
    internationalisation LocaleMaketextForm
    handling, CRUD from db object, validation
    DataFormValidatorRich components
    http//script.aculo.us/ http//dojotoolkit.org/
  • Testingmodule unit test, business data object
    tests, Javascript/browser compatability
    checksTestMore TestWWWMechanize
    TestWWWSelenium

12
Application Components
  • Pre-built componentssave time in short term on
    testing may cost more long term integration
    costsPHPSession
  • Language Repository Template ComponentPerl CPAN T
    T2 BricolagePHP PEAR Smarty CMSMSPython Built-i
    n Clearsilver Trac

13
Perl Application Frameworks
  • CGIApplication CGISession lightweight,
    easy to use, reliable, full control, open
  • Watch out for CGIBuilder, based on CGIApp
    but used to have Makefile.PL that downloaded and
    eval'd code, also bizarre "Perlish" coding style
    use 5.006_001 use Carp
    CarpInternal__PACKAGE__
    CarpInternal__PACKAGE__.'_' use
    IOUtil
  • CGIFrameworkfixed - glue between
    HTMLTemplate, CGISession, CGI,
    LocaleMaketext last release 11-Oct-2005
  • Jifty one true way database mapper, template,
    web services, AJAX toolkit, handlers for FastCGI
    continuations, form-based dispatch "Jifty is the
    only web application framework that comes with a
    pony
  • Gantry Bigtop Apache/mod_perl, MVC Bigtop -
    web application data language processor, app
    generator
  • OpenInteract SPOPS Complex, slow, powerful,
    CMS-oriented permissions last release
    18-Mar-2005
  • Catalystagnostic, MVC, complex, magic, powerful,
    slow (third time in NEXT/C3 OO extension), well
    tested Works well with DBIxClass and TT2 can
    also use ClassDBI, HTMLMason Many plugins for
    auth, XML etc.
  • Maypole (ancestor of Catalyst) similar approach
    ClassDBI, TT2

14
Roll Your Own
  • "Not invented here" syndrome, AKA submitting a
    module to CPAN with "Lite" or "Plus" in the name.
  • Can base on CGIApplication CGISession
  • Or write one yourself. Easier than you'd think.
    Here's one written in a week, not pretty but
    delivered a project delivered fast and on time
    http//perl.dragonstaff.co.uk/app.zip

15
Summary
  • Processes and decision making
  • requirements
  • business context
  • CBA decision basis
  • technical considerations, architecture,
    constraints and features
  • application components
  • Perl application frameworks

16
Where to Get More Information
  • CPAN http//search.cpan.org
  • Books
  • Any Questions
  • These slides are at http//perl.dragonstaff.co.uk/
Write a Comment
User Comments (0)
About PowerShow.com