drupal vs other
DESCRIPTION
Comparing Drupal CMS with Raw PHP coding. Presentation for AISEC conference ItEvent09 - http://aiesec-if.in.ua/news/88-it-event-anounceinspired by Drupal Camp 2009 (http://camp09.drupal.ua/)TRANSCRIPT
Drupal vs.
other
What/Where/Why ?
www.drupal.org
www.drupal.ru
www.drupal.ua
Sites on Drupal
Bukovel.com Kazantipa.net http://socialmedia.com.ua/ http://www.nigraphic.com http://mollom.com http://www.ubercart.org http://mollom.com http://www.xomba.com/ http://fobii.net/ http://www.esw.org/ http://foracamp.gr
Drupal Camp Kyiv 2009
Where?What?Who?Why?How?So what?
www.internetdevels.com
http://camp09.drupal.ua
Comparison …
Development methodsDevelopment methods
Дизайн -> Функціонал
VsФункціонал -> Дизайн
НАПИЛЬНИКНАПИЛЬНИК
порождает основной объем работ
X - Drupal X - Drupal функционалфункционал на на основании существующих модулейосновании существующих модулей
Сборка Drupal на модулях – 20%
Работа напильником – 50%
Css-инг – 30%
raw vs. rapid development
Типичные ошибки и рискиТипичные ошибки и риски
Производительность, хостинг Cистема требовательна к ресурсам, нужен хороший хостинг Неправильная оценка мелочей (а это - работа напильником)
приводит к проблемам Один корявый SQL запрос валит всю систему Интегратор и распределение обязанностей Эксперименты в стиле тысячи клацаний проводить на отдельной
копии
Drupal main advantages
Module system Multilanguage's Content oriented Categorizing (Taxonomy, Vocabulary) Multimedia support FILTERING – html, php, [bb], [rel] Integration with most used JS frameworks (JQuery, Dojo,
Mootools, YUI, Prototype) Update status (core) Statistics (core)
Content types
page story image blog entry book page forum topic webform …
Object $node - main content instance
parent itemmenu titleweighttitlebody (+ rich editor, + min. N of words)tagscomment (add, configure)multiple attachmentsuid, name, picturerevisions (id, log, revision_uid)author (name, date)publishpromote to front pagesticky on top of lists
language (en, ru, ua)
translate
URL alias
books
metatags
image inline
image assist
Drupal Development
Drupal Hooks and No Hacking – module, modules, sub-modules
Drupal Design (themimg\template)
Drupal Safe Code – Save yourself Drupal Do - Help yourself Drupal Performance Speed Up
Drupal Hooks (and it is not all API)
_install _schema _update _enable _disable _cron _save _load _boot _init (setup tasks) _exit (clean up tasks) _delete _alter _form _validate _submit
Drupal Template
Drupal Design (themimg\template)
<head><title>
<?php print $head_title; ?></title><?php print $head; ?><?php print $styles; ?><?php print $scripts; ?>
</head><body>
<?php print $left; ?><?php print $content; ?><?php print $right; ?>
</body>
Drupal Safe Code
Do you make it safety ?
“Cross-site scripting” treating
check_plain() check_markup() check_url() t() l() db_query() filter_xss_admin()
Drupal Do
Project issues– like mantis, Devel (Генерация нодов, Вывод статистики
исполненения, Информация об элементах темы, Отладочный вывод )
Coder (review code) Drush (Командная строка Drupal, Plugins) DTools => bench_chart and WSOD (emergency ) CCK+Views + Fields Services (AMFPHP, XMLRPC Server, sms) * Masquarade *
Drupal Performance Speed Up
Web Server (Apache, NGINX) DB (Indexes, Cache) PHP JS (packing) CSS (Sprites) Optimizers
… :( … => Cache Yslow plugin for FireBug Google page speed Block.cache vs cron Webo.in css sprites CSS optimization (packing, internal option) Aggressive cache mode Webmin.com Virtualmin Boosting (make HTML page for further using) Cache router Memcache On-code cash (APC, XCache, Zend optimizer, accelerator) www.day32.com/mysql – script for optimizing (info only) Cache SQL queries DB replication call drupal_flush_all_caches() or menu_rebuild()
Multilanguage Support
– Locale (locale.module) – общая поддержка дополнительных языков и перевод интерфейса
– Content translation (translation.module) – перевод содержания, поиск и перевод строк из встроенного интерфейса (code-based strings).
– i18n (with contributed sub-modules) – поиск и перевод строки из меню, блоков, таксономии и т.д. (user-entered strings).
– PathAuto, для подстройки автоматических URL с учётом языка– Languageicons and Languageinterface - иконки, переключатели, и их
управление– Многоязычные переменные: site_name, site_footer, theme_settings и
т.п. прописываются в файле settings.php– Translatable fields
Multisiting
Domain Domain Access
./sites/default
./sites/all
./sites/domain1
./sites/domain2
Additional Theme modules
Frontpage Theme developer (+Devel) Lightbox, Thickbox, jLightbox Front Page Slideshow jQuery UI jQuery plugins
Drupal Administer
“У Друпала огромная админка, даже за три клика не до всех страниц можно добраться.”
http://drupal.org/project/admin_menu http://drupal.org/project/nice_menus http://drupal.org/project/simplemenu http://drupal.org/project/dhtml_menu http://drupal.org/project/admin http://drupal.org/project/admin_dashboard http://drupal.org/project/admin_hover http://drupal.org/project/taxonomy_manager
“Не важно, какое решение выбрать.”“Важно, чтобы самые дальние страницы админки были доступны с
минимумом загрузок страниц и кликов.”
Drupal 7 - What, When, How?
OOP (“Друпал 7 станет ООПэшнее “ => @neochief)
Theme “seven” RDF, profiles (SN, simple) Simpletest in core (TestDriven.class) FieldsAPI + CCK +Views Imagecache (with many effects) PDO (PHP Data Object)
Drupal and SEO
Page title Nodetitles, Taxonomy title, Category title Nodeteaser Keywords, Nodewords (Metatags) Google Verification (verify-v1) Sitemenu, Menu tree, Bradcrumb Book Robotext Tegadelic, Cumulus Global redirect Path auto (alieases) + URL alieases + Path module SEO compline checker – checks for good SEO SEO friend
Drupal and Analytics
Sitemap XML sitemap Google Analytics Yandex Metrika Google web optimizer Click Heatmap Webform Simple news Event tracker Worldstat Semrush.com (org) Site Audit
Drupal & Softjourn
Drupal 4-6 development Step-by-step, module-by-module … Own module development for projects Drupal as flexible content management Drupal as social network Drupal as multisite platform
Drupal & IT
WEB 3.0 support JS frameworks, AJAX, XML, XSLT, RSS Ability for building Social Networks Integration with payment systems SEO and analytics support Usability Flash/Flex