all posts

WhatIWantMost Adding attributes for the entities

Published to Blog on 11 Dec 2006

In my last post I defined what I believe to be the basic set of entities needed for the site. I may need to add more later, but for now they will suffice. The goal is to make a decision and keep moving. I don’t want to spend too much time over analyzing, I want to get to writing some code. Call it agile development or whatever you would like. I know that I will learn more about how the application needs to work once I get the application working.

I spent a few minutes looking at that list over the weekend and came up with a list of attributes that I think we’ll need for each of those entities. I am taking a data centric view for this initial design and development because I will be generating a data layer and (some of) the domain layer using CodeSmith and .netTiers from the database. Because this is a smaller application driving the application from the data model should be fine.

After defining the entities and attributes I am going to “skip” early definition of the methods these entities should support. Most of the CRUD stuff will be handled by .netTiers (insert, update, delete, SelectByID, SelectAll, etc) and I have only loosely defined any domain logic so far (like copy wishlist item from userA’s wisthlist to userB’s wishlist). I will begin adding those piece-by-piece once we get the basics in place and I get to check out .netTiers’ results. 

This approach is by no means a recommendation for all projects, it is just the way I am approaching this specific project.  

That’s enough explanation and disclaimers. On with the show:

  • User: ID, FirstName, LastName, Email (Implicitly included is additional Membership, Role, and Profile stuff)

  • Address: ID, UserID, Street, City, State, Country, PostalCode, Label

  • Wishlist: ID, UserID, DateCreated

  • WishlistItem: ID, WishlistID, DateCreated ProductDesc, Size, Color, Qty, Other, Price, Url, ImageUrl, ItemCategoryID, Active

  • ItemCategory: ID, Name, Desc

  • FeaturedItem: ID, ProductDesc, Url, ReviewUrl, ImageUrl, ItemCategoryID

  • Vendor: ID, Name, Url

  • Reviewer: ID, Name, Url

Next steps: create a database adding tables to support the above entities. One of the things I read about .netTiers is that you have to explicitly create your relationships; I will have to keep that in mind when creating my tables.


Dan Hounshell
Web geek, nerd, amateur maker. Likes: apis, node, motorcycles, sports, chickens, watches, food, Nashville, Savannah, Cincinnati and family.
Dan Hounshell on Twitter