• pattern

    Template Design Pattern

    Template Design Pattern is one of the most widely and frequently used design pattern which is based on behavior which Richard E. Sweet refers to as the “Hollywood Principle” — “Don’t call us, we’ll call you.”. In this pattern, subclasses can override parts of the algorithm without changing its overall structure. This is particularly useful for separating the variant and the invariant behaviour, minimizing the amount of code to be written. The invariant behaviour is placed in the abstract class (template) and then any subclasses that inherit it can override the abstract methods and implement the specifics needed in that context. In the body of TemplateMethod() (see UML diagram below),…

    Comments Off on Template Design Pattern
  • pattern

    What is Singleton pattern?

    Description or Definition: A class need to create single instance through out Application, is used to encapsulate the creation of an object in order to maintain control over it. This not only ensures that only one is created, but also allows lazy instantiation; that is, the instantiation of the object can be delayed until it is actually needed. For example, Logger class, which should follow Singleton pattern. This code demonstrates how the Singleton pattern can be used to create a counter toprovide unique sequential numbers, such as might be required for use as primary keys in adatabase: File Name: Logger.java public class Logger {  private static Logger instance;  private static…

    Comments Off on What is Singleton pattern?
  • Interview Questions,  pattern

    What is Creational patterns?

    Creational patterns prescribe different way or solutions that objects are created. These patterns are usedwhen a decision must be made at the time a class is instantiated. Typically, the details of theclasses that are instantiated, what exactly are they, how, and when object need to be created, Objects areencapsulated by an abstract superclass and hidden from the client class, which knows onlyabout the abstract class or the interface it implements. The specific type of the concrete classis normally unknown to client class. The Singleton pattern is one of the Creational Pattern, for example, is used to encapsulate the creation of an object in order to maintain control over it by…

    Comments Off on What is Creational patterns?
  • Interview Questions,  pattern

    Java Design Pattern Categorisation

    Below are the categories for some popular design pattern categories: Creational Patterns Abstract Factory Builder Factory Method Prototype Singleton Structural Patterns Adapter Bridge Composite Decorator Façade Flyweight Proxy Behavioral Patterns Chain of Responsibility Command Interpreter Iterator Mediator Memento Observer State Strategy Template Method  Visitor J2EE Patterns MVC Business Delegate Composite Entity Data Access Object Front Controller Intercepting Filter Service Locator Transfer Object Other (Uncategorised) typesafe enum RESTful WS

    Comments Off on Java Design Pattern Categorisation
  • Interview Questions,  pattern

    Why to use Design Patterns?

    While Designing or building different applications, you continiousally face similar problems. This may lead you to find a new solution for the same problem each time you got it. To overcome and save time and effort it is always better to make documented or make repository for the solution of similar type of problem, a repository have proven solution to a recurring problem will save time, effort which is always a key factor for any development. So solution for such a repository is replaced as Design Pattern. Design pattern are usually a collection for solution for recurring problems faced by developer/architects. Design pattern provide the proven solution of recurring problems. A design pattern is…

    Comments Off on Why to use Design Patterns?
  • Interview Questions,  pattern

    Interview Questions on Java Design Patterns

    Interview Questions on Java Design Patterns: What is the difference between Bussiness Delegate and Service Locator Pattern? What is Factory Pattern and how it differ from Abstract Factory Patterns? What is the difference between the Adapter Pattern and Proxy Patterns? What is difference between GoF and J2EE patterns? What is Singleton Pattern, Explain with best example? What is the use of Anti Design Pattern? What is Front Controller design pattern? What is Inversion Of Control and the Dependency Injection pattern? What are similarities between an architectural pattern and design pattern. What is Creatve, Structural, Behavioural Design Pattern? What is Template Design Pattern?  What is Singleton Pattern? Disadvantages of Design Pattern? We…

    Comments Off on Interview Questions on Java Design Patterns
  • news,  pattern,  Tomcat

    Community just released Tomcat 7.0.10

    Tomcat 7 introduced a number of new features as well as enhancements to existing features, Rather than just list the new features, this article will identify the most notable Tomcat 7.0.10 features and enhancements, The features are categorized as either “New Tomcat 7 Features:” or “Tomcat 7 Enhancements: ” as follows: New Tomcat 7 Features: 1. Working with “NONCE” to prevent cross-site request forgery attacks.2. Changing the jsessionid on authentication to prevent session fixation attacks.3. Memory leaks detection and prevention for performance and security upgradation.4. Use of aliases to store static content outside the war file Tomcat 7 Enhancements: 5. Asynchronous logging 6. Easier to embed Tomcat in your applications,…

    Comments Off on Community just released Tomcat 7.0.10