Rockford Lhotka's Blog

Home | Lhotka.net | CSLA .NET

 Friday, December 10, 2010

I just put CSLA 4 version 4.1 beta 2 online for download. This is probably the last beta release of version 4.1, so please download and try it – I appreciate any help I can get in testing these releases.

http://www.lhotka.net/cslanet/download.aspx

The primary changes in beta 2 include:

  1. Added a new Csla.Xaml.PropertyInfo control for WP7, WPF and Silverlight that is like PropertyStatus but totally non-visual. See the Samples\NET\cs\SimpleNTier solution’s WP7 UI project for an example of how this works
  2. Created a copy of the DataAnnotations functionality for WP7; this is a nice concept that Microsoft didn’t put into WP7, so I ported the parts of System.ComponentModel.DataAnnotations required by CSLA .NET, so if you have classes using DataAnnotations attributes in .NET or Silverlight, that code will now work in WP7 as well
  3. Laying the groundwork for a NuGet installer when 4.1 is released, so people will be able to download and install CSLA 4 via NuGet (thanks Jaans!)
  4. Laying the groundwork for a vsix installer for Visual Studio templates, so when 4.1 is released we can add this to the Visual Studio gallery (thanks Jonny!)

I’ve also put an updated draft of Using CSLA 4: Creating Business Objects online at http://download.lhotka.net/Default.aspx?t=UsingCsla4

