Pages

Thursday, June 12, 2014

SugarCRM 101: Email Delivery

Sometimes I find myself discussing topics relating to Sugar that are difficult to explain without leveraging visual aids. One of those topics happens to be that of the mechanics involved in the delivery of email messages.

In general, the ability to send email, whether ad-hoc messages or those sent through an email campaign, requires the interaction between Sugar and other systems. Because those other systems are not actually within the control of the Sugar application, broader questions pertaining to the delivery of email are sometimes not easily answered, or in some cases, cannot be answered, without leveraging information only available on the other systems. This is often a point of confusion as many folks often assume that all the relevant information is stored somewhere within Sugar, which is not the case.

This short video will discuss this topic in greater detail and hopefully help answer some of your questions pertaining to Sugar and its email delivery mechanics.

Enjoy!


Thursday, April 24, 2014

Let Us Continue...

Last week we took a peek under the hood of Sugar 7 to learn about the location of some of its un-minified JavaScript code. Today, we will continue that discussion, except we will focus on core components of the Sidecar technology that makes up the new MVC client in Sugar 7.

Before we proceed, it is worth noting that Sidecar is a combination of open source JavaScript libraries, including jQuery, Backbone and Underscore, among others. Thus, when we talk about Sidecar, what we are really talking about is the consolidated result of these technologies. 

Bearing that in mind, the article referenced at the top of this post speaks to code relating to customizations that we can apply to change a portion of the MVC client. Another portion of that same client adds some magic behind the scenes to tie together the actions occurring on the interface with the backend.

Although we would not be modifying this code, it is worth studying it as it provides us some really good insights into the manner in which the Sidecar technology implements the Sugar object model and framework. But as with the previous post, this task is far easier to accomplish if we have access to the un-minified sources.

Below is a listing of files you should find helpful in your continued learning about Sugar 7 and Sidecar:

Sugar Object
Un-minified Source Folder
ACL, Controller, Metadata, User
/sidecar/src/core/
SugarBean, Validations 
/sidecar/src/data/
Data Formatting, Logger
/sidecar/src/utils/
Handlebars Helpers, Views, Alerts
/sidecar/src/view/



Give those folders a look and share any gems you find within the comments.

Monday, April 14, 2014

The Issue of Legibility

Those of you that have been working with Sugar 7 have likely already noted that much of the JavaScript code utilized is minified. While that is a nifty trick to squeeze out some more performance, it makes code very difficult to read, such as the snippet inserted below:

({inlineEditMode:false,createMode:false,plugins:['SugarLogic','ErrorDecoration','GridBuilder','Editable','Audit','FindDuplicates','ToggleMoreLess'],enableHeaderButtons:true,enableHeaderPane:true,events:{'click .record-edit-link-wrapper':'handleEdit','click a[name=cancel_button]':'cancelClicked','click [data-action=scroll]':'paginateRecord','click .record-panel-header':'togglePanel','click .tab a':'setActiveTab'},buttons:null...

From the standpoint of a consultant, and one in charge of applying code level modifications to a given Sugar instance, having to unravel code like this in order to work on a customization is a bit of a nightmare. One is also put in a situation in which one has to rely on the use of JavaScript beautifiers and similar tools to display the code in a more legible manner. 

No need to worry, however. Legible versions of the JavaScript code that Sugar utilizes and in turn, minifies, are easily accessible, thus simplifying our work. The table below gives us a listing of the various file locations that might be of interest to developers:


Minified Files
Un-minified Source
/clients/base/views/
/jssource/src_files/clients/base/views/
/clients/base/layouts/
/jssource/src_files/clients/base/layouts/
/clients/base/fields/
/jssource/src_files/clients/base/fields/
/modules/<Module>/clients/base/
/jssource/src_files/modules/<Module>/clients/base/

In future posts we will take a closer look at other aspects of the file system that are equally important.

Have fun exploring!