Wednesday, April 29, 2009
A friend who works in web design recently pointed me in the direction of a CSS framework which could greatly reduce the time spent laying out a website.

It's called the 960 grid system, and you can find it here.

Having checked out the demo and introductory screencast, it is definitely something I'll be looking into for doing web sites in the future.

Wednesday, April 29, 2009 10:43:54 AM (GMT Standard Time, UTC+00:00) | Comments [1] | Web Design#
Sunday, April 12, 2009
I must have spent the best half of a day tearing my hair out at this.


All information here - http://stackoverflow.com/questions/739859/returning-html-from-json-webservice-what-is-the-d
Sunday, April 12, 2009 10:30:27 AM (GMT Standard Time, UTC+00:00) | Comments [0] | ASP.NET | c##
OK, so I'm starting to get to grips a little more with the Repository pattern.  Still got a long way to go, but it makes sense and in true XP style I'm going to run with it.

The namespace/deployment overview is as follows:






I've hidden some of the extra features, such as the DTO namespace.  The BusinessObjects encapsulate the 'raw' DTOs, which are used primarily in serializing the data as JSON via the WebService.

I've also not shown that the RepositoryFactory (and subsequent Repos) could be used directly without having to go via our WebService.

Remember that you can't just go to a BusinessObject and ask it to fetch itself - ALL data access is managed via the Repository.

I've also kept the interface deliberately simple - I don't want to be introducing LINQ goodness at that stage.  Everything is POCO.

You can find a related SO post here - http://stackoverflow.com/questions/741490/repository-pattern-pocos-or-iqueryable/741558#741558








Sunday, April 12, 2009 10:27:40 AM (GMT Standard Time, UTC+00:00) | Comments [0] | Database#
Saturday, April 11, 2009
Starting a new database project, the most important thing for me is to design it for test.  In order to do that effectively, we have to keep the business objects and the data access separate.

This concept is nothing new, but there's a lot of different ways to do that these days.

The first idea I had was to have the data access encapsulated within a DataProvider layer which would be interfaced directly by the application.   This would create and return basic DTO objects for the application to play with, as there is little to no business logic in the classes at this point.

Following discussions with my team, this morphed slightly into having the DTOs converted into fully-fledged Business Objects, which would have knowledge of the DAL and access the database in this way.

It seemed okay.... but then I got thinking about how to return a collection of objects, and how all that worked.  So that brought me to the Repository Pattern.

Simply put, the Repository Pattern abstracts the Data Access part from the Business Objects, which means that to fetch an Object, one has to go via the Repo.

There are a number of ways to implement this - doing a search will bring back a LOT of Linq-related implementations.

Right now, I'm going to keep it more in line with the original specification of this pattern.  My Repository is simply going to return the Business Objects themselves.  At the moment it is read only so there is no need for CUD - because of the way we have separated this we can easily come back to this at a later date.


Saturday, April 11, 2009 11:06:37 AM (GMT Standard Time, UTC+00:00) | Comments [0] | Database | Patterns#
Search
Archive
Links
Categories
Admin Login
Sign In
Blogroll