For many standard SugarCRM users Module Builder is a black box that pops out custom modules as needed. But behind the scenes it is a complex code generator that builds every file and database that SugarCRM requires to create additional functionality. For those standard users it is a helpful tool that requires no PHP or SugarCRM architecture knowledge. For the SugarCRM developer, Module Builder just leads to more questions. The core question be, what all does it change and create?
SugarCRM Module Builder is part of the reason that I started building WapSnap. I needed an easier way to analyze what happens behind the scenes from a higher level than a debugger. Today with the WapSnap prototype I was able to take my first steps into easily detecting what Module Builder was doing when I hit the deploy button. Lets take a look at the first set of results.
For this analysis I created a package called test and a within that package a module called Books.
The Files
WapSnap detected that only 1 file was changed from before the deployment. That file was understandably the sugarcrm.log file.
Most of the work that Module Builder did was to create 56 new files, most of which fell into the custom/modulebuilder directory. A list of these files can be found at the end of this post.
A quick glance at the list of files will also show that most of the files in custom/modulebuilder are further broken down into two more core folders which are packages and builds. I plan to do further analysis but my first guess is that everything in packages is what will be used if a user chooses to Export or Publish the module. The builds folder is probably what is use by SugarCRM when the new module is deployed and used. But that info is yet to be verified.
The Database
Although most of the changes where made in the file structure, SugarCRM still depends heavily on information from the database. With the creation of this new module, WapSnap detected changes to 6 database tables and the creation of two new tables.
The tables that were changed where as follows:
acl_actions
config
relationships
upgrade_history
tracker
versions
The two new tables was, predictably, a table for the Books data and a table for the books audit trail which were as follows:
test_books
test_books_audit
The two table changes that I found interesting from the list are config and relationships. Mainly because I would like to see what config data gets added/changed/removed and because we didn't add any relationships.
Once WapSnap moves into Beta we hope to be able to give you more in depth information about quickly detecting line by line files changes and filed by field database changes. Until then, feel free to deploy a module and use this file list for further analysis.
Files Created
/custom/themes/default/images/test_Books.gif
/custom/themes/default/images/icon_test_Books_32.gif
/custom/themes/default/images/icon_Test_Books.gif
/custom/themes/default/images/Createtest_Books.gif
/custom/modulebuilder/packages/test/modules/Books/vardefs.php /custom/modulebuilder/packages/test/modules/Books/metadata/subpanels/default.php
/custom/modulebuilder/packages/test/modules/Books/relationships.php
/custom/modulebuilder/packages/test/modules/Books/metadata/SearchFields.php
/custom/modulebuilder/packages/test/modules/Books/metadata/sidecreateviewdefs.php
/custom/modulebuilder/packages/test/modules/Books/metadata/searchdefs.php
/custom/modulebuilder/packages/test/modules/Books/metadata/popupdefs.php
/custom/modulebuilder/packages/test/modules/Books/metadata/metafiles.php
/custom/modulebuilder/packages/test/modules/Books/metadata/listviewdefs.php
/custom/modulebuilder/packages/test/modules/Books/metadata/editviewdefs.php
/custom/modulebuilder/packages/test/modules/Books/metadata/detailviewdefs.php
/custom/modulebuilder/packages/test/modules/Books/metadata/dashletviewdefs.php
/custom/modulebuilder/packages/test/modules/Books/language/en_us.lang.php
/custom/modulebuilder/packages/test/modules/Books/Dashlets/test_BooksDashlet/test_BooksDashlet.php
/custom/modulebuilder/packages/test/modules/Books/Dashlets/test_BooksDashlet/test_BooksDashlet.meta.php
/custom/modulebuilder/packages/test/modules/Books/config.php /custom/modulebuilder/packages/test/manifest.php
/custom/modulebuilder/packages/test/language/application/en_us.lang.php /custom/modulebuilder/packages/test/icons/icon_test_Books_32.gif
/custom/modulebuilder/packages/test/icons/test_Books.gif
/custom/modulebuilder/packages/test/icons/Createtest_Books.gif /custom/modulebuilder/packages/test/icons/icon_Test_Books.gif /custom/modulebuilder/builds/test/SugarModules/modules/test_Books/vardefs.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/test_Books_sugar.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/test_Books.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/subpanels/default.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/studio.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/sidecreateviewdefs.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/SearchFields.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/searchdefs.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/popupdefs.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/metafiles.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/listviewdefs.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/editviewdefs.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/detailviewdefs.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/dashletviewdefs.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/language/en_us.lang.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/Forms.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/Dashlets/test_BooksDashlet/test_BooksDashlet.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/Dashlets/test_BooksDashlet/test_BooksDashlet.meta.php
/custom/modulebuilder/builds/test/manifest.php
/custom/modulebuilder/builds/test/SugarModules/language/application/en_us.lang.php
/custom/modulebuilder/builds/test/LICENSE.txt
/custom/modulebuilder/builds/test/icons/default/images/test_Books.gif
/custom/modulebuilder/builds/test/icons/default/images/icon_test_Books_32.gif
/custom/modulebuilder/builds/test/icons/default/images/icon_Test_Books.gif
/custom/modulebuilder/builds/test/icons/default/images/Createtest_Books.gif
/custom/history/modulebuilder/packages/test/modules/Books/metadata/editviewdefs.php_1238005625
/custom/Extension/application/Ext/Language/en_us.test.php
/custom/Extension/application/Ext/Include/test.php
/custom/application/Ext/Include/modules.ext.php
/custom/application/Ext/Language/en_us.lang.ext.php
Author: jsweeney
Last Edited: Jul 02, 2009