Applications that use Microsoft’s .NET at the ‘back end’ and Adobe’s Flex at the ‘front end’ have the best of both worlds. Flex is a development framework for Flash which is installed just about everywhere (well, on 96% or so of computers anyway). For .NET developers, the ability to design, edit and debug Flex and .NET programs inside Visual Studio is a killer combination.
This is the story of an IDE. Over the past three years, I’ve been working on the development of a hugely complex project aimed at welding together two unrelated technologies – Flash and .NET – inside Visual Studio. This week we’ve released a product that consolidates our efforts in a uniquely powerful environment that provides a full suite of tools to design, edit and debug .NET and Flash Platform client/server applications in a single Visual Studio solution. This is just one part of the story...
With Amethyst Professional, you can debug from C# to ActionScript and back again!
When I began working on Amethyst, my company’s Flash Platform IDE, about three years ago, one of our ambitions was to enable the seamless development of mixed-language (C#/ActionScript) and mixed-platform (.NET/Flex) applications in a single, unified environment. At that time, this just wasn’t possible. A .NET developer would use Visual Studio, a Flex developer would load up Eclipse in order to use Adobe’s Flex Builder, and never the twain did meet. Not only was the editing and visual design done in different IDEs but so was the debugging. What we wanted to do was create an IDE that did everything in one place and made it possible to debug from C# to ActionScript and back again in a single debugging session. Finally, we have achieved that. The latest version of Amethyst debugs between the Adobe and Microsoft frameworks from client to server.
An overview of the Amethyst IDE
I have to own up to the fact that I personally was not involved in the development of the Amethyst debugger. I was more involved in the creation of the Amethyst Designer – our drag-and-drop design environment. However, there is a connection. The Amethyst Designer is a Flex application. But it is embedded into Visual Studio and it interacts with the Toolbox (from which components are dragged), the Properties and Events panels, the Alignment toolbar and, of course, the code editor. In other words, it is a Flex program living in a .NET world. So, for our own purposes, we needed to create the best Flex/.NET development tools possible. Once we’d done so, we were able to make those tools available for other developers too.
A core feature of the Amethyst debugger is its ability to debug multiple compiled Flash (SWF) programs running in different processes. It can ‘listen’ for SWFs and when one starts to run it is able to ‘auto-attach’. Alternatively, the programmer can select a specific SWF for debugging using the Visual Studio ‘attach to process’ mechanism. This gives Flash and Flex developers the ability to debug multiple Flash programs (say several SWFs embedded in a single web page) simultaneously so that you can break into and step through the ActionScript code of several projects in a single debugging session.
Once we’d achieved this, our next goal was to provide a similar capability when debugging a mix of Flash and .NET programs. Say, for example, you have a .NET application that includes a Flash SWF embedded onto a form. Maybe the SWF displays a graph of some kind while the buttons and data-entry fields on the .NET form control the display. It turns out that, having created a multi-process debugger for Flash, it was fairly easy to make it work in cooperation with Microsoft’s .NET debugger. By auto-attaching to a debuggable SWF, Amethyst is able to share a debugging session with the Microsoft debugger so that the debugging ‘focus’ switches between (for example) C# and ActionScript as required so that the user can debug from one to the other almost as though the .NET and Flash/Flex code were all contained within a single project.
There was still one piece missing from the puzzle, though. For efficient client/server development you are likely to need to use some additional software to provide access to data and media located on the server. WebORB from Midnight Coders does exactly that. The only problem was that WebORB didn’t ‘know about’ Amethyst and vice versa. In order that WebORB users can have the ability to create, edit and debug their server-side .NET and client-side ActionScript code, what was really needed was a version of WebORB that is integrated into Amethyst. Back in August we began work on making this a reality when my company, SapphireSteel Software, formed a technology partnership with Midnight Coders, the developers of WebORB.
The result of this is the release of Amethyst For WebORB, an optional component for the Amethyst IDE which enables tight integration of Amethyst and WebORB inside Visual Studio. With this integration enabled, it is now possible to right-click the Services node in the solution Explorer to add a WebORB service. this opens the WebORB service browser, docked inside Visual Studio. Here you can load a service and run WebORB code generators. When WebORB generates files, these are
automatically added to the Solution Explorer ready for editing and debugging.
Debugging Flex and .NET applications using Amethyst and WebORB
There have been times along the way when we have thought our goals for Amethyst were ludicrously ambitious. Then again, what’s the point of having goals at all if they aren’t ambitious? Seeing the fruits of our labour, however, is incredibly satisfying.
To try out Amethyst, download a copy from the SapphireSteel Software web site. All the professional features (plus WebORB integration) are enabled for 60 days. After that period Amethyst continues to operate as the ‘Personal Edition’ which has editing, limited debugging and IntelliSense but lacks high-end features such as multi-process debugging, drag-and-drop design and refactoring.