How to Buy My Books


First, I want to thank all of you that have bought one or more or my books.  I’m very grateful.

Second, I wanted to post to make sure that everyone knows that I have three books out  and how you can buy them.


Buy in Paperback

Buy in Digital Form

CodingInDelphiCoverFront Buy on Amazon for $39.99

Buy on CreateSpace for $39.99/p>

Buy on LeanPub for $39.99, which includes *.MOBI, *.PDF, and *.EPUB
MoreCodingInDelphiCoverFront Buy on Amazon for $39.99

Buy on CreateSpace for $39.99

Buy on LeanPub for $39.99, which includes *.MOBI, *.PDF, and *.EPUB
title_page Buy on Amazon for $39.99

Buy on CreateSpace for $39.99

Buy on LeanPub for $39.99, which includes *.MOBI, *.PDF, and *.EPUB

Another option, for those that want to buy all three, is to buy them in a digital bundle on LeanPub for $74.99

A Busy Week Produces 10.2 Tokyo

“Shipping is a feature” is one of my favorite sayings.  In fact, I’d argue that shipping is the most important feature, because without it, you don’t get any other features. 

But shipping is a lot of work – as this past week proved.  On Wednesday, we shipped RAD Studio 10.2 Tokyo, and we got it done two days earlier than we originally planned.  (Here’s a hint from the time we did it with Delphi 2007 and I spent the entire weekend helping customers with issues – never ship on a Friday).  Anyway, we worked hard and shipped on Wednesday, and it all worked out.

So, have you tried Tokyo yet?  If you haven’t, hop on over and give it a whirl.  I’ll wait. 

Okay, now that you’ve tried it out, you can get a good deal until the end of the month.  Definitely worth seriously considering.

My favorite of the new features is the Linux support,  but I’m guessing many of you are, like me, Windows people and aren’t that familiar with how things work on the Linux side of things.  However, things aren’t that difficult.  To get started, I recommend that you read and follow this excellent (and startlingly detailed) blog post by Craig Chapman.  It should get your Linux all set up and ready to run.  You’ll even get a sample application running in the debugger.

Linux support brings to five the number of platforms that Delphi supports.  It’s a list of familiar names —  Windows, MacOS, Android, iOS, and now Linux.  Delphi (and soon C++ for Linux) takes you where ever you need to go.  One codebase, natively compiled on  your favorite operating system.  We’ve come a long way from the days of just supporting WIndows, eh?

Flotsam and Jetsam #118

  • Delphi for Linux is soon to be here.  We’ve unleashed the Beta Bloggers, so keep an eye out for more information coming from any number of sources.
  • Thanks to all of you who have bought my new book, Dependency Injection in Delphi.  I’m grateful for all the support.  My wife is working on the cover for the paperback edition, and it should be available soon.
  • I’ve had a job change – I’m moving from being the Director of Product Management to the Director of Engineering.  Instead of managing the Product itself, I’ll be managing the actual development process for all the Embarcadero products, as well a couple of other Idera tools.  It’s a bit of a switch, but one I’m looking forward to.  Managing the development process is no small task, but I feel up to the challenge.
  • I’ve always said that if I could teach new developers one thing, it would be to “program to an abstraction, not to an implementation”.  I was at a great talk on Code Reviews by Travis Laborde at a recent Philly Code Camp, and he said that that most important thing to teach a new developer was the Single Responsibility Principle.  I thought that was a worthy competitor.  What do you think is the most important thing to teach to a new developer?

The New Release Pattern

Are you on Update Subscription for RAD Studio?

You are?  Great.  Wise move.

You aren’t?  Why not?

We are very interested in you being on Update Subscription — so much so that you pretty much have to be when you upgrade.  We do this because Update Subscription is really great for you, and not bad for us, either.

It is great for you because you pay less over time.  It is great for you because you always have access to the latest and greatest versions and features.   It is great for you because you can budget annually for your software development tools.

And it is great for you because it incents us to release software when it is ready, and no sooner.  Because we no longer have to wait a whole year or more to release new features (as we did previously without Update Subscription), we can more gradually release features when they are ready.  We don’t have to push a feature to make a date because we know that there’s another date not too far off where we can ship that feature. We don’t have to pile a bunch of features into a single release to make it sound “big”.

