SlideShare una empresa de Scribd logo
1 de 28
ModelAdmin
                SilverStripe’s great new tool for building CRMs
                                (and other things)




Monday, March 2, 2009
We develop a CMS
Monday, March 2, 2009
We do other stu
                              too!
                    • Most of our sites include a CMS
                    • But also: CRM, event management,
                      e-commerce, internal business
                      systems
                    • The CMS paradigm doesn’t fit all of
                      these

Monday, March 2, 2009
Let’s build a CRM!

                    • We’ve made CRMs for SilverStripe
                        ... several, in fact
                    • Each time we had a “CRM”
                      customer, it seemed that they
                      wanted something dierent


Monday, March 2, 2009
Flexible Data, Fixed
                         UI
                    • Clients are very specific about data
                      and business logic
                    • But not about user interface - as
                      long as it’s good, they’re happy
                    • SilverStripe CMS exploits this by
                      making it easy to create new Page
                      Types with custom fields

Monday, March 2, 2009
From CMS to DMS

                    • Can we apply this concept to CRM?
                    • Don’t just manage Content
                    • Manage any kind of Data



Monday, March 2, 2009
ModelAdmin
                    • Data Management built into
                      SilverStripe
                    • ModelAdmin gives you a CRUD
                      interface around any data: Search,
                      Results, Detail
                    • Same building blocks as CMS
                      interface

Monday, March 2, 2009
ModelAdmin

                    • Search on fields linked by relations
                    • Detail record gives you a scaolded
                      interface for editing all relations



Monday, March 2, 2009
Monday, March 2, 2009
Monday, March 2, 2009
Monday, March 2, 2009
Code Demo



Monday, March 2, 2009
Random example: A small webhosting company
     with products, customers and contracts


                              * Web2.0ified by http://
                                     creatr.cc
Monday, March 2, 2009
Our Datamodel
                                 HostingContrac
                Customer                            HostingType
                                        t

                           has_many           has_one




Monday, March 2, 2009
HostingType
                    ?php
                    class HostingType extends DataObject {
                        static $db = array(
                            'Title' = 'Text',
                            'Description' = 'Text',
                            'Price' = 'Float',
                        );
                        static $has_many = array(
                            'HostingContracts' = 'HostingContract',
                        );
                    }
                    ?


                                   mysite/code/HostingType.php


Monday, March 2, 2009
HostingType




Monday, March 2, 2009
HostingContract
                         ?php
                         class HostingContract extends DataObject {
                             static $db = array(
                                 'ContractNumber' = 'Varchar',
                                 'StartDate' = 'Date',
                                 'EndDate' = 'Date'
                             );
                             static $has_one = array(
                                 'Customer' = 'Customer',
                                 'HostingType' = 'HostingType',
                             );
                         }
                         ?
                               mysite/code/HostingContract.php


Monday, March 2, 2009
HostingContract




Monday, March 2, 2009
Customer
                   ?php
                   class Customer extends Member {
                       static $db = array(
                           'CustomerType' = quot;Enum('Private,Business','Private')quot;
                       );
                       static $has_one = array(
                           'Avatar' = 'Image',
                       );
                       static $has_many = array(
                           'HostingContracts' = 'HostingContract'
                       );
                   }
                   ?
                                    mysite/code/Customer.php


Monday, March 2, 2009
Monday, March 2, 2009
MyCRMAdmin
         ?php
         class MyCRMAdmin extends ModelAdmin {
             protected static $managed_models = array(
                 'Customer',
                 'HostingContract',
                 'HostingType'
             );
             static $url_segment = 'mycrm'; // will be linked as /admin/mycrm
             static $menu_title = 'My CRM';
         }
         ?


                             mysite/code/MyCRMAdmin.php


Monday, March 2, 2009
Some tweaking...



Monday, March 2, 2009
Summary Fields
                          ?php
                          class Customer extends Member {
                              // ...
                              static $summary_fields = array(
                                  'FirstName',
                                  'Surname',
                                  'CustomerType'
                              );
                          }
                          ?




Monday, March 2, 2009
Searchable Fields
                          ?php
                          class Customer extends Member {
                              // ...
                              static $searchable_fields = array(
                                  'FirstName',
                                  'Surname',
                                  'HostingContracts.ContractNumber'
                              );
                          }
                          ?




Monday, March 2, 2009
getCMSFields()
                        ?php
                        class Customer extends Member {
                            // ...
                            function getCMSFields() {
                                $fields = parent::getCMSFields();
                                $fields-removeByName('Locale');

                                 return $fields;
                             }
                        }
                        ?




Monday, March 2, 2009
Using Data on




Monday, March 2, 2009
SilverStripe 2.4 and
                        beyond
                        • New data mapper
                        • Thinner, reusable
                          controllers
                        • “Intelligent data”



