Re: DLL -> Database
On Wed, 26 Mar 2008 17:52:52 -0800, Jim Johnson <aopiyy001@yahoo.com>
wrote:
This sounds a lot like a middle-tier object. In Micrsoft examples you
often see the term "DAL" = Data Access Layer.
In my opinion, if this DLL is *ONLY* a passthrough between your
front-end app and your database, the benefits are slim to none. If
this DLL actually does some work, it may be a GREAT solution.
I may like to see a more object-oriented solution, not just a long
list of API calls. Perhaps a Program object, and a Programs list
object.
Read up on 3-tier applications, multi-tier applications, and see if
the concepts apply to your situation.
-Tom.
>Is it a good idea to create a DLL API for DB connection + DB query
>calls?
>
>I guess it's the same for creating it in VC++ static library?
>
>so my DLL will have API in header file like
>
>connectSQLServer(){
> SQLConnection sql = new SQLConnection();
>}
>
>getProgramForTVChannel ( String Channel, Time TimePeriod ){
> // do the query for DB
>}
>
>searchProgram ( String Keyword ){
> // do some DB query and return result
>}
>
>... and other DLL API function for DB query
|