Could someone point me in the direction of some good resources on Delphi component development (VCL or FMX)? I've been trying to get into component development for years now, but I usually end up giving up after a couple of days. I've picked up some tricks from studying existing components, but I'm looking for actual guides/tutorials to get a better understanding of the actual process and it's complexities. The docwiki does have some interesting information on the concept, but it seems to be limited. I don't mind buying a (e-)book if that's necessary.
Lars Fosdal These books are pretty old though, are they still "relevant" to the newer versions of VCL? I know VCL is pretty backwards compatible, but still...
ReplyDeleteThey are highly relevant, Frédéric Hannes. In fact, they are considered as the definitive works on the subject. Yes, there are changes in certain areas - especially when it comes to IDE integration - but generally speaking, that is mostly about updates to the IDE and designer integration APIs. When it comes to the pure component design - these books are still it.
ReplyDeleteSomeone should do a new book on the topic, IMO - one that covers FMX as well as VCL.
Lars Fosdal To be fair, they are (apart from the CWG) the only works on the subject, so would have to be definitive.
ReplyDeleteOn the subject of the CWG, one of the points is hammered home was that components must be contract-free. So often I encounter components which clearly fail that criterion. The most common examples which come to mind are sequential dependencies.
A new book on the topic would be very welcome, but likely, I'm afraid, to be read by very few, and those few would probably not include the component writes I most wish would read such a book. Or even re-read the CWG. ;)
I had actually forgotten about the CWG!
ReplyDeletehttp://docwiki.embarcadero.com/RADStudio/XE4/en/Component_Writer's_Guide_Index
Lars Fosdal Shame! ;) I'm afraid you are not alone!
ReplyDeleteLars Fosdal A bit of surfing shows me two things in the XE4 CWG: First, that the CWG has been updated compared to older versions available in PDF, and second, that there appears to be no content regarding components for other platforms than Windows.
ReplyDeleteI'm surprised Ray Konopka has been mentioned yet. I thought his book - Developing Custom Delphi 3 Components - was considered the bible on writing Delphi components.
ReplyDeleteHere's his talk on FireMonkey components:
http://youtu.be/3X12IHOsXB8
jeff weir Ray's book was mentioned in Lars' comment.
ReplyDeleteBill Meyer Oops. I forgot to Read more...
ReplyDeleteOk thanks for summing that up. Once my finals are over, I'm going to have a look at these.
ReplyDeleteFrédéric Hannes Do begin with the CWG. It is foundational, and harps on some key concepts, such as making components "contract-free". The others also assume you have read the CWG, as I recall. The CWG is dry; the others are a better read, but you will benefit from them all.
ReplyDeleteHere's a bunch of FireMonkey component development references.
ReplyDeletehttp://www.tindex.net/FireMonkey/ComponentDevelopment.html
Frédéric Hannes If you tell us what type of component you have in mind and which issues you have, then we could give you some advice about how to write the required code. In my opinion, writing components (I wrote a large number of components) is not much more complex than building "normal" classes.
ReplyDeleteFrançois Piette I don't have any specific problem (at the moment), seeing as I pushed the project aside.
ReplyDeleteFrédéric Hannes It is always better to learn while trying to solve an actual problem.
ReplyDeleteFrançois Piette I know, that's how I learned programming in the first place =)
ReplyDelete