Rockford Lhotka's Blog

Home | Lhotka.net | CSLA .NET

 Tuesday, January 26, 2010

From time to time CSLA .NET users are able to provide me with a summary of their experiences with the framework. Here’s an account I thought I’d share (with permission of course). First, here are some useful links related to A.J.’s summary:

Now to A.J.’s comments:

To all those who struggle with CSLA:

I must admit that at the beginning I had a hard time with CSLA. I remember when I first looked at the ver. NET 2.0, it seemed that there were dozens of objects all over the place and it simply appeared overdeveloped. The whole move to .NET from VB6 seemed even more discouraging to me.

The good thing is that I am stubborn (must be my Slovak origin). I was equally determined to understand why particular approach was chosen, what exactly was the author (Rocky) thinking, what were his findings? So I started way back at VB6 Business Objects book. Shortly after that I moved to first VB.NET Business Objects and then the 2005…story continues.

At some point I had an idea to strip CSLA, make it leaner, less bloated. I figured “why not have some type of a framework that entirely runs locally and doesn’t need any of this extra stuff?”

So I started to strip out serialization, reflection (Data Portal), remoting, n-level undo, trimming validation rules, created new code gen templates, and I soon realized that I was gaining nothing other than trouble, wasting time, and giving away a lot not to mention that this new “low fat” thing of mine needed some serious testing and documentation. It is obvious that I didn’t “get it”.

Well, I went through the 2005 book again, this time at the slower pace. And again, and again. PT Tracker helps for sure.  Eventually it started to make sense. If you write down what functionality and behavior you would like to have in your business object and data access object, you soon realize that CSLA has it all and does it better that you originally wanted. A true "E pour si muove" moment for me.

I guess the message is not to give up. Everything that is there needs to be there. The alternatives were to try to make some sense of data sets, data islands, relations, contexts, EF, and who knows what else out of which none include comprehensive validation, authorization, and simplistic object relation.

Invest your time in CSLA. Get a decent code generation tool that has CSLA templates or write your own templates.

It's good for you. Have fun!

A.J.

Santa Monica, CA

clip_image001  clip_image001[4]

Tuesday, January 26, 2010 11:29:00 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [2]  | 
 Monday, January 25, 2010

codemastery It is hard to believe that in just over 2 weeks I’ll be in Boston for the exciting Code Mastery event!

On Feb 11, at the Microsoft office in Waltham there’s this FREE two track technical event covering topics like Silverlight, SharePoint development, BizTalk, TFS, CSLA .NET and coding best practices.

Time is growing short, and seats are filling up, but there’s still space left. Head over to www.codemastery.com, check out the agenda and register today!

Monday, January 25, 2010 2:33:06 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 
 Friday, January 22, 2010

It is no surprise (to me) that Windows 7 is enjoying rapid and early adoption, already exceeding the install base of all Mac OS versions combined: http://blogs.zdnet.com/gadgetreviews/?p=11476&tag=nl.e539

Windows 7 is pure joy. It is fast, stable, efficient and just plain fun. I wasted no time getting all my XP and Vista machines up to Win7, and I haven’t looked back once (except with relief that I got away from Vista).

Additionally I took the opportunity to switch all my physical machine installs to Win7 x64, so I can fully exploit the 4 or 8 gigs of RAM they possess. Interestingly enough, even all the games I enjoy work fine – and they are often the apps that have the most compatibility issues. But not in Win7 – I’m enjoying all my favorite games (for the curious: Supreme Commander, Left 4 Dead (1 and 2), Deus Ex, TF2, CivIV and a few others).

But as a Microsoft go-to guy, perhaps the single biggest thing for me is that when people ask if Windows 7 is any good I can immediately, honestly and joyfully answer “absolutely yes!!”. It has been a couple years since I could do that, and it feels so good! :)

Friday, January 22, 2010 11:38:57 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [6]  | 
 Wednesday, January 13, 2010

I’m often asked whether CSLA .NET supports the MVC, MVP, MVVM or other “M” patterns.

The answer is an absolute YES! Of course it does, because CSLA .NET is all about the “M”.

The “M” in all these patterns stands for Model – the business layer that is supposed to encapsulate all your business logic and the data required for that logic to work.

Since its inception 13+ years ago, CSLA has been primarily focused on helping people build a powerful business layer composed of business domain objects. This implies strong separation of concerns where UI issues are (as much as possible) kept out of the business layer, as are data access concerns.

