Desperately seeking a lightweight perl web framework l.jpg
This presentation is the property of its rightful owner.
Sponsored Links
1 / 16

Desperately Seeking… a lightweight Perl web framework PowerPoint PPT Presentation


  • 188 Views
  • Uploaded on
  • Presentation posted in: General

Desperately Seeking… a lightweight Perl web framework. Peter Edwards. Introduction . Peter Edwards ~ background. Subject. Explain about the processes and decision making involved in assessing, selecting and using a Perl web framework. Aims. Learn what frameworks are out there

Download Presentation

Desperately Seeking… a lightweight Perl web framework

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Desperately seeking a lightweight perl web framework l.jpg

Desperately Seeking…a lightweight Perl web framework

Peter Edwards

Desperately seeking... a lightweight Perl web framework


Introduction l.jpg

Introduction

  • Peter Edwards ~ background

Subject

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

Desperately seeking... a lightweight Perl web framework


Slide3 l.jpg

Aims

  • Learn what frameworks are out there

  • Technical considerations

  • Business tools for decision-making

  • Audience: What is your background and interest?

Desperately seeking... a lightweight Perl web framework


Topics l.jpg

Topics

  • Define the problem

  • Example requirements

  • Attributes of frameworks

  • Business decision making tools

  • Architecture

  • Application components

  • Perl application frameworks

  • Roll your own

  • Summary

Desperately seeking... a lightweight Perl web framework


Define the problem l.jpg

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

Desperately seeking... a lightweight Perl web framework


Example l.jpg

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

Desperately seeking... a lightweight Perl web framework


Attributes of frameworks l.jpg

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

Desperately seeking... a lightweight Perl web framework


Business decision making tools l.jpg

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 -> decisionPerfection vs. pragmatism

Desperately seeking... a lightweight Perl web framework


Architecture i l.jpg

Architecture I

  • Web ProtocolHTTP request/responseURI, REST, URL parameters http://server.com/client/view/FRED?view=xml&tabs=allWeb 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

Desperately seeking... a lightweight Perl web framework


Architecture ii l.jpg

Architecture II

  • SessionCGI::SessionApache::SessionCatalyst::Plugin::Session -> Cache::FastMMap

  • Security AuthenticationGroup permission rolesHTML field and SQL field encoding

  • Database layerDirect DBISimple Class::DBIORM Object Relational Mapper DBIx::Class Rose::DBPerformance considerations - DBI 10-100x fasterData object attributes - data dictionary - screen dictionary

Desperately seeking... a lightweight Perl web framework


Architecture iii l.jpg

Architecture III

  • TemplatesTemplate::Toolkit (TT2)variable merge, not too complex,encourages using Perl in app modulesHTML::Mason – inline codePersonal preference; understandable by Web designersXHTML, accessibility, internationalisation Locale::MaketextForm handling, CRUD from db object, validation Data::FormValidatorRich components http://script.aculo.us/ http://dojotoolkit.org/

  • Testingmodule unit test, business data object tests, Javascript/browser compatability checksTest::More Test::WWW::Mechanize Test::WWW::Selenium

Desperately seeking... a lightweight Perl web framework


Application components l.jpg

Application Components

  • Pre-built componentssave time in short term on testing; may cost more long term; integration costsPHP::Session

    LanguageRepositoryTemplateComponentPerlCPANTT2BricolagePHPPEARSmartyCMSMSPythonBuilt-inClearsilverTrac

Desperately seeking... a lightweight Perl web framework


Perl application frameworks l.jpg

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::Frameworkfixed - 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

  • Catalystagnostic, 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

Desperately seeking... a lightweight Perl web framework


Roll your own l.jpg

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

Desperately seeking... a lightweight Perl web framework


Summary l.jpg

Summary

Processes and decision making

  • requirements

  • business context

  • CBA decision basis

  • technical considerations, architecture, constraints and features

  • application components

  • Perl application frameworks

Desperately seeking... a lightweight Perl web framework


Where to get more information l.jpg

Where to Get More Information

  • CPANhttp://search.cpan.org

  • Books

  • Any Questions

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

Desperately seeking... a lightweight Perl web framework


  • Login