SlideShare une entreprise Scribd logo
1  sur  32
Drupal as a Web
Framework
Adam Kalsey
adam@tropo.com
@akalsey

Tropo
www.Tropo.com
@tropo
“A web application framework is a software
framework that is designed to support the
development of dynamic websites, Web
applications and Web services. The
framework aims to alleviate the overhead
associated with common activities
performed in Web development.”


                                - Wikipedia
User
Management
user.module


fields.module
Database Access
$query = db_select('search_index',
'i', array('target' => 'slave'))-
>extend('SearchQuery')-
>extend('PagerDefault');
  $query->join('node', 'n', 'n.nid =
i.sid');
  $query
    ->condition('n.status', 1)
    ->addTag('node_access')
    ->searchExpression($keys, 'node');
$databases['default']['default'] = array(
   'driver' => 'mysql',
   'database' => 'databasename',
   'username' => 'username',
   'password' => 'password',
   'host' => 'localhost',
   'prefix' => 'main_',
   'collation' => 'utf8_general_ci',
);

$databases['default']['default'] = array (
   'database' => 'sites/default/files/.ht.sqlite',
   'driver' => 'sqlite',
   'prefix' => '',
);
function audioblogger_schema() {
  $schema = array();
  $schema['audioblogger'] = array(
    'fields' => array(
    'uid' => array('type' => 'int',
'unsigned' => TRUE, 'not null' => TRUE,
'default' => 0, 'disp-width' => '10'),
    'bloguser' => array('type' =>
'varchar', 'length' => '255', 'not null'
=> TRUE),
$form['audioblogger']['phone'] = array(
  '#type' => 'textfield',
  '#title' => t('Phone'),
  '#default_value' =>
empty($edit['phone']) ? '' :
$edit['phone'],
  '#description' => t('The phone number
you usually will call in from.'));
function audioblogger_menu() {
  $items = array();

  $items['audioblogger/answer'] =
array(
     'page callback' =>
'audioblogger_answer',
     'access arguments' => array('access
content'),
     'type' => MENU_NORMAL_ITEM,
  );
#: includes/common.inc:344 modules/
system/system.admin.inc:1645
msgid "@site is currently under
maintenance. We should be back shortly.
Thank you for your patience."
msgstr ""

#: includes/common.inc:1211 modules/
blogapi/blogapi.module:739;749 modules/
upload/upload.admin.inc:98;107;136;145
msgid "MB"
msgstr ""
<?php if (isset($primary_links)) : ?>
  <?php print theme('links',
$primary_links, array('class' => 'links
primary-links')) ?>
<?php endif; ?>
<?php if (isset($secondary_links)) : ?>
  <?php print theme('links',
$secondary_links, array('class' =>
'links secondary-links')) ?>
<?php endif; ?>
What about
 MVC?
/**
 * Default implementation of
DrupalEntityControllerInterface.
 *
 * This class can be used as-is by most
simple entity types. Entity types
 * requiring special handling can
extend the class.
 */
class DrupalDefaultEntityController
implements
DrupalEntityControllerInterface {
<?php if (isset($primary_links)) : ?>
  <?php print theme('links',
$primary_links, array('class' =>
'links primary-links')) ?>
<?php endif; ?>
<?php if
(isset($secondary_links)) : ?>
  <?php print theme('links',
$secondary_links, array('class' =>
'links secondary-links')) ?>
<?php endif; ?>
function audioblogger_menu() {
  $items = array();

  $items['audioblogger/answer'] =
array(
     'page callback' =>
'audioblogger_answer',
     'access arguments' =>
array('access content'),
     'type' => MENU_NORMAL_ITEM,
  );
What does Drupal
     need?
Demo time
function frameworkdemo_menu() {
  $items = array();
  $items['demo/answer'] = array(
     'page callback' => 'demo_answer',
     'access arguments' => array('access
content'),
     'type' => MENU_NORMAL_ITEM,
  );
  return $items;
}
function frameworkdemo_answer() {
  include_once 'tropo.class.php';
  $tropo = new Tropo();
  $session = new Session();
  $caller = $session->getFrom();
  $number = $caller['id'];
  $tropo->say('Thanks for coming!');
  $_SESSION['caller'] = $number;
  $tropo->on(array('event' =>
'continue', 'next'=> url('demo/
thanks/')));
  frameworkdemo_save($number);
  print $tropo;
}
www.Tropo.com
(604) 800-9142
Free developer accounts: http://Tropo.com

Demo module source:
https://github.com/akalsey/drupal-framework-demo

Slides: http://slideshare.com/akalsey/drupal-as-a-web-
framework

Follow us on Twitter: @Tropo
Me: Adam Kalsey | adam@tropo.com | @akalsey

Contenu connexe

Tendances

Deploying
DeployingDeploying
Deployingsoon
 
In-depth changes to Drupal 8 javascript
In-depth changes to Drupal 8 javascriptIn-depth changes to Drupal 8 javascript
In-depth changes to Drupal 8 javascriptThéodore Biadala
 
JavaScript in Drupal 7: What developers need to know
JavaScript in Drupal 7: What developers need to knowJavaScript in Drupal 7: What developers need to know
JavaScript in Drupal 7: What developers need to knowkatbailey
 
Running ms sql stored procedures in mule
Running ms sql stored procedures in muleRunning ms sql stored procedures in mule
Running ms sql stored procedures in muleAnilKumar Etagowni
 
Intro To jQuery In Drupal
Intro To jQuery In DrupalIntro To jQuery In Drupal
Intro To jQuery In DrupalMatthew Farina
 
Configuring a more secure BOSH
Configuring a more secure BOSHConfiguring a more secure BOSH
Configuring a more secure BOSHSaman Alvi
 
Authentication
AuthenticationAuthentication
Authenticationsoon
 
Google
GoogleGoogle
Googlesoon
 
Getting Into Drupal 8 Configuration
Getting Into Drupal 8 ConfigurationGetting Into Drupal 8 Configuration
Getting Into Drupal 8 ConfigurationPhilip Norton
 
Drupal 8 Services And Dependency Injection
Drupal 8 Services And Dependency InjectionDrupal 8 Services And Dependency Injection
Drupal 8 Services And Dependency InjectionPhilip Norton
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVCAlive Kuo
 
Doctrine 2
Doctrine 2Doctrine 2
Doctrine 2zfconfua
 
Backbone js in drupal core
Backbone js in drupal coreBackbone js in drupal core
Backbone js in drupal coreMarcin Wosinek
 
Drupal Javascript for developers
Drupal Javascript for developersDrupal Javascript for developers
Drupal Javascript for developersDream Production AG
 
The new static resources framework
The new static resources frameworkThe new static resources framework
The new static resources frameworkmarcplmer
 

Tendances (17)

Deploying
DeployingDeploying
Deploying
 
In-depth changes to Drupal 8 javascript
In-depth changes to Drupal 8 javascriptIn-depth changes to Drupal 8 javascript
In-depth changes to Drupal 8 javascript
 
JavaScript in Drupal 7: What developers need to know
JavaScript in Drupal 7: What developers need to knowJavaScript in Drupal 7: What developers need to know
JavaScript in Drupal 7: What developers need to know
 
Running ms sql stored procedures in mule
Running ms sql stored procedures in muleRunning ms sql stored procedures in mule
Running ms sql stored procedures in mule
 
Intro To jQuery In Drupal
Intro To jQuery In DrupalIntro To jQuery In Drupal
Intro To jQuery In Drupal
 
Configuring a more secure BOSH
Configuring a more secure BOSHConfiguring a more secure BOSH
Configuring a more secure BOSH
 
Authentication
AuthenticationAuthentication
Authentication
 
Google
GoogleGoogle
Google
 
Getting Into Drupal 8 Configuration
Getting Into Drupal 8 ConfigurationGetting Into Drupal 8 Configuration
Getting Into Drupal 8 Configuration
 
Drupal 8 Services And Dependency Injection
Drupal 8 Services And Dependency InjectionDrupal 8 Services And Dependency Injection
Drupal 8 Services And Dependency Injection
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
Doctrine 2
Doctrine 2Doctrine 2
Doctrine 2
 
Backbone js in drupal core
Backbone js in drupal coreBackbone js in drupal core
Backbone js in drupal core
 
Php frameworks
Php frameworksPhp frameworks
Php frameworks
 
Drupal Javascript for developers
Drupal Javascript for developersDrupal Javascript for developers
Drupal Javascript for developers
 
The new static resources framework
The new static resources frameworkThe new static resources framework
The new static resources framework
 
diego chipantasi
diego chipantasidiego chipantasi
diego chipantasi
 

En vedette (8)

презентація проект1
презентація проект1презентація проект1
презентація проект1
 
Springbreak
SpringbreakSpringbreak
Springbreak
 
Tο Nησι γερμανικη κατοχη - Vicroria hislop
Tο Nησι   γερμανικη κατοχη - Vicroria hislopTο Nησι   γερμανικη κατοχη - Vicroria hislop
Tο Nησι γερμανικη κατοχη - Vicroria hislop
 
Colera
ColeraColera
Colera
 
Tähised
TähisedTähised
Tähised
 
019 h
019 h019 h
019 h
 
semana de acogida
semana de acogidasemana de acogida
semana de acogida
 
Grandes coches de la actualidad
Grandes coches de la actualidadGrandes coches de la actualidad
Grandes coches de la actualidad
 

Similaire à Drupal as a web framework

Service discovery and configuration provisioning
Service discovery and configuration provisioningService discovery and configuration provisioning
Service discovery and configuration provisioningSource Ministry
 
Web applications with Catalyst
Web applications with CatalystWeb applications with Catalyst
Web applications with Catalystsvilen.ivanov
 
Drupal II: The SQL
Drupal II: The SQLDrupal II: The SQL
Drupal II: The SQLddiers
 
Opencast Admin UI - Introduction to developing using AngularJS
Opencast Admin UI - Introduction to developing using AngularJSOpencast Admin UI - Introduction to developing using AngularJS
Opencast Admin UI - Introduction to developing using AngularJSbuttyx
 
What mom never told you about bundle configurations - Symfony Live Paris 2012
What mom never told you about bundle configurations - Symfony Live Paris 2012What mom never told you about bundle configurations - Symfony Live Paris 2012
What mom never told you about bundle configurations - Symfony Live Paris 2012D
 
Supercharging WordPress Development - Wordcamp Brighton 2019
Supercharging WordPress Development - Wordcamp Brighton 2019Supercharging WordPress Development - Wordcamp Brighton 2019
Supercharging WordPress Development - Wordcamp Brighton 2019Adam Tomat
 
Responsive Design with WordPress (WCPHX)
Responsive Design with WordPress (WCPHX)Responsive Design with WordPress (WCPHX)
Responsive Design with WordPress (WCPHX)Joe Casabona
 
Валентин Мацвейко та Владислав Мойсеєнко — D8: Migrate Yourself: code->module...
Валентин Мацвейко та Владислав Мойсеєнко — D8: Migrate Yourself: code->module...Валентин Мацвейко та Владислав Мойсеєнко — D8: Migrate Yourself: code->module...
Валентин Мацвейко та Владислав Мойсеєнко — D8: Migrate Yourself: code->module...LEDC 2016
 
Migrate yourself. code -> module -> mind
Migrate yourself. code -> module -> mindMigrate yourself. code -> module -> mind
Migrate yourself. code -> module -> mindValentine Matsveiko
 
jQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
jQuery UI Widgets, Drag and Drop, Drupal 7 JavascriptjQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
jQuery UI Widgets, Drag and Drop, Drupal 7 JavascriptDarren Mothersele
 
WordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a FrameworkWordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a FrameworkExove
 
CodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkCodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkBo-Yi Wu
 
Drupal 7 Theming - Behind the scenes
Drupal 7 Theming - Behind the scenes Drupal 7 Theming - Behind the scenes
Drupal 7 Theming - Behind the scenes ramakesavan
 
JQuery In Drupal
JQuery In DrupalJQuery In Drupal
JQuery In Drupalkatbailey
 

Similaire à Drupal as a web framework (20)

Service discovery and configuration provisioning
Service discovery and configuration provisioningService discovery and configuration provisioning
Service discovery and configuration provisioning
 
Web applications with Catalyst
Web applications with CatalystWeb applications with Catalyst
Web applications with Catalyst
 
Yii Introduction
Yii IntroductionYii Introduction
Yii Introduction
 
Drupal II: The SQL
Drupal II: The SQLDrupal II: The SQL
Drupal II: The SQL
 
Opencast Admin UI - Introduction to developing using AngularJS
Opencast Admin UI - Introduction to developing using AngularJSOpencast Admin UI - Introduction to developing using AngularJS
Opencast Admin UI - Introduction to developing using AngularJS
 
What mom never told you about bundle configurations - Symfony Live Paris 2012
What mom never told you about bundle configurations - Symfony Live Paris 2012What mom never told you about bundle configurations - Symfony Live Paris 2012
What mom never told you about bundle configurations - Symfony Live Paris 2012
 
Supercharging WordPress Development - Wordcamp Brighton 2019
Supercharging WordPress Development - Wordcamp Brighton 2019Supercharging WordPress Development - Wordcamp Brighton 2019
Supercharging WordPress Development - Wordcamp Brighton 2019
 
Responsive Design with WordPress (WCPHX)
Responsive Design with WordPress (WCPHX)Responsive Design with WordPress (WCPHX)
Responsive Design with WordPress (WCPHX)
 
Валентин Мацвейко та Владислав Мойсеєнко — D8: Migrate Yourself: code->module...
Валентин Мацвейко та Владислав Мойсеєнко — D8: Migrate Yourself: code->module...Валентин Мацвейко та Владислав Мойсеєнко — D8: Migrate Yourself: code->module...
Валентин Мацвейко та Владислав Мойсеєнко — D8: Migrate Yourself: code->module...
 
Migrate yourself. code -> module -> mind
Migrate yourself. code -> module -> mindMigrate yourself. code -> module -> mind
Migrate yourself. code -> module -> mind
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
jQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
jQuery UI Widgets, Drag and Drop, Drupal 7 JavascriptjQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
jQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
 
WordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a FrameworkWordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a Framework
 
CodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkCodeIgniter PHP MVC Framework
CodeIgniter PHP MVC Framework
 
Drupal 7 Theming - Behind the scenes
Drupal 7 Theming - Behind the scenes Drupal 7 Theming - Behind the scenes
Drupal 7 Theming - Behind the scenes
 
Fatc
FatcFatc
Fatc
 
JQuery In Drupal
JQuery In DrupalJQuery In Drupal
JQuery In Drupal
 
WCLA12 JavaScript
WCLA12 JavaScriptWCLA12 JavaScript
WCLA12 JavaScript
 

Plus de Adam Kalsey

Public Speaking for Geeks
Public Speaking for GeeksPublic Speaking for Geeks
Public Speaking for GeeksAdam Kalsey
 
Drupal 7 module development
Drupal 7 module developmentDrupal 7 module development
Drupal 7 module developmentAdam Kalsey
 
East Bay Ruby Tropo presentation
East Bay Ruby Tropo presentationEast Bay Ruby Tropo presentation
East Bay Ruby Tropo presentationAdam Kalsey
 
Introduction to jRuby
Introduction to jRubyIntroduction to jRuby
Introduction to jRubyAdam Kalsey
 
Tuning Drupal for Scale and Performance
Tuning Drupal for Scale and PerformanceTuning Drupal for Scale and Performance
Tuning Drupal for Scale and PerformanceAdam Kalsey
 
Drupal Module APIs
Drupal Module APIsDrupal Module APIs
Drupal Module APIsAdam Kalsey
 

Plus de Adam Kalsey (6)

Public Speaking for Geeks
Public Speaking for GeeksPublic Speaking for Geeks
Public Speaking for Geeks
 
Drupal 7 module development
Drupal 7 module developmentDrupal 7 module development
Drupal 7 module development
 
East Bay Ruby Tropo presentation
East Bay Ruby Tropo presentationEast Bay Ruby Tropo presentation
East Bay Ruby Tropo presentation
 
Introduction to jRuby
Introduction to jRubyIntroduction to jRuby
Introduction to jRuby
 
Tuning Drupal for Scale and Performance
Tuning Drupal for Scale and PerformanceTuning Drupal for Scale and Performance
Tuning Drupal for Scale and Performance
 
Drupal Module APIs
Drupal Module APIsDrupal Module APIs
Drupal Module APIs
 

Dernier

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Dernier (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

Drupal as a web framework

  • 1. Drupal as a Web Framework
  • 3. “A web application framework is a software framework that is designed to support the development of dynamic websites, Web applications and Web services. The framework aims to alleviate the overhead associated with common activities performed in Web development.” - Wikipedia
  • 6.
  • 7.
  • 8.
  • 10. $query = db_select('search_index', 'i', array('target' => 'slave'))- >extend('SearchQuery')- >extend('PagerDefault'); $query->join('node', 'n', 'n.nid = i.sid'); $query ->condition('n.status', 1) ->addTag('node_access') ->searchExpression($keys, 'node');
  • 11. $databases['default']['default'] = array( 'driver' => 'mysql', 'database' => 'databasename', 'username' => 'username', 'password' => 'password', 'host' => 'localhost', 'prefix' => 'main_', 'collation' => 'utf8_general_ci', ); $databases['default']['default'] = array ( 'database' => 'sites/default/files/.ht.sqlite', 'driver' => 'sqlite', 'prefix' => '', );
  • 12. function audioblogger_schema() { $schema = array(); $schema['audioblogger'] = array( 'fields' => array( 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10'), 'bloguser' => array('type' => 'varchar', 'length' => '255', 'not null' => TRUE),
  • 13. $form['audioblogger']['phone'] = array( '#type' => 'textfield', '#title' => t('Phone'), '#default_value' => empty($edit['phone']) ? '' : $edit['phone'], '#description' => t('The phone number you usually will call in from.'));
  • 14. function audioblogger_menu() { $items = array(); $items['audioblogger/answer'] = array( 'page callback' => 'audioblogger_answer', 'access arguments' => array('access content'), 'type' => MENU_NORMAL_ITEM, );
  • 15. #: includes/common.inc:344 modules/ system/system.admin.inc:1645 msgid "@site is currently under maintenance. We should be back shortly. Thank you for your patience." msgstr "" #: includes/common.inc:1211 modules/ blogapi/blogapi.module:739;749 modules/ upload/upload.admin.inc:98;107;136;145 msgid "MB" msgstr ""
  • 16. <?php if (isset($primary_links)) : ?> <?php print theme('links', $primary_links, array('class' => 'links primary-links')) ?> <?php endif; ?> <?php if (isset($secondary_links)) : ?> <?php print theme('links', $secondary_links, array('class' => 'links secondary-links')) ?> <?php endif; ?>
  • 17.
  • 19. /** * Default implementation of DrupalEntityControllerInterface. * * This class can be used as-is by most simple entity types. Entity types * requiring special handling can extend the class. */ class DrupalDefaultEntityController implements DrupalEntityControllerInterface {
  • 20. <?php if (isset($primary_links)) : ?> <?php print theme('links', $primary_links, array('class' => 'links primary-links')) ?> <?php endif; ?> <?php if (isset($secondary_links)) : ?> <?php print theme('links', $secondary_links, array('class' => 'links secondary-links')) ?> <?php endif; ?>
  • 21. function audioblogger_menu() { $items = array(); $items['audioblogger/answer'] = array( 'page callback' => 'audioblogger_answer', 'access arguments' => array('access content'), 'type' => MENU_NORMAL_ITEM, );
  • 22.
  • 23.
  • 24.
  • 27. function frameworkdemo_menu() { $items = array(); $items['demo/answer'] = array( 'page callback' => 'demo_answer', 'access arguments' => array('access content'), 'type' => MENU_NORMAL_ITEM, ); return $items; }
  • 28. function frameworkdemo_answer() { include_once 'tropo.class.php'; $tropo = new Tropo(); $session = new Session(); $caller = $session->getFrom(); $number = $caller['id']; $tropo->say('Thanks for coming!'); $_SESSION['caller'] = $number; $tropo->on(array('event' => 'continue', 'next'=> url('demo/ thanks/'))); frameworkdemo_save($number); print $tropo; }
  • 30.
  • 32. Free developer accounts: http://Tropo.com Demo module source: https://github.com/akalsey/drupal-framework-demo Slides: http://slideshare.com/akalsey/drupal-as-a-web- framework Follow us on Twitter: @Tropo Me: Adam Kalsey | adam@tropo.com | @akalsey