Latest Posts
Polska Premiera Delphi 2009 i C++Builder 2009 - Warszawa, 12 września
Delphi 2009 i C++Builder 2009 już są dostępne! Jeśli interesujesz się programowaniem, a szczególnie jeżeli programujesz w Delphi albo w C++, nie możesz przegapić piątku, 12 września - BSC Polska organizuje premierę najnowszej wersji Delphi i C++Buildera!
Na stronie http://www.codegear.pl/seminaria/delphi2009/ można zarejestrować się na bezpłatną konferencję, która odbędzie się w Hotelu Lord w Warszawie, Al. Krakowska 218.
Od 25 sierpnia rozpoczął się cykl webinariów omawiających szczegóły nowego Delphi i C++Buildera. Szczegółowa agenda jest dostępna tu: http://dn.codegear.com/article/38478
Delphi 2009 i C++Builder 2009 zawierają wiele nowych cech, z czego najważniejsze to:
- pełna obsługa Unicode w kompilatorze, wizualnej bibliotece komponentów (VCL) i w zintegrowanym środowisku programistycznym (IDE)
- nowe elementy w języku programowania Delphi i C++
- udoskonalona architektura DataSnap do budowania wielowarstwowych aplikacji bazodanowych
Wielu programistów to również czytelnicy literatury science-fiction i fani muzyki heavy metal. Czyż to nie jest dobry znak, że w dniu premiery Delphi w Polsce, 12 września 2008, grupa Metallica wydaje swoją najnowszą, długo oczekiwaną płytę Death Magnetic"? Jestem pewien, że najnowsza wersja Delphi 2009 okaże się prawdziwym kamieniem milowym, czego również można się spodziewać po Metallice.
Jeżeli cały czas słuchasz "Master Of Puppets" i programujesz w Delphi 7, to najwyższy czas się "zapgrejdować":-)
Share This | Email this page to a friend
posted @ Tue, 26 Aug 2008 18:55:50 +0000 by Pawel Glowacki
EMEA Delphi 2009 live webinar with Nick Hodges! Tue, Aug 26, 4pm CEST
Delphi 2009 and C++Builder 2009 Are Here!
I have just finished watching the first live Delphi and C++Builder 2009 launch webinar. Nick Hodges, Delphi Product Manager, demonstrated some of the new and exciting new Delphi 2009 features including new VCL components, new Unicode support, new DataSnap architecture and new Delphi language features.
This is just a beginning of Delphi and C++Builder 2009 launch events!
Tomorrow, at 4pm CEST (or 3pm BST), Tuesday, August 26th, Nick Hodges will be presenting new Delphi 2009 specially for EMEA customers. Make sure to register here and feel free to leave questions for Nick as comments to this post.
"Delphi 2009 – What’s New?
Join Delphi product manager Nick Hodges and the EMEA regional evangelist team for this walk through of Delphi 2009. In this high level overview a number of key areas will be discussed:
- New IDE features, including new Class Explorer, inheritable build configuration and option sets and the Resource Manager
- New Unicode support
- New and enhanced VCL components
- New DataSnap architecture based on the DBX driver framework for building COM-free, multitier database application.
This is a great opportunity to hear about the new features directly from Nick and the team, and of course to ask any questions you may have."
The full agenda for live webinars with R&D engineers at http://dn.codegear.com/article/38478. At this very moment, Alisdair Meredith, C++Builder Product Manager, is demonstrating C++Builder 2009.
The full list of EMEA events is avaiable at www.embarcadero-events.eu.
Share This | Email this page to a friend
posted @ Mon, 25 Aug 2008 13:54:20 +0000 by Pawel Glowacki
Multicast Events - the cleanup
In my last post, I introduced a multicast event that uses generics to address the problem of needing to manually declare and implement a new multicaster for each unique event type. If you remember, I referred to some other posts that presented a technique for doing automatic cleanup of both the multicast event object itself and automatic removal of listeners. While the technique presented is indeed very generic and will work for nearly all instances, my only critique is that it carries a fairly heavy "contract" in order to fully realize its potential. This set all the creaky wheels moving as I tried to come up with something a little less "contract" heavy. This solution has an assumption that most events and event handlers are on TComponent derived classes. Yes, there are plenty of folks out there that use method pointers on object instances of types other than TComponent. I’m using the 80/20 rule. This will be highly useful to 80% of you out there and not as useful for the remaining 20%.
One of the main problems of a "bolt-on" multicast event class in Delphi for Win32 is proper cleanup. With normal single-cast events there is but one sender and one listener. The end-points are already presumed to be lifetime managed. For multicast events, no longer is there a point-to-point connection, but rather an intermediate "agent" that serves to translate a single event into "n" events for "n" listeners. In a nice garbage collected run-time environment, this isn’t a problem because this intermediary will be properly cleanup in due time. This is not meant to be a ding against the inherent non-GC Delphi/Win32 environment but merely that we need to be a little more creative. The good thing here is that once we’ve established this solution, you can return to your "regularly scheduled programming" and no longer worry about this cleanup.
Let’s start with a little review. TComponent and its derivatives carry the notion of "ownership" for the exact reason of not being able to rely on a GC. This model was established from the very first introduction of Delphi and the VCL. Any component that has an "owner" will be automatically cleaned up when its owner was cleaned up. In order for this to operate effectively, there was a need for some mechanism to let everyone involved know when an instance was going away. This is the reason for the Notification virtual method on TComponent. Every component that is being cleaned up, or more accurately, being removed from the list of "owned" components is sent broadcast to all the other owned components through this Notification method with the "opRemove" operation enumeration value. Initially, this notification only worked for components that shared a common "owner," which worked well for Delphi 1 and 2. In Delphi 3, form-inheritance and form-linking where introduced which allowed cross-form/datamodule references between components. For instance, the TTable component on a datamodule could now be referenced from a TDataSource component on a form. This presented a problem because the datamodule and form could have very different lifetimes and the previously mentioned notification mechanism just doesn’t work. This is when the FreeNotification() method was introduced on TComponent. This allows any component to insert themselves into the "free notification" list of another component in order to "link" them together and know when each other is going away. Now proper cleanup (such as setting references to nil) can be done even for components that do not share the same owner. We can use this knowledge to devise a solution for properly cleaning up a multicast event object.
I created the following generic descendant of TMulticastEvent<T>:
type
TComponentMulticastEvent<T> = class(TMulticastEvent<T>)
private type
TNotificationSink = class(TComponent)
private
FEvent: TMulticastEvent;
FOwnerComp: TComponent;
protected
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
public
constructor Create(AOwner: TComponent; AEvent: TMulticastEvent); reintroduce;
destructor Destroy; override;
end;
public
constructor Create(AOwner: TComponent);
end;
Since the TMulticastEvent ancestor isn’t a TComponent derivative I needed a way to "listen in" on the notifications sent between TComponents. This is why there is a private component derived from TComponent which provides the link between the multicast event instance and the component notifications. I could have simply made this private component owned by the component and not even worried about the Notification method because all owned components are properly cleaned up. However, the intent is that this internal component needs to be invisible (relatively speaking) and not show up in the list of owned components. A lot of code out there iterates through the list of owned components and performs some operation on each one. Don’t want to risk breaking that code. So, when this private component is instantiated, it isn’t "owned" by any component but by using FreeNotification, it will still know when the "owner" component is freed.
In order to make it a little easier to instantiate these multicast events I added the following public class static methods to the base non-generic TMulticastEvent class:
type
TMulticastEvent = class
...
public
...
class function MulticastEvent<T>(const AMethod: T): TMulticastEvent<T>; static;
class function Create<T>(AComponent: TComponent): T; overload; static;
class function Create<T>: T; overload; static;
end;
The first one we’ll come back to in a moment. The two overloaded Create methods will create a TComponentMulticastEvent<T> or simply a TMulticastEvent<T>, respectively. If you’ll notice that the multicast event instance is not being returned, but rather a value of the method pointer type itself is returned. This is the Invoke property. You can now simply do this:
procedure TForm1.Form1Create(Sender: TObject); begin Button1.OnClick := TMulticastEvent.Create<TNotifyEvent>(Button1); end;
Notice how that looks remarkably similar to a normal object instantiation? Cool. Uh… waitaminnit. How do I add listeners? I cannot call Add, or Remove now. One solution would be to first create the event, add the listeners, then assign the Invoke property to the OnClick event like this:
procedure TForm1.Form1Create(Sender: TObject); var Click: TMulticastEvent<TNotifyEvent>; begin Click := TComponentMulticastEvent<TNotifyEvent>.Create(Button1); Click.Add(Button1Click); Click.Add(Button2Click); Button1.OnClick := Click.Invoke; end;
Yes, that would work, but only if you know up front what the listeners would be and that the list won’t ever change once it is setup. The beauty of multicast events is that they’re dynamic and can change at run-time. Remember the first class static method listed above? This is where that cute little method comes into play. Let’s redo the above code using that method:
procedure TForm1.Form1Create(Sender: TObject); begin Button1.OnClick := TMulticastEvent.Create<TNotifyEvent>(Button1); TMulticastEvent.MulticastEvent<TNotifyEvent>(Button1.OnClick).Add(Button1Click); TMulticastEvent.MulticastEvent<TNotifyEvent>(Button1.OnClick).Add(Button2Click); end;
While the above techniques are equivalent in this instance, what if the addition or removal of the listeners occurred elsewhere? Instead of keeping a separate reference to the multicast event instance, it is simply fished out of the method pointer value itself. Also, because we know it too will be cleaned up, we can now simply concentrate on using it.
On a final note, the above implementation doesn’t currently support automatic removal of listeners when they go away, but that can certainly be done. We’ll look at that in the next installment. Your homework is this; using the class static methods above to in-turn implement class static Include() and Exclude() methods that will mimic the Include/Exclude standard functions in Delphi for .NET.
Share This | Email this page to a friend
posted @ Mon, 25 Aug 2008 17:35:43 +0000 by Allen Bauer
Delphi 2009 is Here!
Today we announced Delphi 2009 and C++Builder 2009. This is a pretty big day around here, as this release represents a big step forward. There has been a lot of work put into this release, and a lot of testing, too. Moving to Unicode and getting all the VCL and IDE features done and tested to a high level of quality has taken a big effort here, and I’m really proud of everyone on the team for pulling together and getting the job done.
You can read the press release here.
Delphi 2009 is ready to order today — right this very minute! If you are in the Benelux region, you can order from Dr. Bob.
For more information:
Data Sheet
Feature Matrix
FAQ
Top Reasons to Buy
Top Reasons to Upgrade
Third party components compatible with Delphi and C++Builder 2009
Case Study
If you are an Enterprise customer in particular, you might want to take a look at moving up to Architect. The new native Architect SKU provide some amazing database design and development features. Give it a look. Heck, even a Professional Edition user might find it interesting.
We are planning all kinds of events, webinars, etc., in the coming days and weeks. I’ll be traveling to Australia and Japan next week to do launch events, and I’ll be at the Software Developers Network conference in Amsterdam again this year.
So, don’t be the last guy on your block to get your copy of Delphi 2009. Order today!
Share This | Email this page to a friend
posted @ Mon, 25 Aug 2008 14:29:11 +0000 by Nick Hodges
Random Thoughts on the Passing Scene #79
- Jan Goyvaerts has a nice post talking about the interesting new-to-Tiburon string type called RawByteString. One thing to emphasize is that you should really never declare a variable of type RawByteString, but you should be free to use the type as a parameter to procedures and functions.
- Sounds like folks in Germany are excited about Tiburon.
- I’ve done a few demos of the new language features in Delphi, and I’ve uploaded that demo code here to CodeCentral.
- I’ve also demoed some of the new DataSnap stuff. I’ve uploaded two things to CodeCentral. The first is a demo of Server Methods, and the second demos using the IAppServer interface with the new DataSnap stuff
Share This | Email this page to a friend
posted @ Mon, 25 Aug 2008 14:19:44 +0000 by Nick Hodges
Two weeks of Delphi 2009 and C++Builder 2009 live webinars start Monday, August 25, 5am PDT
We are on the verge of the formal announcement of Delphi 2009 and C++Builder 2009. Starting this Monday, August 25, we will begin two weeks of Live Webinars for Delphi and C++Builder.
Monday morning at 5am Pacific Daylight Time (UTC-7) we begin the first of twenty-three Live Webinars timed to coincide with the publishing of the announcement press release.
Two articles have already appeared in eWeek and Infoworld online editions:
- eWeek - http://www.eweek.com/c/a/Application-Development/Embarcadero-Plans-New-Delphi-CBuilder-Releases/
- Infoworld - http://news.yahoo.com/s/infoworld/20080821/tc_infoworld/109777
The complete schedule of Live Webinars and a link to the pre-registration site can be found in the Developer Network article at
Remember, it all starts Monday Morning, August 25th, at 5am Pacific Daylight Time (UTC-7) and continues for the next two weeks. Come join the fun!
You can also see Delphi 2009 and C++Builder 2009 sneak peak videos at
http://www.codegear.com/cg-videos/
Share This | Email this page to a friend
posted @ Sat, 23 Aug 2008 01:04:10 +0000 by David Intersimone
The story behind our new algorithms discussion forum
Back in December of 2004, several community members had a conversation in our Delphi non-technical newsgroup, wishing for a general-purpose algorithms group on our server. With the launch of our public beta of our new discussion forums, we finally created that long-awaited algorithms forum.
The people participating in this particular conversation weren’t the only people who wanted a generic algorithms group, but this conversation took a funny twist when John Herbster decided to act on one of my replies in the thread. He asked what it would take to get an algorithms group, and I joked that it would take lots and lots of chocolate in small, easy to eat pieces.
Well, he decided to explore every chance to get that group live, so he actually delivered on my joke. Anders Ohlsson took the picture for me to preserve the moment.
The long wait for the algorithms forum is finally over. I’ve already personally enjoyed several of the discussions there. Remember to thank John Herbster in particular if you benefit from the discussions there!
Share This | Email this page to a friend
posted @ Fri, 22 Aug 2008 21:04:46 +0000 by John Kaster
Ready for Tiburon: TPerlRegEx for Delphi 2009
"TPerlRegEx is a Delphi VCL component wrapper around the open source PCRE library"
http://www.regex-guru.info/2008/08/tperlregex-for-delphi-2009/
Share This | Email this page to a friend
posted @ Fri, 22 Aug 2008 18:54:17 +0000 by Nick Hodges
Ready for Tiburon: The NameSpace Extension Library
NSELib - The NameSpace Extension Library — Extend Windows Explorer with your own virtual folders.
Great company name, BTW.
Share This | Email this page to a friend
posted @ Fri, 22 Aug 2008 18:49:51 +0000 by Nick Hodges
Random Thoughts on the Passing Scene #78
- Infoworld: Embarcadero to upgrade Windows RAD tools.
- I’ve published Part II of my series on Unicode: Delphi in a Unicode World Part II: New RTL Features and Classes to Support Unicode
- Tiburon Beta Blogging in Portuguese: http://blogs.liws.com.br/cesar/?cat=28
- If you missed it live, be sure to check out the replay of DavidI’s seminar on what’s new in Delphi 2009. You can watch online or download the replay entirely.
- Bruce McGee is liking the Tiburon help.
- Do not miss Barry Kelly on Generics in Tiburon.
Share This | Email this page to a friend
posted @ Fri, 22 Aug 2008 15:18:00 +0000 by Nick Hodges
Server Response from: dnrh1.codegear.com
