DrupalCamp Bratislava
     23. - 24. 2. 2013




Efektívny vývoj
   v Drupale
 Martin Hulák @MartinHulak
...Hulák, kto?

• geek
• drupal lover/hater :)
• developer @svencreative
...kto je Sven?
• 2005
• 10 veselých drupalistov
• Salve Finance, Hitka, HMA, SAC
• Fun Radio, DPB
• Ham.sk, Getordeo.com, Shupito.com
o čom bude reč?

 • drush
 • features
 • konvencie + postupy
 • nie čo/prečo ale ako
priebeh projektu

 • inštalácia (drupal + features)
 • vývoj (features + themes + modules)
 • údržba
 • nové požiadavky
inštalácia
                    fserver
• drupal           drupal.org

• start script
                      dev
• features
• feature script      git
start script



• drush make (drupal)
• drush site install
feature script



• drush dl (pm-download)
• drush make (modules)
sven features
• sven_basic (roles + perms + filters)
• sven_admin (admin tools)
• sven_seo (seo tools)
• sven_wysiwyg (ckeditor)
• sven_pages, news, blogs, events, galeries, ...
príkladová feature
make a shell file
create feature
feature state


default                            overridden




          new views filter in diff
nové požiadavky

  • git source + live db
  • dev branch
  • merge + tag
  • deploy script
deploy script
prečo takto?
• prečo nie profiles?
• prečo nie debut?
naming
            • kit spec


• files structure     • features
• content types      • context
• fields              • image styles
• views
site folder structure
content type naming




       singular, one word



     fields naming




 field_[content-type]_[field-type]
views naming




                            plural of content type



                    view displays naming
             view
                                                     context




[Display Type]: Contextual name
features naming
context naming
image styles naming




    field-name_view-mode
Moduly

• výhoda 1000-ky modulov
• nevýhoda 1000-ky modulov
Príklad modulov

• block_class --> template preprocess
• ctools_automodal --> do 10 riadkov kódu
useful links
• http://drupal.org/project/drush
• http://drupal.org/project/features
• http://drupal.org/project/ftools
• http://drupal.org/project/diff
• http://drupal.org/project/fserver
• http://drupal.org/project/debut
Ďakujem.

sven.sk/blog   @svencreative
Martin Hulák   @MartinHulak

Efektivny vyvoj v drupale