The mystical sugarbean part 1 general development overview l.jpg
This presentation is the property of its rightful owner.
Sponsored Links
1 / 11

The Mystical SugarBean Part 1 General Development Overview PowerPoint PPT Presentation


  • 270 Views
  • Uploaded on
  • Presentation posted in: General

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

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


The mystical sugarbean part 1 general development overview l.jpg

Copyright © 2006 SugarCRM, Inc. All rights reserved.

Online Developer/User Group

The Mystical SugarBeanPart 1General Development Overview


Functional architecture l.jpg

Copyright © 2006 SugarCRM, Inc. All rights reserved.

Functional Architecture

Deployment Options:


Ui layer l.jpg

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)


Soap api l.jpg

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


Functional architecture5 l.jpg

Copyright © 2006 SugarCRM, Inc. All rights reserved.

Functional Architecture

Deployment Options:


Data layer sugarbean l.jpg

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


Data layer dbhelper dbmanager l.jpg

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


The mystical sugarbean part 2 custom business logic hooks l.jpg

Copyright © 2006 SugarCRM, Inc. All rights reserved.

Online Developer/User Group

The Mystical SugarBeanPart 2Custom BusinessLogic Hooks


Business logic hooks l.jpg

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


Business logic hooks10 l.jpg

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.


The mystical sugarbean q a l.jpg

Copyright © 2006 SugarCRM, Inc. All rights reserved.

Online Developer/User Group

The Mystical SugarBeanQ & A


  • Login