A Few Thoughts about Windows Phone 7 Development (so far…)

So it has been a few months since MIX and the announcement of the availability of developer tools for the Windows Phone 7 platform, and I have managed to put on at least one presentation about the upcoming Windows Phone 7. With the target of shipping in time for Holiday 2010, I feel it isn’t an unreasonable assumption to believe that the phone will probably start to surface in October / November of this year, which is only 4-5 months out. So, what are my thoughts so far?

Obviously, with the tools just at CTP-stage right now, room for improvement is to be expected. Silverlight as the primary platform for applications is a great thing, but hopefully we can move off of Silverlight 3 and onto Silverlight 4 before too long…because Microsoft is retaining control of the platform instead of letting the carriers control it (read – continue to royally screw it up), hopefully an update to the Silverlight runtime will follow before too long.

Developing against the emulator experience is nice, but lacking, and of course, we “mere mortals” don’t yet have access to real hardware. Most hardware services within the emulator are simply not available, making it challenging to pursue applications that take advantage of these services. Some solutions are available to simulate or mock the hardware input (using the Reactive extensions, etc.), but in my opinion these options put too much responsibility for anticipating the real-world hardware’s real-world behavior in developers’ hands – again many of whom have not yet had a chance to even touch a piece of real hardware. What’s more, most of the provided hardware interaction API’s expose concrete classes; for mocking and simulation, interfaces would have been better choices in my book, and would have involved fairly low overhead in the API design. Regardless, it would be nice if the emulator could provide pre-built facilities for simulating interaction with this hardware. For example:

Location Services

The emulator should provide an emulator-adjacent window with an embedded Bing Maps control. The phone’s hosted virtual OS should have a hardware driver that uses the map’s coordinate values and updates instead of an actual GPS receiver. From a developer’s point of view, this would be preferable to any option that used the host PC’s GPS, as the software could be tested without taking the host machine literally “out for a drive.”

Accelerometer

Another external device, the emulator’s accelerometer data should also be provided by an external UI. There are plenty of applications available today that provide interaction with a 3-d view of an item (I know I have used the one at ClosetMaid several times to help design the layout for closet storage in my own house), and such a UI would again be an interesting option for testing applications (without trying to physically rotate a development system.)

Other Hardware Devices

For most of the other hardware devices, the emulator application should provide access to the devices of that type on the host machine. Connection to a specific device should be available through options in the emulator’s host application (such as which web-cam to use of those available on the host machine, which microphone to use for input, etc. See Skype as a reference application for choosing these settings.)

Figure 1 – Conceptual Thoughts on Extending Hardware Emulation for the Phone

In Summary

Obviously, this writeup has been more critical than complimentary. Just because QA people focus on reporting defects, doesn’t mean that don’t like or believe in the product they are working on…they just want it to be better. My intent here is the same. Having focused my development career (so far) on the Microsoft stack, and seeing that mobile/smartphone applications are going to continue to be more and more important as development targets, I am anxious and eager for Redmond to get this right. The readiness of useful, well-written applications in the phone Marketplace will be critical for the success of this platform (Microsoft is clearly aware of this – just look at the “Hey Windows Phone, I Need This App” contest.) The quality and completeness of the tools that we as developers have available will directly impact the quality and completeness of the applications that will make it to the Marketplace.

New Hampshire Code Camp Content

Another code camp under my belt, this time the NH .Net Code Camp…I swore after the last code camp that I would never do 2 presentations in one camp again. This time I did 3. I won’t promise not to do that again, because at the rate I’m going, I’ll end up doing 4.

The first presentation was An Introduction to Silverlight Development. Despite pruning some content from the last time, I still ran a little long, so the presentation still needs some tuning. CONTENT HERE.

The second was my talk on Silverlight Line of Business applications. I made one glaring mistake, but thankfully I was able to recover (and remember to add the OrderBy statement to the Domain Service.) CONTENT HERE.

