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

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Mojolicious on Steroids

3,667

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,667
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
21
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 <ul><li>Qualities of a good framework
  • 4. Bootstrap from Twitter
  • 5. Mojolicious
  • 6. Fast application development toolchain
  • 7. Conclusions
  • 8. Bonus slide
  • 9. References </li></ul>
  • 10. Qualities of a good framework <ul><li>easy to start with
  • 11. easy to use
  • 12. easy to extend </li></ul><ul><li>facilitate best practices
  • 13. but don't enforce them
  • 14. permissive license </li></ul><ul><li>increase productivity </li></ul>
  • 15. Bootstrap from Twitter <ul><li>for all skill level
  • 16. cross-everything </li></ul><ul><ul><li>supports all major browsers (ie7 too!)
  • 17. tablets and smartphones </li></ul><li>responsive design </li><ul><li>components are scaled by display resolution
  • 18. consistent user experience </li></ul><li>custom jQuery plugins </li></ul><ul><li>Awesome design with proper and extensive interactions </li></ul>
  • 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 &quot;example/welcome.html.ep&quot; 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 &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. 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
  • 26. DBIx::Class::Schema::Loader to have your 'models' generated </li></ul><li>Bootstrap </li><ul><li>Create awesome looking applications
  • 27. Offer cross-browser consistent user experience </li></ul><li>Mojolicious </li><ul><li>Ties them all
  • 28. Makes them behave in nice, concerted manners </li></ul></ul>
  • 29. Summary <ul>Qualities of a good framework </ul><ul><li>easy to start with , to use and to extend
  • 30. facilitates best practices without enforcing them </li></ul><ul>Bootstrap from Twitter </ul><ul><li>very user-friendly
  • 31. cross browser </li></ul><ul>Mojolicious </ul><ul><li>light , very flexible and easy </li></ul>
  • 32. Bonus slide <ul>Success in 4 steps <li>Have a great idea
  • 33. Learn Perl and Mojolicious
  • 34. Implement it
  • 35. Profit!!! </li></ul>
  • 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>

×