aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes What is your definition of Antipattern? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "What is your definition of Antipattern?" Watch "What is your definition of Antipattern?" New topic
Author

What is your definition of Antipattern?

Jean Miles
Ranch Hand

Joined: Aug 20, 2003
Posts: 53
I had read one definition at the website at www.antipatterns.com 'AntiPatterns focus instead on the wide and ever-growing selection of repeated software failures in an attempt to understand, prevent and recover from them.'. Also, in your book do you cover JSP, servlet, EJB and any Web Services antipatterns.
Bill Dudney
Author
Ranch Hand

Joined: Sep 05, 2003
Posts: 234
Hi Jean,
Thanks for the great question.
I would simply define AntiPattern to be a recurring solution to a common problem that leads to a less than desirable outcome. In other words something I have done way to many times before I learned my lesson The focus of the book is to show you how people (me or one of the co-authors usually) mess up and then give you step by step guidance on how to get out of the AntiPattern.
The book does indeed focus on the areas you ask about. The whole list of 'big picture' items are;
  • Distribution and Scaling
  • Persistence
  • Service Based Architectures
  • JSP's
  • Servlets
  • Beans (Entities, Sessions, MDB's one chapter each)
  • Web Services
  • J2EE Services


  • For each AntiPattern discussed at least refactoring is offered as a way out of the AntiPattern.


    TTFN,<br /> <br />-bd-<br /> <br /><a href="http://www.amazon.com/exec/obidos/ASIN/0471449156/qid=1064343733/sr=2-1/ref=sr_2_1/002-8375300-3666449" target="_blank" rel="nofollow">Jakarta Pitfalls</a> | <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0471146153/qid=1064343733/sr=1-2/ref=sr_1_2/002-8375300-3666449?v=glance&s=books" target="_blank" rel="nofollow">J2EE AntiPatterns</a> | <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0471462071/qid=1064343733/sr=1-3/ref=sr_1_3/002-8375300-3666449?v=glance&s=books" target="_blank" rel="nofollow">Mastering JavaServer Faces</a> | <a href="http://bill.dudney.net/roller/page/bill" target="_blank" rel="nofollow">Blog</a> | <a href="http://www.jroller.com/page/BillDudney" target="_blank" rel="nofollow">Eclipse Blog</a> | <a href="http://www.sourcebeat.com/TitleAction.do?id=2" target="_blank" rel="nofollow">Eclipse 3 Live</a>
    Pradeep bhatt
    Ranch Hand

    Joined: Feb 27, 2002
    Posts: 8919

    Does Persistence talk about problems in CMP?
    Can you also tell what J2EE Services are all about?
    [ November 18, 2003: Message edited by: Pradeep Bhat ]

    Groovy
    Jean Miles
    Ranch Hand

    Joined: Aug 20, 2003
    Posts: 53
    Do you consider this situations an antipattern? Situation 1: When you implement a design pattern thinking it is your solution to a problem, but later you find your problem has not changed but you just pick the wrong pattern. Situation 2: just code to make it work then refactor it, and during refactor determine if there are workable solutions such as patterns. In other words, refactoring to patterns.
    Stephen Huey
    Ranch Hand

    Joined: Jul 15, 2003
    Posts: 618
    J2EE Services: e.g. EJBs, Servlets, JSPs, JDBC and JMS
    You could develop a pretty solid idea of all that's included under the J2EE umbrella within minutes if you buddied up with Google a bit more!
    http://www.google.com/
    If you want to know about it from the source, then just visit
    http://java.sun.com/j2ee/
    Pradeep bhatt
    Ranch Hand

    Joined: Feb 27, 2002
    Posts: 8919

    J2EE Services: e.g. EJBs, Servlets, JSPs, JDBC and JMS

    The examples you have mentioned is already other big items.
    Bill Dudney
    Author
    Ranch Hand

    Joined: Sep 05, 2003
    Posts: 234
    Hi All,
    I will try to answer all the questions in this tread at once
    'J2EE Services' is all the other 'stuff' that did not fit under the other topics. For example one of the AntiPatterns in this section is 'Overworking JNI' in a J2EE application. It could be argued that you should never use JNI and I would probably agree but some still do.
    The Persistence chapter talks about how people misuse and/or don't understand how to do persistence. For example 'Crush' discusses the problems in not employing some sort of concurrency scheme.
    For problems with CMP go to the EJB Entity chapter where you will find info on Entities including topics related to CMP. Were there specific AntiPatterns that you (Pradeep) had in mind?
    For the question about things being an AntiPattern;
    1) Picking the wrong pattern can indeed make that pattern an anti-pattern. For example if you are using Composite Entity in an EJB 2.0 world I'd say you have your self an anti-pattern.
    2) I tend to be on the side of the fence that XP needs to be refactored. This link has some interesting info on what is wrong with XP and more or less sums up my view. That said (and I don't want to start a flame fest, resonable discussion is fine on the appropriate forum here but no flame war I am a big fan of Refactoring to Patterns. Joshua Kerievsky has some really great ideas and the bookd that you can download from the above URL is fantastic. While you are there poke around a bit. Joshua's patterns for learning groups are really cool!
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: What is your definition of Antipattern?