SlideShare a Scribd company logo
Desperately Seeking…
a lightweight Perl web framework
                               Peter Edwards




                                                                   1
   Desperately seeking... a lightweight Perl web framework   12/22/12
Introduction
 Peter   Edwards ~ background


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


                                                            2
Desperately seeking... a lightweight Perl web framework
                                                    12/22/12
Aims
 Learn what frameworks are out there
 Technical considerations
 Business tools for decision-making


   Audience: What is your background and
    interest?


                                                            3
Desperately seeking... a lightweight Perl web framework
                                                    12/22/12
Topics
 Define the problem
 Example requirements
 Attributes of frameworks
 Business decision making tools
 Architecture
 Application components
 Perl application frameworks
 Roll your own
 Summary



                                                            4
Desperately seeking... a lightweight Perl web framework
                                                    12/22/12
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         setting
   Project 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




                                                            5
Desperately seeking... a lightweight Perl web framework
                                                    12/22/12
Example
http://merlinfootball.com
 Components
   Flash front end, sending XML transactions to
   Perl back end
   Perl XHTML admin system
 Elements
   Huge volume of users and transactions
   Streaming video
   Picture upload and approval to gallery
   FAQ submission, approval and editing into FAQ
   list
                                                            6
Desperately seeking... a lightweight Perl web framework
                                                    12/22/12
Attributes of Frameworks
 Size -> 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

                                                            7
Desperately seeking... a lightweight Perl web framework
                                                    12/22/12
Business Decision Making Tools
The point of business
   Increased shareholder value - cash
William of Occam, 14th century logician and Franciscan friar
   entia non sunt multiplicanda praeter necessitatem
   entities 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 Analysis
   Estimate days for development
   Estimate hidden costs and benefits e.g. of more stable framework
   Cost comparison -> decision
   Perfection vs. pragmatism
                                                            8
Desperately seeking... a lightweight Perl web framework
                                                    12/22/12
Architecture I
 Web     Protocol
   HTTP request/response
   URI, REST, URL parameters
   http://server.com/client/view/FRED?view=xml&tabs=al
   Web 2.0, AJAX
 Web     Server
   Apache, IIS, lighttpd
   CGI/mod_perl, FastCGI
 Controller     Processing
   Apache registry style stacked phase handlers
   MVC Model View Controller
   Single entry point vs. separate CGI
                                                            9
Desperately seeking... a lightweight Perl web framework
                                                    12/22/12
Architecture II
 Session
   CGI::Session
   Apache::Session
   Catalyst::Plugin::Session -> Cache::FastMMap
 Security
   Authentication
   Group permission roles
   HTML field and SQL field encoding
 Database    layer
   Direct DBI
   Simple Class::DBI
   ORM Object Relational Mapper DBIx::Class Rose::DB
   Performance considerations - DBI 10-100x faster
   Data object attributes - data dictionary - screen dictionary
                                                           10
Desperately seeking... a lightweight Perl web framework
                                                    12/22/12
Architecture III
 Templates
   Template::Toolkit (TT2)
       variable merge, not too complex,
       encourages using Perl in app modules
   HTML::Mason – inline code
   Personal preference; understandable by Web designers
   XHTML, accessibility, internationalisation
   Locale::Maketext
   Form handling, CRUD from db object, validation
   Data::FormValidator
   Rich components http://script.aculo.us/ http://
   dojotoolkit.org/
 Testing
   module unit test, business data object tests,
   Javascript/browser compatability checks
   Test::More Test::WWW::Mechanize
   Test::WWW::Selenium
                                                           11
Desperately seeking... a lightweight Perl web framework
                                                    12/22/12
Application Components
Pre-built      components
  save time in short term on testing; may
  cost more long term; integration costs
  PHP::Session
Language Repository Template Component
  Perl     CPAN        TT2         Bricolage
  PHP      PEAR        Smarty      CMSMS
  Python Built-in Clearsilver Trac

                                                           12
Desperately seeking... a lightweight Perl web framework
                                                    12/22/12
