SlideShare une entreprise Scribd logo
1  sur  31
Télécharger pour lire hors ligne
Boutique product development company
It is amazing what you can accomplish when you have a client-centric team to deliver outstanding products.
An Insight to Microsoft Platform
           Tahir Rauf | Software Architect
An Insight to Microsoft Platform
Topics covered in the presentation




     •   Development Tool Overview
     •   Visual Studio Demo
     •   Tips & Recommendations




                                     Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

Development Tools Overview


     •Microsoft .NET
     •Microsoft SQL Server
     •Windows Azure
     •Windows Phone 7
     •XNA and Kodu Framework
     •Silverlight
     •Microsoft Visual Studio




                                     Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

.NET Framework – General overview




                                     Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

Overview of General Features


 •    Interoperability
 •    Language Independence
 •    Base Class Library
 •    Portability (Mono, DotGNU, CrossNet)
 •    Simplified deployments
 •    Security




                                             Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

What is Silver light

• Application framework for Rich Internet Applications

• Subset of WPF

• Uses XML based representation of presentation using XAML

• XAML targets multiple platforms (desktop, web, mobile)




    )
                                                    Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

Silver light Programming Model




                                     Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

How Silver light Works




                                     Tahir Rauf | Software Architect
An Insight Into Microsoft Platform




                                     Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

Gaming frameworks (XNA & Kodu)


 • Cross platform Game development framework
 • XBOX, Windows, Mobile, Zune
 • C#, VB.NET as compared to traditional C++
 • Kodu – codeless way of game development




                                               Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

Microsoft SQL Server




                                     Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

MS SQL Server high level feature set

 • Database Engine (DBMS) (SQL server management studio)

 • Analysis services (Multidimensional Data, Data Mining) (Business
      intelligence development studio)

 • Integration services (ETL)

 • Replication

 • Reporting Services (Business Intelligence)

 • SQL Server Service Broker




                                                   Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

What is Windows Azure




                                     Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

How Windows Azure works




                                     Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

Azure Features overview


 • Focus on your application, not operational constraints.
             • Administration

             • Availability

             • Scalability

 • REST and managed APIs (storage services even out of cloud)

 • Fault Tolerance (3 times replication)

 • VM

 • In built, caching support


                                                     Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

Windows Phone 7

                          Runtime                                             Tools

                                                            Phone Emulator
        Sensors        Media    Data         Location

         Phone            Xbox LIVE         Notifications       Samples                Documentation

         .NET Framework managed code sandbox                    Guides                  Community

                                                                Packaging and Verification Tools




                           Cloud                                              Portal
          Notifications               App Deployment          Registration               Marketplace

            Location             Identity        Feeds         Validation           MO and CC Billing

                                  Social         Maps         Certification        Business Intelligence

                                                               Publishing          Update Management

                                                                                   Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

Tips and Recommendations



Visual Studio Code Samples at MSDN (C#, C++, j#, VB, Smart Devices
etc) - http://msdn.microsoft.com/en-us/library/se881ay9(v=vs.80).aspx
MSDN Library http://msdn.microsoft.com/en-us/ms348103
Microsoft Research Community (Publications, projects) -
http://research.microsoft.com/




                                                    Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

Common Hooks

 • hook_help()
 • hook_perm()
 • hook_init()
 • hook_theme()
 • hook_block()
 • hook_menu()




                                     Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

Help Hooks – a Module File Entry


   /**
    * Implementation of hook_help
    */
   function modulename_help($path, $arg) {
      switch ($path) {
             case 'admin/help#color':
              $output = '<p>'. t('The color module allows a site administrator to
             quickly and easily change the color scheme of certain
             themes.’ ).'</p>';
         return $output;
         }
   }
                                                           Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

Specify the Available Permissions

 • Tell Drupal who can use your module.
 /**
  * Implementation of hook_perm
  */
 function modulename_perm() {
       return array('access site-wide ', 'administer colors');
 }




                                                            Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

