Mojolicious on Steroids
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Mojolicious on Steroids

on

  • 3,888 views

Presenting a Perl toolchain for rapid web application development

Presenting a Perl toolchain for rapid web application development

Statistics

Views

Total Views
3,888
Views on SlideShare
3,878
Embed Views
10

Actions

Likes
0
Downloads
18
Comments
0

1 Embed 10

http://coderwall.com 10

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Mojolicious on Steroids Presentation 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