Silex

1,128 views
1,057 views

Published on

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

No Downloads
Views
Total views
1,128
On SlideShare
0
From Embeds
0
Number of Embeds
45
Actions
Shares
0
Downloads
6
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Silex

  1. 1. Fási Gábor@maerlynghttp://maerlyn.eu/http://insolis.hu/SilexMicroframework Symfony2 alapon
  2. 2. Symfony2 enterprise FW php5.3 2.0: 2011 augusztus 443 contributorFási GáborTwitter @maerlyng maerlyn.eu insolis.hu
  3. 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, ConsoleFási GáborTwitter @maerlyng maerlyn.eu insolis.hu
  4. 4. Silex Igor Wiedler és Fabien Potencier, 2010 szept. eredetileg komponens-demo Routing HttpFoundation HttpKernel EventDispatcher …Fási GáborTwitter @maerlyng maerlyn.eu insolis.hu
  5. 5. μ 4310 sor /tests: 1959 sor /src: 2351 sor kommentek nélkül: 1204 sorFási GáborTwitter @maerlyng maerlyn.eu insolis.hu
  6. 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áborTwitter @maerlyng maerlyn.eu insolis.hu
  7. 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áborTwitter @maerlyng maerlyn.eu insolis.hu
  8. 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áborTwitter @maerlyng maerlyn.eu insolis.hu
  9. 9. Providerek Doctrine Monolog Session Swiftmailer UrlGenerator Translation Form Twig Url Validator HttpCacheFási GáborTwitter @maerlyng maerlyn.eu insolis.hu
  10. 10. További információk silex.sensiolabs.org github.com/fabpot/Silex silex-php google groupFási GáborTwitter @maerlyng maerlyn.eu insolis.hu
  11. 11. ΩFási GáborTwitter @maerlyng maerlyn.eu insolis.hu

×