1 / 11

The Mystical SugarBean Part 1 General Development Overview

Online Developer/User Group. The Mystical SugarBean Part 1 General Development Overview. Functional Architecture. Deployment Options:. UI Layer. Simple controller in index.php Validates and manages sessions Validates and encodes posted information Authenticates users Controls actions

arleen
Download Presentation

The Mystical SugarBean Part 1 General Development Overview

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Copyright © 2006 SugarCRM, Inc. All rights reserved. Online Developer/User Group The Mystical SugarBeanPart 1General Development Overview

  2. Copyright © 2006 SugarCRM, Inc. All rights reserved. Functional Architecture Deployment Options:

  3. Copyright © 2006 SugarCRM, Inc. All rights reserved. UI Layer Simple controller in index.php Validates and manages sessions Validates and encodes posted information Authenticates users Controls actions Loads detail records Creates wrapper shell around the UI Includes the appropriate file for the right module (action=filename, module=directory)

  4. Copyright © 2006 SugarCRM, Inc. All rights reserved. SOAP API Manages SOAP based Sessions Allows Search, Retrieve, Edit, Delete. Allows Retrieving all modified records since a given date Used for Integrations Plug-in for Microsoft Outlook Wireless Client Application Portal Application Sync projects (Funambol) Offline Client Sync

  5. Copyright © 2006 SugarCRM, Inc. All rights reserved. Functional Architecture Deployment Options:

  6. Copyright © 2006 SugarCRM, Inc. All rights reserved. Data Layer – SugarBean Business Object (Contact, Account, …) High level API for manipulating business data Abstracts away a lot of the common code from the specific modules Designed to be Sub-classed to Support Additional Methods of Retrieving Data SOAP or EJB From Upcoming Data Layer

  7. Copyright © 2006 SugarCRM, Inc. All rights reserved. Data Layer – DBHelper/DBManager Low Level database API Provides database method signature abstraction Allows for easier porting to different databases Provides for some query construction These will be growing to support more database abstraction and more database functionality

  8. Copyright © 2006 SugarCRM, Inc. All rights reserved. Online Developer/User Group The Mystical SugarBeanPart 2Custom BusinessLogic Hooks

  9. Copyright © 2006 SugarCRM, Inc. All rights reserved. Business Logic Hooks Add Custom Business Logic to the Application Upgrade Safe Separated Code Extensions that do not risk your main code Where is it going Workflow in 4.0 in Professional and Enterprise Versions Deeper event triggers for external business processes Help process and handle custom data formats Hook Events in 3.5.0 before_save – Before the bean is saved after_retrieve – After a bean is retrieved before_delete – Before a bean is deleted after_delete – After a bean is deleted before_restore – Before a bean is restored after_restore – After a bean is restored

  10. Copyright © 2006 SugarCRM, Inc. All rights reserved. Business Logic Hooks The custom logic file is located under custom/modules/[CURRENT_MODULE]/logic_hooks.php. The details for format are in SugarBean.php function call_custom_logic The file should only contain the specified information and should be completely replaceable Create a before_save hook $hook_array['before_save'][] = Array(1, 'notify', 'custom/modules/Leads/test12.php', 'TestClass', 'lead_before_save_1'); Hooks are processed in the order in which they are defined. The right hand side array defines processing index (for sorting before exporting the array) Reserved for future use. php file to include php class the method is in php method to call Hook method signature: function NAME(&$bean, $event, $arguments) $bean - $this bean passed in by reference. $event - The string for the current event (i.e. before_save) $arguments - An array of arguments that are specific to the event.

  11. Copyright © 2006 SugarCRM, Inc. All rights reserved. Online Developer/User Group The Mystical SugarBeanQ & A

More Related