Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 04/02/19 in all areas

  1. <sigh> I keep reading that, especially from Delphites, but ISTM that many totally misunderstood "program to the interface". Interfaces (no matter if they are actual language constructs or abstract classes) are fine and have their use, but like with everything, one can overdo it. Not everything is or should be an interface. The author of the article you link to seems to be one of those dependency injection, "interface only" gurus. ISTM that all these techniques should be part of a larger toolbox, not just a toolbox with lots of nails and a few hammers. I am not even sure if the VCL would have been better with interfaces, if they had been available. And the claim "composition is better than inheritance" is just as wrong. Both have their place, and which one should be preferred depends on the situation.
  2. I've just released MARS version 1.3 ( https://github.com/andrea-magni/MARS/releases/tag/v1.3 … ). New developments will take place in the new 'develop' branch and there's already a small new feature: basic IXMLDocument support in MBR and MBW. You can consider using the released version in order to avoid unnecessary noise due to new developments, that from now on will take place in a separate 'develop' branch. Sincerely,
  3. Original post: https://www.thedelphigeek.com/2019/02/design-patterns-with-delphi-book.html Hurrah, hurray, my third book is here! It’s called Hands-On Design Patterns with Delphi and (just like my first book) I wrote it for Packt Publishing. (The second book was self-published and I expect the fourth one to be, too.) As the name says, “Design Patterns with Delphi” deals with design patterns. It is a bit different from most of design pattern books and websites you will find on the Internet. Case in point A: There are no UML diagrams. I don‘t speak UML. Tried to learn it few times but for some reason the whole concept doesn‘t agree with me. If you like diagrams, don’t fear though. Any book on design patterns - and most websites covering that topic - will gladly show how any design pattern can be diagrammed. That, however, is not important and should not govern your decision to buy the book. More important is case in point B: This book speaks Delphi. All the examples are written in Delphi and language features are used to the full. I also covered few less known Delphi idioms in separate sections. You’ll still be able to follow the discussion even though you may program in a different Pascal dialect. There’s also case in point 😄 Examples make sense. I deeply dislike classical design pattern examples of the “And then we want to write this program for different toolkits and it should also be able to draw circles, not only squares” kind. Euch! I tried to find a good example for each design pattern. Admittedly, I ended with few examples that draw triangles and squares on screen (mostly because some patterns were designed specifically for solving such problems), but most of them are of a more practical nature. This book covers all three classical design pattern categories - Creational patterns, Structural patterns, and Behavioral patterns. It also discusses patterns from the newer Concurrency patterns category. At the end I threw in some borderline-pattern(ish) topics and ended with a discussion of few patterns that cannot be strictly classified as “design” patterns. In this book you’ll find: Chapter 1 An introduction to patterns. Exploration of design principles, design patterns, and idioms. A mention of anti-patterns. A short description of most important design principles. Delphi idioms: creating and destroying objects. Chapter 2 Creation patterns part 1. Singleton. Dependency injection. Lazy initialization. Object pool. Chapter 3 Creation patterns part 2. Factory method, Abstract factory, Prototype, Builder. Delphi idioms: Assign and AssignTo. Chapter 4 Structural patterns part 1. Composite. Flyweight. Marker interface. Bridge. Delphi idioms: comparers and hashers. Chapter 5 Structure patterns part 2. Adapter. Proxy. Decorator. Facade. Delphi idioms: replacing components in runtime. Also: helpers. Chapter 6 Behavioral patterns part 1. Null object. Template method. Command. State. Chapter 7 Behavioral patterns part 2. Iterator. Visitor. Observer. Memento. Delphi idioms: for .. in. Chapter 8 Concurrency patterns part 1. Locking. Lock striping. Double-checked locking. Optimistic locking. Readers-writers lock. Delphi idioms: tasks and threads. Also: bitwise operators. Chapter 9 Concurrency patterns part 2. Thread pool. Messaging. Future. Pipeline. Chapter 10 Writing Delphi programs. Event-driven programming. Actions. LiveBindings. Form inheritance. Frames. Data modules. Chapter 11 Wrapping it up. Exceptions. Debugging. Functional programming. I hope you will like this book and learn a lot from it. I know I did during the nine months I spent writing it. And if you find any bug in the code, let me know so I can correct it in the second release!
  4. Thank you to everyone who answered me. @Andrea Magni, the framework does what I thought it did not do. I need to free the TJSONArray from memory. Except that in initial tests it seemed to me that the object remained instantiated, but it does not remain. Thank you!
  5. The most activities seems "like" of posts.
  6. Dalija Prasnikar

    Initialize local variables at declaration

    If everyone stays away, bugs will never be found and fixed... I have used them a lot in various shorter and longer experimental code... so far so good (in spite known bugs)
  7. Steve Maughan

    Is there GIS library for delphi (Free or very cheap)

    CartoVCL looks interesting but hasn't been updated since 2015. Abandonware regards, Steve
  8. Stefan Glienke

    We use DUnitX and it discovers all our silly mistakes before release

    That it what I looked into some years ago and started refactoring out some for me unnecessary code and cruft. You have to know that a coverage profiler is basically a debugger that puts a breakpoint into every single executable line (or at least those where you specified you are interested in). Now finding out what lines that are is the interesting part - the other is presenting the data nicely inside the IDE when executed under TestInsight (at least for me).
×