Monday, March 2, 2009
Thank you
                                  Download this talk at:
                    http://www.slideshare.net/chillu/modeladmin-in-silverstripe-23


                                       Code         (requires SilverStripe 2.3+)

                        http://silverstripe.org/assets/presentations/2009-02-28-
                                     modeladminpresentationmysite.zip



                                Ingo Schommer, SilverStripe Ltd., ingo@silverstripe.com
                             License: http://creativecommons.org/licenses/by-nc/3.0/nz/



Monday, March 2, 2009

Más contenido relacionado

Último

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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
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
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Último (20)

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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

ModelAdmin in SilverStripe 2.3

  • 1. ModelAdmin SilverStripe’s great new tool for building CRMs (and other things) Monday, March 2, 2009
  • 2. We develop a CMS Monday, March 2, 2009
  • 3. We do other stu too! • Most of our sites include a CMS • But also: CRM, event management, e-commerce, internal business systems • The CMS paradigm doesn’t fit all of these Monday, March 2, 2009
  • 4. Let’s build a CRM! • We’ve made CRMs for SilverStripe ... several, in fact • Each time we had a “CRM” customer, it seemed that they wanted something dierent Monday, March 2, 2009
  • 5. Flexible Data, Fixed UI • Clients are very specific about data and business logic • But not about user interface - as long as it’s good, they’re happy • SilverStripe CMS exploits this by making it easy to create new Page Types with custom fields Monday, March 2, 2009
  • 6. From CMS to DMS • Can we apply this concept to CRM? • Don’t just manage Content • Manage any kind of Data Monday, March 2, 2009
  • 7. ModelAdmin • Data Management built into SilverStripe • ModelAdmin gives you a CRUD interface around any data: Search, Results, Detail • Same building blocks as CMS interface Monday, March 2, 2009
  • 8. ModelAdmin • Search on fields linked by relations • Detail record gives you a scaolded interface for editing all relations Monday, March 2, 2009
  • 13. Random example: A small webhosting company with products, customers and contracts * Web2.0ified by http:// creatr.cc Monday, March 2, 2009
  • 14. Our Datamodel HostingContrac Customer HostingType t has_many has_one Monday, March 2, 2009
  • 15. HostingType ?php class HostingType extends DataObject { static $db = array( 'Title' = 'Text', 'Description' = 'Text', 'Price' = 'Float', ); static $has_many = array( 'HostingContracts' = 'HostingContract', ); } ? mysite/code/HostingType.php Monday, March 2, 2009
  • 17. HostingContract ?php class HostingContract extends DataObject { static $db = array( 'ContractNumber' = 'Varchar', 'StartDate' = 'Date', 'EndDate' = 'Date' ); static $has_one = array( 'Customer' = 'Customer', 'HostingType' = 'HostingType', ); } ? mysite/code/HostingContract.php Monday, March 2, 2009
  • 19. Customer ?php class Customer extends Member { static $db = array( 'CustomerType' = quot;Enum('Private,Business','Private')quot; ); static $has_one = array( 'Avatar' = 'Image', ); static $has_many = array( 'HostingContracts' = 'HostingContract' ); } ? mysite/code/Customer.php Monday, March 2, 2009
  • 21. MyCRMAdmin ?php class MyCRMAdmin extends ModelAdmin { protected static $managed_models = array( 'Customer', 'HostingContract', 'HostingType' ); static $url_segment = 'mycrm'; // will be linked as /admin/mycrm static $menu_title = 'My CRM'; } ? mysite/code/MyCRMAdmin.php Monday, March 2, 2009
  • 23. Summary Fields ?php class Customer extends Member { // ... static $summary_fields = array( 'FirstName', 'Surname', 'CustomerType' ); } ? Monday, March 2, 2009
  • 24. Searchable Fields ?php class Customer extends Member { // ... static $searchable_fields = array( 'FirstName', 'Surname', 'HostingContracts.ContractNumber' ); } ? Monday, March 2, 2009
  • 25. getCMSFields() ?php class Customer extends Member { // ... function getCMSFields() { $fields = parent::getCMSFields(); $fields-removeByName('Locale'); return $fields; } } ? Monday, March 2, 2009
  • 26. Using Data on Monday, March 2, 2009
  • 27. SilverStripe 2.4 and beyond • New data mapper • Thinner, reusable controllers • “Intelligent data” Monday, March 2, 2009
  • 28. Thank you Download this talk at: http://www.slideshare.net/chillu/modeladmin-in-silverstripe-23 Code (requires SilverStripe 2.3+) http://silverstripe.org/assets/presentations/2009-02-28- modeladminpresentationmysite.zip Ingo Schommer, SilverStripe Ltd., ingo@silverstripe.com License: http://creativecommons.org/licenses/by-nc/3.0/nz/ Monday, March 2, 2009

Notas del editor

  1. Talk briefly about the CMS.