Hook_init ()

 • This hook is run at the beginning of the page request.
 1.     Add CSS or JS that should be present on every page.
 2.     Set up global parameters which are needed later in the request




                                                       Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

Cont..Hook_init ()

 function modulename_init() {
       $path = drupal_get_path('module', ‘modulename');
       drupal_add_js($path . '/filename.js');
       drupal_add_css($path . ‘/filename.css', 'module', 'all', FALSE);
 }


 http://api.drupal.org/api/drupal/developer!hooks!core.php/function/hook_i
    nit/6




                                                         Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

Hook_Theme ()


   function modulename_theme($existing, $type, $theme, $path) {
   }
   • Write theme funtions




                                                   Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

Declaring Block Content

 /**
       * Implementation of hook_block().
       * @param string $op one of "list", "view", "save" and "configure"
       * @param integer $delta code to identify the block
       * @param array $edit only for "save" operation
       */
 function modulename_block($op = 'list', $delta = 0, $edit = array()) {
    switch ($op) {
           case 'list':
            $block = array();
            $block[0]["info"] = t('assets');
            return $block;
            break;


                                                         Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

Declaring Block Content Cont..


               case 'view':
                  $block['subject'] = 'assets';
                  $block['content'] = get_block_content();
                  return $block;
                  break;
           }
   }


   http://api.drupal.org/api/drupal/developer!hooks!core.php/function/hook_
      block/6



                                                             Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

 Hook Menu

• Define menu items and page callbacks.

• This hook enables modules to register paths in order to define how URL
   requests are handled.

• This hook is rarely called (for example, when modules are enabled), and
   its results are cached in the database.




                                                     Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

Hook Menu Cont..


 function modulename_menu() {
       $items['abc/def'] = array(
           'page callback' => 'mymodule_abc_view',
           'type' => MENU_CALLBACK,
           'access callback' => true,
       );
        return $items;
 }


 http://api.drupal.org/api/drupal/developer!hooks!core.php/function/hook_
    menu/6

                                                     Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

Useful Links

   • hook_form_alter(&$form, &$form_state, $form_id)
     http://api.drupal.org/api/drupal/developer!hooks!core.ph
     p/function/hook_form_alter/6

   • hook_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL)
     http://api.drupal.org/api/drupal/developer!hooks!core.ph
     p/function/hook_nodeapi/6

   • hook_user($op, &$edit, &$account, $category = NULL)
     http://api.drupal.org/api/drupal/developer!hooks!core.ph
     p/function/hook_user/6


                                            Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

.Uninstall File


     • Remove all tables that a module defines.
     • http://api.drupal.org/api/drupal/includes!common.inc/function/drupal_
       uninstall_schema/6




                                                      Tahir Rauf | Software Architect
An Insight Into Microsoft Platform

Useful Links


   1.     Creating modules - a tutorial: Drupal 6.x
   2.     Creating Our First Module (1.3M PDF)
   3.     Coding standards
   4.     http://www.drupal.org




                                                      Tahir Rauf | Software Architect

Contenu connexe

Similaire à An insight to microsoft platform

2017 03 25 Microsoft Hacks, How to code efficiently
2017 03 25 Microsoft Hacks, How to code efficiently2017 03 25 Microsoft Hacks, How to code efficiently
2017 03 25 Microsoft Hacks, How to code efficientlyBruno Capuano
 
FIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT AgentsFIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT AgentsFIWARE
 
Cloud for Game Developers – Myth or Real Scenarios?
Cloud for Game Developers – Myth or Real Scenarios?Cloud for Game Developers – Myth or Real Scenarios?
Cloud for Game Developers – Myth or Real Scenarios?DevGAMM Conference
 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government DevelopersFrank La Vigne
 
Python - A Comprehensive Programming Language
Python - A Comprehensive Programming LanguagePython - A Comprehensive Programming Language
Python - A Comprehensive Programming LanguageTsungWei Hu
 
SharePoint for the .NET Developer
SharePoint for the .NET DeveloperSharePoint for the .NET Developer
SharePoint for the .NET DeveloperJohn Calvert
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arpGary Pedretti
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator PresentationAaron Saunders
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Anupam Ranku
 
Azure enterprise integration platform
Azure enterprise integration platformAzure enterprise integration platform
Azure enterprise integration platformMichael Stephenson
 
Tecnologias Free e Open Source na Plataforma Microsoft
Tecnologias Free e Open Source na Plataforma MicrosoftTecnologias Free e Open Source na Plataforma Microsoft
Tecnologias Free e Open Source na Plataforma MicrosoftGustavo Malheiros
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hourConvert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hourBrian Culver
 
TechnicalTerraformLandingZones121120229238.pdf
TechnicalTerraformLandingZones121120229238.pdfTechnicalTerraformLandingZones121120229238.pdf
TechnicalTerraformLandingZones121120229238.pdfMIlton788007
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"Volker Linz
 
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignalITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignalITCamp
 

Similaire à An insight to microsoft platform (20)

【BS1】What’s new in visual studio 2022 and c# 10
【BS1】What’s new in visual studio 2022 and c# 10【BS1】What’s new in visual studio 2022 and c# 10
【BS1】What’s new in visual studio 2022 and c# 10
 
2017 03 25 Microsoft Hacks, How to code efficiently
2017 03 25 Microsoft Hacks, How to code efficiently2017 03 25 Microsoft Hacks, How to code efficiently
2017 03 25 Microsoft Hacks, How to code efficiently
 
My Saminar On Php
My Saminar On PhpMy Saminar On Php
My Saminar On Php
 
FIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT AgentsFIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT Agents
 
Cloud for Game Developers – Myth or Real Scenarios?
Cloud for Game Developers – Myth or Real Scenarios?Cloud for Game Developers – Myth or Real Scenarios?
Cloud for Game Developers – Myth or Real Scenarios?
 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government Developers
 
Python - A Comprehensive Programming Language
Python - A Comprehensive Programming LanguagePython - A Comprehensive Programming Language
Python - A Comprehensive Programming Language
 
SharePoint for the .NET Developer
SharePoint for the .NET DeveloperSharePoint for the .NET Developer
SharePoint for the .NET Developer
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arp
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator Presentation
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
Azure enterprise integration platform
Azure enterprise integration platformAzure enterprise integration platform
Azure enterprise integration platform
 
AhmedReda
AhmedRedaAhmedReda
AhmedReda
 
Tecnologias Free e Open Source na Plataforma Microsoft
Tecnologias Free e Open Source na Plataforma MicrosoftTecnologias Free e Open Source na Plataforma Microsoft
Tecnologias Free e Open Source na Plataforma Microsoft
 
RavenDB overview
RavenDB overviewRavenDB overview
RavenDB overview
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hourConvert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
 
TechnicalTerraformLandingZones121120229238.pdf
TechnicalTerraformLandingZones121120229238.pdfTechnicalTerraformLandingZones121120229238.pdf
TechnicalTerraformLandingZones121120229238.pdf
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"
 
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignalITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
 

Plus de Confiz

Agile training workshop
Agile training workshopAgile training workshop
Agile training workshopConfiz
 
Web services with laravel
Web services with laravelWeb services with laravel
Web services with laravelConfiz
 
DMAIC-Six sigma process Improvement Approach
DMAIC-Six sigma process Improvement ApproachDMAIC-Six sigma process Improvement Approach
DMAIC-Six sigma process Improvement ApproachConfiz
 
What is UFT? HP's unified functional testing.
What is UFT? HP's unified functional testing.What is UFT? HP's unified functional testing.
What is UFT? HP's unified functional testing.Confiz
 
Software testing methods, levels and types
Software testing methods, levels and typesSoftware testing methods, levels and types
Software testing methods, levels and typesConfiz
 
Sqa, test scenarios and test cases
Sqa, test scenarios and test casesSqa, test scenarios and test cases
Sqa, test scenarios and test casesConfiz
 
Solid principles of oo design
Solid principles of oo designSolid principles of oo design
Solid principles of oo designConfiz
 
Entity framework code first
Entity framework code firstEntity framework code first
Entity framework code firstConfiz
 
Security testing presentation
Security testing presentationSecurity testing presentation
Security testing presentationConfiz
 
Ts seo t ech session
Ts   seo t ech sessionTs   seo t ech session
Ts seo t ech sessionConfiz
 
Learning as a creative professional
Learning as a creative professionalLearning as a creative professional
Learning as a creative professionalConfiz
 
Learning as a creative professional
Learning as a creative professionalLearning as a creative professional
Learning as a creative professionalConfiz
 
Ts archiving
Ts   archivingTs   archiving
Ts archivingConfiz
 
Advance text rendering in i os
Advance text rendering in i osAdvance text rendering in i os
Advance text rendering in i osConfiz
 
Ts threading
Ts   threadingTs   threading
Ts threadingConfiz
 
Ts android supporting multiple screen
Ts   android supporting multiple screenTs   android supporting multiple screen
Ts android supporting multiple screenConfiz
 
Ts drupal6 module development v0.2
Ts   drupal6 module development v0.2Ts   drupal6 module development v0.2
Ts drupal6 module development v0.2Confiz
 
Photoshop manners
Photoshop mannersPhotoshop manners
Photoshop mannersConfiz
 
Monkey talk
Monkey talkMonkey talk
Monkey talkConfiz
 
Ts branching over the top
Ts   branching over the topTs   branching over the top
Ts branching over the topConfiz
 

Plus de Confiz (20)

Agile training workshop
Agile training workshopAgile training workshop
Agile training workshop
 
Web services with laravel
Web services with laravelWeb services with laravel
Web services with laravel
 
DMAIC-Six sigma process Improvement Approach
DMAIC-Six sigma process Improvement ApproachDMAIC-Six sigma process Improvement Approach
DMAIC-Six sigma process Improvement Approach
 
What is UFT? HP's unified functional testing.
What is UFT? HP's unified functional testing.What is UFT? HP's unified functional testing.
What is UFT? HP's unified functional testing.
 
Software testing methods, levels and types
Software testing methods, levels and typesSoftware testing methods, levels and types
Software testing methods, levels and types
 
Sqa, test scenarios and test cases
Sqa, test scenarios and test casesSqa, test scenarios and test cases
Sqa, test scenarios and test cases
 
Solid principles of oo design
Solid principles of oo designSolid principles of oo design
Solid principles of oo design
 
Entity framework code first
Entity framework code firstEntity framework code first
Entity framework code first
 
Security testing presentation
Security testing presentationSecurity testing presentation
Security testing presentation
 
Ts seo t ech session
Ts   seo t ech sessionTs   seo t ech session
Ts seo t ech session
 
Learning as a creative professional
Learning as a creative professionalLearning as a creative professional
Learning as a creative professional
 
Learning as a creative professional
Learning as a creative professionalLearning as a creative professional
Learning as a creative professional
 
Ts archiving
Ts   archivingTs   archiving
Ts archiving
 
Advance text rendering in i os
Advance text rendering in i osAdvance text rendering in i os
Advance text rendering in i os
 
Ts threading
Ts   threadingTs   threading
Ts threading
 
Ts android supporting multiple screen
Ts   android supporting multiple screenTs   android supporting multiple screen
Ts android supporting multiple screen
 
Ts drupal6 module development v0.2
Ts   drupal6 module development v0.2Ts   drupal6 module development v0.2
Ts drupal6 module development v0.2
 
Photoshop manners
Photoshop mannersPhotoshop manners
Photoshop manners
 
Monkey talk
Monkey talkMonkey talk
Monkey talk
 
Ts branching over the top
Ts   branching over the topTs   branching over the top
Ts branching over the top
 

An insight to microsoft platform

  • 1. Boutique product development company It is amazing what you can accomplish when you have a client-centric team to deliver outstanding products.
  • 2. An Insight to Microsoft Platform Tahir Rauf | Software Architect
  • 3. An Insight to Microsoft Platform Topics covered in the presentation • Development Tool Overview • Visual Studio Demo • Tips & Recommendations Tahir Rauf | Software Architect
  • 4. An Insight Into Microsoft Platform Development Tools Overview •Microsoft .NET •Microsoft SQL Server •Windows Azure •Windows Phone 7 •XNA and Kodu Framework •Silverlight •Microsoft Visual Studio Tahir Rauf | Software Architect
  • 5. An Insight Into Microsoft Platform .NET Framework – General overview Tahir Rauf | Software Architect
  • 6. An Insight Into Microsoft Platform Overview of General Features • Interoperability • Language Independence • Base Class Library • Portability (Mono, DotGNU, CrossNet) • Simplified deployments • Security Tahir Rauf | Software Architect
  • 7. An Insight Into Microsoft Platform What is Silver light • Application framework for Rich Internet Applications • Subset of WPF • Uses XML based representation of presentation using XAML • XAML targets multiple platforms (desktop, web, mobile) ) Tahir Rauf | Software Architect
  • 8. An Insight Into Microsoft Platform Silver light Programming Model Tahir Rauf | Software Architect
  • 9. An Insight Into Microsoft Platform How Silver light Works Tahir Rauf | Software Architect
  • 10. An Insight Into Microsoft Platform Tahir Rauf | Software Architect
  • 11. An Insight Into Microsoft Platform Gaming frameworks (XNA & Kodu) • Cross platform Game development framework • XBOX, Windows, Mobile, Zune • C#, VB.NET as compared to traditional C++ • Kodu – codeless way of game development Tahir Rauf | Software Architect
  • 12. An Insight Into Microsoft Platform Microsoft SQL Server Tahir Rauf | Software Architect
  • 13. An Insight Into Microsoft Platform MS SQL Server high level feature set • Database Engine (DBMS) (SQL server management studio) • Analysis services (Multidimensional Data, Data Mining) (Business intelligence development studio) • Integration services (ETL) • Replication • Reporting Services (Business Intelligence) • SQL Server Service Broker Tahir Rauf | Software Architect
  • 14. An Insight Into Microsoft Platform What is Windows Azure Tahir Rauf | Software Architect
  • 15. An Insight Into Microsoft Platform How Windows Azure works Tahir Rauf | Software Architect
  • 16. An Insight Into Microsoft Platform Azure Features overview • Focus on your application, not operational constraints. • Administration • Availability • Scalability • REST and managed APIs (storage services even out of cloud) • Fault Tolerance (3 times replication) • VM • In built, caching support Tahir Rauf | Software Architect
  • 17. An Insight Into Microsoft Platform Windows Phone 7 Runtime Tools Phone Emulator Sensors Media Data Location Phone Xbox LIVE Notifications Samples Documentation .NET Framework managed code sandbox Guides Community Packaging and Verification Tools Cloud Portal Notifications App Deployment Registration Marketplace Location Identity Feeds Validation MO and CC Billing Social Maps Certification Business Intelligence Publishing Update Management Tahir Rauf | Software Architect
  • 18. An Insight Into Microsoft Platform Tips and Recommendations Visual Studio Code Samples at MSDN (C#, C++, j#, VB, Smart Devices etc) - http://msdn.microsoft.com/en-us/library/se881ay9(v=vs.80).aspx MSDN Library http://msdn.microsoft.com/en-us/ms348103 Microsoft Research Community (Publications, projects) - http://research.microsoft.com/ Tahir Rauf | Software Architect
  • 19. An Insight Into Microsoft Platform Common Hooks • hook_help() • hook_perm() • hook_init() • hook_theme() • hook_block() • hook_menu() Tahir Rauf | Software Architect
  • 20. An Insight Into Microsoft Platform Help Hooks – a Module File Entry /** * Implementation of hook_help */ function modulename_help($path, $arg) { switch ($path) { case 'admin/help#color': $output = '<p>'. t('The color module allows a site administrator to quickly and easily change the color scheme of certain themes.’ ).'</p>'; return $output; } } Tahir Rauf | Software Architect
  • 21. An Insight Into Microsoft Platform Specify the Available Permissions • Tell Drupal who can use your module. /** * Implementation of hook_perm */ function modulename_perm() { return array('access site-wide ', 'administer colors'); } Tahir Rauf | Software Architect
  • 22. An Insight Into Microsoft Platform Hook_init () • This hook is run at the beginning of the page request. 1. Add CSS or JS that should be present on every page. 2. Set up global parameters which are needed later in the request Tahir Rauf | Software Architect
  • 23. An Insight Into Microsoft Platform Cont..Hook_init () function modulename_init() { $path = drupal_get_path('module', ‘modulename'); drupal_add_js($path . '/filename.js'); drupal_add_css($path . ‘/filename.css', 'module', 'all', FALSE); } http://api.drupal.org/api/drupal/developer!hooks!core.php/function/hook_i nit/6 Tahir Rauf | Software Architect
  • 24. An Insight Into Microsoft Platform Hook_Theme () function modulename_theme($existing, $type, $theme, $path) { } • Write theme funtions Tahir Rauf | Software Architect
  • 25. An Insight Into Microsoft Platform Declaring Block Content /** * Implementation of hook_block(). * @param string $op one of "list", "view", "save" and "configure" * @param integer $delta code to identify the block * @param array $edit only for "save" operation */ function modulename_block($op = 'list', $delta = 0, $edit = array()) { switch ($op) { case 'list': $block = array(); $block[0]["info"] = t('assets'); return $block; break; Tahir Rauf | Software Architect
  • 26. An Insight Into Microsoft Platform Declaring Block Content Cont.. case 'view': $block['subject'] = 'assets'; $block['content'] = get_block_content(); return $block; break; } } http://api.drupal.org/api/drupal/developer!hooks!core.php/function/hook_ block/6 Tahir Rauf | Software Architect
  • 27. An Insight Into Microsoft Platform Hook Menu • Define menu items and page callbacks. • This hook enables modules to register paths in order to define how URL requests are handled. • This hook is rarely called (for example, when modules are enabled), and its results are cached in the database. Tahir Rauf | Software Architect
  • 28. An Insight Into Microsoft Platform Hook Menu Cont.. function modulename_menu() { $items['abc/def'] = array( 'page callback' => 'mymodule_abc_view', 'type' => MENU_CALLBACK, 'access callback' => true, ); return $items; } http://api.drupal.org/api/drupal/developer!hooks!core.php/function/hook_ menu/6 Tahir Rauf | Software Architect
  • 29. An Insight Into Microsoft Platform Useful Links • hook_form_alter(&$form, &$form_state, $form_id) http://api.drupal.org/api/drupal/developer!hooks!core.ph p/function/hook_form_alter/6 • hook_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) http://api.drupal.org/api/drupal/developer!hooks!core.ph p/function/hook_nodeapi/6 • hook_user($op, &$edit, &$account, $category = NULL) http://api.drupal.org/api/drupal/developer!hooks!core.ph p/function/hook_user/6 Tahir Rauf | Software Architect
  • 30. An Insight Into Microsoft Platform .Uninstall File • Remove all tables that a module defines. • http://api.drupal.org/api/drupal/includes!common.inc/function/drupal_ uninstall_schema/6 Tahir Rauf | Software Architect
  • 31. An Insight Into Microsoft Platform Useful Links 1. Creating modules - a tutorial: Drupal 6.x 2. Creating Our First Module (1.3M PDF) 3. Coding standards 4. http://www.drupal.org Tahir Rauf | Software Architect