Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Singleton Design Pattern in Java

Singleton is frequently used in applications where resource may be expensive to create and no instance specific state needs to be maintained. For example, when creating database connection, a singleton may be needed. Today we will share the famous Singleton design pattern in Java.1. DefinitionSingleton design pattern is a design pattern that restricts the instantiation of a class to one object. It is one of the most well-known design patterns.2. ApplicationSingleton can be used in many occasions, for example, one database can have only one connection or connection coun...

14,586 2       JAVA DESIGN PATTERN SINGLETON MULTITHREAD


  20 Database Design Best Practices

Use well defined and consistent names for tables and columns (e.g. School, StudentCourse, CourseID ...).Use singular for table names (i.e. use StudentCourse instead of StudentCourses). Table represents a collection of entities, there is no need for plural names.Don’t use spaces for table names. Otherwise you will have to use ‘{‘, ‘[‘, ‘“’ etc. characters to define tables (i.e. for accesing table Student Course you'll write “Student Course”. StudentCourse is much better).Don’t use unnecessary prefixes or suffixes for table nam...

3,856 0       DESIGN PATTERN DATABASE DESIGN 20 TIPS WELL DEFINED NAME


  Why do C++ folks make things so complicated?

This morning Miroslav Bajtoš asked “Why do C++ folks make things so complicated?” in response to my article on regular expressions in C++. Other people asked similar questions yesterday.My response has two parts:Why I believe C++ libraries are often complicated.Why I don’t think it has to be that way.Why would someone be using C++ in the first place? Most likely because they need performance or fine-grained control that they cannot get somewhere else. A Ruby programmer, for example, can make a design decision that makes code 10% slower but much easier to use. “Hey, ...

2,865 0       C++ COMPLICATED C++ PROGRAMMER DESIGN PATTERN