SlideShare uma empresa Scribd logo
1 de 11
Baixar para ler offline
Fási Gábor
@maerlyng
http://maerlyn.eu/
http://insolis.hu/

Silex
Microframework Symfony2 alapon
Symfony2
                    enterprise FW
                    php5.3
                    2.0: 2011 augusztus
                    443 contributor




Fási Gábor
Twitter @maerlyng                          maerlyn.eu
                                            insolis.hu
Symfony2
                      22 független komponens összessége
               Validator, Templating, Serializer, Security, Routing,
              Process, Locale, HttpKernel, Form, Finder, Filesystem,
              EventDispatcher, DomCrawler, DependencyInjection,
               CssSelector, Config, ClassLoader, BrowserKit, Yaml,
                      Translation, HttpFoundation, Console




Fási Gábor
Twitter @maerlyng                                                      maerlyn.eu
                                                                        insolis.hu
Silex
             Igor Wiedler és Fabien Potencier, 2010 szept.
             eredetileg komponens-demo

                    Routing
                    HttpFoundation
                    HttpKernel
                    EventDispatcher
                    …




Fási Gábor
Twitter @maerlyng                                            maerlyn.eu
                                                              insolis.hu
μ
                    4310 sor
                    /tests: 1959 sor
                    /src: 2351 sor
                    kommentek nélkül: 1204 sor




Fási Gábor
Twitter @maerlyng                                maerlyn.eu
                                                  insolis.hu
Telepítés
             phar

              wget http://silex.sensiolabs.org/get/silex.phar

              <?php

              require_once __DIR__ . "/silex.phar";

             composer

              {
                    require: {
                       "silex/silex": "1.*"
                    }
              }

              <?php

              require_once __DIR__ . "/vendor/autoload.php";




Fási Gábor
Twitter @maerlyng                                               maerlyn.eu
                                                                 insolis.hu
Használat
              $app = new SilexApplication();

              $app->get('/hello/{name}', function($name) use($app) {
                 return 'Hello '.$app->escape($name);
              });

              $app->run();

              $app->get(/* */);
              $app->post(/* */);
              $app->put(/* */);
              $app->delete(/* */);

              $app->match(/* */)->method("PATCH");




Fási Gábor
Twitter @maerlyng                                                      maerlyn.eu
                                                                        insolis.hu
Használat
              $app->get(/* */)
               ->bind("route_neve")
               ->assert("param", 'd+')
               ->value("param", "default")

              $app->before(function(Request $request) {});

              $app->after(function(Request $request, Response $response) {});

              $app->finish(function(Request $request, Response $response) {});

              $app->error(function (Exception $e, $code) {});

              $app->json($data, $code);

              $app->stream($callable);




Fási Gábor
Twitter @maerlyng                                                                maerlyn.eu
                                                                                  insolis.hu
Providerek
                    Doctrine
                    Monolog
                    Session
                    Swiftmailer
                    UrlGenerator
                    Translation
                    Form
                    Twig
                    Url
                    Validator
                    HttpCache




Fási Gábor
Twitter @maerlyng                               maerlyn.eu
                                                 insolis.hu
További információk
                    silex.sensiolabs.org
                    github.com/fabpot/Silex
                    silex-php google group




Fási Gábor
Twitter @maerlyng                              maerlyn.eu
                                                insolis.hu
Ω




Fási Gábor
Twitter @maerlyng       maerlyn.eu
                         insolis.hu

Mais conteúdo relacionado

Destaque

Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellSaba Software
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming LanguageSimplilearn
 
The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...
The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...
The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...Palo Alto Software
 
9 Tips for a Work-free Vacation
9 Tips for a Work-free Vacation9 Tips for a Work-free Vacation
9 Tips for a Work-free VacationWeekdone.com
 

Destaque (20)

Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 
The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...
The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...
The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...
 
9 Tips for a Work-free Vacation
9 Tips for a Work-free Vacation9 Tips for a Work-free Vacation
9 Tips for a Work-free Vacation
 

Silex

  • 2. Symfony2 enterprise FW php5.3 2.0: 2011 augusztus 443 contributor Fási Gábor Twitter @maerlyng maerlyn.eu insolis.hu
  • 3. Symfony2 22 független komponens összessége Validator, Templating, Serializer, Security, Routing, Process, Locale, HttpKernel, Form, Finder, Filesystem, EventDispatcher, DomCrawler, DependencyInjection, CssSelector, Config, ClassLoader, BrowserKit, Yaml, Translation, HttpFoundation, Console Fási Gábor Twitter @maerlyng maerlyn.eu insolis.hu
  • 4. Silex Igor Wiedler és Fabien Potencier, 2010 szept. eredetileg komponens-demo Routing HttpFoundation HttpKernel EventDispatcher … Fási Gábor Twitter @maerlyng maerlyn.eu insolis.hu
  • 5. μ 4310 sor /tests: 1959 sor /src: 2351 sor kommentek nélkül: 1204 sor Fási Gábor Twitter @maerlyng maerlyn.eu insolis.hu
  • 6. Telepítés phar wget http://silex.sensiolabs.org/get/silex.phar <?php require_once __DIR__ . "/silex.phar"; composer { require: { "silex/silex": "1.*" } } <?php require_once __DIR__ . "/vendor/autoload.php"; Fási Gábor Twitter @maerlyng maerlyn.eu insolis.hu
  • 7. Használat $app = new SilexApplication(); $app->get('/hello/{name}', function($name) use($app) { return 'Hello '.$app->escape($name); }); $app->run(); $app->get(/* */); $app->post(/* */); $app->put(/* */); $app->delete(/* */); $app->match(/* */)->method("PATCH"); Fási Gábor Twitter @maerlyng maerlyn.eu insolis.hu
  • 8. Használat $app->get(/* */) ->bind("route_neve") ->assert("param", 'd+') ->value("param", "default") $app->before(function(Request $request) {}); $app->after(function(Request $request, Response $response) {}); $app->finish(function(Request $request, Response $response) {}); $app->error(function (Exception $e, $code) {}); $app->json($data, $code); $app->stream($callable); Fási Gábor Twitter @maerlyng maerlyn.eu insolis.hu
  • 9. Providerek Doctrine Monolog Session Swiftmailer UrlGenerator Translation Form Twig Url Validator HttpCache Fási Gábor Twitter @maerlyng maerlyn.eu insolis.hu
  • 10. További információk silex.sensiolabs.org github.com/fabpot/Silex silex-php google group Fási Gábor Twitter @maerlyng maerlyn.eu insolis.hu
  • 11. Ω Fási Gábor Twitter @maerlyng maerlyn.eu insolis.hu