eramgarden Posted April 13, 2006 Posted April 13, 2006 I had an interview today and I looked at their ASP.Net/VB.Net app. I was told that the app interacts with AS400/IBM and SQL Server;therefor, the ex-developer developed 2 sets of "data" tier...one to interact with AS400 and one to interact with SQL Server. My question is: did he actually need to develop 2 sets of "data" layer/tier code?? Couldnt there be logic to use, for example, this data connection, if it's AS400..go down this path if it's SQl Server?? How would you design a data layer/tier to interact with 2 databases? Quote
Diesel Posted April 17, 2006 Posted April 17, 2006 He was probably too stupid to figure out how to build a common interface between the databases. There are a few ways to build an api to interact with multiple db servers. Looks at the ado.net design. Common interfaces and base classes, and then specific objects when it comes to actually connecting and running queries on the server. Or you can use objects that themselves check for the type of db, such as odbc. Also, there are third party persistence api's that are able to interact with any db's they have drivers for. Quote
eramgarden Posted April 18, 2006 Author Posted April 18, 2006 do u have a simple example or a link to an example? I think having separate code ...one for SQL, one for AS400...makes it tedious to change. Quote
Diesel Posted April 18, 2006 Posted April 18, 2006 We use http://ibatis.apache.org/ at my work. and here's some random article http://www.codeproject.com/vb/net/data_access_layer.asp?df=100&forumid=15360&exp=0&select=879501 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.