Your SlideShare is downloading. ×
Mojolicious on Steroids
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Mojolicious on Steroids

3,396
views

Published on

Presenting a Perl toolchain for rapid web application development

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,396
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
19
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Mojolicious The duct tape of the web
  • 2. About me Tudor Constantin Perl hacker at Evozon http://programming.tudorconstantin.com/ https://github.com/tudorconstantin
  • 3. Content
    • Qualities of a good framework
    • 4. Bootstrap from Twitter
    • 5. Mojolicious
    • 6. Fast application development toolchain
    • 7. Conclusions
    • 8. Bonus slide
    • 9. References
  • 10. Qualities of a good framework
    • easy to start with
    • 11. easy to use
    • 12. easy to extend
    • facilitate best practices
    • 13. but don't enforce them
    • 14. permissive license
    • increase productivity
  • 15. Bootstrap from Twitter
    • for all skill level
    • 16. cross-everything
      • supports all major browsers (ie7 too!)
      • 17. tablets and smartphones
    • responsive design
      • components are scaled by display resolution
      • 18. consistent user experience
    • custom jQuery plugins
    • Awesome design with proper and extensive interactions
  • 19. Mojolicious Easy to Start With use Mojolicious :: Lite ; get '/' => { text => 'Hello World!' }; app -> start ;
  • 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 "example/welcome.html.ep" with message $self -> render ( message => 'Welcome to Mojo!' ) ;} 1 ;
  • 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. Mojolicious Facilitates best practices # Simple "resource" shortcut, because RESTful apps are a safe bet $r -> add_shortcut ( resource => sub { my ( $r , $name ) = @_ ; # Generate "/$name" route my $resource = $r -> route ( "/$name" )-> to ( "$name#" ) ; # Handle POST requests $resource -> post -> to ( '#create' )-> name ( "create_$name" ) ; # Handle GET requests $resource -> get -> to ( '#show' )-> name ( "show_$document" ) ; 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. 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
    • DBIx::Class
      • More than an ORM
      • 26. DBIx::Class::Schema::Loader to have your 'models' generated
    • Bootstrap
      • Create awesome looking applications
      • 27. Offer cross-browser consistent user experience
    • Mojolicious
      • Ties them all
      • 28. Makes them behave in nice, concerted manners
  • 29. Summary
      Qualities of a good framework
    • easy to start with , to use and to extend
    • 30. facilitates best practices without enforcing them
      Bootstrap from Twitter
    • very user-friendly
    • 31. cross browser
      Mojolicious
    • light , very flexible and easy
  • 32. Bonus slide
      Success in 4 steps
    • Have a great idea
    • 33. Learn Perl and Mojolicious
    • 34. Implement it
    • 35. Profit!!!
  • 36. References
    • Bootstrap
      • http://twitter.github.com/bootstrap/
    • Mojolicious
      • http://mojolicio.us/
    • This presentation
      • http://www.slideshare.net/tudorconstantin/mojolicious-11749040