The various “M” patterns also support separation of concerns. Their perspective is from the UI level, as they are all UI patterns. But at the core of each of them is the idea that the “M” should encapsulate all the business logic, business processing and data required to perform that processing.

Whether you want a Controller-View or a Presenter-View or a View-ViewModel to organize your UI code, in every case you need a clearly separate Model against which the UI will work.

CSLA .NET 3.8 specifically added a bunch of features to simplify the use of MVVM in Silverlight and WPF, but that’s just simplification. MVVM worked fine without those enhancements, it is just a little easier now. Of course you still need an MVVM UI framework, because CSLA isn’t about the UI, it is about the Model.

CSLA .NET 3.8.2 includes a CslaModelBinder for ASP.NET MVC. Again, this simplifies one aspect of using ASP.NET MVC for your UI framework, but it isn’t strictly necessary – it just makes life easier. The same rule applies, CSLA isn’t a UI framework and so does as little as possible at the “V” and “C” level because its focus is all about the “M”.

Wednesday, January 13, 2010 12:39:46 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 
 Monday, January 11, 2010

If you are doing Silverlight development and have SL unit tests, you should probably take a look at StatLight.

As CSLA .NET developers are aware, when we created CSLA .NET for Silverlight we had to create our own unit test framework, which we made as a separate open source project called UnitDriven.

Creating UnitDriven was necessary to allow us to write exactly the same test code to run on both .NET and SL. After all, CSLA .NET works the same (mostly) on both platforms, so having a unified set of tests was critical. And since SL requires a lot of async testing, we also needed a way to implement async unit tests that are exactly the same on .NET and SL.

The big drawback with UnitDriven is that it has an interactive runner – you actually run the SL test app and run the tests by clicking a button. Very nice in some ways, but not useful for continuous integration (CI). And having CI is so very nice…

StatLight works with numerous technologies, including UnitDriven, and enables CI with Silverlight. Absolutely worth checking out!

Monday, January 11, 2010 3:32:31 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 
 Thursday, January 07, 2010

Miguel Castro has kindly compiled a chm help file from the 3.8.2 source code, and it is now available on the CSLA .NET download page – click here.

Thanks Miguel!!

Thursday, January 07, 2010 3:36:34 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [2]  | 

Here’s an episode of Spaghetti Podcast about the Microsoft PDC – I’m one of the people being interviewed.

http://www.slickthought.net/post/2010/01/07/Spaghetti-Code-Recaps-PDC-2009.aspx

Thursday, January 07, 2010 2:55:13 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 

I’ve been working in the VS10 beta trying to get my unit tests converted from nunit to mstest. Overall that went very smooth and easy thanks to some great foresight on the part of the Magenic guys who put together most of the tests.

But I keep running into issues where random tests fail due to a file IO exception:

“a procedure imported by System.Transactions could not be loaded”

The same tests may fail or work seemingly at random. After chasing this far too long, I think I’m going to assume it is a .NET 4 beta bug and just live with it for now. I can’t see where it is my code, since this code is unchanged from .NET 3.5 to 4.0, and any given test will pass around 90% of the time and fail around 10% of the time – and they only fail when run in groups of tests – so I strongly suspect something is messed up in the .NET type loader or something along that line…

Frustrating though – hopefully the next release of VS10 will magically resolve the issue.

Thursday, January 07, 2010 12:05:01 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [6]  | 
 Tuesday, January 05, 2010

MAG hires I am working with Magenic to organize an exciting new event – the Code Mastery events.

The first (of hopefully many) is in Boston on Feb 11.

This is a full day event, with two tracks of FREE CONTENT – deep dive technical content. We’re talking Visual Studio 2010, .NET 4.0, TFS, SharePoint, SQL Server and BizTalk Server – great stuff!!

We’ve lined up an amazing set of speakers, pulling Microsoft MVP’s and authors from Magenic’s national and New England consultants. These are people who are using the technologies day in and day out and who really know what they are talking about.

For my part, I’ll be talking about how 2010 is shaping up for developers, with VS 10, .NET 4, Silverlight 4 and other cool technologies. And I’ll be talking about CSLA .NET for Silverlight, and showing how incredibly powerful and fun it can be to build Silverlight applications when using CSLA .NET.

Space is limited, and if you live in the New England area you won’t want to miss this great educational opportunity!

Go to the site, check out the content and register today!

Tuesday, January 05, 2010 5:02:05 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 
On this page....
Search
Archives
Feed your aggregator (RSS 2.0)
July, 2014 (2)
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 2014, Marimer LLC

Send mail to the author(s) E-mail



Sign In