The final presentation was Windows Phone 7 Development with Silverlight. This was the first run for this demo, and it (not unexpectedly) needs work, plus the fact that it is CTP code and the inherent limitations…I am extremely interested in the upcoming Windows Phone product and the idea that it brings development for the new-generation smartphones to the .Net/Silverlight development crowd. I really hope the teams responsible for orchestrating both the initial release and subsequent updates gets this 110% right. Time will tell, but I am hopeful. CONTENT HERE.

Also during the day I saw Talbott Crowell’s talk on F# and Silverlight, as well as John Bowen’s talk on “Thinking in XAML.” There was a great little insightful moment during John’s presentation where he put together a really good description of the relationship between Controls, Templates, and Styles. I’ve heard and red various descriptions of this relationship, but for some reason this one resonated. To paraphrase the explanation a little bit… CONTENT HERE.

“A control is a set of behaviors defined in code, NOT what you see on the screen. (Eg a button is really defined by a click behavior, not a grey rectangle.) What you’re seeing rendered on the screen is not “the control”; it is the result of interpreting / processing a Template for that control. Styles are a collection of desired values applied to behaviors or properties.”

This camp was also unique in that I was able to volunteer some time to help organize the event (I coordinated the day’s schedule and pulled together the syllabus content as well as the review forms.) Seeing things from behind-the-scenes provided an interesting point-of-view. Many thanks to Pat Tormey and the rest of the organizing crew for pulling the event together.

I also have to mention a couple of upcoming related and worthy events that unfortunately I cannot attend for personal reasons – the New England GiveCamp (June 11-13), and the Connecticut Code Camp (June 19).

As always, many thanks to my wife, kid, and cats for putting up with me in the weeks leading up to the event.

Visual Studio 2010 Tips & Tricks

Visual Studio is a great tool for developing code for the Microsoft technology stack. There are other players out there, but so far, Visual Studio is the king of the road. Most of the developers I know spend the majority of their time working in Visual Studio in one way or another. However, like many productivity applications that have been around for as long as Visual Studio has, the list of commands tends to have grown much larger than many people actually realize.

Up until recently, Microsoft’s Sara Ford had been publishing a daily “Visual Studio Tips & Tricks” Blog target at Visual Studio 2008. She was even able to put together a book of these tips, the profits of which were used for Hurricane Katrina relief in Mississippi. Recently, Sara has passed the mantle on to her Microsoft colleague Zain Naboulsi, who publishes his daily tips here.

While Zain’s tips focus on Visual Studio 2010, he has been good enough to be sure to call out which ones are also applicable to earlier versions of Visual Studio.

There’s also a Visual Studio 2010 Extension that will put the tips right into your Visual Studio Start Page.

 

Enjoy!

Boston .Net Code Camp 13 Content

I had the chance to speak about Silverlight again at the latest Boston .Net Code Camp… Two presentations this time, and the “demo gods” were fighting me all the way there (an external HDD flaked out on me 2 days prior, losing a couple nights’ content. Important lesson about backups re-learned…) Several really late nights later (and endless patience from my wife, daughter, and cats) I pulled things together again.

I gave two presentations. The first was an introduction to Silverlight development. One of the downsides to doing anything whose title starts with “An Introduction” means you get the first slot in the AM, long before the caffeine has had a chance to seep in. It went OK…I think I let the early introduction linger too long and didn’t dive into the code early enough, rushing the latter part of the conversation.

The second presentation went over using Silverlight as a tool for business applications…after some early hiccups it went fairly well. Showing the SL Toolkit’s Graphing capabilities for data expressiveness was well received, as was using the Bing Maps API to geocode addresses. The ease of printing in Silverlight also got some good reactions.

I have uploaded slides and code – the Intro content is available HERE and the Business content is available HERE. Note that the demo that includes interactive Bing Maps has had my personal access key removed/sanitized. To obtain your own key, please visit URL and substitute your key in the MapHelper class constant that contains the test “YOUR OWN KEY HERE.” You can obtain your own app Id here: http://www.bing.com/developers/appids.aspx

