Click here to Skip to main content
15,891,184 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: The Code Repeater Pin
JeremyBob26-Mar-12 22:26
JeremyBob26-Mar-12 22:26 
GeneralRe: The Code Repeater Pin
Stefan_Lang28-Mar-12 0:28
Stefan_Lang28-Mar-12 0:28 
GeneralN-Tier architecture PinPopular
virang_2112-Mar-12 18:08
virang_2112-Mar-12 18:08 
GeneralRe: N-Tier architecture Pin
RobCroll12-Mar-12 18:42
RobCroll12-Mar-12 18:42 
GeneralRe: N-Tier architecture Pin
virang_2112-Mar-12 19:06
virang_2112-Mar-12 19:06 
JokeRe: N-Tier architecture Pin
Shameel14-Mar-12 2:03
professionalShameel14-Mar-12 2:03 
GeneralRe: N-Tier architecture Pin
StM0n12-Mar-12 19:09
StM0n12-Mar-12 19:09 
GeneralRe: N-Tier architecture Pin
CDP180212-Mar-12 21:58
CDP180212-Mar-12 21:58 
virang_21 wrote:
Why in the world do you need BL.Service and BL tiers when all it is doing is
calling method in DAL...Mad | :mad:


I think the same when I have to write a method like this in the application logic. To my defense: Most methods do a little more than that, but there are cases where you simply want to have some data without any great rules or conditions.

It looks like the developer fell into one trap probably everybody sooner or later falls into. A service may not take any input without checking it for validity, checking all applicable rules and possible also some technical requirements. This clearly is the job of the application logic and should be implemented in that layer.

Now we can build a 'dumb' frontend or client that just sends requests to the application logic and reports back whatever answers it gets. This works, but for the user this is less than perfect. A user interface should clearly show the user's options at any time and not blindly send off requests and wait for the application logic to grant or deny them.

In order to do that, the frontend or client must replicate the rule and error checking of the application logic to know which options must be enabled or disabled. Avoiding this kind of redundancy is not as easy as it appears. Solving this problem by moving the application logic into the frontend of course is no good solution, but it looks a little like the man who wrote this application made the wrong choice between two evils.
I'm invincible, I can't be vinced



GeneralRe: N-Tier architecture Pin
krumia17-Mar-12 20:44
krumia17-Mar-12 20:44 
GeneralRe: N-Tier architecture Pin
CDP180218-Mar-12 0:40
CDP180218-Mar-12 0:40 
GeneralRe: N-Tier architecture Pin
Stefan_Lang14-Mar-12 2:58
Stefan_Lang14-Mar-12 2:58 
GeneralRe: N-Tier architecture Pin
Nitin20TechBLR15-Mar-12 18:26
Nitin20TechBLR15-Mar-12 18:26 
GeneralMicrosoft "help" PinPopular
Alan Balkany7-Mar-12 8:28
Alan Balkany7-Mar-12 8:28 
GeneralRe: Microsoft "help" PinPopular
Stefan_Lang8-Mar-12 3:41
Stefan_Lang8-Mar-12 3:41 
GeneralRe: Microsoft "help" Pin
cruest13-Mar-12 3:23
cruest13-Mar-12 3:23 
GeneralRe: Microsoft "help" Pin
SASS_Shooter1-May-12 6:14
SASS_Shooter1-May-12 6:14 
GeneralRe: Microsoft "help" Pin
Nelek10-Mar-12 15:18
protectorNelek10-Mar-12 15:18 
GeneralRe: Microsoft "help" Pin
Gary Wheeler13-Mar-12 0:35
Gary Wheeler13-Mar-12 0:35 
GeneralRe: Microsoft "help" Pin
BrainiacV13-Mar-12 4:26
BrainiacV13-Mar-12 4:26 
GeneralRe: Microsoft "help" Pin
Fabio Franco13-Mar-12 6:42
professionalFabio Franco13-Mar-12 6:42 
GeneralRe: Microsoft "help" Pin
Nunnenkamp13-Mar-12 8:56
Nunnenkamp13-Mar-12 8:56 
GeneralRe: Microsoft "help" Pin
KP Lee13-Mar-12 12:01
KP Lee13-Mar-12 12:01 
GeneralRe: Microsoft "help" Pin
Jwalant Natvarlal Soneji13-Mar-12 18:03
Jwalant Natvarlal Soneji13-Mar-12 18:03 
GeneralRe: Microsoft "help" PinPopular
Reelix14-Mar-12 1:14
Reelix14-Mar-12 1:14 
GeneralRe: Microsoft "help" Pin
Lutosław15-Mar-12 11:49
Lutosław15-Mar-12 11:49 

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.