TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Simon Harrington
NA
3
0
Need help moving business rules from UI to BLL
Jun 30 2010 1:09 AM
Hi,
I have wrote a 3-tier app for college in .Net 3.5 and I want to use it to show a potential employer as soon as possible. I've realised at the end of it that my decision to do error checking of empty fields and date formats in the UI means that I have put business logic there instead of the BLL. At the moment by BLL is pretty useless as it just takes a DTO from the UI and passes it straight through to the DAL during the appropriate method call, and returns a DTO or List of them in most cases.
I have since read about CSLA.Net which looks good but I don't have time to do a re-write in that particular framework as it looks pretty complex to me. I am looking for the quickest way that results in a good way. I will paste what I have below. Any help very much appreciated!
UI - MainAttractionsView.cs
_________________________
if (ErrorCheckOk(attractionInfo))
{
//some code
HolidayPlanner.BLL.Attraction attractionBLL = new HolidayPlanner.BLL.Attraction();
attractionBLL.AddAttraction(attractionInfo);
}
BLL - Attractions.cs
__________________________
public void AddAttraction(AttractionInfo attractionInfo)
{
SQLServerDAL.Attraction attractionDAL = new SQLServerDAL.Attraction();
attractionDAL.AddAttraction(attractionInfo);
}
DAL - Attraction.cs
__________________________
public void AddAttraction(AttractionInfo attractionInfo)
{
//update DB
}
Note: My AttractionInfo object is just a DTO that has private fields, a constructor and public properties.
Many thanks for any advice.
Simon.
Reply
Answers (
2
)
object oriented analysis and design
about dynamic css div on mouseover or mouse click