Latest Posts


Google Chrome - cool new web browser

Google just released a new web browser called "Chrome". I have downloaded, installed and now using it to type in words of this post. It is ellegant and intriguing. Chrome features new architecture where each browsing tab has its own OS process, which effectively creates a sandboxed environment for every session. I like the way you can dock and undock tabs with smaller and transparent display of a tab being moved. The ideas behind the new browser are very nicely explained in the form of a comic book. Another interesting aspect of Chrome is highly optimized execution environment for JavaScript programs embedded in web pages. The new JavaScript engine is called V8 and uses dynamic native code generation for faster execution times, what is discussed on the Chromium Blog and in the design docs. Google Chrome is open source under a permissive BSD license. That is really cool. 5 minute interview with some of the Chrome creators is on youtube.


posted @ Thu, 04 Sep 2008 20:30:16 +0000 by Pawel Glowacki


My Delphi 2009 Top 5

What do you like the most in the new Delphi 2009? There is an interesting thread on forum.barnsten.com. Here is my personal Top 5

  1. Full Unicode support throughout the product - from the new UnicodeString type in the compiler, throughout RTL, VCL and the whole IDE
  2. New Language Features in Delphi language - generics and anonymous methods
  3. New DataSnap architecture, based on DBX, for lightweight, client/server applications
  4. Improvements in the VCL including new Ribbon controls. A bunch of brand new VCL components, like TButtonedEdit, TBalloonHint, TCategoryPanelGroup, and improvements to existing ones, like new "Alignment" property in TEdit (finally!), support for images in TButton and many others
  5. Improvements in the IDE: new Class Explorer, new Resource Manager, Named Build Configurations and Option Sets, more flexible Project Manager.

If you want to see new Delphi 2009 features live, make sure to register for "Take a First look at Delphi 2009 and C++ Builder 2009 - Database Development - Beyond the IDE" workshops:


posted @ Thu, 04 Sep 2008 18:00:05 +0000 by Pawel Glowacki


Multicast Events - the finale

In my previous two posts I presented a technique using the new generics language feature of Delphi 2009 to create a typesafe multicast event. In the previous post, I showed how you can create a TMulticastEvent<T> instance and assign it to an event handler for an existing event on a TComponent derived type. Using the existing FreeNotification mechanism, you didn’t need to worry about explicitly freeing the multicast event object. What if one of the components in the sink event handlers in the multicast event list was freed? The good thing is that the FreeNotification mechanism works both ways. We can leverage this functionality again to handle cleanup from the other direction.

In order to implement the complete cleanup for the TComponentMulticastEvent<T>, we need to know when an event handler was added and when one was removed. To do this I added these two virtual methods to the base TMulticastEvent class (the base non-generic version). There are also helper functions, RemoveInstanceReferences() and IndexOfInstance() that can be used in descendants to remove all event handlers that refer to a specific object instance and check if a specific instance is being referenced within the list.

  TMulticastEvent = class
    ...
  strict protected
    procedure EventAdded(const AMethod: TMethod); virtual;
    procedure EventRemoved(const AMethod: TMethod); virtual;
  protected
    procedure RemoveInstanceReferences(const Instance: TObject);
    function IndexOfInstance(const Instance: TObject): Integer;
    ...
  end;

They’re not marked abstract because the immediate descendant, TMulticastEvent<T> doesn’t need to and should not be forced to override them. They just do nothing in the base class. In the corresponding Add and Remove methods on TMulticastEvent, these virtual methods are then called with event just added or just removed. Now we override the EventAdded and EventRemoved methods in the TComponentMulticastEvent<T> class:

  TComponentMulticastEvent<T> = class(TMulticastEvent<T>)
    ...
  private
    FSink: TNotificationSink;
  strict protected
    procedure EventAdded(const AMethod: TMethod); override;
    procedure EventRemoved(const AMethod: TMethod); override;
    ...
  end;

We also need to hold a reference to the internal notification sink class in order to use its FreeNotification mechanism. Here’s the implementation of these methods:

procedure TComponentMulticastEvent<T>.EventAdded(const AMethod: TMethod);
begin
  inherited;
  if TObject(AMethod.Data) is TComponent then
    FSink.FreeNotification(TComponent(AMethod.Data));
end;

procedure TComponentMulticastEvent<T>.EventRemoved(const AMethod: TMethod);
begin
  inherited;
  if (TObject(AMethod.Data) is TComponent) and (IndexOfInstance(TObject(AMethod.Data)) < 0) then
    FSink.RemoveFreeNotification(TComponent(AMethod.Data));
end;

And then the Notification on the private TNotificationSink class:

procedure TComponentMulticastEvent<T>.TNotificationSink.Notification(AComponent: TComponent;
  Operation: TOperation);
