Browsing articles in "Programming"
Aug
11
2010

Design Patterns : Decorator pattern

Decorator Pattern

Intent Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to sub-classing for extending functionality. [GoF, p175] Client-specified embellishment of a core object recursively wrapping it.   Diagram   Rules of thumb Adapter provides a different interface to its subject. Proxy provides the same interface. but the decorator provides an enhanced interface. [Gof, p216] Adopter changes an object’s interface, Decorator enhances an objects responsibilities, Decorator is thus more transparent to the client. [...]

Aug
10
2010

Design Patterns : Strategy pattern

Strategy pattern

Motivation There are situations where the classes differ only by their behaviour, and on such situations it is advisable to isolate the algorithms into separate classes in order to have the ability to select different algorithms at the runtime depending on the user needs/client inputs.   Intent “Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from the clients that use it.” [Gamma, p315] Capture the [...]

Aug
6
2010

What is a Deadlock?

deadlock

According to Coffman deadlock refers to a specific condition when two or when more processes are each waiting for each other to release a resource, or more than two processes are waiting for resources in a circular chain. It is evident that processes fall into “Deadlock” or no further progress state when all four of the following conditions are met, since there is no way to recover from such situation. Serially reusable resource (Mutual exclusion) [...]

Jul
19
2010

Microsoft Web Matrix

Microsoft Web Matrix

Small, Simple, Seamless ! ‘Web Matrix’ is a free tool released by Microsoft for the rapid development to develop web applications in Microsoft Internet Information Services (IIS) for rapid web development. The best feature is that webmarix supports several open source frameworks like Drupal, wordpress, Joomla and other frameworks likes ‘blogengine’ and ‘silverstripe’. ‘Web matrix’ has several great features like web and server management, FTP Publishing, search optimization is integrated. Features Free and lightweight Integrates [...]

Jul
12
2010

Making a Client Server application (Socket programming) in java

TCP Client Server demo

The programming languages become handier when the user can create a link between two pieces of compiled codes operating from two different locations. In this example, a simple server that takes a text string from the client and returned in upper case is discussed. Hope this will give an overall picture about how socket programming work in JAVA. You do not have to be an expert in Java and all you need is a Java [...]

Pages:«123456»