Learning CSLA

Learning CSLA

Old forum URL: forums.lhotka.net/forums/t/6885.aspx


Tom_W posted on Thursday, April 30, 2009

Hi All

I'm currently working my way up the CSLA learning curve and as I've said elsewhere it is a deeply impressive body of work.  I thought it might be worth me posting up my experiences as I go as it might be a useful resources for others looking at these forums with a view to adopting CSLA.

Expert Business Objects Book

The book is a great resource, but having read both the 2005 and 2008 versions I kind of get the feeling that there is simply so much to say about CSLA that one book simply cannot contain it any more.  Nowhere is this more evident than in the much discussed dropping of the WinForms chapter.

My thought was that the book might be more manageable and be easier for the first timer to read if it was split into a series of books:


I think that a lot of programmers fall into the 'learn by example' and 'just hit the ground and get coding' categories, so I think that a book or books set up around this approach would be of use to a lot of people, and would probably increase the adoption of CSLA.

I know that we as a company have been looking at CSLA for years, but the highly in depth scope of the books meant we never got round to reading the book and so fully understanding CSLAs benefits.  In the meantime, and just for good measure, we wrote an in house framework that tries to achieve almost exactly what CSLA sets out to do, but does hugely less elegantly!


CSLA Source Code

I made the mistake of just referencing up the CSLA.dll and never really looking at CSLA's sourcecode at the beginning.  I would really recommend anyone starting CSLA to add the CSLA.proj to their solution and then to look at the comments/remarks in the methods of the classes being inherited.  There is a wealth of information in that green text!


Example Code - ProjectTracker

I think that adding a straight parent/child/grandchild relationship element to ProjectTracker would be enormously useful as I don't think this area is as well covered by the example (and so correspondingly also not by the book).



OK, that's my experiences so far.  I fully appreciate that Rocky has a day job, and that it isn't supporting CSLA!

Equally however, wider adoption would presumably boost the book sales which I'm sure is always welcome.  In all seriousness, CSLA is a great tool, so making it as accessible as possible is for the greater good :-)

Hopefully none of the above causes offense, it's not meant to, just trying to give the resident experts a view from the trenches!



Part 2 - 29th May 2009

Well, I've been at it a few more weeks now and have learnt a bit more.

One thing that comes up an awful lot in CSLA discussions is the need to adopt a behaviour centric (as opposed to data centric) business object design pattern.  this confused the heck out of me, but the following post helps a lot (in addition to reading teh Expert BOs book obviously):

http://forums.lhotka.net/forums/thread/17230.aspx


The other thing that has absorbed a lot of my time is trying to get an adequate code generation solution up and running - this is still work in progress as i go up the CodeSmith learning curve..

JoeFallon1 replied on Thursday, April 30, 2009

Tom,
Interesting experience. Thanks for sharing.
When I started 5+ years ago I knew we needed a framework. But luckily I had no idea how to build one and so I actually read the book before starting any coding. Cover to cover. And then flipping through it quite a bit after that. Your story about building an in house framework sent chills down my spine. Ouch!

Your comments on using more standard examples is a good one. Project tracker tries to show the various ways that you *can* do things. It does *not* show the best way to do everything.

CSLA has come a long way since version 1.x. I am so glad we chose it and that we have been able to keep up with the changes. Converting from 1.x to 2.x was very painful. But conversions since then have been easy in comparison!

Joe

Tom_W replied on Thursday, April 30, 2009

JoeFallon1:
Your story about building an in house framework sent chills down my spine. Ouch!


I could cheerfully throttle the person responsible for the object binding documentation (or lack thereof).  It's one of the most useful and fundamental parts of .NET and it is stuffed full of undocumented gotchas to trip up the unwary.  I felt so guilty for possibly finding a bug in this area.. I owe Rocky a bottle of whatever his tipple is for making him even think about data binding again!  (He'll have to come to Oxford to collect it though!)

Ash002 replied on Thursday, April 30, 2009

Great post!

RockfordLhotka replied on Thursday, April 30, 2009

This is good feedback, and I appreciate it.

As you may be aware, I'm in the process of releasing about 7 hours of video content that walks through, in detail, what you need to know and do to build a CSLA .NET for Silverlight application. The videos come with more focused code samples that cover (or will cover when I'm done) most or all of the items on your list in terms of types of object and object relationships.

