Download presentation
Presentation is loading. Please wait.
1
CSLA Presenter Sergey Barskiy, senior consultant at Magenic Technologies your questions Send an in order to receive the link to session materials. Allow a few days to post Feedback
2
CSLA Component based, scalable, logical architecture
Application framework CSLA Author – Rockford Lhotka Resources Download CSLA from the web side Download project tracker setup document Purchase the book 2.1 / 3.0 Available in C# and VB.NET
3
What is CSLA? CSLA .NET is a software development framework that helps you build a powerful, maintainable business logic layer for Windows, Web, service-oriented and workflow applications. Helping to manage and implement this business logic is the purpose of CSLA .NET CSLA .NET enables you to create an object-oriented business layer that abstracts and encapsulates your business logic and data. The framework automatically supports data binding for Windows Forms, Web Forms and WPF. It also supports workflow, WCF and web services interfaces. CSLA .NET simplifies and standardizes implementation of validation and authorization logic within your objects. CSLA .NET also includes a technology-neutral client/server abstraction, allowing you to build your application and then decide at deployment whether to use 2-tier or 3-tier client/server. If you opt for 3-tier deployment, you can choose between WCF, .NET Remoting, Web Services or Enterprise Services as a network protocol. The key point here is that you can switch between 2-tier and any of these 3-tier networking options without changing your UI, business logic or data access code; all that changes is a configuration file (and of course deployment to both client and server). Finally, CSLA .NET provides a clearly defined location in your architecture where you get data from or put data into the database. This is not the focus of CSLA .NET, and so the framework’s goal is to put you in charge. To give you optimum flexibility in how that data is managed and to enable decoupling of the data access from the business object and user interface or presentation layers.
4
What is CSLA? Supports rich UI and business layer creation through
Data binding Validation Business rules Authorization / authentication
5
CSLA Advantages of framework Versions
Has been around for over 10 years Proven and stable Large and active community Consistent and simple coding techniques Object oriented analysis and design Focus on business rules, not technology Versions Current version 3.0 Version 3.5 is in beta
6
CSLA Logical application architecture / model
Physical application architecture / model Performance and scalability Security Authorization Authentication Layering Presentation UI Business Layer Data access Data and storage management
7
CSLA Enabling data objects in .NET
Data binding in Win Forms, WPF and Web Forms Validation rules – abstract, consistent coding techniques Authorization rules – centralized per property or per object access rules, defining read and write access N-level undo, single level is used most often Abstract persistence Business objects in CSLA are mobile, thus assisting in scalability of entire framework
8
CSLA Key classes in the framework Building object graphs
Data Portal module Business Base Business List Base Read Only Base Read Only List Base Command Base Business Principal Base Building object graphs Data population Data Updates / Transactional support
9
CSLA Helper Classes Application Context Safe Data Reader
Object Adapter Data Mapper Smart Date Sorted Binding List Filtered Binding List Name / Value List Application Context Local Context Client Context Global Context User
10
CSLA Business Object Business Object In Detail
Inherits from Business Base Is a generic class Key regions of a typical business object Properties Authorization Rules Validation Rules Factory Methods Data Access
11
CSLA Business Object’s Properties
Typical property code Purpose of PropertyHasChanged() Mark object as dirty Raise PropertyChanged Event Run Validation Rules Purpose of CanReadProperty and CanWriteProperty IsDirty() IsValid() IsNew()
12
Business Objects / UI Interaction
Windows form code Display Name Error Provider Enabling / Disabling of buttons Enable Save / Cancel buttons based on edits Disable Save button based on validity of objects WPF form code Web form code
13
CSLA Configuration Data Portal configuration
App.config / web.config Communication protocol sections and configuration Web Services Remoting (IIS hosted or Windows Service) Enterprise Services (COM+) WCF (with all options available in WCF itself) Unit testing
14
Code Generation CodeSmith templates
Templates that come in download of CSLA How to create your own template to write classes from scratch Database based classes generation
15
CSLA / ORM CSLA is NOT and ORM
You can use CSLA data retrieval / update methods to function as ORM adapter for CSLA business objects You can Combine multiple tables into single object (pivot) You can split one table into multiple objects (unpivot) Arbitrarily form data into objects Important: CSLA business object and row from a table in a database do not have to be one and the same. Although a lot of the time they are.
16
Questions?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.