0
Desperately Seeking…a lightweight Perl web framework                               Peter Edwards                          ...
Introduction Peter   Edwards ~ backgroundSubject Explain  about the processes and decision   making involved in assessin...
Aims Learn what frameworks are out there Technical considerations Business tools for decision-making   Audience: What ...
Topics Define the problem Example requirements Attributes of frameworks Business decision making tools Architecture ...
Define the Problem Why do you need a web app? What functionality / how complex?   no. screens, other features, e.g. sear...
Examplehttp://merlinfootball.com Components   Flash front end, sending XML transactions to   Perl back end   Perl XHTML a...
Attributes of Frameworks Size -> complexity Learning curve Vertical vs. horizontal Functionality, flexibility Monothe...
Business Decision Making ToolsThe point of business   Increased shareholder value - cashWilliam of Occam, 14th century log...
Architecture I Web     Protocol   HTTP request/response   URI, REST, URL parameters   http://server.com/client/view/FRED?...
Architecture II Session   CGI::Session   Apache::Session   Catalyst::Plugin::Session -> Cache::FastMMap Security   Authe...
Architecture III Templates   Template::Toolkit (TT2)       variable merge, not too complex,       encourages using Perl i...
Application ComponentsPre-built      components  save time in short term on testing; may  cost more long term; integratio...
Perl Application Frameworks   CGI::Application + CGI::Session lightweight, easy to use, reliable, full    control, open  ...
Roll Your Own "Not  invented here" syndrome, AKA submitting  a module to CPAN with "Lite" or "Plus" in the  name. Can ba...
SummaryProcesses and decision making requirements business context CBA decision basis technical considerations, archit...
Where to Get More InformationCPAN http://search.cpan.orgBooks Any     QuestionsThese slides are at http://perl.dragons...
Upcoming SlideShare
Loading in...5
×

Desperately seeking a lightweight Perl framework

19,474

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
19,474
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Desperately seeking a lightweight Perl framework"

  1. 1. Desperately Seeking…a lightweight Perl web framework Peter Edwards 1 Desperately seeking... a lightweight Perl web framework 12/22/12
  2. 2. Introduction Peter Edwards ~ backgroundSubject Explain about the processes and decision making involved in assessing, selecting and using a Perl web framework 2Desperately seeking... a lightweight Perl web framework 12/22/12
  3. 3. Aims Learn what frameworks are out there Technical considerations Business tools for decision-making Audience: What is your background and interest? 3Desperately seeking... a lightweight Perl web framework 12/22/12
  4. 4. Topics Define the problem Example requirements Attributes of frameworks Business decision making tools Architecture Application components Perl application frameworks Roll your own Summary 4Desperately seeking... a lightweight Perl web framework 12/22/12
  5. 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 5Desperately seeking... a lightweight Perl web framework 12/22/12
  6. 6. Examplehttp://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 6Desperately seeking... a lightweight Perl web framework 12/22/12
  7. 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 7Desperately seeking... a lightweight Perl web framework 12/22/12
  8. 8. Business Decision Making ToolsThe point of business Increased shareholder value - cashWilliam 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.orgCost Benefit Analysis Estimate days for development Estimate hidden costs and benefits e.g. of more stable framework Cost comparison -> decision Perfection vs. pragmatism 8Desperately seeking... a lightweight Perl web framework 12/22/12
  9. 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 9Desperately seeking... a lightweight Perl web framework 12/22/12
  10. 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 10Desperately seeking... a lightweight Perl web framework 12/22/12
  11. 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 11Desperately seeking... a lightweight Perl web framework 12/22/12
  12. 12. Application ComponentsPre-built components save time in short term on testing; may cost more long term; integration costs PHP::SessionLanguage Repository Template Component Perl CPAN TT2 Bricolage PHP PEAR Smarty CMSMS Python Built-in Clearsilver Trac 12Desperately seeking... a lightweight Perl web framework 12/22/12
  13. 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 evald 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. 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 youd think. Heres one written in a week, not pretty but delivered a project delivered fast and on time: http://perl.dragonstaff.co.uk/app.zip 14Desperately seeking... a lightweight Perl web framework 12/22/12
  15. 15. SummaryProcesses and decision making requirements business context CBA decision basis technical considerations, architecture, constraints and features application components Perl application frameworks 15Desperately seeking... a lightweight Perl web framework 12/22/12
  16. 16. Where to Get More InformationCPAN http://search.cpan.orgBooks Any QuestionsThese slides are at http://perl.dragonstaff.co.uk/ 16Desperately seeking... a lightweight Perl web framework 12/22/12
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×