Method/proc for every type of call, or just one and let the client slice and dice?

  • Thread starter Thread starter Ronald S. Cook
  • Start date Start date
R

Ronald S. Cook

So we'll have a SelectPens function and associated proc to bring back all
pens to the client. Now think about all the variations that might be needed
(many). For example, to show the pen feed sequence I'll need a subset of
fields and ordered by FeedSequence.



Option 1) I've seen some shops where they have a function (and associated
proc) for every slice and dice.

Option 2) I've seen some shops where they have a function for every slice
and dice, but then just use the one stpSelectPens proc (they then slice and
dice it in the business layer before returning to the client)

Option 3) I've seen some shops where they have a single function and proc
(stpSelectPens) and then the client can slice and dice all it wants to
present to the user



I'm leaning toward option 3. Any other opinions?



Thanks,

Ron
 
Ronald,

Is there any way you could have your function in the lower levels take
some sort of filter? This way, you can have the business layer decide what
to pass for a filter and get the results that it needs, without having to
push a whole bunch of data over the line unecessarily (and waste processing
cycles as well).

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top