Perl Application Frameworks
   CGI::Application + CGI::Session lightweight, easy to use, reliable, full
    control, open
    Watch out for CGI::Builder, based on CGI::App but used to have
    Makefile.PL that downloaded and eval'd code, also bizarre "Perlish" coding
    style
    ;   use 5.006_001
    ;   use Carp
    ;   $Carp::Internal{+__PACKAGE__}++
    ;   $Carp::Internal{__PACKAGE__.'::_'}++   ; use IO::Util
   CGI::Framework
  fixed - glue between HTML::Template, CGI::Session, CGI,
  Locale::Maketext 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
   Catalyst
  agnostic, MVC, complex, magic, powerful, slow (third time in NEXT/C3
  OO extension), well tested Works well with DBIx::Class and TT2; can also
  use Class:DBI, HTML::Mason Many plugins for auth, XML etc.
 Maypole (ancestor of Catalyst) similar approach Class::DBI, TT2


                                                            13
 Desperately seeking... a lightweight Perl web framework
                                                     12/22/12
Roll Your Own
 "Not  invented here" syndrome, AKA submitting
  a module to CPAN with "Lite" or "Plus" in the
  name.
 Can base on CGI::Application + CGI::Session
 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


                                                           14
Desperately seeking... a lightweight Perl web framework
                                                    12/22/12
Summary
Processes and decision making
 requirements
 business context
 CBA decision basis
 technical considerations, architecture,
  constraints and features
 application components
 Perl application frameworks

                                                           15
Desperately seeking... a lightweight Perl web framework
                                                    12/22/12
Where to Get More Information
CPAN http://search.cpan.org
Books


 Any     Questions

These slides are at
 http://perl.dragonstaff.co.uk/

                                                           16
Desperately seeking... a lightweight Perl web framework
                                                    12/22/12

More Related Content

KEY
Inside Of Mbga Open Platform
PDF
Web Clients for Ruby and What they should be in the future
PPTX
Java EE 8
PDF
JavaOne 2014 BOF4241 What's Next for JSF?
PDF
Java 8 in Anger (JavaOne)
PPTX
Expect the unexpected: Anticipate and prepare for failures in microservices b...
PDF
20191119 Cloud Native Java : GraalVM
PDF
Polygot Java EE on the GraalVM
Inside Of Mbga Open Platform
Web Clients for Ruby and What they should be in the future
Java EE 8
JavaOne 2014 BOF4241 What's Next for JSF?
Java 8 in Anger (JavaOne)
Expect the unexpected: Anticipate and prepare for failures in microservices b...
20191119 Cloud Native Java : GraalVM
Polygot Java EE on the GraalVM

What's hot (20)

PDF
JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...
PPTX
Why jakarta ee matters (ConFoo 2021)
PDF
What's next for Java API for WebSocket (JSR 356)
DOC
Jetty Vs Tomcat
PDF
Grizzly 20080925 V2
PPTX
Servlet 4.0 at GeekOut 2015
PPT
Succeding with the Apache SOA stack
ODP
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
PPTX
Preparing for java 9 modules upload
PDF
Modular Java applications with OSGi on Apache Karaf
PDF
XML and Web Services with Groovy
PDF
Serverless Java Challenges & Triumphs
PDF
Tricks and Tips With NIO Using the Grizzly Framework
PPTX
PHP on IBM i Tutorial
PDF
WebSocket in Enterprise Applications 2015
PPT
Web Development Environments: Choose the best or go with the rest
PDF
Karaf ee-apachecon eu-2012
PDF
Open Social Summit Korea
PPTX
Node.js Development with Apache NetBeans
KEY
Apache, osgi and karaf par Guillaume Nodet
JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...
Why jakarta ee matters (ConFoo 2021)
What's next for Java API for WebSocket (JSR 356)
Jetty Vs Tomcat
Grizzly 20080925 V2
Servlet 4.0 at GeekOut 2015
Succeding with the Apache SOA stack
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
Preparing for java 9 modules upload
Modular Java applications with OSGi on Apache Karaf
XML and Web Services with Groovy
Serverless Java Challenges & Triumphs
Tricks and Tips With NIO Using the Grizzly Framework
PHP on IBM i Tutorial
WebSocket in Enterprise Applications 2015
Web Development Environments: Choose the best or go with the rest
Karaf ee-apachecon eu-2012
Open Social Summit Korea
Node.js Development with Apache NetBeans
Apache, osgi and karaf par Guillaume Nodet
Ad

Similar to Desperately seeking a lightweight Perl framework (20)

