wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Factory Pattern: Where is java code for factory pattern? 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 » Java » Beginning Java
Bookmark "Factory Pattern: Where is java code for factory pattern? " Watch "Factory Pattern: Where is java code for factory pattern? " New topic
Author

Factory Pattern: Where is java code for factory pattern?

Kevin Thompson
Ranch Hand

Joined: May 04, 2001
Posts: 237
Here is the deal - I have Mark Grand's Book - called "Patterns in Java - Volume 1". He has lots of java code examples.
BUT....
He has no compile instructions. No run instructions either. I have not found a website that is for Mark Grand or for his book that has this type of info.
Here are my questions:
Question 1. What good is java code if there are no instructions on how to compile/execute/run the code?
Question 2. Is the java code in his book meant to be sort of "theoretical examples"?

Question 3. Where can I find some java code that is written with a factory pattern - that actually has compile & run instructions with it - and actually does something? What I mean when I say it "does something", means that I want some code that I can run here on my home computer. Something with some input and some output. (I.E. real java code that actually does something.)
thanks!
Kevin Thompson
P.S. If I could find java code for other patterns also, that would be wonderful.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
He is presuming that you already know how to program using Java. Patterns are the same patterns regardless of the language. The original patterns book by the Gang of Four used mostly Smalltalk to illustrate the patterns.

If you need compile and run instructions, you need a beginning Java book/references, not a patterns book.

The java source code (in src.jar) has lots of examples of the Factory Pattern in java.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Wilfried LAURENT
Ranch Hand

Joined: Jul 13, 2001
Posts: 269
HAve a look atThe design pattern java companion
W.
Kevin Thompson
Ranch Hand

Joined: May 04, 2001
Posts: 237
thanks wilfried.
I should demand my money back for my book, because I was tricked. I thought the code was legitimate java code(compiles and runs and does something) as opposed to "pretend" code.
The cover of the books says it includes "complete java source code".
I should contact some book publishers to see if my 5 year old nephew can be a author of java patterns books. My nephew can produce volumes of "completed java source code" if there is never any requirement whatsoever that it ever compiles, or ever runs, or ever works.
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937

He has no compile instructions. No run instructions either.

All Java programs are compiled the same, and all Java programs are run the same. What's the point of including the instructions?
If you see "Design Patterns" in the title of the Java book, that's not the book that you want to learn Java programming. Try to get some Java experience, write a few programs (that you can compile and run), and then proceed to design patterns, UML, refactoring, etc.
Eugene.
[ July 15, 2002: Message edited by: Eugene Kononov ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Factory Pattern: Where is java code for factory pattern?
 
Similar Threads
Patterns Introduction
Implementation Patterns book
Discussing Design Patterns - Factory Method & Abstract Factory pattern
How good is this book for a java developer?
Design Patterns...