Why I hate SugarCRM

I’ve worked for a half of year with SugarCRM and I haven’t changed my mind about it. It looks nice from the outside and crude inside (as most of others popular PHP applications). For example, it’s a good idea to check of application version. Let’s see how it was implemented in SugarCRM. First of all, the version is stored in the database: table name is ‘config’. Also, you can find the version of SugarCRM in the config.php and there is a special PHP script – sugar_version.php which contains the version again. And finally, I found version checking in the index.php:

$result = $current_user->db->query("SELECT * FROM config
WHERE category='info' AND name='sugar_version' AND value LIKE '3.5%'");

How do you think is it right way to check of version? I don’t think so.

Another annoying thing is hard coded columns for various list view. Each class contains an array – $list_fields included all columns which can appear in the list view. But also there is a method create_list_query() where all columns are hardcoded instead of using the array $list_fields! More over started from the version 4.0 it’s needed to define a new class property in the two places: inside the class and in the vars.php which is not obvious and efficiently.
The big disadvantage of SugarCRM from users point of view is an absence of user friendly error messages. Does user need to see broken query of some other technical information about error? Of course, doesn’t! There is a function sugar_die() in the include/utils.php where should be defined a trigger to catch errors, notify system administrator and display some message like:

Cannot perform this operation! Please, try later!

But inside Sugar many places where the original die() is used (I’ll upload the path soon)!
And finally, I’d like to say about code policy. Judge by Sugar source it doesn’t exist at all. I don’t think that it’s very difficult to set the smae tabs and code style (put the opening bracket on the same row or new but it should be the same everywhere!).
Anyway, I have to continue to look into SugarCRM. Hope it won’t take a lot of time 😉

Published by

Michael Stepanov

Site owner and admin :)

Leave a Reply

Your email address will not be published. Required fields are marked *