(I'm working on segment 5 right now, which includes illustrations of most major object relationship scenarios)

This is my experiment to try and address the recurring request for content focused more on using the framework as opposed to creating the framework.

Tom_W replied on Friday, May 01, 2009

Hi Rocky,

That sounds really good.  We are currently developing with VB (sorry!) and WinForms (sorry again!) ; how different is the CSLALight framework, are the examples in the videos directly applicable to WinForms?

One other question, without stirring up the hornet's nest of the future of WinForms, in your experience are the current versions of the WPF and Silverlight development tools robust and fast enough for development of complex software solutions?  The last time I looked at these tools I felt they weren't quite there yet and that waiting for VS2010 would be sensible, but that was back in the VS2008 pre release days.

Thanks

Tom

RockfordLhotka replied on Friday, May 01, 2009

CSLA .NET for Silverlight allows you to share 85-95% of your business object code between Windows and SL. So at the business class implementation level, the Windows and SL versions of CSLA are very close.

 

At the UI level the story is obviously different, as XAML in SL is different from WPF (to some degree) and of course is quite different from Windows Forms or ASP.NET.

 

So if you look at the videos in the series, segments 1 (intro/background), 5 (object types) and 6 (data access) are useful to .NET as well as SL. Segment 4 is also somewhat useful to .NET, but I’d guess over half the content is entirely SL specific.

 

In terms of tooling for WPF/SL, I absolutely think there’s wisdom in waiting for VS10. Even in VS08 you really need to plan for writing XAML by hand. For a developer with a web background that’s probably not such a big deal, but for a developer with a Windows background it seems (and is imo) extremely primitive.

 

 

The point of my previous post however, is that if the SL video series is successful (meaning enough people buy it to make it worth my time to have created them), then I’ll almost certainly create similar videos (series and/or singles) covering .NET, WPF, ASP.NET MVC and other topics of interest. Windows Forms would be in that list, because it is, and will be for some time, a widely used technology.

 

I can’t say that I’ll put a lot of focus on VB. It isn’t realistic to record and produce the videos twice, and sales of VB content is substantially lower than C# content, so I’m afraid the economics just aren’t there at this point in time.

 

Rocky

Tom_W replied on Friday, May 01, 2009

Thanks Rocky, that's great info, I will purchase the relevant videos.

I saw a Beth Massi video showing off WPF development in VS2010 and it looks like a big step forward.

Great news on the more videos front, I hope they are a success.  I understand about the VB, thankfully I have a Java background so C syntax doesn't worry me too much!

RockfordLhotka replied on Friday, May 01, 2009

For better or worse, the current set of videos are sold as a series, not as individual segments. I’m not sure I’d recommend buying the whole series to get just the 3 or so segments that are relevant outside Silverlight (though I obviously won’t complain if you do buy the series to get those segments! :) ).

 

Rocky

Tom_W replied on Friday, June 05, 2009

What is CSLA

One thing I should have put right at the beginning of the OP, was that before starting down the road of learning CSLA it is vital to understand what CSLA actually is and isn't.

The book covers this in detail, but Rocky has appeared on several dnrtv shows to talk on this subject, and I think those videos are very informative.  All of the previous dnrtv shows can be found here: http://www.dnrtv.com/archives.aspx

Tom_W replied on Friday, June 05, 2009

I'm going to try and keep this thread updated when good beginners info is posted.  If this is annoying anyone let me know!

Understanding the CSLA Stereotypes


After getting your head round what CSLA is for, probably the next stop is to look at the CSLA stereotypes.  There is now a video to cover this that is discussed in this post:
http://forums.lhotka.net/forums/thread/33683.aspx

RockfordLhotka replied on Friday, June 05, 2009

That’s fine, though I’m also willing to give you the ability to edit the wiki if you’d like to maintain a “Getting Started” page there instead. That might be easier to deal with than an ever-growing forum thread.

 

Rocky

 

 

From: Tom_W [mailto:cslanet@lhotka.net]
Sent: Friday, June 05, 2009 12:05 PM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] Learning CSLA

 

I'm going to try and keep this thread updated when good beginners info is posted.  If this is annoying anyone let me know!

Understanding the CSLA Stereotypes


After getting your head round what CSLA is for, probably the next stop is to look at the CSLA stereotypes.  There is now a video to cover this that is discussed in this post:
http://forums.lhotka.net/forums/thread/33683.aspx


Tom_W replied on Friday, June 05, 2009

That makes a lot more sense, wiki it is.

Tom_W replied on Tuesday, June 16, 2009

In the interim and before i forget...

Understanding the Data Access choices available in CSLA and generally more solid CSLA explanatory info

Segment 6 of the Silverlight video series is a great resource for anyone going up the CSLA curve and should be watched early in your quest to master CSLA.  There is almost no Silverlight specific content, almost everything applies equally to CSLA.NET.

More details here:  http://forums.lhotka.net/forums/thread/33814.aspx

RockfordLhotka replied on Tuesday, June 16, 2009

You mean no Silverlight specific content :)

 

It is true that the data access video applies to any CSLA .NET scenario, with very little Silverlight-specific content at all.

 

Rocky

 

From: Tom_W [mailto:cslanet@lhotka.net]
Sent: Tuesday, June 16, 2009 12:57 PM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] RE: Learning CSLA

 

In the interim and before i forget...

Understanding the Data Access choices available in CSLA and generally more solid CSLA explanatory info

Segment 6 of the Silverlight video series is a great resource for anyone going up the CSLA curve and should be watched early in your quest to master CSLA.  There is almost no CSLA specific content, almost everything applies equally to CSLA.NET.

More details here:  http://forums.lhotka.net/forums/thread/33814.aspx


Tom_W replied on Wednesday, June 17, 2009

LOL, even by my standards that's a good effort!  Duly edited.

Copyright (c) Marimer LLC