For instance, C++ for Linux is proving to be a bit more challenging that we thought.  We originally planned to release C++ for Linux with the 10.2 (Godzilla) release.  But we don’t have to, and so we aren’t.  Instead, we are going to get Delphi for Linux in your hands as soon as possible, and then get C++ for Linux in your hands a bit later, when it is ready.  You get quality software sooner, and later.  We ship Delphi for Linux now, and then in a few short months, we ship C++ for Linux in the 10.2.1 release.

Okay, a little terminology.  Because of the fact that we can — and will — ship new features in all of our releases, we are going to stop  using the word “Update” and start using “Release” for all of our, well, releases.  Why?  One reason is because we find that many customers think of an Update as bug fixes only.  That isn’t true, and we don’t want to give that message by using the word that has meant that in the past.  Another reason is that “Release” connotes newness, and that’s the message we want to send.  So from now on, it’s Releases, not updates.  Everything we ship will be a release.

We can do this because you all are on Update Subscription.  Why is that?  Suffice it to say that it has to do with arcane accounting rules.  I know — that sounds lame, but it’s true.  Trust me, you don’t want to know the details.

Because of Update Subscription, we can now do two or three (or more if we want) releases a year.  We can deliver a constant stream of new features and quality fixes.  We are committed to making that upgrade path as smooth as possible.  We want you to be happy with this steady stream of goodness because we want you to renew your subscription when the time comes.  From now on, we make our money by continuously delighting you, and thus we are highly incented to do that.  That means quality and valuable new features on a steady and continuing basis.  It means we can ship no code before its time.

We have lots in the pipeline to keep you delighted.  We can ship these new features when they are ready.  That’s big win for everyone.

What is RAD Server and How You Can Use It?

I’m digging the new job. Lots of interesting things going on. Lots of great plans.

Now, you may not realize it, but I’m the Director of Product Management for all the Embarcadero products,  including a very cool product named RAD Server.

Many of you may have heard of RAD Server, but aren’t exactly sure what it is or why you’d want or need it. Well, read this blog post, and you won’t wonder anymore.

At its root, RAD Server allows you to build REST Server APIs with Delphi and C++Builder. You can read up here on what, exactly, REST is.

REST is beautifully simple. It functions on the notion that the four operations of the HTTP protocol – GET, POST, PUT, DELETE – correspond quite closely to the four CRUD operations – CREATE, READ, UPDATE, and DELETE. REST (along with JSON) has to a large degree taken over what SOAP and Web Services do/did.

So RAD Server accelerates building modern REST applications, services, and micro-services with Delphi and C++ Builder. This allows you a terrific amount of flexibility. First, you can easily build a back-end for a mobile application. RAD Server can provide a JSON-based REST API that your mobile application can use to manage all its data needs. The “heavy lifting” gets done by RAD Server, and the mobile application deals entirely with JSON. Nice.

In addition, because it uses the industry standards of REST, you can build any client front-end that you want for your RAD Server application. Any tool that can consume JSON via HTTP can be used to build a RAD Server client. PHP, Javascript, Angular, C#, whatever – doesn’t matter. As the graphic below shows, you can leverage almost anything to consume a RAD Server service.


And of course, you can build a very nice REST client using the tools in RAD Studio.

Leverage Delphi and C++Builder

But the real power comes in that you can write your code in Delphi or C++Builder. It’s pathetically easy to create a powerful set of REST API endpoints using a RAD Server plugin built with Delphi. You have total control over the URLs and the results of those URL requests. You can use FireDAC to access your favorite backend database. You can, literally, build any REST service with the full power of RAD Studio. Another cool thing – it’s naturally really easy to leverage your existing code base and transform it into a REST API.

Built-in Services to Get Up and Running Fast

But wait, there’s more! RAD Server includes a full-featured set of built-in core services to power application back-ends, meaning that you don’t have to build any of them yourself. Such core services include User Directory services, Authentication, and Access Control, Push Notifications, JSON data-storage, etc. These services are all ready to go right out of the box.

REST API applications are different than the typical Client/Server application. You’ve heard me ranting about loose coupling for years now. Well, there’s no looser coupling than a thin REST API serving up JSON. Separating business logic from the client is a natural as falling off of a log. Basically you are building a different form of a multi-tier application. Thus, RAD Server is a great complement to DataSnap by providing another, industry standard way to build multi-tier applications.

