Archive for June, 2007

Saturday, June 30th, 2007

AWSandbox and persistence

Data access is going to be via NHibernate. One of the design patterns from Martin Fowler’s “Patterns of Enterprise Application Architecture” is called Metadata Mapping. NHibernate uses O/R Mapping so this pattern is what is needed. With NHibernate 1.2 you can do the O/R Mapping using NHibernate.Mapping.Attributes. This is new to the 1.2 version.
NHibernate supports […]

No Comments » - Posted in AWSandbox by Duvall Buck

Thursday, June 28th, 2007

My Audio book for driving to work

I finished listening to “Anansi Boys” and started listening to “The Echelon Vendetta” by David Stone.
This is another spy-CIA thrillers about the hero, Micah Dalton, trying to figure out who is killing ‘agents’ for the Company. Micah is the typical macho ex-military bigger than life ‘agent’ who does what he wants because he […]

No Comments » - Posted in Audible books by Duvall Buck

Wednesday, June 27th, 2007

AWSandbox adding the first Services classes

With two domain groups starting to have objects in them I’m getting anxious to do something with them. I’m still putting off the persistence classes even though I keep thinking about them. I know that I want Services to use the domain objects to provide a collection of domain objects or single domain object. I […]

No Comments » - Posted in AWSandbox by Duvall Buck

Wednesday, June 27th, 2007

And I thought I figured this DbResouceManager issue out!!!

I have been working off and on since Friday trying to figure out why my custom resource provider factory wasn’t working. Here is what I found out for all my efforts. This is how I can reproduce the issue.

In the web page design mode select the ‘Generate Local Resources’
Copy the App_LocalResources/<page>.aspx.resx file and rename it […]

No Comments » - Posted in Today's issue by Duvall Buck

Wednesday, June 27th, 2007

Writing a DbResourceManagerProvider

DbResourceManagerProviderFactory class
It all begins here by extending the ResourceProviderFactory by overriding CreateGlobalResourceProvider and CreateLocalResourceProvider. These two methods will return my DbResourceManager (a concrete implementation of IResourceProvider). All requests for strings go through this class.
All pages are parsed during design time and all of the explicit local and global resources are validated. DbResourceManagerProvider is used to complete […]

No Comments » - Posted in DbResouceManager by Duvall Buck

Tuesday, June 26th, 2007

AWSandbox added AWSandbox.Domain.Purchasing

I added a Vendor class to the AWSandbox.Domain.Purchasing namespace and a Vendor unit test to the AWSandbox.Domain.Test.Purchasing.Test namespace. I did this in the same way I did the Person domain objects. Following good TDD I created the Vendor unit test class with an internal class named Vendor. I got the unit test to succeed. I […]

No Comments » - Posted in AWSandbox by Duvall Buck

Tuesday, June 26th, 2007

AWSandbox reorganizing the Repository

As I’m thinking about the next step I decided that I would add to the AWSandbox.Domain namespace with an AWSandbox.Domain.Person namespace and move the Contact, PersonContact, Address and PersonAddress classes into it. I would also reflect this in the AWSandbox repository. After I did this it now looks like this:
This was a move that […]

No Comments » - Posted in AWSandbox by Duvall Buck

Tuesday, June 26th, 2007

Refactoring out the internal classes in AWSandbox

I moved the two internal classes into the AWSandbox.Domain project. The PersonAddressTest unit test class now looks like this:
using NUnit.Framework;
using Rhino.Mocks;
using AWSandbox.Domain;
namespace AWSandbox.Domain.Test {
[TestFixture]
public class PersonAddressTest {
private MockRepository mock;
[SetUp]
public void SetUp() {
mock = new MockRepository();
}
[Test]
public void […]

No Comments » - Posted in AWSandbox by Duvall Buck

Tuesday, June 26th, 2007

AWSandbox and TDD

The starting point for the domain driven design of AdventureWorks’ database is the Person group/schema. The Person.Contact and the Person.Address tables are used by the HumanResources, Purchasing and Sales groups/schemas. Here are some basic use cases:

Fetch a list of all Person.Contact
Fetch a Person.Contact by Id or GUID
Fetch a list of all Person.Address
Fetch a Person.Address by […]

No Comments » - Posted in AWSandbox by Duvall Buck

Tuesday, June 26th, 2007

ASP.NET 2.0 Globalization and DbResourceManager

I’m trying to get an understanding of how all this works so I’m going to write them down here. I may get some of this wrong but I will correct it if I find inaccuracies later. ASP.NET 2.0 has made some major changes in how you deal with multiple languages for your web pages. The […]

No Comments » - Posted in DbResouceManager by Duvall Buck