Click here to Skip to main content
15,900,973 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
AnswerRe: Non-centralized app design - Good idea? Pin
led mike8-Oct-08 5:33
led mike8-Oct-08 5:33 
QuestionCan anyone please have a look at this problem and suggest a code architecture??! URGENT HELP NEEDED!! Thanks in advance (: Pin
amit jindal6-Oct-08 1:02
amit jindal6-Oct-08 1:02 
Questionimplementing effective searching in business code(maybe with linq?) Pin
giddy_guitarist5-Oct-08 7:35
giddy_guitarist5-Oct-08 7:35 
AnswerRe: implementing effective searching in business code(maybe with linq?) Pin
Pete O'Hanlon5-Oct-08 11:21
mvePete O'Hanlon5-Oct-08 11:21 
GeneralRe: implementing effective searching in business code(maybe with linq?) Pin
giddy_guitarist5-Oct-08 17:37
giddy_guitarist5-Oct-08 17:37 
GeneralRe: implementing effective searching in business code(maybe with linq?) Pin
Pete O'Hanlon5-Oct-08 22:07
mvePete O'Hanlon5-Oct-08 22:07 
GeneralRe: implementing effective searching in business code(maybe with linq?) Pin
giddy_guitarist5-Oct-08 22:31
giddy_guitarist5-Oct-08 22:31 
AnswerRe: implementing effective searching in business code(maybe with linq?) Pin
Mark Churchill5-Oct-08 21:08
Mark Churchill5-Oct-08 21:08 
Diamond Binding's business objects expose a variety of methods for selecting sets of objects. For the simple searching we expose what you described T[] T.FindByColumn(T.Columns.Foo, value). In most apps that I've implemented then its by far the most common useage. If you were implementing your own data layer by hand, then providing FindByColumn, FindAll and for the rare occasions that you need something more complex, select by stored proc. Select by stored proc could work like T[] T.FindUsing(procName, params[]).

The next level of complexity works using NHibernate Expressions - this is a fairly simple API that covers your boolean logic scenarios. This is implemented by a FindBy that takes an Expression object. The "generic" way that this expression is constructed is by using factory methods. so expression = Expression.Or( expr1, expr2 ). Expression.Between(column, low, high), etc. This is do-able in house if you wanted to go for the learning experience - a simple implementation would be to just emit an SQL condition straight from this tree.

We also provide Hibernate Query Language support - HQL could be seen as an "object-orientated" version of SQL, referring to the model, not the DB. So you can do conditions like "order.product.department.name = 'foo'". Linq is on a similar level of complexity to this.

So theres a fair few options. My recommendation (apart from buying our product :P) would be to start with a bunch of Expression style objects for single column search (= != gt lt) and then expose a FindByExpression and perhaps some thin wrappers such as FindByColumn(...) { r FindByExpression(Expression.Eq(...)) }. Then you can build up your "library" of expressions and go from there.

Definitely don't load everything and query in memory. Imagine if you wanted only one out of the million audit records Wink | ;)


GeneralRe: implementing effective searching in business code(maybe with linq?) Pin
giddy_guitarist5-Oct-08 22:45
giddy_guitarist5-Oct-08 22:45 
GeneralRe: implementing effective searching in business code(maybe with linq?) Pin
Mark Churchill5-Oct-08 23:18
Mark Churchill5-Oct-08 23:18 
GeneralRe: implementing effective searching in business code(maybe with linq?) Pin
giddy_guitarist9-Oct-08 20:40
giddy_guitarist9-Oct-08 20:40 
QuestionDistributed Computing Special Pin
abhigad2-Oct-08 19:50
abhigad2-Oct-08 19:50 
QuestionXSS-CGI-RFI-SQL Injection Scanner Project Help Pin
Fuat Mx1-Oct-08 22:25
Fuat Mx1-Oct-08 22:25 
AnswerRe: XSS-CGI-RFI-SQL Injection Scanner Project Help Pin
ozguryasarakyar26-Dec-09 12:24
ozguryasarakyar26-Dec-09 12:24 
GeneralRe: XSS-CGI-RFI-SQL Injection Scanner Project Help Pin
Fuat Mx26-Dec-09 21:27
Fuat Mx26-Dec-09 21:27 
QuestionIntegrating scripting languages with "low-level" languages. Pin
Leslie Sanford1-Oct-08 19:45
Leslie Sanford1-Oct-08 19:45 
AnswerRe: Integrating scripting languages with "low-level" languages. Pin
led mike2-Oct-08 5:27
led mike2-Oct-08 5:27 
QuestionImplementing Model View Presenter Pin
Giorgi Dalakishvili30-Sep-08 22:18
mentorGiorgi Dalakishvili30-Sep-08 22:18 
AnswerRe: Implementing Model View Presenter Pin
stavinski1-Oct-08 3:29
stavinski1-Oct-08 3:29 
GeneralRe: Implementing Model View Presenter Pin
Giorgi Dalakishvili2-Oct-08 22:41
mentorGiorgi Dalakishvili2-Oct-08 22:41 
QuestionDesign solution for .NET application. Pin
xbuster28-Sep-08 3:11
xbuster28-Sep-08 3:11 
Questioncreating a _simple_ fine grained user based security system Pin
giddy_guitarist27-Sep-08 6:37
giddy_guitarist27-Sep-08 6:37 
AnswerRe: creating a _simple_ fine grained user based security system Pin
Pete O'Hanlon27-Sep-08 8:54
mvePete O'Hanlon27-Sep-08 8:54 
GeneralRe: creating a _simple_ fine grained user based security system Pin
giddy_guitarist27-Sep-08 20:22
giddy_guitarist27-Sep-08 20:22 
GeneralRe: creating a _simple_ fine grained user based security system Pin
Pete O'Hanlon28-Sep-08 9:21
mvePete O'Hanlon28-Sep-08 9: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.