Want to get started? RAD Studio Enterprise includes a test version of RAD Server that allows you to build RAD Server applications via packages.  It’s very easy to get going. 

A Simple Use Case

One of our customers had a client server app for order management. In its old form, a separate server was installed at every store. The development team used RAD server to re-architect the front-end with a Javascript Angular web-based client and the back-end with RAD Server.   In only three months, they had a robust application that can service a host of new stores with minimal infrastructure investment. At first, they were considering a costly parallel Java development that was going to take over six months and require a whole separate team. Want to find out more about this customer? Watch this great video by our partner Malcolm Groves of CodeInsight.


There never has been a better time to move to a multi-tier architecture that separates your concerns and makes your applications both easier to maintain and more flexible. RAD Server allows you to migrate existing code to a more robust, modern architecture using REST APIs. Keep your eyes peeled for a Webinar covering all of this in the coming weeks.

In addition, we’re going to be running some pretty compelling sales programs that will make it easier than ever to get started with RAD Server. All in all, RAD Server is a bargain and you should give it a closer look.

Flotsam and Jetsam #116

  • The Starter Version of Delphi is currently 100% off.  I.e.  Free as in beer.
  • The proper use of comments is to compensate for our failure to express ourselves in code.” – Uncle Bob Martin
  • I continue working hard on my materials for Delphi Developer Days.  If you haven’t signed up yet, do it.  I’m really looking forward to seeing you all there.
  • I’m really looking forward to attending TechBash 2016 at the end of the month here in the Poconos in Pennsylvania.  Not only will there be a great lineup of speakers and a great venue, there will be some old friends there that I’m looking forward to seeing again.  It’s nice to have a world-class event like this so close to where I live – it’s so close that I’m driving, as well as taking advantage of the water park.  🙂
  • And while we are on the topic of conferences, I’ll be at Philly CodeCamp this year as well, on October 21-22.  It’s at the Microsoft Malvern office.  Friday is a pay-for-it all day session, where Saturday is hour long talks and is totally free.  If you are in the area, you should go.  It’s always been very good, and they give away a lot of prizes.
  • The new book is drawing closer.  I know I keep saying that, but I only so because it is true.  It will finish sooner rather than later.  As always, you can sign up to  be kept abreast of things.

Delphius and Basicus Stop for the Night

Delphius and Basicus were on a long journey, requiring several days travel.

They stopped for the night at a campsite beside the trail.  It had obviously been used as a campsite previously, as there were many signs of previous inhabitants.

Delphius and Basicus made camp and slept comfortably, for their journey was long and they were tired.

In the morning, Delphius began cleaning up the remains left by previous users of the site. 

“Why are you cleaning up another’s mess, Delphius.  They should have done it.  Why are you doing it?” said Basicus.

“Because someone else will want to use this site in the future, and we should do what we can for those future residents,” said Delphius.  “Those residents might even be us on the return journey.”

Delphius and Basicus continued on their journey.  Basicus remained puzzled, but Delphius knew the wisdom of his actions.

Flotsam and Jetsam #115

  • I put up a poll on Google Plus asking what the greatest all time Delphi freeware/open source plugin/framework was.  Thought you might like to vote.
  • Work continues apace as we continue to prepare for Delphi Developer Days.  I’m happy to say that there will be six folks attending in Baltimore from my employer, Gateway Ticketing.  I’m really looking forward to seeing so many Delphi developers from all over the world.  Sign up today if you haven’t already.
  • Remember, the price for the Coding in Delphi Bundle remains at the low price of $54.99 (You can pay more if you want. <g>).   That’s a savings of just over $25 when buying both individually.  Thanks to everyone who has bought the bundle already.
  • Jason Southwell is a friend of mine and a fine contributor to the Delphi community.  His company, Ideal Software, is looking for a Senior Developer.  Sounds like a good opportunity to me.
  • Shameless Plug:  My wife is an artist and writer.  She has a fun coloring book designed for all ages called “Color the Cats”.  Give it a look.
  • My latest book, Dependency Injection in Delphi, is still in the works.  I know I said that a while ago, but it always takes 90% of the time to finish the last 10%, right?

Delphius and Basicus Find a Wall

Delphius and Basicus were walking down a path.  Delphius was a wise software developer with many years of experience.  Basicus, Delphius’ student, had some experience as well, but lacked wisdom and often made foolish errors.

