Click here to Skip to main content
15,902,635 members
Home / Discussions / C#
   

C#

 
GeneralRe: help me out pls Pin
lawrenceinba16-Jan-09 21:01
lawrenceinba16-Jan-09 21:01 
QuestionHow to add icon in control pannel using c# Pin
azad yadav16-Jan-09 17:35
azad yadav16-Jan-09 17:35 
AnswerRe: How to add icon in control pannel using c# Pin
Luc Pattyn16-Jan-09 18:17
sitebuilderLuc Pattyn16-Jan-09 18:17 
QuestionCreate window user in c# Pin
azad yadav16-Jan-09 17:04
azad yadav16-Jan-09 17:04 
AnswerRe: Create window user in c# Pin
EliottA16-Jan-09 21:29
EliottA16-Jan-09 21:29 
QuestionNew explorer menu design samples Pin
phoopwint16-Jan-09 16:42
phoopwint16-Jan-09 16:42 
QuestionBusiness Objects Pin
CodingYoshi16-Jan-09 12:30
CodingYoshi16-Jan-09 12:30 
AnswerRe: Business Objects Pin
Jon Rista16-Jan-09 13:42
Jon Rista16-Jan-09 13:42 
Well, it may not be the answer your looking for....but I would remove .Save() from all of your business objects entirely, and isolate all persistance logic completely within your DAL. You have the fundamental issue that I call "Blending of Concerns" (I guess it could be called an anti-pattern). You have mixed the concerns of persistance with the concerns of your business, which, while it can make the USE of your object model simple...it greatly complicates maintenance and extension.

If you are really looking for the "best" way, I would say that one of the best ways is to follow Domain Driven Design (DDD) and implement a Domain Model. Domain models are systems of business objects (entities and value objects) and some support types. Entities implement business rules, but contain absolutely no persistance logic (or, perhapse some minimal support for persistance through the use of specialized collections). Repositories encapsulate the bulk of persistance logic. Instead of calling stored procs, an Object/Relational Mapper is often used to automatically handle graph retrievals and inserts/updates/deletes of graphs of objects. You will end up with more objects by following DDD principals, but each class will be responsible for less, do less, and generally be smaller in size. Services wrap up the orchestration of loading, editing, and saving business objects with the repositories, a unit of work, and any other support types.

http://domaindrivendesign.org/
GeneralRe: Business Objects Pin
CodingYoshi16-Jan-09 14:06
CodingYoshi16-Jan-09 14:06 
GeneralRe: Business Objects Pin
Jon Rista16-Jan-09 14:22
Jon Rista16-Jan-09 14:22 
GeneralRe: Business Objects Pin
Colin Angus Mackay16-Jan-09 15:17
Colin Angus Mackay16-Jan-09 15:17 
GeneralRe: Business Objects Pin
Jon Rista16-Jan-09 15:26
Jon Rista16-Jan-09 15:26 
GeneralRe: Business Objects Pin
N a v a n e e t h16-Jan-09 15:34
N a v a n e e t h16-Jan-09 15:34 
GeneralRe: Business Objects Pin
Jon Rista16-Jan-09 15:40
Jon Rista16-Jan-09 15:40 
GeneralRe: Business Objects Pin
CodingYoshi16-Jan-09 17:20
CodingYoshi16-Jan-09 17:20 
GeneralRe: Business Objects Pin
Jon Rista16-Jan-09 17:32
Jon Rista16-Jan-09 17:32 
GeneralRe: Business Objects Pin
CodingYoshi16-Jan-09 20:23
CodingYoshi16-Jan-09 20:23 
GeneralRe: Business Objects Pin
Jon Rista16-Jan-09 20:31
Jon Rista16-Jan-09 20:31 
GeneralDomain Driven Design Quickly - free ebook Pin
DaveyM6917-Jan-09 2:22
professionalDaveyM6917-Jan-09 2:22 
GeneralRe: Domain Driven Design Quickly - free ebook Pin
CodingYoshi17-Jan-09 13:17
CodingYoshi17-Jan-09 13:17 
AnswerRe: Business Objects Pin
Mark Graham26-Feb-09 23:43
Mark Graham26-Feb-09 23:43 
Questiondisplay data from a database in a label Pin
ferronrsmith16-Jan-09 10:21
ferronrsmith16-Jan-09 10:21 
AnswerRe: display data from a database in a label Pin
Alaric_16-Jan-09 10:25
professionalAlaric_16-Jan-09 10:25 
GeneralRe: display data from a database in a label Pin
ferronrsmith16-Jan-09 11:24
ferronrsmith16-Jan-09 11:24 
GeneralRe: display data from a database in a label Pin
ferronrsmith16-Jan-09 11:25
ferronrsmith16-Jan-09 11:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.