begin
  inherited;
  if Operation = opRemove then
    if AComponent = FOwnerComp then
      Free
    else
      FEvent.RemoveInstanceReferences(AComponent);
end;

In the EventRemoved method we call IndexOfInstance() to ensure that there aren’t multiple references to the same instance in the list before we remove the free notification hook. This is because FreeNotification will add the instance to its internal list only once.

So there you go, a multicast event that also performs full auto-cleanup for both the source and the sink instances. If the source instance goes away, the multicast event instance is automatically cleaned up. Likewise, if one of the sink event handlers’ instances go away, it will automatically be removed from the list so there are no stale references. Of course, I’ll remind the reader that with this implementation, it only works for TComponent derived instances. For non-TComponent derived instances, you can still use a descendant of TMulticastEvent<T> in a manner similar to TComponentMulticastEvent<T> mixed with, for instance, a technique described here.


posted @ Thu, 04 Sep 2008 00:29:18 +0000 by Allen Bauer


Random Thoughts on the Passing Scene #81

  • Redmond News: Embarcadero Advances Borland Tools  "It seems like Borland’s products might enjoy a bright future under the Embarcadero banner."  Boy, did he ever get that right.
  • I’m in Melbourne, Australia right now, and I want to get this out of the way:  The water in my tub drained out clockwise this morning.
  • Sorry to you Kiwis, not trip to New Zealand this time, but next time I come over, I’ll lobby for it!
  • Delphi: a secret weapon for Windows developers — Nice comments from Tim Anderson.

posted @ Tue, 02 Sep 2008 22:11:39 +0000 by Nick Hodges


Are there storm “clouds” on the horizon?

The move towards putting all things application on the nebulous cloud is an exciting prospect, but are we ready as an industry, as architects, as developers, and as business people, for the next leap?  Those questions are of-course important but maybe the biggest issue facing the cloud is the underlying infrastructure that supports everything about it, the Internet.

Great examples of applications that are what I call version 1.0 of the cloud paradigm are basically SaaS (Software as a Service) and include Salesforce.com, Google’s suite of products, Amazon suite of services, and many others.  This may lead to the question of what is version 2.0?  One of the promises, from my perspective, is that the “cloud” becomes a smorgasbord of available functionality.  Say a company needs ‘x’ functionality and the cloud has 30 versions of ‘x’ functionality available, so the company can select a provider that best fits its requirements.  An example of this may be a company needs some type of persistence functionality for their application and they decide to use Amazon’s SimpleDB for this functionality.

Again, I love the concept around the cloud, but I do have concerns around the stability of the underlying infrastructure, which is the Internet.  How many reports have we read in the last couple of years that the infrastructure of the internet is becoming more fragile as it continues to exponentially increase in size?  How many times does your internet go out and what happens when it does?  Will the current ISP rumblings with talk of throttling, regulating, taxing, and limiting access to the Internet and the information that one can get to going to, cause significant ripples where getting to the internet may mean something completely different to 2 or more people accessing it from the same location.

I have waved the magic wand and all of the above issues are overstated.  The internet infrastructure is fine and can handle exponential growth for the foreseeable future, and the large communications companies find they don’t have to throttle or reduce or charge extreme premiums on internet connections, all is right with the world.  Then other areas of concern around cloud computing start to pop up and they include disaster recovery and how is it affected, and how do you plan for other services not being available and rethinking responsibility of availability?  How do you offer off-line support when things go wrong?   What is the responsibility of the organizations offering services to your company if things change, go wrong, or other issues arise as they always do?

Another question that has been bothering me around the cloud is what happens if the cloud goes out?  I’ve watched and written about natural disasters and disaster recovery from those issues, but lets take a much smaller issue; what happens in your area when the power goes out for 5 hours?  Many companies send people home, factories close down, work comes to a stop.  When I think logically about cloud computing, I think that the cloud should protect me in some of the above examples, but what about the concept of mashups that help create mongrel applications from available services in the cloud and one or more services fails?  Does that mean that you as a user of a service may also be responsible for replication or services depending on the application?

Don’t get me wrong, these things can be overcome (I use this same optimism when asked a question that starts with “Can your product do” something, I response with “we build compilers.  We can do anything with enough time and money!”) with thought and perseverance, hopefully someday in the future, the ideas and concepts of building truly widespread, distributed, multiple functional applications in the cloud will be great.  But the fact still remains that moving to the cloud distributes the responsibility to 3rd parties that may not have you or your company’s best interest in mind and that needs to be accounted for, and if not, it won’t be just storm clouds, it will be chaos in the making.

Am I Wrong or Right? 

Let me know, I love feedback,

Mike

More to come…


posted @ Tue, 02 Sep 2008 18:53:59 +0000 by Michael Rozlog