As the two were walking, they came upon a wall blocking the path.  The wall was made of stone and was not high – it could be easily climbed over — and not wide, the brush on either side could be easily walked through.

“What a stupid place for a wall!” exclaimed Basicus.

Delphius considered the wall. 

“Clearly someone put this wall here on purpose,” he said.

Basicus scowled.  “Why would anyone be so dumb as to put a wall in the middle of a path?”

“At the moment I do not know,” replied Delphius.

“I say tear it down!” Basicus cried out.

“One must be very sure about tearing down a wall so carefully constructed,” replied Delphius.  He walked around the wall, through the brush, and on to the path on the other side.

Basicus reluctantly followed.

Flotsam and Jetsam #114

  • Signups are open for Delphi Developer Days.  Remember, the “Very Early Bird” special price ends on August 12, so start planning now.  I love presenting and hanging out with Delphi developers, so I hope you’ll be at one of the events.  Should be a very fun time all around.  And of course, if your company wants to help sponsor the event, then please be sure to contact Cary via the website.
  • RAD Server is the latest “official” product at Embarcadero.  (It previously was known as the Enterprise Management Server and was a feature of high end Delphi SKU’s).  This is a cool tool.  It’s basically an “AppServer” to Delphi as AppServers are to Java Enterprise Beans (or at least as I understand it).  It in effect makes it pathetically easy to build REST APIs.  Microservices are all the rage, and so this is a well-timed release.  I’m definitely going to investigate it.
  • Book Update:  You can find out the basics of my new book here. You can also sign up to get email updates, and help me price it by letting me know what you’d be willing to pay.  Currently the book is being proof-read and is under technical review.  I can’t say for sure when it will be available, but it’s definitely in the “The last 10% takes 90% of the time” stage.  I just realized that I hadn’t covered attributes enough, so I’m going to have to add a section on that. 
  • I simply cannot say enough good things about CodeInsightPlus.  Here’s the one thing I will say. If you value your time even slightly, get it and install it now.
  • This blog post by Marco started an interesting discussion.  For what it’s worth, I stand on the side of proper encapsulation, after having originally been on the other side of the argument.

Delphi Developer Days 2016

I’m quite happy to announce that I’ll be part of Delphi Developer Days with Cary Jensen this year.  I’m honored to be included, as DDD has long been a successful, interesting, and educational event.  I’m joining a list of distinguished Delphi speakers who have participated in the past. I’ve been to DDD a number of times and have always come away pleased that I went, so I’m glad to be on the delivering end this time.

There will be four events this year:

  • Chicago, USA: 14-15 November 2016 Register
  • Copenhagen, Denmark: 24-25 November 2016 Register
  • Frankfurt, Germany: 28-29 November 2016 Register
  • Baltimore, USA: 5-6 December 2016 Register

The complete agenda isn’t set yet, but we’ll get that out as soon as it is ready.  There is an “Very Early Bird” discount  of 25% for folks who sign up before August 12th.

I’m really excited to do these events and so I hope that I see you there.

Book: Dependency Injection in Delphi

My new book, “Dependency Injection in Delphi” is getting close to being published.  It is a deep dive into Dependency Injection and the Spring4D DI Container. 

It’s going to be about 90 pages long or so, depending on the exact size the book ends up being.  I’ll be publishing it first as an eBook, and then soon after in hard cover. 

You can click on the link above to find out more information, including the chapter list.  Please feel free to enter your email address to be notified about it being published, etc. (You don’t even have to let me know your email address if you don’t want to).

My previous two books – Coding in Delphi and More Coding in Delphi – exceeded my expectations, and I’m very grateful to everyone who bought it.  I know I’ll appreciate the support that Dependency Injection in Delphi receives as well.  Thanks as always.

