Impressive LiveCycle Data Services Numbers

My knowledge of Adobe’s LiveCycle Data Services platform is very limited as I’ve experimented with it only once. However, I’m impressed with the ability of the LiveCycle Data Services (LCDS) to push what seems like a massive amount of messages per second to client machines running Adobe Flash/AIR applications.

http://www.dcooper.org/blog/client/index.cfm?mode=entry&entry=084D6DDA-4E22-1671-5EFB301D42924692

LCDS in their scenario was able to push 400,000 messages to 500 concurrent clients with an average latency of less than 15 milliseconds on a single dual-processor Intel machine.

I know there were some big improvements in the network stack and polling API in Silverlight 4 (in particular the http stack added multiple messages per poll) – but I don’t know how it compares from a performance perspective to the Adobe options.

Anyone know of any real-world comparisons?

Imagine the Uproar …

Imagine the uproar if Microsoft changed the legal agreement of Windows to say:

Programs from Apple (of Cupertino, CA) may not be installed or run by any means within this operating system by any means, including, but not limited to virtual machines and web browser plug-ins. By running or installing these applications, your license to use this copy of Windows is immediately void.

Or if they changed it to:

An Application may not itself install or launch other executable code by any
means, including without limitation through the use of a plug-in architecture, calling other frameworks, other APIs or otherwise. No interpreted code may be downloaded or used in an Application except for code that is interpreted and run by Apple’s Documented APIs and built-in interpreter(s).

(license quoted from here, taken verbatim from Apple’s updated iPhone Developer Program License)

Imagine how an entire industry would have changed (and the impact if Visual Basic, .NET, etc. were never created as those violated these basic terms — even MFC would have been included.)

Microsoft has made some giant mistakes over the years. But they’ve always put developers at the front and center. Thank you for that Microsoft and keep doing it.

This HTML 5 thing sounds magical…

Steve Jobs certainly makes me want to check out the magic that is apparently HTML5.

Steve Jobs on Why He Knows Flash Sucks and isn’t worthy.

It’s amazing how apparently HTML5 solves all problems and is the best platform for doing modern application development.

Oh wait.

No, as the vast majority of applications for Apple’s mobile devices are written using native solutions (in Objective-C), with some subset using embedded web-browsers as needed. Very few are pure web.

HTML 5 clearly is the perfect development platform for all applications.

Seriously, if you’re thinking of creating an application for mobile – I too suggest you to consider creating the application using modern HTML standards rather than Flash. On that I agree with Mr. Jobs. (Especially if you’d like to have owners of Apple iPhone/iPad/iPod be users of your application).

(Aside: I do think this “Flash = Video” thing really sucks and Adobe should spend more time proclaiming that there’s more to Flash than just video. I really like the Flex framework and what AIR has done for the development community. And seriously, when is the last time you saw a really good HTML4/5 game? It’s still too hard to build things like that in pure HTML.)

Do not however choose the completely proprietary and closed system that exists for Apple mobile products using XCode and Objective-C. It’s a dead end from a portability perspective (especially after Apple banned portability platforms).

What do you do if you need lower-level access to things that aren’t available thru the HTML layer? Ask Steve about that apparently. It’s magical – so either it’s there, or you apparently didn’t need it.  (I’d actually consider creating a native app in this case and wrapping the browser and making it a blended experience with as little in the native application as possible).

It’s pretty simple to create a manifest file for your web application so users can add it to the iPhone experience as a icon that will act like any other iPhone application (you can even hide the “safari” chrome). 

By creating a mobile web application, it will be accessible on many phone and new device platform categories (maybe like the new webkit powered TomTom GPS for example).

Silverlight ChildWindows and VisualStates

Unfortunately, as of the latest version of Silverlight 4 and Blend 4, there’s a feature supportability mismatch. Blend 4’s designer may lead to you to believe and expect that VisualStates will work within a Silverlight 4 application. (It led me down that path).

In fact, VisualStates do not work directly inside of a ChildWindow. VisualStates are only applicable on the root element of a ControlTemplate or UserControl (as described here). I just spent the last 20 minutes learning about this limitation the hard way – by trying it, over and over. :)  It’s not a bug, it just isn’t supported.

If you want to use VisualStates within a ChildWindow, the simplest workaround for this problem is to wrap the content of the child window into a new UserControl and place that UserControl in the ChildWindow (as a child). You’ll need to do a little more work to expose the functionality of the UserControl to the containing ChildWindow (like OK/Cancel button handling for example), but it’s simple work. I added an event which indicates the child window should be closed:

public event EventHandler<CloseDialogEventArgs> CloseDialog;
public class CloseDialogEventArgs : EventArgs
{
    public bool? DialogResult { get; set; }

    private CloseDialogEventArgs()
    {

    }
    public CloseDialogEventArgs(bool? dialogResult)
    {
        DialogResult = dialogResult;
    }

    public static new CloseDialogEventArgs Empty = new CloseDialogEventArgs();
}

Then, it can be closed:

private void CancelButton_Click(object sender, RoutedEventArgs e)
{
    if (CloseDialog != null)
    {
        CloseDialog(this, new CloseDialogEventArgs(false));
    }
}