Rockford Lhotka

 Wednesday, January 25, 2012

I am pleased to announce that the Using CSLA 4: Windows Phone ebook is now available for purchase.

If you purchased the Using CSLA 4 ebook series you already own the book, and can download it now.

This ebook (in PDF format) demonstrates how to create a Windows Phone 7 (WP7) application that uses a business layer created using CSLA 4. This ebook also demonstrates the use of the MVVM (Model-View-ViewModel) design pattern in a way that is very complementary to the capabilities provided by CSLA .NET business objects, resulting in an application that is easy to build and maintain with clear separation of concerns between the XAML-based view, the interface control code in the viewmodel and the model composed of CSLA-based business objects. This ebook also makes use of the open-source Bxf MVVM UI framework.

The ebook includes a sample application demonstrating the concepts and techniques discussed in the book.

Here’s the high level content outline:

  1. Introduction
  2. Windows Phone
    1. About Silverlight
    2. Windows Phone Application Model
    3. Silverlight Navigation
    4. ApplicationBar Control
    5. Overview of XAML
  3. MVVM Design Pattern and CSLA 4
    1. MVVM Design Pattern overview
    2. Bxf MVVM Framework
    3. Main Shell Implementation
    4. CSLA .NET Windows Phone features
  4. Business and Data Access Layers
    1. Responsibility-driven design
    2. Domain overview and implementation
  5. Application Implementation
    1. Windows Phone project setup
    2. Main shell implementation
    3. User scenarios
Books | CSLA .NET | WP7
Wednesday, January 25, 2012 5:35:03 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Monday, December 12, 2011

One of my primary news sources is The Morning Brew blog. I have it in my RSS reader, and I at least skim through every post.

It amazes me how Chris is able to pull together the key information every day – his dedication and the quality of his work are commendable.

If you are looking for an easy way to keep up on what’s going on in the Microsoft developer world, this is your source!

Monday, December 12, 2011 5:27:50 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Friday, December 9, 2011

One of the perks of working for Magenic is that Greg and Paul (the owners) give all employees a tech gift at the end of each year.

Past gifts have included Tivo units, Xbox consoles (with and without Kinect over time), GPS units, Kindle readers, you get the idea.

This year’s tech gift: a Kindle Fire with a one year Amazon Prime subscription.

Magenicons work hard to do great work for our customers, and this is one way the company shows its appreciation for that dedication. Thank you Greg and Paul, and thanks to all the Magenic employees that make the company a great place to work!

Friday, December 9, 2011 11:31:37 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Friday, December 2, 2011

I try not to vent all that often, but this just seems deserving…

It seems like every time I install Visual Studio 2010, SQL Express doesn’t work.

I just repaved my laptop – new Win7 install, the whole works.

My previous install didn’t have working SQL Express – as in Visual Studio couldn’t create or open SQL Express files as part of a project. I’d spent a few hours trying to get it working – installing and uninstalling VS/SQL in various combinations to no avail.

The OS reinstall was, in part, because I figured I’d screwed something up so bad it just need a total restart.

Sadly, after installing Win7, Office, VS10, and then VS10 SP1 I still don’t have a working SQL Express – basically out of the box.

My conclusion? The VS10 installer is broken. What else could be wrong here?

At no point, on this new OS install, have I installed SQL Server by hand. The SQL Server install on the machine is directly from the VS10 install – and it doesn’t work.

The SQLEXPRESS service is running, but VS10 can’t talk to it.

I’m surely not looking forward to spending another ton of hours troubleshooting this problem – again. And presumably without success – again.

In short: WTF!?!

Friday, December 2, 2011 11:56:07 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Thursday, December 1, 2011

CSLA 4 version 4.2 is now released and available for download.

The primary focus of this release is the introduction of support for mono (Mac, Linux), monotouch (iPhone, iPad), and mono for Android.

This version also supports Windows Phone “Mango” (SDK version 7.1).

You can now reuse your business code across .NET, Silverlight, Windows Phone, and these newly supported platforms as well. As demand grows to build applications that must work on various mobile devices, the ability to directly reuse your business classes is compelling!

Version 4.2 also includes a number of enhancements to the existing CSLA 4 rule engine, along with various other features and bug fixes. Check out the change log for more information.

