Your SlideShare is downloading. ×
0
Mojolicious   The duct tape of the web
About me Tudor Constantin Perl  hacker  at Evozon http://programming.tudorconstantin.com/ https://github.com/tudorconstantin
Content <ul><li>Qualities of a good framework
Bootstrap from Twitter
Mojolicious
Fast application development toolchain
Conclusions
Bonus slide
References </li></ul>
Qualities of a good framework <ul><li>easy to  start with
easy to  use
easy to  extend </li></ul><ul><li>facilitate  best practices
but  don't  enforce them
permissive license </li></ul><ul><li>increase productivity </li></ul>
Bootstrap from Twitter <ul><li>for all skill level
Upcoming SlideShare
Loading in...5
×

Mojolicious on Steroids

3,704

Published on

Presenting a Perl toolchain for rapid web application development

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

  • Be the first to like this

No Downloads
Views
Total Views
3,704
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
21
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Mojolicious on Steroids"

  1. 1. Mojolicious The duct tape of the web
  2. 2. About me Tudor Constantin Perl hacker at Evozon http://programming.tudorconstantin.com/ https://github.com/tudorconstantin
  3. 3. Content <ul><li>Qualities of a good framework
  4. 4. Bootstrap from Twitter
  5. 5. Mojolicious
  6. 6. Fast application development toolchain
  7. 7. Conclusions
  8. 8. Bonus slide
  9. 9. References </li></ul>
  10. 10. Qualities of a good framework <ul><li>easy to start with
  11. 11. easy to use
  12. 12. easy to extend </li></ul><ul><li>facilitate best practices
  13. 13. but don't enforce them
  14. 14. permissive license </li></ul><ul><li>increase productivity </li></ul>
  15. 15. Bootstrap from Twitter <ul><li>for all skill level
  16. 16. cross-everything </li></ul><ul><ul><li>supports all major browsers (ie7 too!)
  17. 17. tablets and smartphones </li></ul><li>responsive design </li><ul><li>components are scaled by display resolution
  18. 18. consistent user experience </li></ul><li>custom jQuery plugins </li></ul><ul><li>Awesome design with proper and extensive interactions </li></ul>
  19. 19. Mojolicious Easy to Start With use Mojolicious :: Lite ; get '/' => { text => 'Hello World!' }; app -> start ;
  20. 20. Mojolicious Easy to use $r -> route ( '/home' )-> to ( 'example#welcome' ) ; Controller: package MyApp :: Example ; use Mojo :: Base 'Mojolicious::Controller' ; sub welcome { my $self = shift ; # Render template &quot;example/welcome.html.ep&quot; with message $self -> render ( message => 'Welcome to Mojo!' ) ;} 1 ;
  21. 21. Mojolicious Easy to extend # Everything can be customized with options my $config = $self -> plugin ( yaml_config => { file => 'conf/config.yaml' , stash_key => 'conf' , class => 'YAML::XS' } ) ; $self ->{ config } = $config ; Controller #access to the configuration hash ref $self -> app ->{ config }
  22. 22. Mojolicious Facilitates best practices # Simple &quot;resource&quot; shortcut, because RESTful apps are a safe bet $r -> add_shortcut ( resource => sub { my ( $r , $name ) = @_ ; # Generate &quot;/$name&quot; route my $resource = $r -> route ( &quot;/$name&quot; )-> to ( &quot;$name#&quot; ) ; # Handle POST requests $resource -> post -> to ( '#create' )-> name ( &quot;create_$name&quot; ) ; # Handle GET requests $resource -> get -> to ( '#show' )-> name ( &quot;show_$document&quot; ) ; return $resource ; } ) ; # POST /user -> {controller => 'user', action => 'create'} # GET /user -> {controller => 'user', action => 'show'} $r -> resource ( 'user' ) ; # POST /document -> {controller => 'document', action => 'create'} # GET /document -> {controller => 'document', action => 'show'} $r -> resource ( 'document' ) ;
  23. 23. Mojolicious But don't enforce them #code is self explanatory $r -> delete ( '/get/stuff/21/:k' )-> to ( 'static#_doWhat_I_mean_NOW' ) ;
  24. 25. Mojolicious Fast application development toolchain <ul><li>DBIx::Class </li></ul><ul><ul><li>More than an ORM
  25. 26. DBIx::Class::Schema::Loader to have your 'models' generated </li></ul><li>Bootstrap </li><ul><li>Create awesome looking applications
  26. 27. Offer cross-browser consistent user experience </li></ul><li>Mojolicious </li><ul><li>Ties them all
  27. 28. Makes them behave in nice, concerted manners </li></ul></ul>
  28. 29. Summary <ul>Qualities of a good framework </ul><ul><li>easy to start with , to use and to extend
  29. 30. facilitates best practices without enforcing them </li></ul><ul>Bootstrap from Twitter </ul><ul><li>very user-friendly
  30. 31. cross browser </li></ul><ul>Mojolicious </ul><ul><li>light , very flexible and easy </li></ul>
  31. 32. Bonus slide <ul>Success in 4 steps <li>Have a great idea
  32. 33. Learn Perl and Mojolicious
  33. 34. Implement it
  34. 35. Profit!!! </li></ul>
  35. 36. References <ul><li>Bootstrap </li><ul><li>http://twitter.github.com/bootstrap/ </li></ul><li>Mojolicious </li><ul><li>http://mojolicio.us/ </li></ul><li>This presentation </li><ul><li>http://www.slideshare.net/tudorconstantin/mojolicious-11749040 </li></ul></ul>
  1. A particular slide catching your eye?

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

×