<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Sans Typewriter'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; ">One of the cool things, I think, about Smalltalk is that Classes are objects... i.e. concrete factories that can be modified at runtime to produce objects in different ways, depending on the runtime situation. I just find this so much more intuitive, compared to how classes are done in other languages... </span></span></div><div><font class="Apple-style-span" face="Helvetica"><br class="webkit-block-placeholder"></font></div><div><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Sans Typewriter'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; ">But I think I may have used it in a naive way...</span></span></div><div><font class="Apple-style-span" face="Helvetica"><br class="webkit-block-placeholder"></font></div><div><font class="Apple-style-span" face="Helvetica">For example, I needed an Adapter class that could produce standard Item objects by connecting to a variety of legacy database tables, converting the non-standard item records into standard Item objects. This way, the consumer of those Item objects doesn't care where the items come from.</font></div><div><font class="Apple-style-span" face="Helvetica"><br class="webkit-block-placeholder"></font></div><div><font class="Apple-style-span" face="Helvetica">Originally, I thought I would only have to make these connections, one at a time. I.e., I'd program the Item class 'factory' with the legacy database hostname, username, password, and then just start asking for Items. The Item class would then go out to the database, fetch the proper row, create an Item object, initialize the instance variables, and return it to the Item object consumer.</font></div><div><font class="Apple-style-span" face="Helvetica"><br class="webkit-block-placeholder"></font></div><div><font class="Apple-style-span" face="Helvetica">This is intuitive, cool, and it works.</font></div><div><font class="Apple-style-span" face="Helvetica"><br class="webkit-block-placeholder"></font></div><div><font class="Apple-style-span" face="Helvetica">Then the requirements changed and I needed to connect to multiple database *at the same time*. </font></div><div><font class="Apple-style-span" face="Helvetica"><br></font></div><div><font class="Apple-style-span" face="Helvetica">But there is only one Item class object!  </font></div><div><font class="Apple-style-span" face="Helvetica"><br></font></div><div><font class="Apple-style-span" face="Helvetica">This really muddles things up, because I basically have to update the Item class variables every time I need an Item object. No longer cool!</font></div><div><font class="Apple-style-span" face="Helvetica"><br class="webkit-block-placeholder"></font></div><div><font class="Apple-style-span" face="Helvetica">Did I just misuse this feature? Should I have built two Adapter Objects, instead? Am I missing something obvious? Is a little knowledge a dangerous thing? :-)</font></div><div><br></div><div><font class="Apple-style-span" face="Helvetica">TIA... John</font></div><div><font class="Apple-style-span" face="Helvetica"><br class="webkit-block-placeholder"></font></div></body></html>