A while ago I wrote about Mixins in C# 3.0, at the time I was saying that you can get some of the functionality, but not all, from some of the new language features in C#3.0. The solution is a bit of a fudge because the language doesn’t support the concept. I’ve been looking at …
Tag Archives: design patterns
DALs and the DAAB
I’ve been pondering something that was raised in passing earlier this week and that is the relationship between a DAL (Data Abstraction Layer) and the DAAB (Data Access Application Block). It was briefly mentioned in a conversation that I had that the DAAB provides the functionality of a DAL because the developer doesn’t need to …
What is a DAL (Part 4)
As has been mentioned previously, one of the purposes of the DAL is to shield that application from the database. That said, what happens if a DAL throws an exception? How should the application respond to it? In fact, how can it respond to an exception that it should not know about? If something goes …
What is a DAL (Part 3)
In this continuation of my series on the DAL I’m going to show the ability to create several DALs and have a Factory class instantiate the correct DAL based on settings in a config file. One of the purposes of the DAL is to shield the application from the detail of accessing the database. You …
What is a DAL? (Part 2)
In my last post about the DAL I presented a very basic DAL based on a static class. This is fine for small applications, but for larger applications the limitations will soon start to show themselves. In this post I’ll convert the DAL to a series of singletons so that each singleton operates on a …
What is a DAL?
I occasionally see posts on forums asking for help with some database problem. Then I see they’ve been using the the wizards in Visual Studio (which is okay for a beginner, but should really be ditched once the basic concepts have been learned). I suggest that they use a DAL and I get lots of …
The new Model VIew Controller
I’ve always had an inkling that there was something not quite right about Model-View-Controller pattern. Something didn’t sit right with me that (1) the View ask the Controller to do something, (2) the Controller in turn manipulated the Model, (3) the Model would emit events to tell the View that it had changed and finally (4) the View would …