Questions tagged [csla]

CSLA .NET provides a home for your business logic. It helps you build a scalable and reusable business domain object model for your application. Your business logic can run anywhere .NET runs: Windows, iOS, Android, Linux, Mac, and more.

Questions with the csla tag should relate to the CSLA .NET framework.

CSLA .NET

A Home for Your Business Logic

CSLA .NET is an open source framework, created by Rockford Lhotka, designed to help developers create a rich, scalable, reusable, and maintainable business domain model for their application. This business domain model is ideally designed around user scenarios/stories or use cases, and encapsulates business, validation, and authorization rules.

CSLA .NET also supports an architectural concept called mobile objects. Using this concept, in an n-tier application the business object graphs are able to move between the client workstation and application server. The CSLA .NET data portal enables this concept, as well as completely abstracting any idea of the network from the application code. The result is that an application can switch from a 1- or 2-tier deployment to a 3- or 4-tier deployment without needing to change any application code.

The platforms supported by CSLA .NET include:

  1. Windows (MAUI, UWP, WPF, Windows Forms)
  2. Android (MAUI, Xamarin)
  3. iOS (MAUI, Xamarin)
  4. MacOS (MAUI, Xamarin, .NET Core)
  5. Linux (MAUI, Xamarin, .NET Core)
  6. WebAssembly (Blazor, Uno, etc.)
  7. Blazor, ASP.NET MVC, Razor Pages, Web API, Web Forms

The primary feature areas provided by CSLA .NET are:

  1. Business rules: CSLA .NET includes a rules engine supporting business, validation, and authorization rules. This engine integrates with, and extends, standard DataAnnotations, and brings DataAnnotations support to WP7 and Windows Forms. Additionally, it supports synchronous and asynchronous rule execution
  2. Data binding support: Business objects created with CSLA .NET support data binding in all supported platforms. The data binding support includes full support for in-place editing in datagrid controls, as well as read-only data, and standard detail forms.
  3. LINQ: CSLA .NET collections are queryable, and can optionally create "live views" so changes made to the results of a LINQ query are automatically synchronized with the original business object.
  4. Mobile objects: Through the data portal, CSLA .NET supports 1-, 2-, 3-, and 4-tier application deployments, and allows an application to switch between deployment configurations without changing existing code.
  5. Abstract persistence: CSLA .NET is not an ORM and does not implement mapping to databases. However, the data portal does provide a clear, well-defined structure for invoking the application's data access layer. This is abstract, and supports the use of any data access technology, including ADO.NET, Entity Framework, dapper, REST service calls, interacting with the file system or XML files, or any other data access model you care to use.

Important links

Other resources

222 questions
1
vote
3 answers

how can i tell if an application is written with CSLA 2.0 or CSLA 3.5 (or with some other version of CSLA)

I'm trying to untangle a legacy system written with the CSLA framework. The contractors who originally wrote the software are long gone. I want to figure out what version of CSLA was used so that I can start to learn about that particular framework…
bernie2436
  • 22,841
  • 49
  • 151
  • 244
1
vote
2 answers

Should CSLA be used with a dependency injection framework?

My development team is evaluating the various frameworks available for .NET to simplify our programming, one of which is CSLA. I have to admit to being a bit confused as to whether or not CSLA would benefit from being used in conjunction with a…
Derek
  • 952
  • 3
  • 13
  • 34
1
vote
1 answer

read csv file with filehelpers error

I have an application developed in Visual Studio 2010 incorporating the CSLA.Net framework and FileHelpers Library. I am using the code below to read a csv file with the file helpers library. I have break points set on every line and it faults after…
1
vote
1 answer

How to create a lazy-loaded and cached collection in Silverlight/CSLA

I'm creating a Silverlight front end for an existing desktop app written using CSLA. One thing that I'm having trouble with is converting classes like the following: public class SomeCollection : Csla.ReadOnlyListBase { …
Joe
  • 3,827
  • 1
  • 25
  • 37
1
vote
1 answer

From Silverlight to MVC CslaModelBinding child collections

Background: A while ago we developed a business application for silverlight using the csla framework. Now we wish to create an MVC alternative for people who are unable to use Silverlight for one reason or another. The problem: Now the problem is…
Daniel
  • 270
  • 3
  • 14
1
vote
3 answers

How to inherit from a CSLA object in F#?

I would like to get the benefits of CSLA from F#, but I am having trouble with inheritance. Here is the ProjectTracker ResourceInfo class. Can someone please show how to do it in F#? using Csla; using System; using Csla.Serialization; namespace…
Larry
  • 11
  • 1
1
vote
1 answer

CSLA authorization per property

I have a BusinessBase with a lot of PropertyInfo. It has an AuthorizationAction.EditObject that all user can change it. But some user have access to different fields. User A can update all properties. User B can only update one property. Is there…
the_lotus
  • 12,668
  • 3
  • 36
  • 53
1
vote
1 answer

Is it possible to have AuthorizationRule on CSLA CriteriaBase

Is it possible to have AuthorizationActions.WriteProperty rules on a CriteriaBase in CSLA ? I have a screen with a bunch of filters and I want to enable only those that the user has access (ex: some user can't search in other regions).
the_lotus
  • 12,668
  • 3
  • 36
  • 53
1
vote
1 answer

HasPermission is false on parent but true on child

I have a parent/childs relationship and both use AuthorizationRule. The save is always done on the parent. For some users, they do not have access to modify the parent but do have access to modify the childs. If the parent HasPermission returns…
the_lotus
  • 12,668
  • 3
  • 36
  • 53
1
vote
4 answers

Disabling a TextBox in C# .NET using CSLA

I am trying to disable a number of text boxes intended for displaying data (not edit) in one of my UserControls. However, for some reason I can not get the textBoxes to disable properly. I've set "ApplyAuthorization on readWriteAuthorization" to…
Sakkle
  • 1,934
  • 9
  • 27
  • 39
1
vote
2 answers

WPF - Warning icon shows with red borders only, without red box

How to change the red box around a TextBox to a red circle with an exclamation mark? On error, WPF can show either a red border around a TextBox or a warning icon. When I create a simple test application to test validation rules, I get only red…
JhonMalk199
  • 97
  • 1
  • 9
1
vote
1 answer

Why is PropertyInfoManager not contained within BusinessBase like FieldManager is?

I know that FieldManager is exposed as a protected property within BusinessBase. Why isn't PropertyInfoManager setup the same way? From what I can gather, PropertyInfoManger maintains a dictionary of Types and a list of each Type’s…
P B
  • 650
  • 1
  • 7
  • 10
1
vote
1 answer

Csla.Configuration.ConfigurationManager Exception

I'm trying to use CSLA with Xamarin iOS and Andriod. The Xamarin iOS works fine until I add CSLA and do a fetch. It throws an exception on DataPortal.Create(). Having the same issue with Andriod as well. Any help is appreciated. Error:…
rnach
  • 11
  • 1
1
vote
1 answer

Unit Test a CSLA Asynchronous Validation Rule

I have a validation rule on a CSLA Business Base stereotyped class. I'm having trouble figuring out how to unit test the validation rule as it includes an asynchronous callback lambda expression. Here's some example code: using System; using…
Tom Hunter
  • 5,714
  • 10
  • 51
  • 76
1
vote
2 answers

How to solve generics error CS0311?

I have searched the web and stackoverflow and found many posts that deals with CS0311 error. None of the scenarios are close to mine. I have a generic class that inherits from a generic class. Please note that BusinessBase is a class in the CSLA…
Bill
  • 67
  • 1
  • 1
  • 10