Also, I found out what why the printing demo cut off the map. Because I was just using a stack panel and taking the screen elements as laid out, when using the resolution of the projector at the presentation, some extra whitespace was included in the text address portion of the display. I slightly changed the layout of the grid used in the text portion, then changed the printing code to use a grid instead of a stack panel (in order to dynamically adjust the amount of space between the address and the map.)

Enjoy! I would like to extend my thanks to Chris Bowen, Chris Pels, the sponsors, speakers, and especially the attendees. Please let me know if there are any questions.

Looking Back at PDC 2009 – General Thoughts

So coming home from PDC turned out to be much different than expected…my wife has been bedridden with a cold since I stepped back into the house on Friday night. I was hoping to reflect a lot more on PDC over the weekend, but alas that was not to be (although it was nice to spend so much time with my daughter after being gone for a week.)

I got a lot out of PDC, but like a lot of things, it may not have been what was directly intended to be delivered, but rather what was between the lines that mattered. It was hard to get a solid track for session attendance – I tended to be all over the place…I think my next conference will have me going to a very narrow-focused set of sessions and then catching the videos for what I missed. Regardless, having the videos available is handy, and I’ve already watched several for sessions that I had to skip for one reason or another.

From a high-level, my thoughts are as follows:

Azure: Raymond Chen once blogged about the true measure of when a project is “real” being when stakeholders start talking more about what it won’t do than about what it will do. Azure seems to be there. A lot of the general-high-level functionality is in place, and they’ve managed to plugged some significant holes in very short-order (eg. single sign-on…) “Dallas” is big, and I think that once I am able to cobble together some demos, some people I know will find it irresistible. The general place where Azure lives and/or will live is in the ability to scale ASP.Net applications up to Azure (an interesting idea is to keep existing data centers, but use Azure for redundancy and for elastic scaling…) and soon to be able to revert Azure applications back down to ASP.Net and private data centers.

Silverlight: With the enhanced LOB features in SL4 (printing, right-click context menus, shared assemblies, etc.) and especially with the ability to run standalone SL with enhanced trust, the line between SL and WPF is getting incredibly blurry. Bottom line, Silverlight continues to be a platform worthy of the time spent becoming familiar with it.

Parallelism: The content here was not really new – Moore’s law seems to still be predicting 80 core machines in the not-too-distant future. The new .Net 4 support for parallelism builds nicely on top of what is already in the framework, but unfortunately there’s still nothing to replace the requisite “InvokeRequired” boilerplate checks at the presentation layer. This becomes problematic when a layer outside of the presentation layer gets refactored to use threading…the UI layer isn’t written expecting it, resulting in a runtime exception. Ideas involving an application-level attribute or other high-level approach to baking the thread marshaling code into the UI framework controls themselves would probably go a long way, and conversely, the absence thereof will probably stifle the extensive use of parallelism in real-world applications, due to the perceived complications that its inclusion introduce.

Data: Put simply – goodbye LINQ-to-SQL. With EF4, there’s really not much need anymore. The ability to come at data from either model-first, code-first, or database first is really helpful…from my perspective, when doing “Greenfield development“, the Model is My Truth, and both the code and the database are simply implementation artifacts.

What was missing: Ray Ozzie’s talk of “Three Screens and the Cloud” began to ring hollow when it became clear that Windows Mobile was taking a back-seat at this conference…no talk of WM7, Silverlight Mobile, etc. What happened to the “little screen?” Just saying “we don’t have it yet, but we’re working on it and just wait…it’s going to be awesome” would have gone a long way. Not mentioning it actually turned it into the 800-lb gorilla in the room.

Also, what happened to the Live Services story? What about Live Mesh? It looks like these topics are being taken back into the garage for a retune, and their inclusion in last year’s introduction of the Azure stack may have been inadvertent noise. I have found Mesh in particular to be a very useful tool, but its lack of any relationship whatsoever to SkyDrive is perplexing.

Finally, if this year is any indication (and it may not be), it looks like the PDC may be being positioned for a new identity. With other conferences like Mix, SQL-PASS, and SharePoint-specific conferences, among others, it may be time to make TechEd IT-specific and bring TechEd’s developer content into PDC. I felt the “split approach” taken by TechEd in 2008 (1 week for dev, 1 week for IT) worked out nicely. Time will tell…

