Delphi and the Decorator Pattern

Delphi and the Decorator Pattern

http://www.nickhodges.com/post/Delphi-and-the-Decorator-Pattern.aspx
http://www.nickhodges.com/post/Delphi-and-the-Decorator-Pattern.aspx

Comments

  1. It wasn't mine -- it came directly from the book.  ;-)

    But thanks.

    ReplyDelete
  2. THe kindle edition of the book is only $1 cheaper than the actual book.

    ReplyDelete
  3. I wouldn't recommend getting the Kindle version. There are lots of illustrations and such, it and I don't think it would work well for on a Kindle.

    ReplyDelete
  4. I might be stupid, but I don't find a way to find all your posts related to design patterns on your website.

    I know these pattern but I would like to recommend the reading of your articles to my colleagues , who are still using delphi in a procedural way (they still use delphi 4) but are preparing migration to XE3 ...

    ReplyDelete
  5. All Kindle books purchased can now be seen in full color and complete with active links using the Amazon Reader which syncs with your Kindle

    https://read.amazon.com/

    ReplyDelete
  6. Great book, I always have it near my desk. Thanks for implementing the pattern demos!

    ReplyDelete
  7. Nick Hodges 
    A have a little question: 
    "type
      TBeverage = class
    ...
      public
        function Cost: Double; virtual; abstract;
        property Description: string read GetDescription write SetDescription;
      end;

    The base class is abstract. It has two properties, with the Cost property being read-only and having an abstract, virtual setter. "

    maybe you mean "getter" ?

    ReplyDelete
  8. Nick Hodges I have had my Kindle for over two years now, and have yet to find a software book which is not annoying on Kindle. It appears as though the publishers think they should be able to get on Kindle without doing additional work in formatting, and of course, woth a 600x800 screen, that's wishful thinking, at best. And many of the non-software books appear to have been scanned, and badly proofed (if at all). I have returned a few that were so bad they should never have been offered for sale.

    ReplyDelete
  9. Steven Healey Using Amazon Reader would be a reasonable solution for some of the software books which are not well formatted for Kindle. However, I love my Kindle because whenever I have to wait somewhere, it is there, and I need not have my time wasted on waiting room magazines. I won't carry a laptop for such service; Kindle is far more convenient.

    ReplyDelete
  10. Would you mind if we tried to run these examples in Smart Mobile Studio?  (Or perhaps we could convince you to try that yourself...)

    IMHO, such examples would really benefit from being "pure Pascal" (and reusable in several Pascal-based environments), rather than bound to "Delphi"...

    ReplyDelete
  11. Jørn Einar Angeltveit Hey, feel free.

    And I'd love to try it myself as well, though I don't have a copy of Smart Mobile Studio.  ;-)

    ReplyDelete
  12. Olivier SCHWAB I've create a category for these posts:

    http://www.nickhodges.com/category/Patterns.aspx

    And so you should be able to find that that way from now on.

    ReplyDelete
  13. Thanks Nick Hodges , you're great !

    ReplyDelete
  14. Olivier SCHWAB You are too kind.  ;-)

    ReplyDelete
  15. Igor Schevchenko Yes, thanks for the correction. I've fixed the article.

    ReplyDelete
  16. With only a few modifications, the code was pretty easy to "port" to Smart. (No need (support) for GUID in the interfaces and no generics).

    You can test the solution online in the widget in this article: http://smartmobilestudio.com/2013/02/08/design-patterns-observer/.

    Oh.  I had to add another TWeatherDataDisplay class.  Guess which :-)

    ReplyDelete

Post a Comment