Coffeehouse Post

Single Post Permalink

View Thread: Reading local files -- Win API's Vs Framework
  • User profile image

    Hello All,

    Sorry if the question is a bit simplistic, trivial or too long.

    I'm working on a multi devoloper project and am getting ready to fight for a change that although I believe in I'm not too sure is totally neccesary.

    Unfortunately the project did not have a very indepth design proccess and we devolopers were pretty much left to our own to build our parts. We're getting close to the integration time and all of the differences are starting to get noticed big time.

    Okay the situation. All the parts of the program have to access two servers for their information. My access solution was to create an DatabaseAccess class that uses the connection string as a constant and then use that constant anywhere needed. I figured that any changes to the Database Connection could be made in one location, recompile the DLL and distribute.

    Another devolper has gone the route of a local ini file (which my project manager likes). Thus he can siply change the ini file and relaunch the program. Test to production in a heartbeat. He understands that this exposes the DB login information in plain text and wants to write an encryption function to handle this. I think this is the direction we're going to end up going in.

    Here's the part I'm concerned about. When I asked him how he was reading the ini file he sent me the code and he's using WIN API's to access the file.

    I do not feel that in the .NET environment we should be using API's when we can avoid them (especially in this case of file access which is well supported by .NET). However I have no solid evidence that it would hurt performance or is a "Bad Thing".

    This developer is also a Senior Devoloper who is very good and respected in the shop. It not easy to suggest the change to the framework mode as both the project manager and senior devoloper in question are not as experienced in either the .Net framework or Object orientated coding. The general belief is, "if it works and we can do the same thing we did in VB 6 then it's good".

    I'd appreciate any comments you guys/gals might have on the issue of API vs Framework