As I said, it was a good conference for many reasons for me. In addition to the show contents, there were interesting networking experiences. I’ll be posting about individual technologies in the coming few days.

I’m Off to PDC (or Contracting Encephalitis)

I’m off to this year’s PDC event in Los Angeles. From the logo, it looks like attending this conference will result in horrific brain swelling. It’ll be several days of immersion into the latest and upcoming Microsoft development stack. This year, I’m particularly interested in Silverlight, SharePoint 14/2010, Azure, and what’s new in parallelism. I’m also looking forward to being able to engage with representatives from JetBrains, DevExpress, and RedGate (especially in regards to the exciting new things they are doing with Reflector Pro!) to discuss their productivity tools and their inclusion in Visual Studio 2010.

I’ll be at the MSDev Booth on Wednesday from 12-12:45 as part of the Partner program, basically to let people know of my and Burntsand’s success stories with the Microsoft tools and products.

MaxiVista is back!

It always felt a little odd that a product called MaxiVista was (somewhat) incompatible with Microsoft’s Vista OS. However, after a bit of a wait, the folks at MaxiVista seem to have overcome their technical hurdles and the product is back with MaxiVista v4.

For those who may be unfamiliar, MaxiVista is a software application/driver that allows:

  • a remote PC to act as a second (or third, or fourth) monitor
  • remote control (K/M) of a second PC
  • clipboard sharing between PCs
  • display cloning between PCs

This all takes place over a regular LAN connection. In the past, I have used this software while traveling to allow me to use a low-end laptop to act as a secondary display to my main development PC, which is a lot more convenient than trying to travel with an actual display, LCD or otherwise. All you do is run a small Viewer application on the “slave machine” (no installer required) and the main PC can discover it and make use of it.

The product supports Windows Vista and Windows 7 in both 32 and 64-bit configurations (and of course still supports XP, 2003, 2000, etc.)

If you are as much of a fan of using multiple-monitors as I am, MaxiVista is definitely worth a look. They do offer a time and run-limited free trial version.

Vermont Code Camp Content

 

Yesterday was the Vermont .Net User Group’s first Code Camp. They put on one heck of an inaugural event. It was well organized, well attended, the facility (Kalkin Hall at the University of Vermont) was great, and they had great sponsorship. All in all, Julie Lerman and her team did a fantastic job.

Because there was so much interest, presenters were mostly limited to just one presentation, so I condensed my Silverlight for Business presentation so I could include new content for RIA Services. I have uploaded the presentation materials, and they are available here.

Again, many thanks to the event organizers and the sponsors!

Silverlight Research Links Updated

I have updated my collection of Silverlight Research materials that I have been using to back my Silverlight
presentations. The links (now the graphic makes sense, right?) have been categorized into “logical” groups (your mileage may vary) and a section has been added for several books that I consider good references on the topic. Anyway, the content can be found here. Enjoy!

New England VB Professionals Presentation Overview

I had another chance to get in front of a User Group – this time the New England Visual Basic Professionals to discuss Silverlight for Business. I changed up the presentation a bit, removing the discussion of Authentication and Membership and replacing it with a quick discussion/overview of .Net RIA Services. It also was my first opportunity to show some of the new features and tools available in the recently-released Silverlight 3.

I have posted the latest version of the presentation slides, code, and “script.” As usual, the script is an interactive PDF version of the mind-map that I use, and it includes hyperlinks to the references for the pertinent topics covered in the presentation. To use it, start at 1:00 and work through the topics in a clockwise rotation. The content is available here.

I went through a lot of research material getting ready for this presentation, and I will be updating and organizing the Silverlight Research section of my SkyDrive storage area to reflect that over the next couple of days.

Many thanks to NEVB’s Andrew Novick, as well as Dean Serrentino and Teresa DeLuca from the New England ASP.NET Professionals User Group for their help and hospitality.