Posts

Showing posts from May, 2013

Frequently used Java design patterns

I am writing blogs on design pattern because I couldn't find a site where I can get good information about all the design patterns. So I referred different sites and consolidating design pattern in this blog. Please help me in improving this blog by commenting on it. Below are three different categories on java design patterns. Creational Design pattern Singleton Pattern Factory Design Pattern Abstract Factory Design Pattern Builder Pattern Prototype Pattern Structural Design pattern Adaptor Pattern Bridge Pattern Decorator Pattern Facade Pattern Proxy Pattern Composite Pattern Flyweight Pattern Behavioral design pattern Chain of Responsibility Pattern Command Pattern Observer Pattern State Pattern Strategy Pattern Template Pattern Visitor Pattern Interpreter Pattern Iterator Pattern Mediator Pattern Momento Pattern We will not be discussing about all design pattern here. Instead we will discuss about most commonly used pattern. S

Installing and running MongoDB on windows environment

Below are the steps to download and run MongoDB on Windows Download stable release of MongoDB from http://www.mongodb.org/downloads Extract the tar/zip file in any folder. Create a directory named as “data\db” inside MongoDb folder. Start MongoDB using command “ mongod --dbpath ..\data ”. Here ..\data is the path to data directory, which is required to store data files. This is most important option we need to specify. Please note that directory path you are providing should exists otherwise process won’t start.   Open a new command prompt and go to bin directory of MongoDB installation folder. Run command “ mongo ” which will let you to execute any MongoDB command through the prompt. MongoDB commands Below are some of MongoDB frequently used commands – Displaying list of databases show dbs Selecting a particular database e.g. “local” database Use local Verifying db. Current db can be verified using below command Db Mongo Help. At any point o