Versuche und Ergebnisse Umstrukturiert

This commit is contained in:
2026-02-19 20:16:26 +01:00
parent a5d2f5490c
commit 9b95958eeb
108 changed files with 1427 additions and 7786 deletions

View File

@@ -0,0 +1,36 @@
PatternID,PatternName,Category,Frequency,Complexity,Examples,Guidelines,Status
P001,ILogic Interface Pattern,Architecture,Very High,Medium,IAccountsLogic-BLAccountsLogic-WSAccountsLogic,Use dual BL/WS implementation for all data access,Active
P002,Result<T> Error Handling,Error Handling,Very High,Low,"Task<Result<AccountDTO>> GetAccountAsync()","Always return Result<T> or Task<Result<T>>",Active
P003,ClassContainer Dependency Injection,Dependency Injection,Very High,Medium,"ClassContainer.Instance.WithInstance((ILogic logic) => ...)","Use for all service resolution and disposal",Active
P004,BL/WS Dual Implementation,Architecture,Very High,High,BLAccountsLogic vs WSAccountsLogic,Implement both database and web service access,Active
P005,DTO Entity Conversion,Data Transformation,Very High,Medium,"ConvertAccountDeviceDTOToAccountDevice()","Convert between entities and DTOs at service boundaries",Active
P006,MVVM BindableBase Pattern,UI Architecture,Very High,Medium,ViewModel : BindableBase,All ViewModels inherit from BindableBase,Active
P007,NHibernate Session Management,Data Access,Very High,High,"using (var session = new BLSession())","Manage NHibernate sessions in using statements",Active
P008,Guard Validation Pattern,Validation,High,Low,"Guard.NotNull(parameter, ""parameter"")","Validate all method parameters with Guard clauses",Active
P009,Async Task ConfigureAwait,Performance,High,Low,"await method().ConfigureAwait(false)","Use ConfigureAwait(false) for library code",Active
P010,External API Client Pattern,Integration,Medium,High,FinApiClient : RestClientBase,Inherit from RestClientBase for external APIs,Active
P011,AppModuleController Registration,UI Module Management,High,Medium,ICentronAppModuleController implementation,Register all UI modules with rights and features,Active
P012,Ribbon Interface Pattern,UI Navigation,Medium,Medium,IRibbonControlModule implementation,Implement ribbon interfaces for UI integration,Active
P013,Request/Response DTO Pattern,Web Service,Very High,Medium,SearchAccountsThroughPagingRequest,Use typed request/response objects for web services,Active
P014,Cache Update Service Pattern,Performance,Low,High,CacheUpdateService with background execution,Implement background services for cache management,Active
P015,Authentication Attribute Pattern,Security,High,Low,[Authenticate] on web service methods,Apply authentication attributes to all protected endpoints,Active
P016,Localization Resource Pattern,Internationalization,High,Medium,"LocalizedStrings.resx, LocalizedStrings.en.resx","Support German primary with English fallback",Active
P017,Database Script Versioning,Data Migration,High,High,"ScriptMethod{number}.cs with ApplicationVersion","Version all database changes with sequential scripts",Active
P018,User Rights Constant Pattern,Security,High,Medium,"UserRightsConst.Sales.Customer.SHOW_*","Organize user rights in hierarchical constants",Active
P019,Settings Management Pattern,Configuration,High,Medium,"ApplicationSettings table vs legacy Stammdat","Use ApplicationSettings for new settings only",Active
P020,Entity Validation Pattern,Business Logic,High,Medium,Entity property validation in BL classes,Implement business rule validation in entity classes,Active
P021,Audit Trail Pattern,Data Security,Medium,Medium,"CreatedByI3D, ChangedByI3D, DeletedByI3D columns","Include audit columns in all business tables",Active
P022,Soft Delete Pattern,Data Management,High,Low,"IsDeleted, DeletedDate, DeletedByI3D","Use soft deletes instead of hard deletes",Active
P023,Background Service Pattern,Performance,Medium,High,ManagedBackgroundService base class,Inherit from ManagedBackgroundService for background tasks,Active
P024,JSON Web Token Pattern,Security,Medium,Medium,JWT token management in external APIs,Use JWT for external API authentication,Active
P025,Circuit Breaker Pattern,Integration,Low,High,Error handling with retry logic,Implement circuit breakers for external service calls,Active
P026,Repository Pattern,Data Access,High,High,"EntityBL classes with DAO access","Implement repository pattern through BL classes",Active
P027,Unit of Work Pattern,Data Access,High,High,BLSession manages NHibernate session,Use BLSession for transaction boundaries,Active
P028,Observer Pattern,UI Updates,Medium,Medium,INotifyPropertyChanged implementation,Use for UI data binding and change notifications,Active
P029,Command Pattern,UI Actions,High,Medium,DelegateCommand implementations,Use commands for UI actions and button bindings,Active
P030,Factory Pattern,Object Creation,Medium,Medium,"WebServiceBL creates base BL instances","Use factories for complex object creation",Active
P031,Decorator Pattern,Cross-cutting Concerns,Medium,Medium,WebServiceBL decorates base BL with DTO conversion,Use for adding behavior to existing classes,Active
P032,Template Method Pattern,Code Reuse,Medium,Medium,Base BL classes with virtual methods,Define algorithm structure in base classes,Active
P033,Strategy Pattern,Conditional Logic,Medium,High,Different authentication strategies,Use for varying algorithms or business rules,Active
P034,Facade Pattern,System Integration,High,High,CentronRestService as API facade,Provide simplified interface to complex subsystems,Active
P035,Proxy Pattern,Remote Access,High,High,WS Logic classes proxy to web services,Use for remote service access and caching,Active
1 PatternID PatternName Category Frequency Complexity Examples Guidelines Status
2 P001 ILogic Interface Pattern Architecture Very High Medium IAccountsLogic-BLAccountsLogic-WSAccountsLogic Use dual BL/WS implementation for all data access Active
3 P002 Result<T> Error Handling Error Handling Very High Low Task<Result<AccountDTO>> GetAccountAsync() Always return Result<T> or Task<Result<T>> Active
4 P003 ClassContainer Dependency Injection Dependency Injection Very High Medium ClassContainer.Instance.WithInstance((ILogic logic) => ...) Use for all service resolution and disposal Active
5 P004 BL/WS Dual Implementation Architecture Very High High BLAccountsLogic vs WSAccountsLogic Implement both database and web service access Active
6 P005 DTO Entity Conversion Data Transformation Very High Medium ConvertAccountDeviceDTOToAccountDevice() Convert between entities and DTOs at service boundaries Active
7 P006 MVVM BindableBase Pattern UI Architecture Very High Medium ViewModel : BindableBase All ViewModels inherit from BindableBase Active
8 P007 NHibernate Session Management Data Access Very High High using (var session = new BLSession()) Manage NHibernate sessions in using statements Active
9 P008 Guard Validation Pattern Validation High Low Guard.NotNull(parameter, "parameter") Validate all method parameters with Guard clauses Active
10 P009 Async Task ConfigureAwait Performance High Low await method().ConfigureAwait(false) Use ConfigureAwait(false) for library code Active
11 P010 External API Client Pattern Integration Medium High FinApiClient : RestClientBase Inherit from RestClientBase for external APIs Active
12 P011 AppModuleController Registration UI Module Management High Medium ICentronAppModuleController implementation Register all UI modules with rights and features Active
13 P012 Ribbon Interface Pattern UI Navigation Medium Medium IRibbonControlModule implementation Implement ribbon interfaces for UI integration Active
14 P013 Request/Response DTO Pattern Web Service Very High Medium SearchAccountsThroughPagingRequest Use typed request/response objects for web services Active
15 P014 Cache Update Service Pattern Performance Low High CacheUpdateService with background execution Implement background services for cache management Active
16 P015 Authentication Attribute Pattern Security High Low [Authenticate] on web service methods Apply authentication attributes to all protected endpoints Active
17 P016 Localization Resource Pattern Internationalization High Medium LocalizedStrings.resx, LocalizedStrings.en.resx Support German primary with English fallback Active
18 P017 Database Script Versioning Data Migration High High ScriptMethod{number}.cs with ApplicationVersion Version all database changes with sequential scripts Active
19 P018 User Rights Constant Pattern Security High Medium UserRightsConst.Sales.Customer.SHOW_* Organize user rights in hierarchical constants Active
20 P019 Settings Management Pattern Configuration High Medium ApplicationSettings table vs legacy Stammdat Use ApplicationSettings for new settings only Active
21 P020 Entity Validation Pattern Business Logic High Medium Entity property validation in BL classes Implement business rule validation in entity classes Active
22 P021 Audit Trail Pattern Data Security Medium Medium CreatedByI3D, ChangedByI3D, DeletedByI3D columns Include audit columns in all business tables Active
23 P022 Soft Delete Pattern Data Management High Low IsDeleted, DeletedDate, DeletedByI3D Use soft deletes instead of hard deletes Active
24 P023 Background Service Pattern Performance Medium High ManagedBackgroundService base class Inherit from ManagedBackgroundService for background tasks Active
25 P024 JSON Web Token Pattern Security Medium Medium JWT token management in external APIs Use JWT for external API authentication Active
26 P025 Circuit Breaker Pattern Integration Low High Error handling with retry logic Implement circuit breakers for external service calls Active
27 P026 Repository Pattern Data Access High High EntityBL classes with DAO access Implement repository pattern through BL classes Active
28 P027 Unit of Work Pattern Data Access High High BLSession manages NHibernate session Use BLSession for transaction boundaries Active
29 P028 Observer Pattern UI Updates Medium Medium INotifyPropertyChanged implementation Use for UI data binding and change notifications Active
30 P029 Command Pattern UI Actions High Medium DelegateCommand implementations Use commands for UI actions and button bindings Active
31 P030 Factory Pattern Object Creation Medium Medium WebServiceBL creates base BL instances Use factories for complex object creation Active
32 P031 Decorator Pattern Cross-cutting Concerns Medium Medium WebServiceBL decorates base BL with DTO conversion Use for adding behavior to existing classes Active
33 P032 Template Method Pattern Code Reuse Medium Medium Base BL classes with virtual methods Define algorithm structure in base classes Active
34 P033 Strategy Pattern Conditional Logic Medium High Different authentication strategies Use for varying algorithms or business rules Active
35 P034 Facade Pattern System Integration High High CentronRestService as API facade Provide simplified interface to complex subsystems Active
36 P035 Proxy Pattern Remote Access High High WS Logic classes proxy to web services Use for remote service access and caching Active