50 Things I Don’t Like

  1. Donald Trump
  2. Heavily coupled code
  3. When people think that Delphi is dead
  4. Pineapple on Pizza
  5. Mean people
  6. Rap “Music”
  7. Not having enough battery
  8. Wires
  9. The New York Yankees
  10. Restaurants that don’t have free wireless
  11. C++
  12. Waiting
  13. Hillary Clinton
  14. Kanye West
  15. Bad grammar
  16. Stop lights
  17. Lima Beans
  18. The Caps Lock key
  19. When Windows steals the focus and your keystrokes go somewhere you don’t want them to
  20. Cleaning the bathroom
  21. Whoopi Goldberg
  22. Little dogs that yap and yap and yap
  23. When people don’t mean it when they agree to a EULA
  24. Tabs in source code
  25. Cold, rainy days
  26. Meaningless variable names
  27. The Lord of the Rings books
  28. May 4th as “Star Wars Day” (Stop talking like Daffy Duck)
  29. Cancer
  30. Mowing the lawn
  31. Delphi’s ‘with’ statement
  32. Cleaning litter boxes
  33. Headphones that tangle
  34. Smugness.  I can take arrogant, but not smug.
  35. Apple
  36. Winter
  37. Software pirates
  38. Being sick
  39. Dress codes
  40. When my team loses
  41. Long meetings
  42. Cauliflower
  43. Global Variables
  44. The Green Bay Packers
  45. Being overweight
  46. Entities that oppose Uber
  47. Badly formatted code
  48. Really spicy food
  49. Cable companies
  50. When my wife is away.

Fun Code of the Day #2: Does nil have a type?

Okay, no cheating now. That is, no running the code until you’ve guessed.

What is the output of this code?

How sure are you?

Now run it and find out. Were you right?

50 Things I Like

  1. Delphi
  2. The Delphi Community
  3. Clipmate (written in Delphi, by the way)
  4. Everything search tool
  5. NBA Basketball
  6. My Nexus 5x phone
  7. Visual Studio Code
  8. Notepad++
  9. Taylor Swift
  10. Bruce Springsteen
  11. Cream Cheese
  12. Traveling
  13. Evernote
  14. Being married
  15. Being a Dad
  16. Twitter
  17. Lonesome Dove
  18. Casablanca
  19. Taking a nap on Sunday afternoon
  20. Working at Gateway Ticketing
  21. Netflix
  22. The Spring for Delphi Framework
  23. The Delphi MVC Framework
  24. Patty Griffin
  25. Dogs
  26. Mat Kearney
  27. Cool Spring days
  28. Iced Tea
  29. Raize Components (and yes, I liked them before Embarcadero bought them.  😉 )
  30. Harry Potter
  31. Loosely coupled code
  32. The Minnesota Timberwolves
  33. The Chrome Browser
  34. Freedom
  35. Facebook
  36. Donating to open source projects
  37. Raspberry Pi
  38. Loyalty
  40. Butter
  41. Pickled Herring
  42. Giving presentations at conferences
  43. Writing code
  44. The Good Wife
  45. Spiderman
  46. My Roku
  47. The Caine Mutiny (The book, not the movie.  The movie was terrible)
  48. Birds of Prey – all kinds
  49. Black Panthers
  50. Wood burning stoves.

Flotsam and Jetsam #113

  • I’d like to offer my public and profuse thanks to the Danish Delphi Developers group – and most notably MVP Jens Fudge and his family – for their wonderful hospitality while I was in Denmark presenting at the DAPUG group.  I talked for two days and had a great time.  They were also kind enough to allow me to bring my 13 year old daughter along, who had a great time and a great experience.  It was my third trip there and it’s always a very, very pleasant and enjoyable time.  (Hidden secret of the conference:  The hotel is magnificent and the food – oh, the food!  — is incredible.)  Anyway, thanks very much to all involved, and again, to Jens for his always superior kindness and hospitality. 
  • I seriously think that most people don’t understand Markdown.  Markdown is supposed to be human readable and human writable.  You aren’t supposed to need a special tool to use it.  It’s so simple that you should be able to deal with it just fine in Notepad.
  • I was honored to be the MVP of the Week this week.  The best part was a chance to chat with my good friend Jim McKeeth on the Delphi Podcast.  I don’t think it is posted yet, but I’ll publish the link when it is. I appreciate all the kind words.
  • Baoquan Zuo has released a fantastic new IDE tool – CodeInsightPlus.  This thing is pure gold.  Go out and get it right now. My typing speed easily doubled with this thing, even over regular Code Insight.  My favorite feature is when you have a class named “TWidgetDatabaseProcessor” and you type “twdp” and then hit enter and it finds it and completes it.  And that just touches the surface of what it will do.  Seriously, this is really cool.   When you add this to the stuff coming from Parnassus, Source Oddity, and others, it’s a great time for the Delphi IDE. 
  • In a related matter, Delphi developer David Hoyle has released a very nice and very useful book on the IDE’s Open Tools API (OTAPI).   The best part it is actually a free PDF download.  Well worth a look.  (And David, if you want to actually publish and sell this marvelous book, please let me know. I can make that happen.)
  • Not that anyone probably cares, and not to be too much of a martyr, but I’ve quit the Delphi non-tech group.  It was just getting so tiring, and I didn’t like how it kind of made me obnoxious. I fully confess I was addicted to reading and posting there.  I decided it wasn’t a productive use of my time, and won’t be posting there anymore.  Like I said, maybe no one cares, maybe people are happy.  All I know is my blood pressure is reduced.  😉  If you want to find me, I’m active on the Delphi Developers Google Plus community.
  • Does anyone know what the hell this “Delphi Parser” thing is? Are you getting emails on it? They’ve been sending me advertising emails, and I don’t have any idea who they are or what they do.  I do know they win the prize for “The Most Expensive Delphi Tool of All Time.”  Am I missing something?
  • Have you donated to your favorite productivity tool lately?  I just made a humble donation to Test Insight.  I really like it, and so I donated.  I encourage you to do the same for your favorite tool or framework, whether it be for a Delphi tool or framework, or a general utility, or whatever.  If we all started making donations – even small ones – to those folks who make our developing and computing experiences better, well, I think that would be a good thing. Go on, do it right now.

