Click here to Skip to main content
15,899,679 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
AnswerRe: Azure is cool but makes me nervous Pin
Eddy Vluggen21-Dec-09 6:12
professionalEddy Vluggen21-Dec-09 6:12 
QuestionHow to control another application Pin
cullyk11-Dec-09 16:13
cullyk11-Dec-09 16:13 
AnswerRe: How to control another application Pin
Luc Pattyn11-Dec-09 17:35
sitebuilderLuc Pattyn11-Dec-09 17:35 
GeneralRe: How to control another application Pin
cullyk11-Dec-09 18:02
cullyk11-Dec-09 18:02 
QuestionBest way to share the load on a project for two developers? Pin
buzzwright3-Dec-09 11:36
buzzwright3-Dec-09 11:36 
AnswerRe: Best way to share the load on a project for two developers? Pin
Eddy Vluggen11-Dec-09 11:40
professionalEddy Vluggen11-Dec-09 11:40 
Questiongood production software should contain some or most of the following? Pin
boyGenius22-Nov-09 3:02
boyGenius22-Nov-09 3:02 
QuestionDynamic filters in n-tier applications - how to implement? Pin
midix18-Nov-09 5:13
midix18-Nov-09 5:13 
I was thinking about a scenario which is often seen. Let's start form the user perspective. He opens a web page and there is some data table and filters like that:
Filter by: <field names="" combobox="" here=""> equals

User chooses a field name and enters some value and submits that.

Web application (presentation layer) takes user input and transfers the request to the web service (using automatic .NET XML serialization). So it seems data transfer object pattern can be used here.

Then my web service transforms that DTO to some valid query. Let's assume we are using some OR/M tool to query it for objects which satisfies the query. Also let's assume that OR/M tool offers some easy way to construct dynamic queries (BTW, LINQ-to-SQL has some problems with this).

So the question is - how to better pass data from user form to the data access layer (OR/M tool) so the dynamic query could be generated with less hassle? It would be awful to have web method for each field like this: GetCustomerByName(string name), GetCustomerByCity ... and so on. Then I have to analyze the user input and call appropriate web method. But maybe it is the right way?

I prefer some method GetCustomersByFilter, so then I can almost directly pass the request to web service and then can convert the request to query in OR/M servicing component. But what to pass to this GetCustomersByFilter method? Dictionary with field names as keys? Many nullable parameters? Custom objects?

It would be nice to use the same data structures that are used to pass data to the web application - the same data transfer objects, I guess. Like this:
Customer[] GetCustomersByFilter(Customer filter);

but then I have to allow all the fields of Customer to be nullable so I can later see which fields are used as filters. And if that does not correspond my business/validation rules (if rules say - some property cannot be null) than it would be a bit confusing. Also if I would like to use some generator to create web forms based on my DTO objects, it would be impossible to mark required fields easily just by detecting if some field is nullable or not.

So maybe I need some other object, like CustomerFilter with all nullable fields? Wouldn't it be overkill to have two classes for each object (also, accounting that those DTOs are converted to domain entities later - then we have even more classes)?

This dynamic filtering issue is really bugging me. Has anybody any experience with that, especially using domain driven design?

Thanks.
QuestionDocument Management Syatem Pin
Odd Arne17-Nov-09 7:16
Odd Arne17-Nov-09 7:16 
AnswerRe: Document Management Syatem Pin
Sir Dot Net19-Nov-09 7:58
Sir Dot Net19-Nov-09 7:58 
AnswerRe: Document Management Syatem Pin
Robin_Roy2-Dec-09 18:42
Robin_Roy2-Dec-09 18:42 
AnswerRe: Document Management Syatem Pin
Eddy Vluggen6-Dec-09 2:11
professionalEddy Vluggen6-Dec-09 2:11 
AnswerRe: Document Management Syatem Pin
puri keemti7-Dec-09 0:34
puri keemti7-Dec-09 0:34 
AnswerRe: Document Management Syatem Pin
David Lario22-Jan-10 9:12
David Lario22-Jan-10 9:12 
QuestionDoes a developer need local administrator rights? Pin
Windswept13-Nov-09 21:55
Windswept13-Nov-09 21:55 
AnswerRe: Does a developer need local administrator rights? Pin
Pete O'Hanlon15-Nov-09 9:36
mvePete O'Hanlon15-Nov-09 9:36 
GeneralRe: Does a developer need local administrator rights? Pin
Windswept16-Nov-09 9:32
Windswept16-Nov-09 9:32 
AnswerRe: Does a developer need local administrator rights? Pin
Ian Shlasko16-Nov-09 10:41
Ian Shlasko16-Nov-09 10:41 
GeneralRe: Does a developer need local administrator rights? Pin
Windswept16-Nov-09 21:41
Windswept16-Nov-09 21:41 
GeneralRe: Does a developer need local administrator rights? Pin
Ian Shlasko17-Nov-09 3:32
Ian Shlasko17-Nov-09 3:32 
AnswerRe: Does a developer need local administrator rights? Pin
Sir Dot Net19-Nov-09 7:50
Sir Dot Net19-Nov-09 7:50 
AnswerRe: Does a developer need local administrator rights? [modified] Pin
Flint-Bear8-Dec-09 5:14
Flint-Bear8-Dec-09 5:14 
QuestionEmpty IEnumerable or null Pin
Gideon Engelberth10-Nov-09 9:19
Gideon Engelberth10-Nov-09 9:19 
AnswerRe: Empty IEnumerable or null Pin
Luc Pattyn10-Nov-09 13:36
sitebuilderLuc Pattyn10-Nov-09 13:36 
GeneralRe: Empty IEnumerable or null Pin
Gideon Engelberth16-Nov-09 5:21
Gideon Engelberth16-Nov-09 5:21 

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.