.NET 2.0 for Delphi Programmers
Apress, June 2006
.NET 2.0, from a Delphi point of view. Finally in print and available from
.NET is a lot like Delphi.
.NET has components, events, exceptions, interfaces, and objects that descend
via single inheritance from a common ancestor.
Delphi programmers will find .NET easier to learn than VB or MFC programmers will.
This book doesn't ask you to plow through things you already know in the
hopes of picking up a few choice bits of new information; it presents the core
concepts of the .NET world in terms of the Delphi concepts you're familiar with.
From your employer's point of view, .NET offers managed code plus
Delphi's traditional productivity advantages, without Delphi's traditional
drawback of being a niche product that few programmers know. From your point of
view, .NET offers something like a hundred times as many possible jobs - and it
puts the fun back in programming.
.NET offers what you've always loved about
Delphi, without locking you into a narrow ghetto. This book will help you
transfer your Delphi skills to the broader, brighter world outside the ghetto walls.
- Color Theory for Developers
Magazine article: DevSource, December 7, 2006
The HSB color model is a better way to think about colors than RGB. HSB tells you
why some colors are good forgeround or background colors, and why some colors go
together better than other. Examples, heuristics, and code for generating random color schemes.
- Easy Parallelization
Magazine article: DevSource, May 23, 2006
It is quite easy to take a simple iterative loop and parallelize it: the
body does an asynchronous
BeginInvoke to process each item in its own thread,
instead of processing each item synchronously. It is not much harder to use a
Semaphore to match the number of active threads to the number of processors.
- The System
Magazine article: DevSource, April 23, 2006
ThreadPool is ideal when you want to run some code asynchronously
and you don't need any special control over the thread, because the
reduces thread creation costs by reusing threads.
- Advanced Delegates
SDForum Windows SIG talk, April 5, 2006, and SacDotNet, April 25, 2006
Delegates may be the least-understood part of the CLR. Delegates look a bit like
method pointers, but the differences go well beyond delegates' multi-cast abilities.
I started with a quick survey of delegate basics, including invocation list editing
and event syntax (which few people seem to really understand). I then explored 2.0's
anonymous methods before concluding with a lengthy discussion of asynchronous
delegate execution and the system ThreadPool. I also touched on minor topics like
covariance and contravariance as well as creating a delegate instead of
repeatedly invoking a dynamically loaded method.
- Asynchronous Delegates
Magazine article: DevSource, March 25, 2006
Many people do not know that any delegate can be invoked asynchronously
(provided that there's one and only one entry in the invocation list). This is
a 1.0 feature which has only gotten more appealing in 2.0, with its expanded range of delegates.
- .NET 2.0: open types, anonymous methods, iterators, and asynch primitives
eBig user group talk, February 16, 2006
Now that .NET 2.0 is out of beta, we can use the new features in production code.
I surveyed 2.0 features and talked about how they can be used in real programs.
Open types can make code both smaller and faster. Anonymous methods make your
code smaller and clearer. Iterators make it much easier to enumerate nested
data structures. I also talked a bit about the existing .NET asynch features -
particularly the system thread pool, and asynch invocation of delegates.
- Dynamic Plugins: Using the AppDomain Class to Load and Unload Code
Magazine article: DevSource, April 27, 2005
How to load and call code in a temporary
AppDomain without affecting your
- Adding Controls To Forms
Magazine article: DevSource, August 31, 2004
How to drag a control from a custom Visual Studio tool window to a form.
- Hosting A C# UserControl
Magazine article: DevSource, August 30, 2004
A step-by-step guide to hosting a UserControl in a Visual Studio tool window.
- Delegates vs. Interfaces
Magazine article: DevSource, June 24, 2004
Delegates look like method pointers but (in .NET 1.1) delegates are slow, because they are multi-cast.
Interfaces can be faster, and more general.
- Object Oriented State Machines
Magazine article: DevSource, March 17, 2004
Implementing state machines with objects, not
- .NET Architecture, reprise
eBig user group talk, April 2003
A repeat of my BorCon talk.
(PowerPoint slides, without BorCon sponsor logos)
- .NET Architecture
Euro BorCon talk, October 2002
A programmer's introduction to .Net - what it is, and what's in it for us.
runtime functional groups; jitting and garbage collection;
common type system and language neutrality; .Net object model (like the Delphi
object model, but not identical); framework classes and "learn once, work anywhere."