Flotsam and Jetsam #112

  • Been a while, eh? 
  • Obviously the biggest news to cover is the Idera acquisition.  By now I’m sure you all are aware that Idera Software has acquired Embarcadero. (It always seems strange to me when a smaller company bys a bigger one, but never mind….)  They’ve done an interesting thing.  They’ve taken the Embarcadero database tools (what we used to call “DataGear”) and incorporated them into Idera’s software brand.  Then, they’ve left RAD Studio and Interbase under the Embarcadero banner as a separate entity.  I don’t know what the accounting setup is, but it does seem like a separate company altogether.  Neither website mentions the other.  Embarcadero put out a press release stating that they are exclusively focused on development tools, which I really liked to see.  It does seem like Idera wanted the “DataGear” stuff and have now set up “CodeGear” as a separate entity.  What that means I don’t know. But here’s to continued success under the new management.
  • Along those lines, I did have a conversation with Atanas Popov, General Manager for Embarcadero. He was quite confident in things going well as they execute on the roadmap.  He’s actually quite open and accessible – he publishes his email:  Don’t be afraid to get in touch with him if you have any questions or issues about the path forward.
  • I can’t vouch for the book, but you can get Delphi Succinctly for free.
  • I will be presenting two days of material at the Danish Delphi User Group at the end of April.  I’m really looking forward to it, not only for the excellent conference, but also because my youngest will be making the trip with me.  I’ve talked at this conference twice before, and it’s always been fun.  If you are in thearea and want to excellent Delphi content (if I do say so myself), then you should attend.
  • My books continue to sell, and I’m very grateful to each and everyone of you that have made a purchase.  If you still want to buy, supplies are unlimited, but don’t let that stop you!  You can buy both books in paper copy, both on  electronic copy from LeanPub, and if you are really excited, you can buy them both as an electronic bundle for a $15 savings.  Again, you have my thanks and gratitude for your purchases.  The books have been way more successful than I ever hoped.
  • The bummer news is, of course, the departure of Allen Bauer from Embarcadero. Allen is a great friend, and I wish him well on his new endeavors at Google. He was with the Delphi team from the very beginnning.  His loss is a blow to the product.  But the team isn’t just one guy, so here’s to others stepping up to fill the void. 
  • Link of the Week:  Giving up on TDD by Uncle Bob.  Apparently a guy named Ian Sommerville “gave up” on TDD, and Uncle Bob refutes his argument. Uncle Bob doesn’t pull his punches.  Good stuff.
  • Coding in Delphi Bundle

    Want to buy both of my books in electronic form?  Well now you can get a deal on it – The Coding in Delphi Bundle.  Buy the bundle and save $15!

    As always, I’m very grateful to the Delphi community for all your support.

    Flotsam and Jetsam #111

    • My friends David Millington and Roman Yankovsky have teamed up to offer a Christmas time special.  You can buy both of their tools for the price of Fix Insight.  What are those tools?  Well, David’s tool is Navigator – a powerful, easy to use way to navigate your code.  Roman’s tool is Fix Insight – a static code analysis tool.  Right now, you can get both for the price of Fix Insight – that’s a $40 in savings.  I can vouch for both tools as being very useful and of high quality.  Don’t miss this good chance to get two excellent tools at a low price.  (While you are at David’s website, be sure to download the excellent and free Bookmarks plugin. And did you know that he has some open source items available as well?)
    • ‘Tis the season for Delphi updates.  Of course, Delphi 10 Seattle Update 1 is out.  It even includes a few new features.  It is available for all people on Update Subscription.  (For those of you complaining about this, I hate to say it, but you were given plenty of warning and opportunities to get on board.)  Dr. Bob reports on two hot fixes that are also available.
    • It looks like I’m going to be speaking in Denmark in April at DAPUG’s annual conference.  I have spoken twice before, and have always enjoyed my trips there, and the fine hospitality provided by Jens Fudge and his family.  I’m looking forward to speaking there again.  Not 100% sure what the topics will be yet, but I promise it will be interesting.
    • I had a great time at EKON 19 – you should attend next year no matter where you are in the world – and the thing I enjoyed the most was my three hour seminar on Dependency Injection.  I covered Dependency Injection in Coding in Delphi,  but things have changed in the mean time, and there have been additions to the Spring for Delphi framework that make things even more powerful and capable.  So much so, in fact, that I’ve decided to write a book entitled Dependency Injection in Delphi. It will very likely be shorter than my other two books, and I think to start I’ll sell it as an ebook only (MOBI, ePub, and PDF) on Leanpub.  It will, however, go into Dependency Injection much more in depth than my two chapters in Coding in Delphi.   In any event, you can follow this link and sign up for updates about  the book and let me know how much you think I should charge for it.  There’s absolutely no time table on this – as you saw above, I have a lot of preparation to do for DAPUG – but I will be working on it.  I’ll go with “it will be available later this year”.  Again, I’m humbled and grateful by all the people who have bought my books.  

    Registering Primitives in the Spring Container

    I just got back from attending EKON 19 in Köln, Germany. I had a really good time and learned a lot. In fact, I learned the most in one of the sessions I gave – a three hour workshop on Dependency Injection.  Stefan Glienke was there – he maintains and enhances the Spring Framework – and he showed me something that the Spring Container can do that I didn’t know it could do — resolve primitive values by name and an anonymous method.

    Here’s how this works.  First, we’ll take a look at a simple class:

    This is a simple class — so simple that I won’t bother showing you the implementation, which I know you can figure out.

    What is cool, however, is that you can inject both Name and Age properties.  I’ll demo one as a constructor-injected parameter, and the other as a field-injected value.

    First, we’ll register the Name property.  We’ll get the name property using the following function that gets the user’s Windows Name:

    This is just a wrapper around the Windows API call GetUserName.  The real fun is here:

    First, we register the TPerson class so that the container can resolve things for it. Then we register a string with the name ‘name’, and delegate its “construction” to an anonymous function that calls our GetLocalUserName function. The point here is that we now have a “handle” – the string ‘name’ – to a string value that can resolve at runtime. We do the very same thing for the FAge field. That might seem like over-controlling things, but in effect it is quite powerful.  We can use it to ensure that both interface and primitive values in a class are resolved with the Container.  Imagine a constructor that requires not only interface dependencies, but a string value as well.  You can let the container resolve the values for the entire class.

    Now, all we need to do is to change the above class to have these attributes:

    Now, the Name property of the TPerson class will automatically be filled with the Windows user name without actually writing any more code to make it do that. The FAge field will be set with our favorite number ’42’.

    (The code for this application can be found here.)

    Now, at this point I bet you are asking “Why would I do that?”

    It does, on the surface, seem like a bit of overkill.  But, in the world of Dependency Injection, being able to resolve all the dependencies of a given class – interfaces, classes, and primitives  — is golden.  Not having to write code, and centralizing the resolution of constructor parameters, properties, and fields –no matter what the type — are very useful indeed.  Remember, the more you can decouple your code via the Container, the better.

    And you don’t even need but the one call to the ServiceLocator.