Upgrade to Pro — share decks privately, control downloads, hide ads and more …

JF01PR5 - Δημιουργία εφαρμογών στο Joomla! χωρίς να τρελαθείτε (Nicholas Dionysopoulos)

JF01PR5 - Δημιουργία εφαρμογών στο Joomla! χωρίς να τρελαθείτε (Nicholas Dionysopoulos)

JoomlaFrappe

March 12, 2013
Tweet

More Decks by JoomlaFrappe

Other Decks in Technology

Transcript

  1. !ά#$%&' 2013 – 1& Joomla! Frappé Ναι, ξέρω τι σκέφτεστε

    “Ό!. 2+έ ,04, ό!., ό!. ά--0 έ&' 6'('#',έ&0 framework!”
  2. !ά#$%&' 2013 – 1& Joomla! Frappé Το FOF επεκτείνει το

    Joomla! framework 7+& (0 '&(.6'8./(ά 9-ή#"%
  3. !ά#$%&' 2013 – 1& Joomla! Frappé DRY - Μην Επαναλαμβάνεστε

    !"#ώ (0 copy/paste (04 ί;.04 6ώ;.6' ='&ά 6'. ='&ά 6'. ='&ά !"# $"%ά !"# $"%ά 6'. ='&ά 6'. ='&ά ...
  4. !ά#$%&' 2013 – 1& Joomla! Frappé Το λιγότερο είναι περισσότερο

    Convention over configuration – -.>ό(+#0% !#ό&0%, 6ό90%, 6ώ;.6'% 6'. bugs
  5. !ά#$%&' 2013 – 1& Joomla! Frappé Δεν επιβάλλει τον τρόπο

    σκέψης του 7+& έ!+. ,'ύ#' 604(.ά, '--ά έ!+. 9#0/'#,0@ό,+&' triggers, >+>0&ό(' 9#0/8έ("&...
  6. !ά#$%&' 2013 – 1& Joomla! Frappé Προς τα πίσω συμβατότητα

    7+& έ!+. ='B&.6έ%, 60/,0>0&.6έ% '--'>έ% '9’(C ,.' ,έ#' /(C& ά--C
  7. !ά#$%&' 2013 – 1& Joomla! Frappé Ιούλιος 2009 – Βασικές

    MVC κλάσεις 7.6έ% ,04 6-ά/+.%, +9+6(+ί&04& (0 JModel 6'. /.', +-'!./(090.0ύ& (0& copy & paste 6ώ;.6'
  8. !ά#$%&' 2013 – 1& Joomla! Frappé Σεπτέμβριος 2011 – Γϊναμε

    κανονικό framework E'/.6ά, (' +ί!' 9ά#+. ,+ έ&' ά--0 framework 904 ,04 έ6'&+ (C& @"ή 9'(ί&.
  9. !ά#$%&' 2013 – 1& Joomla! Frappé Σεπτέμβριος 2011 – Γϊναμε

    κανονικό framework E'/.6ά, (' +ί!' 9ά#+. ,+ έ&' ά--0 framework 904 ,04 έ6'&+ (C& @"ή 9'(ί&. THIS. IS. NIKEA! (Η Σπάρτη είχε άλλες δουλειές να κάνει)
  10. !ά#$%&' 2013 – 1& Joomla! Frappé Οκτώβριος 2011 – HMVC

    +&ώ +ί!' 60--ή/+. ,έ/' /(0 '+#09-ά&0, /(0 έ;'B0%, /(0 F-. E+&.@έ-0% >.' 4 ώ#+%
  11. !ά#$%&' 2013 – 1& Joomla! Frappé Μάιος 2012 – Δημόσια

    έκδοση /(0 /4&έ;#.0 J and Beyond 2012
  12. !ά#$%&' 2013 – 1& Joomla! Frappé Ιούνιος 2012 – Bootstrap

    & jQuery A(0 9#0'.#+(.6ό 9'6έ(0 Akeeba Strapper
  13. !ά#$%&' 2013 – 1& Joomla! Frappé Φεβρουάριος 2013 – η

    έκδοση 2.0 ΔΕΝ μπήκε στο Joomla! 3 (0 090ί0, (+-.6ά, +ί&'. 6ά(. 6'-ό!
  14. !ά#$%&' 2013 – 1& Joomla! Frappé Στο μυαλό μιας εφαρμογής

    σε FOF G.' +9ί/6+HC /(0 ό#0B0 71/2 +&ό% 6(.#ί04 >#'B+ί"& /(0 G'&!ά('&
  15. Μερικές γενικές σκέψεις ✤ A!+;ό% RESTful, '--ά ό!. 6'. (ό/0

    ✤ D#0/έ>>./C “9#ώ(' 0. 49C#+/ί+%”. F&/",'(",έ&C 490/(ή#.=C JSON 6'. ;.'B'&ή% '48+&(.6090ίC/C 904 '&0ί>+. (C& 9ό#(' >.' 9'#0!ή ;+;0,έ&"& /+ +B'#,0>έ% (web, desktop, mobile 6'. ;+& /4,,'@+ύ+('.) ✤ Ό!., (0 OAuth ;+& 490/(C#ί@+('. ('6ό,';). G.' ;.6.ά ,'% )'/./,έ&C /+ TOTP 6'. AES-256 ,έ80;0% ;.'B'&0ύ% '48+&(.6090ίC/C% 6'. (0 '9-ό HTTP Basic Authentication 490/(C#ί@0&('. ή;C. ✤ D'#έ!04,+ HMVC #ή&'() !"#ί% &' !#+.'/(+ί &' ='&',ά8+(+ &' B(.ά!&+(+ +B'#,0>έ% /+ Joomla! (/+ '&(ί8+/C ,+ (0 9#0(+.&ό,+&0 Joomla! Framework, ό('& 6'. '& +ί&'. έ(0.,0)
  16. !ά#$%&' 2013 – 1& Joomla! Frappé 6'. C /(0.!+.ώ;C% >&ώ/C

    (C% '>>-.6ή% Προσοχή: Απαραίτητη η γονική συναίνεση
  17. Convention over configuration in the Dispatcher ✤ The Dispatcher is

    your component’s router. It routes the request to the appropriate Controller based on conventions: ✤ A POST request gets routed to the save task ✤ A GET request to a plural view name gets routed to the browse task ✤ A front-end GET request with an ID gets routed to the read task ✤ A back-end GET request with an ID gets routed to the edit task
  18. Convention over configuration in Models ✤ Tables are named as

    #__component_view, e.g. #__todo_items ✤ Auto increment field is named component_view_id, e.g. todo_item_id ✤ Magic fields: enabled, created_by, created_on, modified_by, modified_on, locked_by, locked_on, hits ✤ You can override defaults without copying & pasting code, ever. Copy & paste is the devil!
  19. Convention over configuration in Controllers ✤ Default tasks (not RESTful!):

    browse, read, edit, add, delete, save, apply, ... ✤ Customize with onBeforeMethod and onAfterMethod methods, e.g. onBeforeSave. Don't copy & paste code. ✤ All MVC objects can be passed a $config array to customize them. It "flows" from dispatcher to component to model and view. ✤ FOF guesses the task if it's missing based on plural/singular view name and existence of ID in the query
  20. Convention over configuration in Views ✤ Views inherit from FOFView

    and its specialized children, e.g. FOFViewHtml ✤ Customize using the onTask methods, e.g. onBrowse ✤ The toolbar is handled outside the view, in a FOFToolbar descendant class. Override it with a toolbar.php file in the component's root. ✤ Magic toolbar methods, e.g. onItemsBrowse allow you to customize the toolbar without copying & pasting code.
  21. HMVC – Hierarchical MVC ✤ Include the results of component

    views anywhere (other views, other component, modules, ...) ✤ FOFDispatcher::getTmpInstance(‘com_foobar’, ‘items’, array(‘layout’ => ‘fancy’))->dispatch();
  22. Reuse view templates ✤ Load a view template from another

    view, component, ... ✤ echo $this->loadAnyTemplate('site:com_foobar/item/form');
  23. Media files overrides ✤ Load media files like this: FOFTemplateUtils::addCSS('media://com_foobar/css/frontend.css');

    ✤ Media overrides are inside the template folder, e.g. templates/tpl_example/media/com_foobar/css/frontend.css
  24. Services first – automatic JSON and CSV views ✤ Just

    add format=json or format=csv ✤ JSON: You have an instant JSON-based remote API for your components ✤ CSV: You can quickly export whatever you see in the backend to Excel, Numbers, LibreOffice, Google Docs, etc. ✤ Transparent authentication support using URL parameters or HTTP Basic Authentication
  25. XML-based views ✤ It’s JForm on double dose of steroids

    ✤ Browse, read and edit views from XML templates ✤ You don’t need to write any PHP or HTML, but you can mix traditional PHP-based and XML-based templates, even in the same view ✤ Overridable with Joomla! template overrides