Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Is it just me or are data providers done wrong?Is it just me or are data providers done wrong?
Previous
 
Next
New Post
11/4/2006 1:47 PM
 

Okay I agree that if you use only ExecuteSQL in the dal+ and you use "standard" SQL you have a hope of database independence on those calls. 

Is it possible to create a single script to create the tables and indexes for a module that you can guarantee with work in SQL server, Oracle, Access and MySQL?  I do not know if table creation is part of the entity spaces stuff.  It wasn't obvious form the information I have read.  I will need to spend more time on that.  I would guess that it is not a slam dunk to easily define tables in oracle, MySQL, Access and SQL server without compromises.  There are differences between the databases here is an article talking about datatype interoperability.  There are issues.

Even if it is possible with entity spaces or the table definition and index creation is common among all the databases and it is simple.  You have to test on all of them.  That would quadruple the database access testing on a module.  I would guess that testing is rarely sufficient now.  It will certainly get worse.  Developers won't have SQL Server, Oracle, MySQL and Access all running to test.  It just seems impractical.  True swappable database providers is a figment of our imagination as it is right now unless every part is taken care of in the dataprovider and that will be too limiting. 

It's like writing a program in C.  You should be able to write source and compile that same code on Linux, UNIX and windows and have the program work on all systems.  But it only works for very simple things. 

mj


Michael Jackson
Brillnat.com
Custom module development
Database access tokenized HTML modules
 
New Post
11/4/2006 9:13 PM
 
Scott (AerosSaga) is correct. EntitySpaces is truly provider independent. We have a massive NUnit test suite that runs against all four of our supported databases, SQL, Oracle, Access and MySQL with VistaDB in the hopper. Our NUnit test suite runs against all 4 databases in two modes, with and without stored procedures and exercises the hierarchical object model which we also generate. So, we have the same exact binary running against all for databases with or without procs and no code changes, it's merely a config file change and can be switched during runtime even. You can read from Oracle and turn around and save to MySQL with the same physical object instance. The unit tests first delete the data and then repopulate the data and then proceeeds to make all kinds of queries and other actions, it's pretty amazing to watch it run actually. You can invoke stored procs independently as well.

It's pretty forgiving too, SQL has a bit field for a boolean type, MySQL does not. However, the same binary code will allow you to use an INT when accessing MySQL to represent you boolean field and so on.

Does it generate the table creation scripts and such? The answer is no, we do not do that, however, MyGeneration can easily do that and indeed I think there are scripts up in our template library to do it. However, the time saved using ES will more than make up for that. So, you can write an EntitySpaces module and and state that it runs on 5 databases and more as we add them. That means one codebase for you and more customers.

It's too bad really DNN itself doesn't use EntitySpaces as it would be able truly run on many databases and there would be one code base, no different DAL code whatsoever. It would greatly expand the DNN reach very quickly and open up DNN module developement by making it very easy for would-be module developers to create modules. The comments I've heard from several DNN developers are that they are amazed at the performance of EntitySpaces, and it provides LINQ support, transactions, serialization, easy webservice access which are all missing from the current DNN DAL.

Mike Griffin
EntitySpaces LLC
http://www.entityspaces.net

 
New Post
11/5/2006 11:42 AM
 
mhj96813 wrote

Okay I agree that if you use only ExecuteSQL in the dal+ and you use "standard" SQL you have a hope of database independence on those calls. 

True swappable database providers is a figment of our imagination as it is right now unless every part is taken care of in the dataprovider and that will be too limiting. 

A lot of work by a lot of people for years has been spent on this issue (for example: DAL Project/FireBirdDotNuke Project ) . We believe that we currently deliver the best solution with the DAL/DAL+

mhj96813 wrote

It's like writing a program in C.  You should be able to write source and compile that same code on Linux, UNIX and windows and have the program work on all systems.  But it only works for very simple things. 

I think the issue to keep in mind is that with databases you are crossing a "boundary" from your computer program into a system (the database) that is completely separate and usually unique. With .Net vs. Linux they are targeted to the same hardware. With SQL vs. MySQL you have completely different systems.

Trying to create a generic way to talk to systems so completely different is almost impossible. All we really have is standard SQL (and that is not perfect. For example table creation scripts and index optimization is just plain different in each database). Therefore the ExecuteSQL is as close as I believe you will ever come.

We now provide that in the DAL+. Give it a try. I belive it will come as close as anything to meeting your needs.



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
11/6/2006 5:27 PM
 
I have been developing a fairly complex module in 4.3.5 (Intranet App) using the DAL+ with the Execute methods and SPs and I think it works great, thank you Michael.

Now, is there any tool (preferably free) to just develop the CRUD Stored Procedures without any of the other DAL components???

Carlos
 
New Post
11/7/2006 5:18 AM
 
CarlosRafi wrote
Now, is there any tool (preferably free) to just develop the CRUD Stored Procedures without any of the other DAL components???


This is what is preventing me from trying the DAL+ I would have to handcode everything instead of CodeSmith as I do now - when I do look at it I will try to put together some CodeSmith templates to do the grunt work.

Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Is it just me or are data providers done wrong?Is it just me or are data providers done wrong?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out