This ebook is incomplete, but I’m providing work-in-progress drops of the book as I work on it. People who’ve purchased the entire Using CSLA 4 ebook series (from http://store.lhotka.net/) can download this pre-draft content. This new drop includes a lot more content than the previous drop – including the entire sections on declaring and implementing properties and methods, and a good start on the metastate fields/methods available from BusinessBase and other base classes.

Finally, I also put a top level type diagram online that is available to anyone who has purchased either the Using CSLA 4: CSLA .NET Overview ebook or the entire ebook series. It is available from the same download.lhotka.net web page.

Books | CSLA .NET | WP7
Friday, December 10, 2010 3:25:51 PM (Central Standard Time, UTC-06:00)  #    Disclaimer

Apparently music subscription services are struggling to gain traction

http://www.zdnet.com/blog/bott/more-itunes-alternatives-can-a-subscription-music-service-ever-succeed/2770?tag=nl.e539

I can understand that, because I was an anti-digital-music person for a long time. My thought was that I had no reason to pay for a music subscription when radio was free.

Of course radio isn’t free, and over time (as I’ve gotten older?) I find the DJ dialog and commercials on radio to be increasingly annoying. To the point that radio costs way too much – there’s less music than drivel and I just can’t take it.

The other alternative is to buy CDs, rip them and create your own collection. That way you “own” the music. And certainly compared to buying digital MP3s it is better to buy the CD. I’ve “purchased” digital music several times over the years, and several times I’ve had the originating company go out of business and so the DRM locked me out of my “purchase”. And I’ve had hard drive failures, and so lost my “purchase”.

Sure, a CD can get scratched, but if you buy a CD, rip it and then only use the digital copy, you always have the pristine master source, even in the case of hard drive failure.

However, a CD costs around $12, and zune.net costs $15/mo. So I can buy around 12-13 CDs each year, or I can spend the same money to have access to a few hundred thousand songs. Even over my entire lifetime, at 12 CDs per year I’ll never get a collection the size I have access to via zune.net.

So radio is out (because it just sucks), and buying CDs isn’t really cost-effective.

But there are streaming services like pandora and last.fm and others. They are free, or at least cheaper than zune.net, so why not use them?

I used to use pandora, but it started getting pretty flaky with its song selections. Lately I’ve been using last.fm because they came with my xbox gold subscription (and zune.net didn’t until recently). I like last.fm, they do a good job and they stream to my xbox and my Windows Phone 7.

However, streaming services don’t work when I’m on an airplane, in a hotel (you never get good bandwidth in a hotel), in northern Minnesota camping or fishing, etc. Basically they are for city people who don’t travel, not for people like me who travel and/or spend a lot of time in rural areas.

So how does zune.net differ from things like radio, CDs or streaming services?

For about $15/mo you get this:

  1. Access to several hundred thousand songs via streaming
  2. 10 free purchases (DRM free) each month (basically I get to “buy” for free almost an entire album every month)
  3. Smart DJ, which does what pandora and last.fm do: creating a themed “radio station” drawing music from my personal library plus the entire zune library (those hundreds of thousands of songs)
  4. The ability to sync Smart DJ playlists to my zune device or Windows Phone – so that music is available when I’m entirely offline

So think about this. For just over the price of a CD I get (more or less) a CD’s worth of music I actually own each month. I figure that’s $10 of the $15 covered each month right there.

But more importantly, for my other $5/mo I get unlimited streaming just like pandora or last.fm – and in a form that works when I’m entirely offline like on an airplane or sitting on a lakeshore in far northern Minnesota where there’s no cell coverage, much less Internet.

(it is this pure offline feature that even iTunes doesn’t have – and why zune.net is (for me) the ultimate solution)

In the end, yes, I understand the arguments against paying a subscription fee for music. But when compared to the alternatives, it has become clear to me that none of those arguments really hold water. The zune.net service is pretty much the perfect way to consume music.

Windows Phone | WP7 | Xbox | Zune
Friday, December 10, 2010 10:59:08 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Monday, November 29, 2010

One week from today, on December 6, at the Microsoft office in Bloomington, MN you can attend a free two-track .NET developer training event: Code Mastery.

This event includes content from the Microsoft PDC 2010 event, plus custom content covering topics such as:

  • Windows Phone 7 (WP7) development
  • How to really use the MVVM design pattern in WPF
  • SQL Azure
  • Combining Scrum and TFS 2010
  • Best practices for development in .NET
  • and more!!

If that isn’t enough, there’s a raffle at the end of the day, with great prizes (including an MSDN Universal subscription), and our special guest Carl Franklin from .NET Rocks! will be in attendance to spice up the event.

Register now to reserve your seat!

Monday, November 29, 2010 10:21:14 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Monday, November 22, 2010

Thanks to Russ Blair, there is now a time-based index available for the entire Core 3.8 video series.

The series can be purchased from http://store.lhotka.net.

Monday, November 22, 2010 3:05:35 PM (Central Standard Time, UTC-06:00)  #    Disclaimer

The first ebook in the Using CSLA 4 ebook series is now available.

Using CSLA 4: CSLA Overview

This ebook (in PDF format) is an introduction to CSLA 4, and will provide you with an overview of the framework, its goals and its most basic usage scenarios. All other ebooks in the Using CSLA 4 ebook series assume you have read this first ebook and understand the overall architecture and philosophy of the CSLA .NET framework.

You should also be aware that the Using CSLA 4 ebook series is also available for purchase, and it will be cheaper to buy the series than every individual ebook. Obviously right now purchasing the series only gets you access to the first book, but you'll gain immediate access to all subsequent books in the series as they come online.

Monday, November 22, 2010 2:02:49 PM (Central Standard Time, UTC-06:00)  #    Disclaimer

This is the proposed outline for the Using CSLA 4 ebook series. This is subject to change, but it is the outline I’m working against at the moment as I set up packaging and pricing for the ebooks and the ebook series.

The plan is to publish seven ebooks, and each will be released in PDF format for reading on the PC or any other PDF reader.

As a special note: I have not yet found a practical way to publish in native format for the Kindle because the Kindle can’t support different fonts or tables. And believe me, I really want this on the Kindle because I love, love, love my Kindle!! But I can’t delay publishing the content while I continue to try and find a cost-effective way to create a specific Kindle version.

You will be able to purchase each ebook individually, or purchase the entire ebook series. Purchasing the series will be cheaper than buying each book individually.

Individual books will be available for purchase as they enter the draft/review phase, and will be updated as corrections are made. I am doing this to get the content out as quickly as possible. If you don’t want a draft, wait until the DRAFT designation is removed from the description of the item on the store (http://store.lhotka.net/).

If you purchase the series, you will automatically gain access to each book as it enters the draft/review phase. In other words, you are buying future access to the entire series ebooks as they come out.

Here’s the current proposed outline for the series:

  1. Using CSLA 4: CSLA .NET Overview
    1. Introduction and Installation
    2. Architecture and Philosophy
    3. CSLA .NET framework design overview
  2. Using CSLA 4: Creating Business Objects
    1. Stereotypes
      1. Editable root/child
      2. Editable root/child list
      3. Dynamic list/root
      4. Read-only
      5. Read-only list
      6. NameValueList
      7. Command
      8. Unit of Work
    2. Object metastate
      1. IsNew, IsDirty, IsValid, etc.
    3. Property declarations
      1. PropertyInfo metastate field
      2. Managed backing fields
      3. Private backing fields
      4. Child object references
      5. Lazy loading of child objects
    4. Business rules
      1. Business rules
      2. Validation rules
      3. Authorization rules
      4. Sync/async rules
      5. DataAnnotations attributes
  3. Using CSLA 4: Data access
    1. Data access models
      1. DP_XYZ invoking DAL
      2. Factory objects as DAL
      3. DP_XYZ as DAL
      4. Factory objects invoking DAL
    2. Data access technologies
      1. ADO.NET
      2. ADO.NET Entity Framework
      3. OData services
    3. Data portal
      1. N-Tier
        1. 1-, 2-tier
        2. 3-tier
        3. 4-tier (Silverlight, WP7)
          1. MobileFactory
    4. Configuring the client
    5. Configuring the server
      1. IIS
      2. Windows Server AppFabric
      3. Windows Azure
    6. Using compression in Silverlight
  4. Using CSLA 4: Security
    1. MembershipProvider authentication
    2. Windows authentication
    3. Custom authentication
    4. IAuthorizeDataPortal
  5. Using CSLA 4: Silverlight 4 and WPF
    1. Development basics
      1. WPF
      2. Silverlight
    2. MVVM design pattern
      1. Basic XAML Framework (Bxf)
      2. TriggerAction
    3. Data binding
    4. ViewModelBase/ViewModel
    5. PropertyInfo/PropertyStatus
    6. Platform specifics
      1. WPF
      2. Silverlight
  6. Using CSLA 4: ASP.NET MVC 3
    1. ASP.NET MVC development basics
    2. Controller (Csla.Web.Mvc)
    3. CslaModelBinder
    4. Html authorization helpers
  7. Using CSLA 4: Windows Phone 7
    1. WP7 development basics
    2. MVVM design pattern
      1. Basic XAML Framework (Bxf)
      2. TriggerAction
    3. Data binding
    4. ViewModelBase/ViewModel
    5. PropertyInfo
Monday, November 22, 2010 11:01:22 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Tuesday, November 9, 2010

Over the past few months there’s been this ongoing buzz about whether WPF is dead, or whether Silverlight is really mature – in short, people trying to figure out whether to use WPF or Silverlight or both.

Having worked with WPF since it came out, and with Silverlight 2.0 and higher since before it came out, I thought I’d share my thoughts.

This post flows from my experiences with CSLA .NET, UnitDriven and Bxf – three frameworks I’ve created or been directly involved with, that run on WPF (.NET), Silverlight and now Windows Phone 7 (WP7). With CSLA in particular, I’ve been maintaining this one codebase on .NET since 2001, and to my knowledge it was the first major framework ported to Silverlight from .NET. Also, as I write about this, I’m thinking about how I build XAML-based apps, using the MVVM pattern as discussed in the CSLA 4 MVVM video series and some of my previous blog posts.

The way I use SL and WPF there is no meaningful difference between them. My MVVM demos, for example, are mostly the same across WPF, SL and even WP7.

The business layer, created with CSLA 4, is typically identical across all three platforms. That’s one of the big benefits of CSLA 4, in that you can write your business, validation and authorization rules once and use them across multiple interface technologies. And with the data portal managing any interactions with the application server, you are shielded from any complexity or differences you’d normally encounter there as well.

The way I use MVVM, with a strong focus on having zero code-behind any XAML, means that nearly all interface control logic (any actual code in the presentation layer) is also reused. Any presentation layer code is either in the viewmodel, in value converters, in attached properties or custom controls. This reuse isn’t always 100%, especially when you get to WP7, because the tiny phone screen often forces a different user workflow than if you have a full-size screen like in WPF or SL. But between WPF and SL, the viewmodel code is typically the same, as is most value converter and attached property code. Some custom controls may be different – again especially on the phone.

This commonality of viewmodel code is thanks to the use of Bxf. But any decent MVVM framework will offer the same kind of abstractions, so your application code is never directly interacting with the UI shell or any platform-specific constructs or types.

With WPF and SL there are places of direct difference however, depending on how you structure your user experience.

  • WPF doesn't have a URL based navigation scheme or a navigation framework, so you have to come up with your own UI framework to manage any sort of navigation model. I usually do this by having exactly one Window, and that hosts all my content in the form of UserControl objects, but you could use many Window objects.
  • SL does have an optional URL based navigation scheme and framework, which is nice - makes things simpler. However, you can use the same "one Window that hosts UserControl objects" model just like WPF (hence my samples are the same). What you can't do is have a lot of Window objects (which to me is no loss, since the multiple SDI interface went out of style in 1997).
  • WP7 also has a URL based navigation scheme and framework. I still use the hosted UserControl idea too, and that makes a lot of the code common with SL and WPF.

I think the thing to understand, is that while SL runs in the browser, it is a smart client technology. It is far more like WPF than like HTML. In fact it is virtually identical to WPF in most ways that matter for a business app.

And the key to my success in this area, is that all my business “forms” or “pages” are always a subclass of UserControl. So every bit of meaningful UI content (forms/pages) are UserControl objects that can be hosted by the UI shell. This means that I can usually change out the shell, or even have different shell styles (URL navigation vs Outlook-style navigation for example) and this has no effect on the actual business UI elements. Yes, the shell code may be different, but the business code is unchanged.

This is one powerful technique that makes it quite realistic to create your app in Silverlight, even using the navigation framework, and then port it to WPF if you need to in the future. You might have to write some new WPF shell code, but your UserControl XAML, your viewmodels, your business domain objects, your data access code and your database remain unchanged.

Beyond UI and navigation differences, there are some technical differences between WPF and SL, including:

  • Some minor, niggling differences in XAML - this is the sort of thing I personally want fixed now that the WPF and SL product teams have merged - this niggling differences are stupid and are nothing but an annoyance – why is the binding Mode default different between WPF and SL (for example)??
  • SL requires that all server interactions be async, WPF allows sync or async - I tend to use async in both places, because the user experience is so superior with async, I can't figure out why I'd want to punish my end users just because they are using WPF
  • SL has the navigation framework, WPF doesn't
  • WPF has an application model that includes navigation, but it is hopelessly broken - it tried to emulate the worst features of the web without any of the benefits - to me this is the "ActiveX Documents" of WPF
  • WPF apps can use all of .NET, SL uses a subset - but the SL subset is everything I've needed to build typical business apps
  • WPF apps can interact with the full client workstation hardware (odd peripherals, the full hard drive, etc)
  • WPF apps are (typically) deployed via ClickOnce, SL apps are deployed transparently via the browser - so WPF is slightly more "in your face" for your users, but the difference should be pretty incidental
  • WPF apps can tap into all of DirectX, though SL now has hardware acceleration for some graphics scenarios too - so this difference is probably less meaningful for most business apps than for games
  • SL doesn't have the complexity of the legacy "crap" that comes with WPF (DataSet, IBindingList, etc) so it is a simpler, easier and more consistent programming environment
  • SL runs on Windows, in the browser, on the Mac, in the browser on the Mac, and in WP7; WPF of course runs only on Windows

Again however, I come back to the same thing - I always use as little of any platform/technology as necessary to get the job done. SL is a subset, so if I can get the job done with SL then that's the best thing to do (I can always upsize to WPF later if necessary). If I can't get the job done with SL, I'll use WPF.

In my mind it is a superset/subset decision - always default to the subset that meets your needs.

As long as you understand both technologies, you can architect your UI so transitioning from SL to WPF is relatively easy (the other way isn't always so easy - because your WPF code might use superset technologies).

In conclusion, my recommendation has been (since SL3 at least) to design your app for SL, and fall back to WPF only if SL can’t meet your needs. The most common scenarios for business apps to fall back to WPF are:

  • Your app is only occasionally connected, and is mostly offline, so you use a client-side database like SQL Express or SQL CE
  • Your app needs to interact with client-side peripherals
  • Your app needs full access to the client-side hard drive

I don’t think this is a “WPF vs SL” thing at all. I think it is a sliding scale, where you default to SL, and slide up to WPF if necessary. All the angst is unnecessary.

Bxf | CSLA .NET | Silverlight | WP7 | WPF
Tuesday, November 9, 2010 10:06:24 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Monday, November 8, 2010

This is a bit of a teaser, but I want to keep people posted on my progress.

I’m getting very close to finishing the first, and in some ways hardest, book in the CSLA 4 ebook series.

Overview Cover

It is arguably the hardest of the ebooks to write, because this is around 125 pages explaining the architecture, goals and basic design parameters of CSLA .NET. Lots of concepts, not so much code. While I’m still working on this, and will be for a few more days, here’s the rough outline:

  1. Introduction
    1. About this ebook and the ebook series
    2. Downloading, installing and building CSLA 4 and its samples
  2. Architecture and Philosophy
    1. Logical and Physical architecture
      1. 5 layer architecture
      2. N-tier vs service-oriented
      3. Applying the layers to real scenarios
    2. Managing business logic
      1. Defining a home for business logic
      2. Behavioral object design
      3. Mobile objects
    3. Architectures and frameworks
  3. CSLA .NET Framework
    1. Basic design goals
    2. Framework design
      1. Base classes and stereotypes
      2. Data binding
      3. N-level undo
      4. Business, validation and authorization rules
      5. Data portal
      6. Authentication
      7. Data access helpers
    3. Assembly and namespace organization

The next ebook will be easier and faster to write. Its title? Using CSLA 4: Creating Business Objects.

This current book should be online, in draft form at least, by November 19.

Monday, November 8, 2010 5:10:36 PM (Central Standard Time, UTC-06:00)  #    Disclaimer

Listen to an interview where I talk about CSLA 4, UnitDriven and a lot of things related to Silverlight, WPF and Windows Phone (WP7) development.

Pluralcast 28 : Talking Business and Objectification with Rocky Lhotka

This was recorded in October at the Patterns and Practices Symposium in Redmond.

Monday, November 8, 2010 10:56:59 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Monday, November 1, 2010

Halloween is over, so it is time to quit being scared and get back to reality.

This is, perhaps, easier for me, because my wife and I attended the Rally to Restore Sanity and/or Fear over the weekend. There’s nothing like being surrounded by 200,000+ sane people on a beautiful afternoon in Washington DC to refresh your spirit and appreciation for the true strength of America (and I think humanity in general).

Of course while we were enjoying great music, comedy and an inspirational speech by Jon Stewart, the Microsoft developer world was turning itself inside out with the hyperbole generated by last week’s PDC conference and some less than thoroughly explained remarks made by Bob Muglia in an interview.

My reaction, perhaps tempered by hours of restoring sanity, was relatively simple:

  1. Microsoft (and BobMu) clearly didn’t intend to gut their entire client-side development community
  2. Therefore this is just a (perhaps big) PR mistake, nothing more
  3. Therefore it is best to just wait for Microsoft to correct the mistake with clarification

I feel justified in that reaction, since we now have clarification from BobMu and SteveB:

Other Microsoft Silverlight bloggers, such as Tim Heuer, are starting to blog as well, so I’m sure there’ll be further reinforcement and refinement of these top-level responses. And I would expect to see continuing movement on the part of Microsoft and its product groups to prove their ongoing top-level commitment to Silverlight and the whole idea of a Microsoft-based smart-client experience.

I think what happened is this: at least in the US we’re just a day away from a big election. For weeks (months?) we’ve been bombarded with messages of fear and hatred from political candidates, political action committees and cable news channels. It is very challenging to maintain a positive or even moderate outlook on life itself when you are continually inundated (unless you never watch television or listen to the radio or go to your mailbox) by these vile messages from every side for weeks or months on end.

It is no surprise to me that the developers, at least in the US, fell right into the same fear/hatred mindset with the (clearly incongruous) information about Silverlight – everyone’s mind is already primed for a fight-or-flight response. Confusion leads instantly to fear, which (as we all know) leads to the dark side.

After tomorrow, the election will be over, along with the fear/hate ads. By the time our brain chemistry has returned to normal, the newly elected politicians will be well down the path of corporate-sponsored corruption and life will continue.

In the meantime, at least we now know (again) that Silverlight has a bright future as the smart client development tool of choice for Windows, the Mac, Windows Phone and other devices.

Monday, November 1, 2010 1:27:32 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, October 27, 2010

The first WP7 app built by Magenic is now in the WP7 app marketplace: GuestList.

This app allows you to easily check in attendees at an event, using EventBrite as the backend service. You create your event in EventBrite, users register through their web site, and as they arrive at your event you get the attendee list on your phone, and easily check them in right there.

Chris Williams (Microsoft MVP and author of an upcoming WP7 developer book) did the development on this project, with assistance from Donn Felker (author of a similar app for Droid). Anthony Handley (from our Magenic Studios group) created the user experience flow and look and feel.

Very exciting stuff!

Wednesday, October 27, 2010 2:25:56 PM (Central Standard Time, UTC-06:00)  #    Disclaimer

In the past week I’ve had a couple people mention that CSLA .NET is ‘heavyweight’. Both times it was in regard to the fact that CSLA 4 now works on WP7.

I think the train of thought is that CSLA 4 supports .NET and Silverlight, but that phones are so … small. How can this translate?

But I’ve had people suggest that CSLA is too heavyweight for small to medium app development on Windows too.

As you can probably guess, I don’t usually think about CSLA as being ‘heavyweight’, and I feel comfortable using it for small, medium and large apps, and even on the phone. However, the question bears some thought – hence this blog post.

I think there are perhaps three things to consider:

  1. Assembly size
  2. Runtime footprint
  3. Conceptual surface area

CSLA is a small framework in terms of assembly size – weighing in at around 300k (slightly more for .NET, less for SL and WP7). This is smaller than many UI component libraries or other frameworks in general, so I feel pretty good about the lightweight nature of the actual assemblies.

The runtime footprint is more meaningful though, especially if we’re talking about the phone. It is a little hard to analyze this, because it varies a lot depending on what parts of CSLA you use.

The most resource-intensive feature is the ability to undo changes to an object graph, because that triggers a snapshot of the object graph – obviously consuming memory. Fortunately this feature is entirely optional, and on the phone it is not clear you’d implement the type of Cancel button this feature is designed to support. Fortunately, if you don’t use this feature then it doesn’t consume resources.

The other primary area of resource consumption is where business rules are associated with domain object types. This can get intense for applications with lots and lots of business rules, and objects with lots and lots of properties. However, the phone has serious UI limitations due to screen size, and it is pretty unrealistic to think that you are going to allow a user to edit an object with 100 properties via a single form on the phone…

Of course if you did decide to create a scrolling edit form so a user could interact with a big object like this, it doesn’t really matter if you use CSLA or not – you are going to have a lot of code to implement the business logic and hook it into your object so the logic runs as properties change, etc.

There’s this theory I have, that software has an analogy to the Conservation of Energy Principle (which says you can neither create nor destroy energy). You can neither create nor destroy the minimum logic necessary to solve a business problem. In other words, if your business problem requires lots of properties with lots of rules, you need those properties and rules – regardless of which technology or framework you are using.

The CSLA 4 business rule system is quite spare – lightweight – at least given the functionality it provides in terms of running rules as properties change and tracking the results of those rules for display to the user.

The conceptual surface area topic is quite meaningful to me – for any framework or tool or pattern. Developers have a lot to keep track of – all the knowledge about their business, their personal lives, their relationships with co-workers, their development platform, the operating system they use, their network topography, how to interact with their IT department, multiple programming languages, multiple UI technologies, etc. Everything I just listed, and more, comes with a lot of concepts – conceptual surface area.

Go pick up a new technology. How do you learn to use it? You start by learning the concepts of the technology, and (hopefully) relating those concepts to things you already know. Either by comparison or contrast or analogy. Technologies with few concepts (or few new concepts) are easy to pick up – which is why it is easy to switch between C# and VB – they are virtually identical in most respects. But it is harder to switch from Windows Forms to Web Forms, because there are deep and important conceptual differences at the technology, architecture and platform levels.

I think large conceptual surface areas are counterproductive. Which is why, while I love patterns in general, I think good frameworks use complex patterns behind the scenes, and avoid (as much as possible) the requirement that every developer internalize every pattern. Patterns are a major avenue for conceptual surface area bloat.

CSLA has a fairly large conceptual surface area. Larger than I’d like, but as small as I’ve been able to maintain. CSLA 4 is, I think, the best so far, in that it pretty much requires a specific syntax for class and property implementations – and you have to learn that – but it abstracts the vast majority of what’s going on behind that syntax, which reduces the surface area compared to older versions of the framework.

Still, when people ask me what’s going to be the hardest part of getting up to speed with CSLA, my answer is that there are two things:

  1. Domain-driven, behavior-focused object design
  2. Learning the concepts and coding practices to use the framework itself

The first point is what it is. That has less to do with CSLA than with the challenges learning good OOD/OOP in general. Generally speaking, most devs don’t do OO design, and those that try tend to create object models that are data-focused, not behavior-focused. It is the fault of tooling and a matter of education I think. So it becomes an area of serious ramp-up before you can really leverage CSLA.

The second point is an area where CSLA could be considered ‘heavyweight’ – in its basic usage it is pretty easy (I think), but as you dive deeper and deeper, it turns out there are a lot of concepts that support advanced scenarios. You can use CSLA to create simple apps, and it can be helpful; but it also supports extremely sophisticated enterprise app scenarios and they obviously have a lot more complexity.

I can easily see where someone tasked with building a small to mid-size app, and who’s not already familiar with CSLA, would find CSLA very counter-productive in the short-term. I think they’d find it valuable in the long-term because it would simplify their maintenance burden, but that can be hard to appreciate during initial development.

On the other hand, for someone familiar with CSLA it is a lot harder to build even simple apps without the framework, because you end up re-solving problems CSLA already solved. Every time I go to build an app without CSLA it is so frustrating, because I end up re-implementing all this stuff that I know is already there for the taking if I could only use CSLA…

.NET is great – but it is a general-purpose framework – so while it gives you all the tools to do almost anything, it is up to you (or another framework) to fill in the gaps between the bits and pieces in an elegant way so you can get down to the business of writing business code. So while CSLA has a non-trivial conceptual surface area where it solves these problems – you’ll have to solve them anyway because they exist and must be solved.

In summary, from an assembly size and runtime size perspective, I don’t think CSLA is heavyweight – which is why it works nicely on WP7. But from a conceptual surface area perspective, I think there’s an argument to be made that CSLA is a very comprehensive framework, and has the heavyweight depth that comes along with that designation.

Wednesday, October 27, 2010 9:58:30 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Friday, October 22, 2010

I would like to call out the amazing help I’ve had in getting the 4.1 beta out the door.

Jonny Bekkum is responsible for nearly all the non-WP7 changes in this release, with the exception of ASP.NET MVC.

Gary Brandt has really taken ownership of the ASP.NET MVC functionality provided by CSLA 4, and has made some really nice improvements, and perhaps most importantly has provided a good sample app (Samples\Net\cs\CslaMVC).

Justin Chase put a huge amount of work into updating UnitDriven for WP7 and getting most of the CSLA .NET unit tests running in WP7. This included fighting with some WP7 bugs, and perhaps even a Visual Studio debugger bug.

Without the substantial contributions of these individuals 4.1 wouldn’t be where it is!

Of course the framework wouldn’t continue to improve without the continuing support and suggestions from the CSLA .NET community on http://forums.lhotka.net – thank you to everyone who posts, your contributions are invaluable. I hope people continue to provide such high quality interactions via the forum.

Friday, October 22, 2010 1:54:36 PM (Central Standard Time, UTC-06:00)  #    Disclaimer

I am pleased to announce the first beta release of CSLA 4 version 4.1 with support for Windows Phone 7, and continuing support for .NET 4 and Silverlight 4.

Download CSLA 4 version 4.1.0 here

With this release, it is now possible to write a single business layer composed of business domain objects that run unchanged on a WP7 device, in Silverlight, on a Windows client, on Windows Server and on Windows Azure.

The samples download includes Samples\Net\cs\SimpleNTier, which does implement the following interfaces over one common business layer:

  • Windows Phone
  • WPF
  • Silverlight
  • ASP.NET MVC

Of course this is just the first beta release, so there’s more work to be done. At the same time, we have completed the vast majority of the effort, and it is quite possible to build WP7 applications using this beta.

As with all CSLA releases, this one does include some bug fixes and enhancements to other parts of the framework. Please see the change log for a list of all changes. Enhancement highlights include:

  • Add ability to get a consolidated list of broken rules for an object graph
  • New BackgroundWorker component that automatically initializes background threads with the current principal and culture from the UI thread
  • TriggerAction provides better debugging information, following the lead of many Microsoft XAML controls
  • and much more…

In related news, UnitDriven has also been updated to support WP7, and provides a pretty comprehensive unit test runner and framework for WP7 code. CSLA uses UnitDriven for its automated testing, but UnitDriven can be used for any application on .NET, Silverlight or WP7.

Similarly, Bxf (Basic XAML Framework) has been updated to support WP7, thereby providing a common MVVM framework for WPF, Silverlight and WP7 UI development efforts. Some CSLA sample apps use Bxf, but Bxf can be used for any application, including those that don’t involve CSLA at all.

Bxf | CSLA .NET | Silverlight | Web | Windows Azure | WP7 | WPF
Friday, October 22, 2010 1:35:18 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
On this page....
Search
Archives
Feed your aggregator (RSS 2.0)
April, 2019 (2)
January, 2019 (1)
December, 2018 (1)
November, 2018 (1)
October, 2018 (1)
September, 2018 (3)
August, 2018 (3)
June, 2018 (4)
May, 2018 (1)
April, 2018 (3)
March, 2018 (4)
December, 2017 (1)
November, 2017 (2)
October, 2017 (1)
September, 2017 (3)
August, 2017 (1)
July, 2017 (1)
June, 2017 (1)
May, 2017 (1)
April, 2017 (2)
March, 2017 (1)
February, 2017 (2)
January, 2017 (2)
December, 2016 (5)
November, 2016 (2)
August, 2016 (4)
July, 2016 (2)
June, 2016 (4)
May, 2016 (3)
April, 2016 (4)
March, 2016 (1)
February, 2016 (7)
January, 2016 (4)
December, 2015 (4)
November, 2015 (2)
October, 2015 (2)
September, 2015 (3)
August, 2015 (3)
July, 2015 (2)
June, 2015 (2)
May, 2015 (1)
February, 2015 (1)
January, 2015 (1)
October, 2014 (1)
August, 2014 (2)
July, 2014 (3)
June, 2014 (4)
May, 2014 (2)
April, 2014 (6)
March, 2014 (4)
February, 2014 (4)
January, 2014 (2)
December, 2013 (3)
October, 2013 (3)
August, 2013 (5)
July, 2013 (2)
May, 2013 (3)
April, 2013 (2)
March, 2013 (3)
February, 2013 (7)
January, 2013 (4)
December, 2012 (3)
November, 2012 (3)
October, 2012 (7)
September, 2012 (1)
August, 2012 (4)
July, 2012 (3)
June, 2012 (5)
May, 2012 (4)
April, 2012 (6)
March, 2012 (10)
February, 2012 (2)
January, 2012 (2)
December, 2011 (4)
November, 2011 (6)
October, 2011 (14)
September, 2011 (5)
August, 2011 (3)
June, 2011 (2)
May, 2011 (1)
April, 2011 (3)
March, 2011 (6)
February, 2011 (3)
January, 2011 (6)
December, 2010 (3)
November, 2010 (8)
October, 2010 (6)
September, 2010 (6)
August, 2010 (7)
July, 2010 (8)
June, 2010 (6)
May, 2010 (8)
April, 2010 (13)
March, 2010 (7)
February, 2010 (5)
January, 2010 (9)
December, 2009 (6)
November, 2009 (8)
October, 2009 (11)
September, 2009 (5)
August, 2009 (5)
July, 2009 (10)
June, 2009 (5)
May, 2009 (7)
April, 2009 (7)
March, 2009 (11)
February, 2009 (6)
January, 2009 (9)
December, 2008 (5)
November, 2008 (4)
October, 2008 (7)
September, 2008 (8)
August, 2008 (11)
July, 2008 (11)
June, 2008 (10)
May, 2008 (6)
April, 2008 (8)
March, 2008 (9)
February, 2008 (6)
January, 2008 (6)
December, 2007 (6)
November, 2007 (9)
October, 2007 (7)
September, 2007 (5)
August, 2007 (8)
July, 2007 (6)
June, 2007 (8)
May, 2007 (7)
April, 2007 (9)
March, 2007 (8)
February, 2007 (5)
January, 2007 (9)
December, 2006 (4)
November, 2006 (3)
October, 2006 (4)
September, 2006 (9)
August, 2006 (4)
July, 2006 (9)
June, 2006 (4)
May, 2006 (10)
April, 2006 (4)
March, 2006 (11)
February, 2006 (3)
January, 2006 (13)
December, 2005 (6)
November, 2005 (7)
October, 2005 (4)
September, 2005 (9)
August, 2005 (6)
July, 2005 (7)
June, 2005 (5)
May, 2005 (4)
April, 2005 (7)
March, 2005 (16)
February, 2005 (17)
January, 2005 (17)
December, 2004 (13)
November, 2004 (7)
October, 2004 (14)
September, 2004 (11)
August, 2004 (7)
July, 2004 (3)
June, 2004 (6)
May, 2004 (3)
April, 2004 (2)
March, 2004 (1)
February, 2004 (5)
Categories
About

Powered by: newtelligence dasBlog 2.0.7226.0

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2019, Marimer LLC

Send mail to the author(s) E-mail



Sign In