PPT
A Tour of Ruby On Rails
PPT
Cloud Computing for Barcamp NOLA 2009
PDF
Cloud foundry and openstackcloud
PDF
Cloud Foundry, the Open Platform as a Service - Oscon - July 2012
PPTX
Is 12 Factor App Right About Logging
PPT
Ruby On Rails
PDF
Dennis Povshedny.Mediamosa intro.DrupalCamp Kyiv 2011
PDF
DPC2007 Zend Framework (Gaylord Aulke)
 
PPTX
.net Framework
PDF
Kubernetes Summit 2019 - Harden Your Kubernetes Cluster
PPT
Php Frameworks
PPTX
Power features in .NET 4: Investigating the features of .NET 4 which you don’...
PPT
Durkee apache 2009_v7
ODP
Speeding up your Drupal site
PPS
Building Low Cost Scalable Web Applications Tools & Techniques
PDF
Cloud Native Applications on OpenShift
PPT
Lamp Zend Security
PDF
Principles of MVC for Rails Developers
PPT
Viridians on Rails
PDF
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
A Tour of Ruby On Rails
Cloud Computing for Barcamp NOLA 2009
Cloud foundry and openstackcloud
Cloud Foundry, the Open Platform as a Service - Oscon - July 2012
Is 12 Factor App Right About Logging
Ruby On Rails
Dennis Povshedny.Mediamosa intro.DrupalCamp Kyiv 2011
DPC2007 Zend Framework (Gaylord Aulke)
 
.net Framework
Kubernetes Summit 2019 - Harden Your Kubernetes Cluster
Php Frameworks
Power features in .NET 4: Investigating the features of .NET 4 which you don’...
Durkee apache 2009_v7
Speeding up your Drupal site
Building Low Cost Scalable Web Applications Tools & Techniques
Cloud Native Applications on OpenShift
Lamp Zend Security
Principles of MVC for Rails Developers
Viridians on Rails
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Ad

More from Peter Edwards (8)

PPTX
Enhancing engagement through content
PPTX
Twitter oauth
PPTX
BBC World Service Twitter OAuth Perl
ODP
Perl exceptions lightning talk
PPT
Role based access control
PPT
Getting started with Catalyst and extjs
PPT
Real world cross-platform testing
PPT
Open Source for Government - PSEICT Conference - British Council Case Study u...
Enhancing engagement through content
Twitter oauth
BBC World Service Twitter OAuth Perl
Perl exceptions lightning talk
Role based access control
Getting started with Catalyst and extjs
Real world cross-platform testing
Open Source for Government - PSEICT Conference - British Council Case Study u...

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Spectroscopy.pptx food analysis technology
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Encapsulation theory and applications.pdf
PPT
Teaching material agriculture food technology
PPTX
Machine Learning_overview_presentation.pptx
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
A Presentation on Artificial Intelligence
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Dropbox Q2 2025 Financial Results & Investor Presentation
Spectroscopy.pptx food analysis technology
NewMind AI Weekly Chronicles - August'25-Week II
Unlocking AI with Model Context Protocol (MCP)
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Encapsulation theory and applications.pdf
Teaching material agriculture food technology
Machine Learning_overview_presentation.pptx
Group 1 Presentation -Planning and Decision Making .pptx
SOPHOS-XG Firewall Administrator PPT.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Building Integrated photovoltaic BIPV_UPV.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Network Security Unit 5.pdf for BCA BBA.
MYSQL Presentation for SQL database connectivity
A Presentation on Artificial Intelligence
Digital-Transformation-Roadmap-for-Companies.pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...

