Showing posts with label patterns. Show all posts
Showing posts with label patterns. Show all posts
Tuesday, November 3, 2015

Fail-Fast instead of Fire-and-Forget

Fail-Fast

fail-safe, fail-fast, fire-and-forget

Fail Fast means, when something goes wrong, you must show an error as soon as possible, so that you can take an action to solve the problem.
With fire-and-forget (when you have no any response) there is nothing you can do, when something went wrong.
Here is few points to follow fail-fast behavior:
  • assertions;
  • meaningful exceptions;
  • response for each request.

Friday, May 16, 2014

Data transfer object, Business object & Data access object...

Introduction

To simplify data interactions and increase the code understanding the following entities usually are used:
  • Value object (VO);
  • Business object (BO);
  • Persistence object (PO); 
  • Data transfer object (DTO or TO) ;
  • Data access object (DAO);
So, let's take a look on each of them more closer.