Category: Best practices

Exception handling strategy

In this article we introduce a common strategy for handling exceptions in an OOP application, our strategy conforms to the best exception handling techniques and can be integrated in any application. 1. Overview The following diagram provides an overview of our strategy, it shows the flow of the exception starting from the detection phase until reaching the handling phase. The...

How to use exceptions effectively

Exception is an event which occurs during the execution of a program and disrupts its normal flow, it is mainly arised from different kind of situations such as wrong user interaction, hardware failure, network failure, database failures or even business failures. 1. Checked vs Unchecked Exceptions are of 2 types: checked and unchecked. Checked exceptions are predictable during the development...

Software design principles

Software design has always been the most important phase in the development cycle, the more time you put on designing a resilient and flexible architecture, the more saving you will get in the future when changes arise. Requirements always change, software will become legacy if no features are added or maintained on regular basis, and the cost of these changes are determined based on...

Web service project structure

In this article we introduce the most common way for structuring a maintainable web service, our example can be used as a template for creating any web service using object oriented language. The important factor when structuring an application is to divide it into several modules/components and to define how these components interact between each other. The following example is about a java...

Coding conventions

In this article, we talk about the standards and the best practices which make your code looks clean, elegant and most importantly understandable by humans. Most companies tend to apply strictly the coding conventions concept in their development process because normally the software is developed and maintained by several programmers,  so it should be readable and understandable enough in order to make the...