Hi there, I've just inherited a web-based travel request system to support and maintain. I can - more or less - follow the logic of it all, but I can't figure out why certain design decisions were made and I was wondering if you could help out. I've already discovered "Unobtrusive Javascript" as a result of this for example, so it could be a tactic I've just not read about before.
Case in point. Depending on about 8 different factors, each request requires emails sent out to one of four types of managers to authorise the request as well as other emails sent to people for information only.
- Client-side javascript keeps track of which manager type needs emails as the request is made so a person of that rank can be chosen to receive the email.
- Code behind the page plays dumb but saves only whether an email is required to be sent to each of the four manager types and the id of those selected. Not which type of email is to be sent.
- Finally, all mail sending is done in an Oracle Sproc which again recalculates all the emails to be sent out in which order and to whom along with which emails are information only and which are to ask for authorisation.
This seems a bit overly complex. Is there any reason (aside from keeping requests to the DB to a minimum) all the email logic, creation, and sending should be in one sproc and not in the code-behind of a page? Why repeat the same logic three times in three tiers?
Thoughts welcome.