Our next step is to provide support for Silverlight 5 in CSLA 4 version 4.3, followed by support for WinRT (Windows 8) in version 4.5. The expectation is that your existing CSLA-based business classes will continue to work in Silverlight 5 and WinRT, providing even more long-term reuse, maintainability, and cost-effective development.

Thursday, December 1, 2011 2:30:06 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, November 30, 2011

I have been working with some of my colleagues at Magenic to write a whitepaper that summarizes our view on how “Windows 8” and WinRT affect existing Microsoft developers.

http://magenic.com/Portfolio/WhitePaperWindows8DevelopmentPlatform.aspx

If you’ve read my previous WinRT related blog posts you’ll see that the whitepaper is similar, but provides more formal analysis and information in a presentable format.

Wednesday, November 30, 2011 10:33:35 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Saturday, November 12, 2011

One of the primary goals for CSLA 4 version 4.3 (the next version we’ll be creating) is to improve the performance of the MobileFormattter that is used for Silverlight and Windows Phone applications. This is made all the more important, because it will also be used in WinRT applications in the future.

Sergey (a CSLA dev team member, and Magenic colleague) has been doing some heavy research into this area, and we’d originally thought to do the changes as part of the 4.2 release. It turns out that doing a really great job of optimization will require some breaking changes – at least for people who aren’t using managed backing fields. So we are deferring the bigger changes until 4.3.

In the meantime, Sergey has blogged about how to improve performance of MobileFormatter in 3.8 and 4 (4.0, 4.1, or 4.2). These are changes you can make to your CSLA codebase now if you want some of the performance benefits without waiting for the “big change” that’ll come in 4.3.

Saturday, November 12, 2011 12:41:27 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, November 9, 2011

I’m speaking at Visual Studio Live! in Orlando, the week of December 5.

Billy Hollis and I are teaching a full-day workshop on Monday, covering XAML app design and development. This is a great workshop. Billy covers user experience design, and I cover distributed application architecture. Between the two of us, we cover what you need to know to build Silverlight and WPF applications that are usable, scalable and just plain awesome!

I also have two talks during the show, covering XAML binding, and how to use CSLA .NET to build applications for the web, Windows client, Windows Phone, iOS, and Android.

http://www.vslive.com

I hope to see you there!

Wednesday, November 9, 2011 12:02:47 PM (Central Standard Time, UTC-06:00)  #    Disclaimer

Joe writes a nice summary of why a web app is not a web page – it is something different, and in important ways.

http://www.misfitgeek.com/2011/11/html5-app-versus-html5-page/

This distinction becomes very important when considering building H5/js apps on WinRT in Windows 8, or if you believe (in general) that H5/js will replace existing dev platforms like Java and .NET. For that to happen, we have to stop thinking about HTML and js as web technologies – they must be thought of as general purpose technologies that sometimes happen to be used on the web too.

Web | WinRT
Wednesday, November 9, 2011 10:10:01 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Tuesday, November 8, 2011

Disclaimer: I know nothing. The following is (hopefully) well educated speculation on my part. Time will tell whether I’m right.

I really like Silverlight. I’ve been a strong proponent of Silverlight since 2007 when I rushed to port CSLA .NET to the new platform.

In fact, Magenic provided me with a dev and test team to make that transition happen, because we all saw the amazing potential of Silverlight.

And it has been a good few years.

But let’s face reality. Microsoft has invested who-knows-how-much money to build WinRT, and no matter how you look at it, WinRT is the replacement for Win32. That means all the stuff that runs on Win32 is “dead”. This includes Silverlight, Windows Forms, WPF, console apps – everything.

(this is partially in answer to Mary-Jo’s article on Silverlight 5)

I wouldn’t be surprised if Silverlight 5 was the last version. I also wouldn’t be surprised if .NET 4.5 was the last version for the Win32 client, and that future versions of .NET were released for servers and Azure only.

Before you panic though, remember that VB6 has been “dead” for well over a decade. It died at the PDC in 1999, along with COM. But you still use VB6 and/or COM? Or at least you know organizations who do? How can that be when it is dead??

That’s my point. “dead” isn’t really dead.

Just how long do you think people (like me and you) will continue to run Win32-based operating systems and applications? At least 10 years, and many will probably run 15-20 years into the future. This is the rate of change that exists in the corporate world. At least that’s been my observation for the past couple decades.

Microsoft supports their technologies for 10 years after a final release. So even if SL5 is the end (and they haven’t said it is), that gives us 10 years of supported Silverlight usage. The same for the other various .NET and Win32 technologies.