Desperately seeking a lightweight Perl framework

  • 1. Desperately Seeking… a lightweight Perl web framework Peter Edwards 1 Desperately seeking... a lightweight Perl web framework 12/22/12
  • 2. Introduction  Peter Edwards ~ background Subject  Explain about the processes and decision making involved in assessing, selecting and using a Perl web framework 2 Desperately seeking... a lightweight Perl web framework 12/22/12
  • 3. Aims  Learn what frameworks are out there  Technical considerations  Business tools for decision-making  Audience: What is your background and interest? 3 Desperately seeking... a lightweight Perl web framework 12/22/12
  • 4. Topics  Define the problem  Example requirements  Attributes of frameworks  Business decision making tools  Architecture  Application components  Perl application frameworks  Roll your own  Summary 4 Desperately seeking... a lightweight Perl web framework 12/22/12
  • 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 setting Project 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 5 Desperately seeking... a lightweight Perl web framework 12/22/12
  • 6. Example http://merlinfootball.com  Components Flash front end, sending XML transactions to Perl back end Perl XHTML admin system  Elements Huge volume of users and transactions Streaming video Picture upload and approval to gallery FAQ submission, approval and editing into FAQ list 6 Desperately seeking... a lightweight Perl web framework 12/22/12
  • 7. Attributes of Frameworks  Size -> 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 7 Desperately seeking... a lightweight Perl web framework 12/22/12
  • 8. Business Decision Making Tools The point of business Increased shareholder value - cash William of Occam, 14th century logician and Franciscan friar entia non sunt multiplicanda praeter necessitatem entities 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 Analysis Estimate days for development Estimate hidden costs and benefits e.g. of more stable framework Cost comparison -> decision Perfection vs. pragmatism 8 Desperately seeking... a lightweight Perl web framework 12/22/12
  • 9. Architecture I  Web Protocol HTTP request/response URI, REST, URL parameters http://server.com/client/view/FRED?view=xml&tabs=al Web 2.0, AJAX  Web Server Apache, IIS, lighttpd CGI/mod_perl, FastCGI  Controller Processing Apache registry style stacked phase handlers MVC Model View Controller Single entry point vs. separate CGI 9 Desperately seeking... a lightweight Perl web framework 12/22/12
  • 10. Architecture II  Session CGI::Session Apache::Session Catalyst::Plugin::Session -> Cache::FastMMap  Security Authentication Group permission roles HTML field and SQL field encoding  Database layer Direct DBI Simple Class::DBI ORM Object Relational Mapper DBIx::Class Rose::DB Performance considerations - DBI 10-100x faster Data object attributes - data dictionary - screen dictionary 10 Desperately seeking... a lightweight Perl web framework 12/22/12
  • 11. Architecture III  Templates Template::Toolkit (TT2) variable merge, not too complex, encourages using Perl in app modules HTML::Mason – inline code Personal preference; understandable by Web designers XHTML, accessibility, internationalisation Locale::Maketext Form handling, CRUD from db object, validation Data::FormValidator Rich components http://script.aculo.us/ http:// dojotoolkit.org/  Testing module unit test, business data object tests, Javascript/browser compatability checks Test::More Test::WWW::Mechanize Test::WWW::Selenium 11 Desperately seeking... a lightweight Perl web framework 12/22/12
  • 12. Application Components Pre-built components save time in short term on testing; may cost more long term; integration costs PHP::Session Language Repository Template Component Perl CPAN TT2 Bricolage PHP PEAR Smarty CMSMS Python Built-in Clearsilver Trac 12 Desperately seeking... a lightweight Perl web framework 12/22/12
  • 13. Perl Application Frameworks  CGI::Application + CGI::Session lightweight, easy to use, reliable, full control, open Watch out for CGI::Builder, based on CGI::App but used to have Makefile.PL that downloaded and eval'd code, also bizarre "Perlish" coding style ; use 5.006_001 ; use Carp ; $Carp::Internal{+__PACKAGE__}++ ; $Carp::Internal{__PACKAGE__.'::_'}++ ; use IO::Util  CGI::Framework fixed - glue between HTML::Template, CGI::Session, CGI, Locale::Maketext 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  Catalyst agnostic, MVC, complex, magic, powerful, slow (third time in NEXT/C3 OO extension), well tested Works well with DBIx::Class and TT2; can also use Class:DBI, HTML::Mason Many plugins for auth, XML etc.  Maypole (ancestor of Catalyst) similar approach Class::DBI, TT2 13 Desperately seeking... a lightweight Perl web framework 12/22/12
  • 14. Roll Your Own  "Not invented here" syndrome, AKA submitting a module to CPAN with "Lite" or "Plus" in the name.  Can base on CGI::Application + CGI::Session  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 14 Desperately seeking... a lightweight Perl web framework 12/22/12
  • 15. Summary Processes and decision making  requirements  business context  CBA decision basis  technical considerations, architecture, constraints and features  application components  Perl application frameworks 15 Desperately seeking... a lightweight Perl web framework 12/22/12
  • 16. Where to Get More Information CPAN http://search.cpan.org Books  Any Questions These slides are at http://perl.dragonstaff.co.uk/ 16 Desperately seeking... a lightweight Perl web framework 12/22/12