Core Java Design Patterns

Hi folks,
I wanna know about design pattern to implement my current project, I need some reference book. if you know the book. please mail me
[email protected]
Thanks and regards
SK,India

[The GoF book|http://www.amazon.co.uk/gp/product/0201633612/ref=s9sims_c3_at1-rfc_g1?pf_rd_m=A3P5ROKL5A1OLE&pf_rd_s=center-1&pf_rd_r=1JQJWT69HDE1GTFS4EXH&pf_rd_t=101&pf_rd_p=139045791&pf_rd_i=468294]
[Head First Design Patterns|http://www.amazon.co.uk/Head-First-Design-Patterns/dp/0596007124/ref=pd_sim_b_2]
[Refactoring to Patterns|http://www.amazon.co.uk/Refactoring-Patterns-Addison-Wesley-Signature-Kerievsky/dp/0321213351/ref=sr_1_1?ie=UTF8&s=books&qid=1216992456&sr=1-1]
Enjoy

Similar Messages

  • Software reuse with Java design patterns

    Anyone have any suggestions on how software can be reused with Java design patterns? Any concrete examples?

    Buy the GoF book. Lot's of examples there.

  • Core java patterns

    Hi can anyone tell me some good tutorials or pdfs on Cre Java Design Patterns.

    http://www.research.umbc.edu/~tarr/dp/fall00/cs491.html

  • Design Patterns and J2mE

    Hey,
    I do wanna know if is recommendable to use a Java Design Pattern (like Singleton, Fa�ade, etc)... in a J2ME application. I mean, a colleague of mine made a j2me application using these kind of technologies, but, when he installed in his cell phone, the application occuppied much memory. So, another guy told me that due to the limited memory space we find on these devices it's better for us to use only the MVC idea. So, is it recommendable for me to use this kind of resources???
    Thanks!

    Hi,
    it is a good programming practice to use Design patterns. But too much of design patterns results in more classes which will be a problem in j2me sometimes.
    Most of the MIDP classes uses Singleton and abstract design patterns

  • UML and Java Design Patters

    I am new to UML and Java Design Patterns
    Please suggest some good books for UML and Java Design Patterns.
    Venu

    I am new to UML and Java Design
    Patterns
    Please suggest some good books for UML and Java
    Design Patterns.
    VenuThere are only a few of them:
    http://www.amazon.com/gp/product/0596007124/ref=pd_bxgy_text_b/102-9140088-0344105?%5Fencoding=UTF8
    http://www.amazon.com/gp/product/0130935387/ref=pd_sbs_b_3/102-9140088-0344105?%5Fencoding=UTF8&v=glance&n=283155
    http://www.amazon.com/gp/product/0471227293/ref=pd_sim_b_5/102-9140088-0344105?%5Fencoding=UTF8&v=glance&n=283155
    http://www.amazon.com/gp/product/0201485397/102-9140088-0344105?v=glance&n=283155

  • Suggestions regarding corej2ee design patterns

    hi all
    i wanted to go through the core j2ee design pattern but i don't know which one to refer and what to
    so i need suggestions that what to read in a design pattern
    and which is the best book or pdf if possible send me the link too

    Core J2EE patterns are not what they were. A lot of them would be considered anti-patterns, work arounds for deficiencies in the EJB 1.0 and 2.0 specs that have been addressed in EJB 3.0.
    The "Core J2EE Patterns" (Amazon.com search will find it) sounds like what you want.
    %

  • Design Pattern for low cohesion & coupling

    Hi there!
    I�m about to make a applictation in swing and don�t have so much experince in this API. Normally I program for the web using J2EE tech like Servlets, JSP, custom tag libs and EJB�s. Therefore my biggest challenge for the moment is to find (/ find out) a good framework for coding in swing and minimize coupling between the participants.
    I have good knowledge about the MVC paradigm (in web programming) but finds it difficult to apply my knowledge in the Swing area. Do you have links or can recomend some litterature that handles my little but very frustrating problem?
    In advance thank�s
    Best regards
    Niclas Rothman

    Check out Java Design Patterns A Tutorial by James W. Cooper.
    I am sure there are many other publications out there, but I am not quite sure what your frustration is related to swing.
    Design patters are applicable in many aspects and are mostly language independent. In fact swing uses some of the design patters such at the command pattern in using Actions.
    Hope this helps
    Neelesh

  • Design Pattern for Role-based GUI

    Hi,
    I'm looking for a java design pattern to provide different GUI according to the user role.
    For example, If logon user has general user role, the GUI would disable some administrator related menu items...
    I think, this kind of functionality is now in use at many applications..
    Thanks in advance..
    Habin

    Hi
    I try to explain with some more detail (sorry for my bad english) :
    I write a complete hotel reservation app with Java+Bd (relational). This app is used by diferent users types.
    The administrator has all privileges (can do every action) and other users can do only some actions (make a reservation, check-in, check-out etc but not modify a
    room price for example).
    The app is a MDI app, there are a menu and menuitems
    and when a user do an actionEvent over a menuItem an InternalFrame is activated and so on. These InternalFrame make possible some actions at app level (ex. : do a check-in).
    The menuItems set is controled by the App (is the Controller in MVC design pattern) and the model is represented by a set of user possible actions; so there are a class (UserConfig) with these set of possible actions.
    the Controller ask UserConfig abouth the posible action
    set and do the enable/disable job. There are a 1 to 1
    relationship : each possible actions has a menuItem. And
    there are a M to N relationship from User/Action perspective.
    With this design (I think is an MVC design) the Controler mantain a UserConfig (via a Relational Database) and the Administrator (via the App) can create or modify the UserConfig objects.
    At implementation level, each menu item has a name, and
    for each registered user there are the name/id_user pair
    of actions. These info (stored in BD) is used to create
    the UserConfig objects (via username/password).
    Bye

  • Design patterns implemented in java API

    Hi,
    I have some questions on design patterns implemented in core java class or in general in java API.
    1)Whether
    java.util.Collections, the checkedXXX(), synchronizedXXX() and unmodifiableXXX() methods.
    can be considered as a decorator pattern?
    2) Whether
    LinkedHashMap(LinkedHashSet<K>, List<V>) which returns an unmodifiable linked map which doesn't clone the items, but uses them
    can be considered as a Bridge pattern?
    3) Whether Facade pattern is implemented in java ? If so which API uses it?
    4) Whether
    •     All non-abstract methods of java.io.InputStream, java.io.OutputStream, java.io.Reader and java.io.Writer.
    •     All non-abstract methods of java.util.AbstractList, java.util.AbstractSet and java.util.AbstractMap
    can be considered as a Template method pattern?
    5) Whether
    •     java.util.Comparator#compare(), executed by among others Collections#sort()
    can be considered as a Stratergy pattern?
    6)
    Whether State pattern is implemented in java ? If so which API uses it?
    7)
    All implementations of java.lang.Runnable are considered as a Command pattern.
    8)
    Whether
    •     java.io.InputStreamReader(InputStream) (returns a Reader)
    •     java.io.OutputStreamWriter(OutputStream) (returns a Writer)
    can be considered as an Adapter pattern?
    Please clarify.
    Thanks.

    What do you think, and why?

  • Cor design pattern

    I use cor design pattern little different than what I see in google.
    here is m y cor
         public static  abstract  class CORHandler    {
              CORHandler  nextHandler;
              public void process(){
                   if(canHandleRequest()){
                        handleRequest();
                   }else {
                        if(nextHandler!=null) nextHandler.process();
              protected abstract  boolean canHandleRequest();
              protected abstract void  handleRequest();
              public void setNextHandler(CORHandler  corHandler){
                   nextHandler=corHandler;
         }this serves most of my need and also I can override process method for change behaviour .
    this code helps me save lots of if/else conditions , I am not passing any object to the method here reason is I use this always as inner class inside a method so I can access all final fields
    advice me is this right when applying cor pattern?

    Making it a base class increases connectivity to no good purpose.
    It violates the concept of inheritance by making the objects COR classes which is not what they are.
    It violates the principal of COR in that the intent is to handle a responsibility not all responsibilities. This same problem obscures the pattern as well by eliminating the objects to be acted upon.

  • Design Pattern for Building Trees (Java)

    I'm wondering if there is a design pattern suited to build trees from a given domain object.
    public interface DomainObject {
    public long getId();
    public abstract class Displayable {
    private DomainObject domainObject;
    private Displayable parent;
    private Vector children;
    public Displayable(DomainObject domainObject, Displayable parent) {
    this.domainObject = domainObject;
    this.parent = parent;
    this.children = new Vector();
    public Displayable(DomainObject domainObject) {
    this(domainObject, null);
    public Displayable getParent() {
    return parent;
    public DomainObject getDomainObject() {
    return domainObject;
    public Displayable[] getChildren() {
    return (Displayable[])children.toArray(new Displayable[children.size()]);
    public void addChild(Displayable d) {
    children.add(d);
    Example:
    DomainObject O
    Displayable D (contains O)
    D's parent is C
    C's parent is B
    B's parent is A
    A does not have a parent
    A --> B --> C --> D(O)
    Method signature
    public Displayable buildDisplayable(DomainObject domainObject);
    So basically pass in a DomainObject (O) and spit out the Displayable (D), with the tree built up to the root (A).

    No I graduated last year from college. I'm trying to improve our SWT/JFace GUI framework. That method signature is just something I thought about. I'm thinking using Factory Pattern will have to do considering I know ahead of time which subclasses of Displayable have parents and children.

  • A beginner to design pattern(Struct,Spring & Hibernate framework)

    Actually I am beginner to MVC2 Approach of complex application incorporated by design pattern as Struct,Spring & Hibernate framework.
    Currently I am learning JSP Concepts,I have one doubt.
    (1)What are the things I should grasp even before taking off to Design pattern?
    Help me anyone plz?
    With Regards,
    Stalin.G

    [email protected] wrote:
    Actually I am beginner to MVC2 Approach of complex application incorporated by design pattern as Struct,Spring & Hibernate framework.
    Currently I am learning JSP Concepts,I have one doubt.Just one?
    >
    (1)What are the things I should grasp even before taking off to Design pattern?You should understand core Java very, very well.
    You should know JSPs using JSTL without scriptlets.
    You should understand relational databases and SQL.
    You should understand HTML and HTTP.
    Personally I think Struts, Spring, and Hibernate all at once are well beyond any beginner.
    It's hard to advise you on what to do without knowing your capabilities and the problem you're trying to solve, but I think you should try it first using just JSPs, servlets, and JDBC. Get that to work and then refactor it to use the frameworks. You'll understand and appreciate them more that way.
    %

  • Suggest good book for J2EE Design Pattern.

    Is there any good book for J2EE Design pattern? I know Head First Design Pattern book, but is focuses oncore java. I want to learn in detail with examples J2EE design pattern.
    Please suggest good books.
    Thanks in advance.
    Rahul.

    most j2ee patterns are discredited now. they were mostly workarounds for deficiencies in ejb 1 & 2 specs.
    "core j2ee patterns" is your best bet, but take it with a grain of salt.
    better to learn spring, IMO:
    springframework.org
    %

  • EJB Design Patterns

    I picked up "EJB Design Patterns" by Floyd Marinescu. As I started reading through the book I began to wonder if these were standard patterns. So my question is this. Are the patterns described in this book accepted standards for design EJB's?
    Thanks

    Hi,
    You can check out the Core J2EE patterns at
    http://java.sun.com/blueprints/corej2eepatterns/index.html
    and also some examples and other strategies as applied in an application at
    http://java.sun.com/blueprints/patterns/catalog.html
    The Core patterns would be considered as the standard patterns and would probably help quite a bit.
    hope that helps,
    Sean

  • SERVICE LOCATOR ?? Is it really an interesting Design pattern??

    Hi everybody,
    i've a problem with the J2EE Design Pattern "Services locator" (it's a singleton).
    It is said that by making use of a Service Locator we can :
    - hide to the client the complexities of initial context creation, EJB home object lookup,and EJB objectre-creation.
    - multiple clients can reuse the Service Locator object to reduce code complexity, provide a single point of control, and improve performance by providing a caching facility.
    But i would like to understand at which side should that service locator object reside??!!??
    If it is at server side then the clients need well an initial context in order to make a lookup on that object.
    Conclusion :
    the service locator doesn't hide the complexities of initial context!!
    Furthermore the client has to perform a look-up on that service locator object!! The only advantage left is caching facility.
    If it is at client side, each client needs his own services locator object
    Conclusion :
    multiple client don't reuse the same service locator. What's the advantage to be a singleton ???
    There is certainly something that i don't understand so help me please!! Thanks.

    Hi Yves,
    But i would like to understand at which side should
    that service locator object reside??!!??
    If it is at client side, each client needs his own
    services locator object
    Conclusion :
    multiple client don't reuse the same service locator.
    What's the advantage to be a singleton ???The service locator resides on the client side and is implemented as
    a singleton. Since it is possible that there could be multiple
    class loaders/JVMs on the client side, and therefore, multiple
    instances of the "singleton" service locator. This is typical
    in a distributed environment (e.g. servlets/JSPs in a web-tier
    cluster using service locator). Thus service locator is not
    a truly "distributed singleton" object. But, the empahsis
    is to design the service locator such that it does not hold
    any state that needs to be replicated across multiple
    instances across different JVMs as mentioned. Thus, there
    is no need for multiple clients to use the "same" service locator,
    but still the benefits of implementing this pattern is realized.
    By making it a singleton, and keeping it from holding state
    that needs to be replicated, we realize the benefits of this pattern.
    You may also want to visit the J2EE Pattern interest list
    and see these relevant discussions :
    Topic: Service Locator and passivation
    http://archives.java.sun.com/cgi-bin/wa?A2=ind0106&L=j2eepatterns-interest&F=&S=&P=1026
    Topic: Caching EJBHome interfaces
    http://archives.java.sun.com/cgi-bin/wa?A2=ind0106&L=j2eepatterns-interest&F=&S=&P=9226
    Topic: Using Service Locator for Data Source caching
    http://archives.java.sun.com/cgi-bin/wa?A1=ind0106&L=j2eepatterns-interest#31
    hope this helps,
    thanks,
    -deepak

Maybe you are looking for