May 2007 - Posts
Microsoft has released the newest version of the Interop Forms Toolkit. You can download it here. Clarity created the first version of the toolkit aimed at simplifying the process of migrating VB6 applications to .NET. The new version goes beyond Forms, adding support for easily incorporating .NET Controls in a Visual Basic 6 Form.
MEDC was a bit of a let down this year. Last year, MS was championing Windows Mobile 5.0 and rightly so. It was a big step. This year nothing like that existed.
Windows Mobile 6.0 and.NET CF 3.5 have some cool updates. Windows Mobile Pocket PC and Smartphone are called now Windows Mobile Professional and Standard, respectively. There's a new cellular emulator and a Fake GPS emulator for developers to test with. Orcas is coming. But there wasn't that huge jump in technology.
You still have SQL Server CE. And though the name changed four times, you still only have RDA and Merge Replication. The Occasionally Connected Sync framework/components/pattern or whatever still seems to be off in the distance. Gaming and entertainment still makes up a larger portion of market share than Business/Office and Home/Education combined.
Maybe MS didn't put the effort into mobile that they did the year before. Maybe my perception is off. This year just seemed to lack some excitment. It's still mobile development, though, and that is ALWAYS cool. So hopefully I'll get my hands dirty with some of this soon. I'll be sure to post on any new excitement I learn about.
One of the cooler things I learned about at MEDC was the new Store and Forward Transport capability in the upcoming .NET CF 3.5. This allows one device to send data to a central data store and even directly to another device using the new Email trasport feature in WCF. This looks like it could really simplify data transfer in some scnearios, especially in a loosely connected enviroment. Essentially your "service" mail stays up on the server until your code pulls it down.
The new code lives in the System.ServiceModel.Channels namespace. The basic flow of the code looks something like this.
RECEIVING
- Create a WindowsMobileMailBinding
- From the binding, create a listener specifiying the channel name and email address
SENDING
- From the binding, create a channel factory
- Open the factory and create and output channel
- Create a Message that includes your serialized custom data and send it
Of course there's that's the simplified view, but seeing and playing with the code a little, it looks like it's easy enough. It's also worth noting that messages can be protected using WS-Security.
For more detailed info, checkout Mark Prentice's blog: http://blogs.msdn.com/markprenticems/archive/2007/04/25/introduction-to-the-windows-communication-foundation-for-the-net-compact-framework-store-and-forward-messaging.aspx
One of the discussions at MIX covered patterns to follow when developing with AJAX. These patterns, or maybe better called conventions, can be divided into two groups: Foundational Patterns and User Experience Patterns. Foundational patterns describe the structure of the code and resources used to develop AJAX. User Experience Patterns, not surprisingly, improve the way a user interacts with the web site.
Some of the foundational pattern discussion was not new. It's something I think we all try to do in our everyday development: separation and encapsulation. Whenever possible, separating code from content is ideal. For example, moving your custom javascript code into a separate js file can allow for content updates independent of code. Taking it a step further, the inclusion of javascript and control over the placement of content can be encapsulated into a server control creating a single unit that can be reused. I know this isn't rocket science, but in an enviroment where web tools change frequently and there are lots of options, it is nice to affirm the belief in building reusable pieces of functionality that abstract behavior from content.
The patterns that are more interesting to talk about with AJAX relate to user experience though. That's why we've got AJAX, right? AJAX exists to make it easier to build a user experience that is more intuitive, responseive and user friendly. The two points of interest we discussed related to history an user feedback.
With AJAX, you lose the postback and therefore lose the back button. That might seem like a bad thing, but instead, it can be treated as an opportunity. For example, if a user is filling out a form that adds an order, you probably don't want them to be able to go back to the form with the old values after they submit. Let's think about another example, though. You may show pictures of products that a user can click through with typical paging controls. Making them slick with AJAX is cool, but you could make the behavior of the page even more natural by allowing the back and forward buttons to do what the user expects: navigate through the images they just saw.
A future release of the AJAX Control Toolkit (man is it difficult to track what is/will be available when) will most likely offer a history server control that exposes an API for managing web browser history. This allows you to define logical views in your web site and decide exactly when to add history. You can even structure these views such that they can be accessed via a URL for bookmarking/static linking ability. For more info and the current source code for the control check out Nikhil's blog (http://www.nikhilk.net/BackButtonSupport.aspx).
Another pattern to follow relates to giving a user feedback about what they changed. One way to do this is by using the UpdateAnimation control that current ships in the AJAX Control Toolkit. A new way is using the prototype UpdateIndicator control that is targeted for a future release. I don't think the code for the control is available yet, but I'll post an update if I find it. The server side control allows you scroll to a changed field and momentarily higlighting the change. Implementing this type of behavior significantly improves the user experience and further blurs the line between web apps and richer fat client application abilities.
For more info on AJAX patterns, check out the following sites:
http://ajaxpatterns.org
http://developer.yahoo.com/ypatterns/
Robbie Bach, President of Entertainment & Devices Division, led today's keynote address at MEDC 2007. The overarching theme of the presentation was that Microsoft is known to be your connected solution in the workplace, but they want to also be your mobile solution. MS wants to give users "what they want when they want it." They are continuing to focus on expanding mobile services from both MS (SQL Server, Office, Dynamics) and partners (VCast, Yahoo!, Sling, Weatherbug, vodaphone), improve development provide tools (VS.NET), and supporting the market (Mobile Marketplace, Verisign) to foster growth in the mobile landscape.
The presentation was a little heavy of the marketing side of things, but there were some cool highlights:
- Clarity's own Jon Rauschenberger demoed a Crate & Barrel touch screen Gift Registry kiosk application, highlighting the use of Expression Blend, Target Designer and USB boot/deployment
- Microsoft Robotics Studio was demoed, using an XBOX control to drive a robot through a full 3-D, full-physics simulation environment
- Additional help for developers including SQL Server CE in-ROM, .NET CF 3.5 support for LINQ and support for unit tests
- A new technology shipping with .NET CF 3.5 Futures called Store And Forward that allows a mobile device to push data (like inventory information) through Exchange to another mobile device
- Using web services on devices (WSD) to control things like lighting and the thermostat in your home remotely
- A demo showing a full Silverlight web site running on IE mobile
Today at MIX, a new set of controls aimed at simplifying data binding in ASP.NET were announced as part of the ASP.NET Futures release. The goal of these controls is to make the process of creating a data bound web site extremely easy. The theme of the presentation seemed to be "Use these controls to rapidly develop a starting point that you can replace portions of over time." While the controls do meet this goal, there is, in my opinion, only a very small set of real world projects that would ever use them.
Some of you roll your eyes when I voice my skepticism for the magical wizardry that Visual Studio and some controls (Web or Winform) offer to make data access and display too easy and impractical for real world enterprise applications. I can usually support my position in a debate, though I many times I'm satisfied to say "it just doesn't feel right." With these new Dynamic Data Controls, though, I think we'll all be able to agree: They're just not practical for most enterprise situations.
Let's review the offering before making a full judgement, though.
The story of the Dynamic Data Controls starts by adding a data source (currently only a SQL Server database) to the App_Data folder of your web site. (You may also be able to simply select a connection string, but it wasn't clear.) Then you create a web page, optionally using the pre-built Dynamic Data Web Form template. Finally, you add one or more of the new Dynamic Data Controls and there you have it. The magic behind the curtain recognizes the columns, data types, foreign key constraints and other info about your database and wires up a fully functional read/write data driven web site. You can even skip adding the web page and with a simple tweak of the web config you can have the auto.axd mechanism create an entire site for your database.
The new release offers several new controls. The DynamicList is essentially a grid with your typical edit, delete, and row select features. DynamicDetails and DynamicInsert controls gives you a details view and the ability to insert a record. The DynamicFilter is a drop down list or radio button (or maybe another control) that filters your data source. The DynamicRSS control exposes your data as an RSS feed. Finally, there is the big daddy DynamicAutoData control that is a composite of all of the above.
All of the controls support the extender pattern of setting the ControlID property to the ID of the Control you want to use. For example, if you want to make a DynamicFilter a DropDownList with so you can handle it's events, you would set the DynamicFilter's ControlID to the ID of the DropDownList.
<asp:DynamicFilter ID="dfOrderID" ControlID="ddlOrderID"/>
<asp:DropDownList ID="ddlOrderID" SelectedIndexChanged="ddlOrderID_SelectedIndexChanged"/>
So to review, with zero code, you created a data driven web site. You can even customize some of the style and behavior. But that's it. You haven't built an enterprise LOB application. And you really can't. The meat is in the magic, and there is a little too much mystery meat for my taste. Where's the security? Where are the business rules?
Unfortunately, there is no good answer, at least not yet. The roadmap for the Dynamic Data Controls seems to revolve around the use of LINQ as the data layer and that is where you would wire up your business logic. But integration with LINQ isn't ready.
I credit the team that built the Dynamic Data Controls for creating a neat tool. But unfortuantely (at least for now) outside of a purely internal or administrative web site, I don't see there being any enterprise-level value. Oh, and the whole thing just doesn't feel right.