Windows 8 applications follow what is considered the normal pattern in Software Architecture. In the words of Ted Neward it goes a little something like this:
The first box indicating the UI tier, the second box being the logical middle tier and the cylinder of course being our data tier. For our purposes, this application will have the following physical architecture:
For this blog post, I’m going to concentrate on the data tier. We will need to have an idea of the information that we wish to track in our application. I am very much a Crayola architect, so I grabbed my little TouchSmart machine and opened OneNote and began drawing my thoughts. The main items that we will be tracking are Meetings, Members, and Meetings that Members have attended. Here is my rough sketch:
This equates to the following data model, created in SQL Server 2012 Express:
The database has 3 tables, Members, Meetings, and MeetingAttendanceRegistries. The MeetingAttendanceRegistries table will keep track of which meetings a Member has attended. In the Members and Meetings table, the Id’s are both identity columns, set to auto-increment, and they are also the primary key fields for the matching foreign key columns in the MeetingAttendanceRegistries table.
Join me next time where I will show you how to implement the middle tier using ASP.NET Web API 🙂