Delphi Tour 2009 - Brasil

Delphi Tour 2009 

Comunidade,

É com grande alegria que escrevo este post. está chegando o Delphi Tour 2009 no Brasil, eu(Andreano Lanusse) e David I  estaremos apresentando as novidades do Delphi 2009 e C++ Builder 2009.

A agenda e o procedimento para inscrição já estão disponíveis, acesse: http://latam.codegear.com/br/delphitour/

Faça já sua inscrição, o evento é gratuito e as vagas são limitadas.


posted @ Fri, 29 Aug 2008 10:16:56 +0000 by Andreano Lanusse


Recording speaker audio (what you hear, or "Stereo Mix") under Vista

Ever since I put Vista on a Dell Latitude D810, I’ve had issues recording speaker audio on that machine. I didn’t think much of it, since I used to use another XP machine as my main machine anyway, but it recently came to a head when I got rid of my XP machine and needed to actually record webinars on a Dell Precision M6300 with Vista on it, and I once again was painfully reminded that it doesn’t work.

First I thought it was Camtasia’s fault, but not at all. It’s Dell that is disabling the functionality in their Vista drivers.

After hours of searching for a solution, I gave up and just used a cable ($5) between the head phone and microphone jacks. Worked great, except for the fact that you can’t monitor what you’re recording (unless you feed it through a head phone splitter or mixer).

Several nights later I was determined to find a solution for Vista, because I grew to hate the ridiculous cable, and after hours and hours of digging through web sites that made McAfee go insane :p I found the solution!

Install the XP driver on the Vista box in XP compatibility mode. Works like a charm!

Simply save the XP audio driver (in my case Dell’s XP driver for Sigmatel) on the desktop, right click on the file and go to the Compatibility tab and select XP Service Pack 2 for instance. Then install the driver. In my case the installer would fail on Vista, but it works just fine in XP compatibility mode.

After the driver is installed you may have to go in and actually show the disabled devices and enable Stereo Mix under the Recording tab in Sound properties.

If this helped you, please feel free to leave a comment saying so. :)


posted @ Fri, 29 Aug 2008 05:11:00 +0000 by Anders Ohlsson


Random Thoughts on the Passing Scene #80

  • I note that some of you may not realize that our newsgroups have moved.  They can now be found at https://forums.codegear.com.  Note that you can access those forums either via the web interface or with an NNTP newsreader.  I recommend Xananews — and excellent Delphi application.
  • Delphi and C++Builder in Dr. Dobbs — CodeGear Delphi 2009, C++ Builder 2009 Released
  • We’ve been demo-ing the new TRibbon controls this week,  They are really cool and powerful and should enable you to really spruce up your user interfaces.  Since they’ve been shown, I’ve been asked a couple of times "What do I need to deploy with my app to make the ribbon controls work?"  The answer is: nothing.  The ribbon controls in Delphi and C++Builder 2009 are pure-as-the-driven-snow VCL components.  There’s no runtime DLL from Microsoft or anything in there.  It’s all VCL top to bottom, left to right, and front to back.
  • Another question is about the license that Microsoft requires to deploy apps with Ribbon controls in them.  There is a license — the installer warns you about it — and you need to agree to it in order to deploy an application using ribbon controls.  This is no big deal at all.  You can find out more information about the license here.  They have an FAQ,  and you can actually sign the license here.  I just personally signed up this very minute - took about 90 seconds, and I told them the products I was registering was "My Shareware".  Nothing to it.
  • I’m going to be in Australia next week demo-ing Delphi 2009 and spreading the good word about all the cool stuff we are doing.  Should be lots of fun, especially since the gang down there is taking me to an Australian Rules Football game!  I’m then going to Japan, where I’ll get to ride the bullet train.  Fun!

posted @ Thu, 28 Aug 2008 17:10:44 +0000 by Nick Hodges


Ansioso para comprar Delphi 2009 e C++ Builder 2009 no Brasil?

Muitos desenvolvedores tem me enviado email, perguntando quando podem adquirir sua licença de Delphi 2009 e C++ Builder no Brasil, você já pode ligar e reservar a sua cópia.

O produto já está quase pronto!!! Reservando primeiro, você receberá primeiro :) !!!!

Para maiores informações, ligue (11) 2165-8000


posted @ Thu, 28 Aug 2008 16:12:07 +0000 by Andreano Lanusse


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/38478Delphi 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ć":-)


posted @ Tue, 26 Aug 2008 18:55:50 +0000 by Pawel Glowacki



Server Response from: dnrh1.codegear.com

 
© Copyright 2008 Embarcadero Technologies, Inc. All Rights Reserved. Contact Us  |   Site Map  |   Legal Notices  |   Privacy Policy  |   Report Software Piracy