[Vtigercrm-developers] Code quality

Phasaphon Kwanrutai sunkohchangresort at gmail.com
Wed Dec 7 03:33:17 GMT 2016


> I totally agree with you, it’s all marketing spam


No. It is little posting made with use of outstanding vtiger campaign
module which go a bit out of track.

On Tue, Dec 6, 2016 at 11:45 PM, Błażej Pabiszczak <
b.pabiszczak at yetiforce.com> wrote:

> I totally agree with you, it’s all marketing spam. However, the truth is
> that the code quality in Vtiger is very low and their devs should read
> through all the elements from his tutorial, so maybe they’d stop
> programming the way it was done 7 years ago, because now we program
> according to standards.
> ---
> Z poważaniem / Regards
>
> *Błażej Pabiszczak*
> *Chief Executive Officer*
> M: +48.884999123
> E: b.pabiszczak at yetiforce.com
>
>
>
> W dniu 2016-12-05 18:57, socialboostdk napisał(a):
>
> Hi there,
>
> Its a nice idea for you to send it out, but it is also sending a lot of
> info for a full list, where no-one of us asked for it. So could you not
> instead send 1 mail with the relevant links & suggestions, etc. instead of
> forcing a daily mail?
>
> Thanks :)
>
> Best,
> Chris.
>
> On 5 December 2016 at 18:07, Holbok István <holbok at gmail.com> wrote:
>
>> Today, in day 4 of our 5-day mini-course, we're going to discuss *Error
>> handling*.
>> Error handling
>>
>> For a long while, error handling was just about magical status codes for
>> us. You know what I am talking about, right?
>>
>> When user submits an order, return 0 when the date is expired, return 1
>> when there is no more stock, return 2 when user is not eligible for current
>> order, return 3 when user is not logged in, and return 4 when order is
>> placed successfully.
>>
>> Have you done anything similar above? If so, you need to learn a better
>> way of error handling. We did, and we've never looked back.
>>
>> Error codes are terrible; they are meaningless to new developers; are
>> hard to keep track of because they contain no real information.
>>
>> Error handling should be done properly with exceptions.
>>
>> A lot of errors in our applications are exceptions. They are exceptional
>> cases in our applications, which we should handle directly as soon as they
>> occur.
>>
>> PHP introduced Exception class in PHP 5.
>>
>> Similar to exceptions in other languages, an exception is "thrown" when
>> an error occurs:
>>
>> throw new Exception('No more stock')
>>
>> And an Exception class ought to be handled in a catch clause:
>>
>> catch (Exception $e) {
>>      echo 'Caught exception: ',  $e->getMessage(), "\n";
>> }
>>
>> To make sure some code always runs such as closing a database connection,
>> we use a finally clause:
>>
>> finally {
>>      // close PDO connection
>> }
>>
>> Now you know error handling does not mean returning magical codes. Using
>> exceptions to handle exceptional cases is the way to go!
>>
>> Tomorrow, in the final installment of this course, we'll take a look at *Test
>> Driven Development.*
>>
>> You won't want to miss it,
>>
>> Keep learning!
>> Xu
>> www.startutorial.com
>>
>>
>> Kindest regards:
>> Istvan Holbok
>>
>> _______________________________________________
>> http://www.vtiger.com/
>
>
> _______________________________________________
> http://www.vtiger.com/
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20161207/042ff9c0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: open
Type: image/gif
Size: 43 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20161207/042ff9c0/attachment.gif>


More information about the vtigercrm-developers mailing list