Ratko Ćosić - lamentations of one programmer

ponedjeljak, 03.11.2008.

Session Completed: C# Business Objects - Patterns of Application Business Core

Session title: C# Business Objects - Patterns of Application Business Core (C# Poslovni objekti - Arhitektura poslovnog aplikacijskog sloja)
Held at: Microsoft Community Cakovec, November 3, 2008.

Trivia: I made this session as an introduction to my future ramblings about business core and Cloud platform, which is gonna change our world of thinking.
Why not start with elemental stuff as a business object? It is fairly an entity in our domain business model, but sounds very intelligent and essential.
During the session I was teasing and proposing alternate solutions to the current and upcoming infrastructure, and time will show if I was right....



Session Outline (on Croatian):

Intro
C# Poslovni objekti
Arhitektura poslovnog aplikacijskog sloja

Novi izazovi
“The world is changed. I feel it in the water. I feel it in the earth. I smell it in the air. “ – Galadriel, The Lord of the Rings

Ubrzani razvoj platformskih tehnologija
Potrebe za novim znanjima i vještinama rastu
Povećani zahtjevi kupaca/korisnika
Pritisak na isplativost novih tehnologija istovremeno sa podrškom za sve veći broj zastarjelih tehnologija
Prilike za “greenfield” projekte relativno male

Promjena paradigme
“We hire people to build doghouses, give them cranes and ask them to build scyscapers. Then we’re surprised when they fail.” – Eileen Steets Quann

Design by Contract (DBC)
Aspect-Oriented Programming (AOP)
Design Patterns
Rapid Application Development (RAD), RTE
Agile Development, Test-Driven Development (TDD)
Refactoring

Poslovni aplikacijski sloj
Višeslojna arhitektura
Sloj poslovne logike
Problem validacije
Windows Application Server: WF + WCF
SQL Data Services (storage in a “Cloud”)

Naš cilj: poslovni objekti
Domenski objekti (DDD)
DataSet, XML/XSD, LINQ
“Pametni” objekti: poslovna logika i sigurnost
Anatomija posl. objekta:
interface + code + state
Mobilni objekti

Pomagala za dizajn poslovnih objekata
Design Patterns
Software Factories
CSLA.NET = osnovni gradivni blok
Enterprise Library – Application Blocks
FxCop, CodeAnalysis
Castle Project, NHibernate
LINQ / ADO.NET Entity Framework
MSDN Code Library, CodeProject

Ciljevi dizajna poslovnih objekata
Kreiranje poslovnih objekata (Factory Pattern)
“N-level undo capability”
Validacija objekta kroz provjeru poslovnih pravila
Spremanje i pristup podacima
Praćenje promjene podataka (“dirty”)
Povezanost hijerarhije objekata (“lazy loading”)
Podrška različitih fizičkih konfiguracija (DataPortal)
Podrška za data-binding
Integrirana autentifikacija i autorizacija

Pristup poslovnim objektima
Kreiranje novog objekta:
Customer c = Customer.NewCustomer();
Dohvat poslovnog objekta:
Customer c = Customer.GetCustomer(criteria);

N-level undo – “svijest” objekta
UndoableBase, IUndoableObject
Upravljanje snimkama stanja (“snapshots”): CopyState(), UndoChanges(), AcceptChanges()
IEditableObject: BeginEdit(), CancelEdit(), ApplyEdit()
[NotUndoable] atribut

Podrška za data binding
IEditableObject : BeginEdit(), CancelEdit(), EndEdit()
INotifyPropertyChanged : PropertyChanged
IBindingList
IDataErrorInfo

Validacija poslovnih objekata
Validation Application Block (Microsoft Enterprise Library)
IsValid
ValidationRules
RuleHandler, RuleArgs
BrokenRulesCollection
CommonRules

Integracija autentifikacije i autorizacije
Autentifikacija – identitet i profil korisnika
Windows integrated security, Active Directory
Generic security model
Login(), Logout()
“graceful degradation”
adaptacija post. sustavu
AuthorizationRules

Data Portal koncept
Data Persistence
Object-Relational Mapping (ORM)
Data Caching
Message Router pattern
.NET remoting, web servisi, Enterprise Services, WCF
Windows Application Server (“Dublin”)

Vrijeme je za demo aplikaciju!
....

Software Factory arhitektura



Budućnost poslovnih objekata
ADO.NET Entity Framework
Workflow Foundation 4.0 / BizTalk Services
Microsoft Business Rules Framework
Visual Studio 2010 (DSL Toolkit)
“Oslo” (M + Quadrant + Repository)
Microsoft Blueprints
SQL Data Services
Microsoft Azure (“Cloud”)

Umjesto zaključka ...
ICT svijet se mijenja - prihvatimo taj izazov!
Možemo pobijediti kompleksnost
Pametni poslovni objekti - specifičnost našeg poslovanja, načina rada, razmišljanja
Budućnost je u povezivanju logike (Cloud)
BUDITE KREATIVNI I JEDINSTVENI!

Literatura
Gamma, Erich, et al. (GoF): Design Patterns: Elements of Reusable Object-Oriented Software, 1994
Fowler, Martin, et al.: Patterns of Enterprise Application Architecture; Addison-Wesley, 2002
Fowler, Martin, et al.: Refactoring: Improving the Design of Existing Code; Addison-Wesley, 1999
Greenfield, Jack; Keith Short: Software Factories: Assembling Applications with Patterns, Models, Frameworks, and Tools; Wiley Publishing , 2006
Lhotka, Rockford: Expert C# 2005 Business Objects; Apress, 2006
Cwalina, Krysztof, Brad Abrams: Framework Design Guidelines, McGraw-Hill, 2007

http://castleproject.org/
http://www.hibernate.org/
http://msdn.microsoft.com/hr-hr/architecture/
http://www.microsoft.com/soa/products/oslo.aspx
http://www.pluralsight.com/community/blogs/dbox/

Pitanja ?
Dobrodošli ste na mom blogu:
http://rcosic.blog.hr




- 23:01 - Comments (0) - Print - #

<< Arhiva >>

Creative Commons License
Ovaj blog je ustupljen pod Creative Commons licencom Imenovanje-Nekomercijalno-Dijeli pod istim uvjetima.