That’s plenty of time for Microsoft to get WinRT mature, and to allow us to migrate to that platform over a period of years.

I don’t expect WinRT 1.0 (the Windows 8 version) to be capable of replacing Win32 or .NET. I rather expect it to be pretty crippled in many respects. Much like VB 1.0 (and 2.0), .NET 1.0 and 1.1, Silverlight 1 and 2, etc.

But Windows 9 or Windows 10 (WinRT 2.0 or 3.0) should be quite capable of replacing Win32 and .NET and Silverlight.

If we assume Win8 comes out in 2012, and that Microsoft does a forced march release of 9 and 10 every two years, that means 2016 will give us WinRT 3.0. And if we hold to the basic truism that Microsoft always gets it right on their third release, that’ll be the one to target.

I think it is also reasonable to expect that Win9 and Win10 will probably continue to have the “blue side” (see my Windows 8 dev platform post), meaning Win32, .NET, and Silverlight will continue to be released and therefore supported over that time. They may not change over that time, but they’ll be there, and they’ll be supported – or so goes my theory.

This means that in 2016 the clock might really start for migration from Win32/.NET/Silverlight to WinRT.

Yes, I expect that a lot of us will build things for WinRT sooner than 2016. I certainly hope so, because it looks like a lot of fun!

But from a corporate perspective, where things move so slowly, this is probably good news. Certain apps can be ported sooner, but big and important apps can move slowly over time.

What to do in the meantime? Between now and 2016?

Focus on XAML, and on n-tier or SOA async server access as architectural models.

Or focus on HTML 5 (soon to be HTML 6 fwiw, and possibly HTML 7 by 2016 for all we know).

I’m focusing on XAML, creating a CSLA 4 version 4.5 release that supports .NET 4.5 on servers, Azure, Windows (Win32), and Windows (WinRT). And Silverlight 5 of course.

In fact, the plan is for a version 4.3 release to support Silverlight 5, then version 4.5 with support for .NET 4.5 and WinRT.

I suspect that you can use Silverlight or WPF as a bridge to WinRT. The real key is architecture.

  1. An n-tier architecture is fine, as long as the data access layer is running on a server, and the client uses async calls to interact with the server. WinRT requires a lot of async, at a minimum all server interactions. Silverlight forces you to adopt this architecture already, so it is a natural fit. WPF doesn’t force the issue, but you can choose to do “the right thing”.
  2. You can also build your client applications to be “edge applications” – on the edge of a service-oriented system. This is a less mature technology area, and it is more costly. But it is also a fine architecture for environments composed of many disparate applications that need to interact as a loosely coupled system. Again, all service interactions by the edge applications (the ones running on the clients) must be async.
  3. Or you can build “hybrid solutions”, where individual applications are built using n-tier architectures (with async server calls). And where some of those applications also expose service interfaces so they can participate as part of a broader service-oriented system.

I favor option 3. I don’t like to accept the cost and performance ramifications of SOA when building an application, so I’d prefer to use a faster and cheaper n-tier architecture. At the same time, many applications do need to interact with each other, and the requirement to create “application mashups” through edge applications happens from time to time. So building my n-tier applications to have dual interfaces (XAML and JSON for example) is a perfect compromise.

The direct users of my application get n-tier performance and maintainability. And the broader organization can access my slower-moving, standards-based, contractual service interface. It is the best of both worlds.

So do I care if Silverlight 5 is the last version of Silverlight?

Only if WPF continues to evolve prior to us all moving to WinRT. If WPF continues to evolve, I would expect Silverlight to, at a minimum, keep up. Otherwise Microsoft has led a lot of people down a dead-end path, and that’s a serious betrayal of trust.

But if my suspicions are correct, we won’t see anything but bug fixes for WPF or Silverlight for many years. I rather expect that these two technologies just became the next Windows Forms. You’ll notice that WinForms hasn’t had anything but bug fixes for 6 years right? The precedent is there for a UI technology to be “supported, stable, and stagnant” for a very long time, and this is my expectation for WPF/SL.

And if that’s the case, then I don’t care at all about a Silverlight 6 release. We can use WPF/SL in their current form, right up to the point that WinRT is stable and capable enough to act as a replacement for today’s Win32/.NET applications.

Tuesday, November 8, 2011 8:51:12 PM (Central Standard Time, UTC-06:00)  #    Disclaimer