• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Builder design pattern example

 
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I am currently trying to understand the Builder design pattern. I am not able to understand its RTF text converter example. Please could anyone explain me the text converter example in java.

Thanks
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which text converter example?
 
Siddharth Bhargava
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The RTF Text Format Converter example. RTF reader should be able to convert RTF to many text format. The example which is given in GoF book.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is a RTF example explained here:
http://www.oodesign.com/builder-pattern.html
 
Siddharth Bhargava
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had already seen this site. But here ASCIIText and Document have not been implemented. So its not that clear. If anywhere this example is complete in Java then please do provide me the same.
Also if there is any real world example of prototype pattern in Java then please do provide me that also.

Thanks in advance.
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What don't you understand about the Builder design pattern?
[ October 15, 2008: Message edited by: James Clark ]
 
Siddharth Bhargava
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I understood the builder design pattern but I was looking for a real time example of it so that I am able to understand the concept behind it.
Please provide me a real time (java code) example of builder design pattern so that I am able to understand the concept behind it through code. .
If possible please provide me the RTF format converter example (Complete java code). I saw the example in a website but the example was not complete.

Thanks in advance.
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Siddharth Bhargava:
I had already seen this site. But here ASCIIText and Document have not been implemented. So its not that clear.



I don't understand how those implementations are relevant to understanding the Builder pattern.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I understood the builder design pattern but I was looking for a real time example of it so that I am able to understand the concept behind it.



If you say that you understand the Builder pattern, then you surely understand the concepts of the pattern. It is a fairly simple design pattern, you should be able to implement it very easily.
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Another Example - Builder Pattern
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out wikipedia example.
 
reply
    Bookmark Topic Watch Topic
  • New Topic