Using CSLA 4: Creating Business Objects draft online

Using CSLA 4: Creating Business Objects draft online

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


RockfordLhotka posted on Tuesday, January 04, 2011

The completed first draft of the Using CSLA 4: Creating Business Objects ebook is now online and available for purchase. 

If you’ve purchased (or now purchase) the Using CSLA 4 ebook series you’ll also have access to this new ebook.

This is book 2 of the series. The next book will be Using CSLA 4: Data Access, followed by Using CSLA 4: Security. These first four ebooks cover all the core concepts around using CSLA 4 to build your business layer, along with various options for building a data access layer and implementing authentication.

After these four are complete I’ll move on to ebooks covering how to use a CSLA .NET business layer to create applications with different types of UI, including Silverlight, WPF, ASP.NET MVC and Windows Phone 7 (WP7).

Here’s the top-level outline of the Creating Business Objects book’s contents:

  1. Introduction

  2. Key Object Concepts

    1. Stereotypes

    2. Serialization

    3. Object Lifetime

    4. Object Relationships

    5. Object Identity and Equality

    6. Platform Differences in .NET and Silverlight

    7. Property Declarations

    8. Method Declarations

    9. Metastate

  3. Solution Structure

    1. Project Types and Assembly References

    2. Combining Project to Create Solutions

  4. Object Stereotypes

    1. Editable Objects

    2. Read-Only Objects

    3. Execution Objects

    4. Criteria Objects

    5. LINQ Types

    6. Windows Forms Types

  5. Business Rules

    1. Business and Validation Rules

    2. Authorization Rules

For those who are wondering, the first ebook is almost through the editing process and the “draft” designation will then be removed.

dg78 replied on Wednesday, January 05, 2011

Hello Rocky,

In the different types of UI, that you enumerate, and in the list of the seven books, I don’t see WinForm.

Do you plan to abandon to support WinForm ?

 It is good that CSLA supports new technologies but Winform is still used by many developpers.

Dominique

RockfordLhotka replied on Wednesday, January 05, 2011

CSLA 4 does support Windows Forms, in fact I put in a fair amount of effort to make sure Windows Forms remains supported. The Creating Business Objects book discusses the collection types that exist specifically to support Windows Forms.

The thing is that Windows Forms itself is no longer in active development at Microsoft, so it hasn't changed for the past 5 years. All the Windows Forms information in the Using CSLA 3.0 ebook remains completely relevant today. The only difference in CSLA 4 is that you need to use the new collection base classes when building your collections, otherwise there's simply nothing new.

So I might write a Windows Forms ebook at the end, if I have time before .NET v.next and CSLA v.next come out, but it isn't a high priority because it isn't like the content doesn't already exist.

dg78 replied on Wednesday, January 05, 2011

Yes the content (for Windows Forms) already exists but with a big difference : Using CSLA 3.0 ebook cover all the core concepts around using CSLA 3.0 (it is like the first four ebooks you are writing), it is not truly a ebook covering how to use a CSLA .NET business layer to create applications as you will do for the others UI.

If you can write a small ebook with differences from csla 3.0, and with useful things to create application, it would be fine. And if you can write that after the ebook on WPF, not at the end, it would be still finest. I think that I am not alone to dream to that.

Thanks and Happy New Year to you and your family.

emathias replied on Monday, January 10, 2011

Rocky,

I've already inhaled most of Creating Business Objecst.  Great job.  I know you are a busy guy but do you have a tentative schedule for the next release?

 I was in Miguel Castro's training class some years back and I had a conversation with you at Fuddruckers regarding how nice it would be to have (in a perfect world) 2 different CSLA books; one focused on framework, and one focused on using CSLA. .  These ebooks seem to be much more towards the usability angle than your apress book, which has me absolutely thrilled!  It's already been well worth the prepay.  Highly recommended.

RockfordLhotka replied on Monday, January 10, 2011

A schedule for the Using CSLA 4: Data Access book you mean?

I'll start working on this when I get back from my current trip (so tomorrow), and it will take around 3 weeks to put out the draft.

Teresa is done editing the first book, so that will move out of draft sometime this week. She'll start working on editing book 2, and that'll take 2-3 weeks too, then that'll go out of draft.

Basically it takes around 3-4 weeks per book, but in real time it can take longer as I get little writing done as I fly around the country for other aspects of my job.

rxelizondo replied on Monday, January 10, 2011

emathias

 I was in Miguel Castro's training class some years back and I had a conversation with you at Fuddruckers regarding how nice it would be to have (in a perfect world) 2 different CSLA books; one focused on framework, and one focused on using CSLA. . 

This was also proposed here Smile

http://forums.lhotka.net/forums/p/3955/19955.aspx#19955

Realistically though, I just don't see how the time / money / energy for a CSLA inner workings book can be justified since I have a feeling (I may be wrong as usual) that the absolute great majority of people (99.5 %) don't care about inner workings..... and who can blame them, with so many new technologies being thrown at us so often, who has time to learn the nuts and bolts!!??

What I would like to see though, is a LOT more comments on the CSLA code itself... I mean, given enough time, everything can be figured out, but its just nice to have those extra inline helpful code comments here and there.

Thanks.

emathias replied on Monday, January 10, 2011

Interesting.  Never saw that thread, but it pretty much sums up what I've thought also.

I know from talking to other .NET gurus that authoring books for one of the big companies is not exactly a path to retirement riches.  Some have hinted that it's almost not even worth the effort except than for the name recognition it brings.  Hopefully the ebook  route will prove lucrative enough that projects such as what we're discussing here will become much more feasible.  Like most of us here, I don't mind paying more if it saves me effort, and Rocky's latest will certainly do that!

 

rxelizondo replied on Tuesday, February 01, 2011

 

On page 16, under the section: Table 6. Elements defined by IPropertyInfo in Csla.Core"

The Description for the PropertyInfo DefaultValue says: Gets the default value for a new instance of the property

I think you need to add more details to the description. I think you should add a note indicating that default values are only good for value types, CSLA derived reference types don’t’ work because the instance would be shared between all classes so it would have different parents.

-------

Later on, at the end of page 33  you have some sample code as follows:

private PersonEdit _person = PersonProperty.DefaultValue;

Perhaps you should indicate there that if the default value was not null, doing that may not be a good idea (assuming that "PersonEdit" is a reference type.

 

RockfordLhotka replied on Tuesday, February 01, 2011

Thanks, I've forwarded this to errata@lhotka.net, which is the official location for errata.

mesh replied on Friday, July 01, 2011

There is not "Using CSLA 4: Creating Business Objects"  sample code available?

RockfordLhotka replied on Friday, July 01, 2011

Because it is essentially impossible to create working business classes without some DAL, it wasn't clear to me how to create code samples beyond what was in the book itself that had any meaning. The Data Access ebook has DAL examples (and thus code examples) for all stereotypes.

mesh replied on Friday, July 01, 2011

I'm looking for more BusinessRules sample code, but I can't find it? I thing that rules are maybe the most complex thing in whole CSLA... 

Copyright (c) Marimer LLC