1 / 16

CSLA

Presenter Sergey Barskiy, senior consultant at Magenic Technologies www.magenic.com SergeyB@magenic.com Email your questions Send an email in order to receive the link to session materials. Allow a few days to post Feedback. CSLA. Component based, scalable, logical architecture

palani
Download Presentation

CSLA

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Presenter Sergey Barskiy, senior consultant at Magenic Technologies www.magenic.com SergeyB@magenic.com Email your questions Send an email in order to receive the link to session materials. Allow a few days to post Feedback CSLA

  2. Component based, scalable, logical architecture Application framework CSLA Author – Rockford Lhotka Resources www.lhotka.net Download CSLA from the web side Download project tracker setup document Purchase the book 2.1 / 3.0 Available in C# and VB.NET CSLA

  3. 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. What is CSLA?

  4. Supports rich UI and business layer creation through Data binding Validation Business rules Authorization / authentication What is CSLA?

  5. Advantages of framework 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 CSLA

  6. 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 CSLA

  7. 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 CSLA

  8. Key classes in the framework 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 CSLA

  9. Helper Classes 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 CSLA

  10. 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 CSLA Business Object

  11. Typical property code Purpose of PropertyHasChanged() Mark object as dirty Raise PropertyChanged Event Run Validation Rules Purpose of CanReadProperty and CanWriteProperty IsDirty() IsValid() IsNew() CSLA Business Object’s Properties

  12. 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 Business Objects / UI Interaction

  13. 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 CSLA Configuration

  14. CodeSmith templates Templates that come in download of CSLA How to create your own template to write classes from scratch Database based classes generation Code Generation

  15. 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. CSLA / ORM

  16. Questions?

More Related