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 (UWP, WPF, Windows Forms)
  2. Android (Xamarin)
  3. iOS (Xamarin)
  4. MacOS (Xamarin, .NET Core)
  5. Linux (Xamarin, .NET Core)
  6. WebAssembly (Blazor, Uno, etc.)
  7. 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

216 questions
51
votes
23 answers

Does anyone have any real-world experience of CSLA?

The main web application of my company is crying out for a nifty set of libraries to make it in some way maintainable and scalable, and one of my colleagues has suggested CSLA. So I've bought the book but as : programmers don't read books…
Johnno Nolan
  • 27,849
  • 17
  • 105
  • 158
25
votes
6 answers

What is CSLA Framework and Its use?

What is CSLA Framework and Its use ?
Greens
  • 2,921
  • 11
  • 41
  • 57
17
votes
5 answers

Circular reference causing stack overflow with Automapper

I'm using Automapper to map my NHibernate proxy objects (DTO) to my CSLA business objects I'm using Fluent NHibernate to create the mappings - this is working fine The problem I have is that the Order has a collection of OrderLines and each of these…
Charleh
  • 13,285
  • 3
  • 34
  • 54
14
votes
2 answers

Visual Studio 2012 testing with csla and entity framework

In VS2010 my MSTest test run just fine. When running in VS2012 I am getting an error. The test sets the Csla.ApplicationContext.User with a Custom Business Principal. When the EntityFramework is asked to provide a new ObjectContext I receive a…
Jamie Altizer
  • 1,530
  • 1
  • 11
  • 16
13
votes
3 answers

Are there any worthy CSLA alternatives available?

My company is interested in porting a large business application to .NET. We plan on developing a desktop version and a silverlight version. I mostly researched the CSLA framework (got rocky's book, halfway through already) and found it a bit…
James Couvares
  • 1,583
  • 1
  • 15
  • 15
11
votes
1 answer

How to use Include with Lambda in EF?

According to this article you are suppose to be able to do includes using a lambda expression http://romiller.com/2010/07/14/ef-ctp4-tips-tricks-include-with-lambda/. For example ... var blogsWithPosts = context.Blogs.Include(b => b.Posts); So…
mattruma
  • 16,084
  • 31
  • 98
  • 163
10
votes
3 answers

should I use Entity Framework instead of raw ADO.NET

I am new to CSLA and Entity Framework. I am creating a new CSLA / Silverlight application that will replace a 12 year old Win32 C++ system. The old system uses a custom DCOM business object library and uses ODBC to get to SQL Server. The new system…
Art Dumas
  • 430
  • 1
  • 5
  • 12
8
votes
3 answers

Validation and in Service Layer or Business Objects?

Martin Fowler suggests using a service layer as a boundary between the domain model and and "Data Loaders". However, Rockford Lhotka suggests building validation into the business object itself and this is exactly what CSLA.NET does. The benefits of…
Ryan Tomlinson
8
votes
1 answer

Unit Testing in CSLA? How? What?

Does anyone have an example of unit testing in CSLA. I find it difficult to implement TDD with this framework and was wondering if there is any simple ways of doing this. Is there any other Mock Framework I could use besides TypeMock Isolator that…
Donny
  • 4,738
  • 8
  • 35
  • 50
7
votes
1 answer

Best way to do TDD and CSLA

I would like to know what tools, patterns, etc people have used to be able to do TDD with CSLA .NET 3.8 and higher. Which parts pose the most effort. Are there parts that are completely untested, etc. Any and all information is most welcome. Thanks
Hagashen
  • 75
  • 6
6
votes
3 answers

What caused this InvalidOperationException using LINQ to SQL?

We experienced a number of errors on our live application a week or two ago that have so far escaped explanation. We saw these errors internally and they were also experienced by clients as it manifested in a set of web services. I have included the…
rrrr
  • 2,207
  • 23
  • 51
6
votes
8 answers

How do you test your business objects?

I am wanting to implement automated testing, using the Microsoft testing framework in Visual Studio, for my software development projects. I have created some tests, and all in all, it's pretty easy to use. What are some better practices for testing…
mattruma
  • 16,084
  • 31
  • 98
  • 163
6
votes
1 answer

Return Value Using SqlCommand

I'm trying to get the result set and return value of a stored proc on SQL 2008 server. When I run the proc in sql management studio, I get the result set and the return value. However, when I try to get the value in C# 4.0, the value of the…
jaryd
  • 851
  • 11
  • 21
6
votes
7 answers

How can I learn CSLA.NET Fast?

I'd like to learn CSLA.NET quickly. What advice do you have?
KG Sosa
  • 18,371
  • 6
  • 24
  • 27
6
votes
3 answers

Error deleting a record using Linq2SQL

I've received an error report from a client recently and am having no luck resolving it. I'm hoping someone can give me some insight to what may be wrong. The error seems simple enough: Csla.DataPortalException: DataPortal.Delete failed…
Buddy Lee
  • 376
  • 2
  • 13
1
2 3
14 15