Database · Java · Programming · transaction

Database Transaction Basics using Java

A database transaction is a single unit of work. It is a set of operations that succeed or fail as a unit. Properties of a Transaction Every transaction must have the four properties known as ACID. Atomicity : All operations succeed or fail as a unit. Consistency : Any transaction must end with consistent state… Continue reading Database Transaction Basics using Java

design patterns · JavaScript · Programming

Design Patterns in JavaScript

Singleton Pattern //This is a simple singleton with all public members var simpleSingleton = { “func1” : function() {alert(‘func1’);}, “msg” : “hello” }; //This is complex singleton with private and public members var complexSingleton = (function() { var privateVar = ‘private var’; function privateMethod1(){alert(‘privateMethod1’);} return { publicMethod1 : function(){ //from here all public and private… Continue reading Design Patterns in JavaScript