Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2008 > C# 2008 aka C# 3.0
|
C# 2008 aka C# 3.0 Discuss the Visual C# 2008 (aka C# 3.0) language
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2008 aka C# 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 17th, 2008, 03:13 AM
Friend of Wrox
 
Join Date: Sep 2007
Posts: 169
Thanks: 7
Thanked 2 Times in 2 Posts
Default Need help with 3-teir architecture

Hi

I am trying to do a 3-teir architecture. So I been following along with this tutorial http://www.asp.net/learn/data-access...ial-01-cs.aspx

I am now trying to do my own and having trouble getting started.

 Currently I have a database with a Characters Table. It has like 218 rows in there. In each row there is a CharacterID(PK), CharacterName(used for the checkbox ID), CharacterImage(the path to the image) and a SortOrder. Now these 218 rows get divided into 6 tables. Each table varies of data. The data that gets put in the table varies too. Like the first table will have 6 cells(the first cell is not part of the database. It selects the row and was made on the fly when I was looping around and grabbing the values out of the database). The 3rd table for instance has 4 cells.


If that did not make sense or if your having trouble visualizing it here are screen shots of how the final tables look like(Basically the other 3 tables not show just repeat the format of these 3 just with different data)

http://img401.imageshack.us/img401/4...shot001rx6.jpg

http://img525.imageshack.us/img525/6...shot002yv9.jpg

http://img181.imageshack.us/img181/5...shot003zt9.jpg

 So those screenshots are from my old version what I did with all inline sql. Now I am trying to get practice with the 3-teir arch.

So I am not sure how I am to do this in the 3-teir architecture.

The only thing I can think of is something like this.

    public japanese.CharactersDataTable GetCharcters(int start, int end)
    {
        return CharacterAdapter.getCharacters(start, end);

    }

So I then would pass what Id the table should start filtering at. So like the first table its start would be 1 and its end 51. Then for the next table I would start at 52 and end at 76.

 But I still don't know how to hook that up all to the table since I can't pass a table object back otherwise that breaks the rule of dividing presentation and data layers apart.


So I am not sure how to get that data back and put it into a table.


 
Old September 12th, 2008, 01:39 PM
Friend of Wrox
 
Join Date: Sep 2008
Posts: 234
Thanks: 0
Thanked 32 Times in 30 Posts
Default

Perhaps I'm confused, but the problem you're describing seems to be a data structures issue, not a "tier" issue.

A 3-tier model usually has the following generic form:

       Client <---> Business Rules <---> Server

The Client provides the user interface and generates requests for data and displays or otherwise uses the data returned to it from the Business Rules tier. The Business Rules tier is responsible for enforcing the rules applied to the data (e.g., who has the right to read the data, modify it, write new data, etc.) The Server is really just a tier that responds to the requests that have been approved by the Business Rules. Your question seems to be one of how the Server data should be organized, which is an entirely different issue.

Dr. Purdum





Similar Threads
Thread Thread Starter Forum Replies Last Post
Basic Architecture iceman90289 C# 2005 3 March 24th, 2008 10:53 PM
architecture MunishBhatia ASP.NET 2.0 Professional 3 October 6th, 2007 05:24 AM
Application Architecture balesh.mind ASP.NET 2.0 Professional 3 July 26th, 2007 11:26 AM
computer architecture mole384 C++ Programming 1 February 2nd, 2005 08:24 AM
Application Architecture ram_siddinen VS.NET 2002/2003 1 January 27th, 2004 12:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.