mojolicious mvc
DESCRIPTION
TRANSCRIPT
Mojolicious- advocating for evaluation at RMG
by Árpád Szász 2012
Disclaimer
● No comparison with Catalyst or Dancer
Disclaimer
● No comparison with Catalyst or Dancer● Highlight Mojolicious' strenght points
Disclaimer
● No comparison with Catalyst or Dancer● Highlight Mojolicious' strength points● 2 years experience using Mojolicious
Introduction
● Development started in late 2008 by Sebastian Reidel (original developer of Catalyst)
Introduction
● Development started in late 2008 by Sebastian Reidel (original developer of Catalyst)
● Concept based initially on Sinatra (Ruby), steals ideas from other frameworks
Introduction
● Development started in late 2008 by Sebastian Reidel (original developer of Catalyst)
● Concept based initially on Sinatra (Ruby), steals ideas from other frameworks
● Focus on supporting latest web technologies
Introduction
● Development started in late 2008 by Sebastian Reidel (original developer of Catalyst)
● Concept based initially on Sinatra (Ruby), steals ideas from other frameworks
● Focus on supporting latest web technologies● “Duct tape for the HTML5 web”
Introduction
● Development started in late 2008 by Sebastian Reidel (original developer of Catalyst)
● Concept based initially on Sinatra (Ruby), steals ideas from other frameworks
● Focus on supporting latest web technologies● “Duct tape for the HTML5 web”● Active and helpful community
Introduction
● Development started in late 2008 by Sebastian Reidel (original developer of Catalyst)
● Concept based initially on Sinatra (Ruby), steals ideas from other frameworks
● Focus on supporting latest web technologies● “Duct tape for the HTML5 web”● Active and helpful community
Highlights
● Flexibility
Highlights
● Flexibility● Self-contained
Highlights
● Flexibility● Self-contained● Fast-prototyping
Highlights
● Flexibility● Self-contained● Fast-prototyping● Built-in web servers
Highlights
● Flexibility● Self-contained● Fast-prototyping● Built-in web servers● Realtime/async features
Flexibility
● Modular design
Flexibility
● Modular design– Mojo – runtime environment
Flexibility
● Modular design– Mojo – runtime environment
– Mojolicious::Lite – fast prototyping
Flexibility
● Modular design– Mojo – runtime environment
– Mojolicious::Lite – fast prototyping
– Mojolicious.pm – full-featured web applications
Flexibility
● Suitable to any workflow– No built-in Model
Flexibility
● Suitable to any workflow– No built-in Model
– No rigid constraints imposed by design
Flexibility
● Suitable to any workflow– No built-in Model
– No rigid constraints imposed by design
– Customizable RESTful routes dispatcher
Self-contained
● Single 500kB CPAN distribution (only requirement is Perl 5.10.1+)
● Has built-in templating engine, but supports others through plugins
Self-contained
● Built-in support for:– client-side sessions
Self-contained
● Built-in support for:– client-side sessions
– JSON
Self-contained
● Built-in support for:– client-side sessions
– JSON
– testing
Self-contained
● Built-in support for:– client-side sessions
– JSON
– testing
– real-time web technologies: Comet (long-polling), Eventsource, websockets
Self-contained
● Built-in support for:– client-side sessions
– JSON
– testing
– real-time web technologies: Comet (long-polling), Eventsource, websockets
Self-contained
● Built-in support for:– client-side sessions
– JSON
– testing
– real-time web technologies: Comet (long-polling), Eventsource, websockets
– PSGI (Plack), IPv6, etc.
Fast prototyping
● Create Mojolicious::Lite application
Fast prototyping
● Create Mojolicious::Lite application● Test with built-in development web-server
Fast prototyping
● Create Mojolicious::Lite application● Test with built-in development web-server
(morbo)● Convert to full application (Mojolicious)
Hypnotoad
● Built-in high-performance web server
Hypnotoad
● Built-in high-performance web server:– Non blocking I/O HTTP and Websocket server
Hypnotoad
● Built-in high-performance web server:– Non blocking I/O HTTP and Websocket server
– Hot deployment support
Hypnotoad
● Built-in high-performance web server:– Non blocking I/O HTTP and Websocket server
– Hot deployment support
– Usual setup: Hypnotoad behind nginx reverse-proxy
Testing
● TDD mentality (over 10.000 tests)
Testing
● TDD mentality (over 10.000 tests)● Test::Mojo built-in framework