This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes OO, Patterns, UML and Refactoring and the fly likes Patterns in web applications? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Patterns in web applications?" Watch "Patterns in web applications?" New topic
Author

Patterns in web applications?

Vladimir Ergovic
Ranch Hand

Joined: Apr 22, 2001
Posts: 63
Hi, I've been in Java for 2 years mostly developing web applications. I am new to design patterns, but I ve been reading a lot about it. Now, what I want to ask is what are the situations and problems in web apps where I can find patterns usefull?
Thanks,
Vlad


Vladimir Ergovic
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Originally posted by Vladimir Ergovich:
Hi, I've been in Java for 2 years mostly developing web applications. I am new to design patterns, but I ve been reading a lot about it. Now, what I want to ask is what are the situations and problems in web apps where I can find patterns usefull?
Thanks,
Vlad

Patterns are simply reusable solutions to common, recurring problems. It's often easier to start looking directly at the problems you have and then branching out to more general, less technology-specific kinds of solutions. As other posts have suggested, you might want to start with the book "Core J2EE Patterns", which provide specific solutions that have worked in multiple J2EE projects. Then you might want to read the featured book, and/or the original "Design Patterns: Elements of Reusable Object Oriented Design" book, and start thinking about ways in which you can apply these general principles to your specific problems.
Design Patterns are general-purpose tools. You can't just ask someone "how do I use nails in building a house?" The answer would be too broad to be useful. Your question is similar. Take some time to learn about the patterns first, and then you'll start seeing the applicablity on your own.
Kyle Brown

------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
timothy zimmerman
Ranch Hand

Joined: Jun 26, 2001
Posts: 149
I would agree that this is a hard question to give a cut and dry answer to but I can suggest one example.
Consider login authentication. This is a situation where you could apply the Command Pattern. It is a process you will want to repeat frequently. You take incoming requests and forward them to a controlling servlet which will perform the authentication and create the command object. For a more detailed description of the implementation you could refer to O'Reilly's Servlet Programming book (I believe it is the one with the tea kettle on the cover) although they don't refer to it as the Command Pattern.Yoou can review the Command pattern at http://myweb.onramp.net/~huston/dp/patterns.html
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Another suggestion (that I can't believe I've forgotten to make so far) is that Patterns are by far best learned in groups. Get together with a couple of your buddies and do a reading group that meets once a week over lunch to discuss one pattern a week. You'll see that it's much easier to learn this in a group than it is alone. Another possiblility is to look at http://www.hillside.net and see if there isn't a patterns reading group already formed in your area that you can join.
Good luck!
------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
[This message has been edited by Kyle Brown (edited October 04, 2001).]
Paul Newton
Ranch Hand

Joined: Jul 17, 2001
Posts: 67
Regarding design patterns - as they relate specifically to web applications - I have always found the IBM redbooks (anything about VAJ/WAS/EJB/XML) to be very useful (www.redbooks.ibm.com). Even if you don't use the IBM product range, there is a lot of good information included here (I work for IBM, but this is my objective opinion!).
The Apache Struts project also has some information on the basic motivation for MVC in web apps.
For more enterprise oriented patterns in a 'web' context - the SUN site has some J2EE patterns.
All of these sources discuss to a greater/lesser extent, the motivation and advantages of employing particular patterns.
regards,
paul.
Johannes de Jong
tumbleweed
Bartender

Joined: Jan 27, 2001
Posts: 5089
Another suggestion (that I can't believe I've forgotten to make so far) is that Patterns are by far best learned in groups. Get together with a couple of your buddies and do a reading group that meets once a week over lunch to discuss one pattern a week.
Good idea Kyle
[This message has been edited by Johannes de Jong (edited October 05, 2001).]
Vladimir Ergovic
Ranch Hand

Joined: Apr 22, 2001
Posts: 63
Thanks guys those links were helpfull!
David Kane
Ranch Hand

Joined: Sep 20, 2001
Posts: 65
Folks,
At some level, web application development is like other software development activities. However, as a particular application domain, there are some special issues, especially for user interface design.
You might check out: http://www.welie.com/patterns is a pretty good collection that addresses such issues.
David
------------------
David Kane
david_kane@houseofyin.com
Author of Software Architecture: Organizational Principles and Patterns
http://www.vraps.com
http://www.houseofyin.com


David Kane<BR> <A HREF="mailto:david_kane@houseofyin.com" rel="nofollow">david_kane@houseofyin.com</A> <BR>Author of <A HREF="http://www.amazon.com/exec/obidos/ASIN/0130290327/ref=ase_electricporkchop/103-0514572-3811868" TARGET=_blank rel="nofollow">Software Architecture: Organizational Principles and Patterns</A><BR><A HREF="http://www.vraps.com" TARGET=_blank rel="nofollow">http://www.vraps.com</A><BR><A HREF="http://www.houseofyin.com" TARGET=_blank rel="nofollow">http://www.houseofyin.com</A>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Patterns in web applications?
 
Similar Threads
unknown author
Design patterns confusion ?
Comparison with J2EE patterns and GOF
Best Answer
How to design a web based email system?