Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

DotNetNuke Marketplace
  Ads  
r2i.ntegrated
 


  Sponsors  

Meet Our Sponsors

The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Is it just me or are data providers done wrong?
Previous Previous
 
Next Next
New Post 11/4/2006 11:47 AM
User is offline michael jackson
172 posts
Brillnat.com
9th Ranked


Re: Is it just me or are data providers done wrong? 

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 7:13 PM
User is offline Mike Griffin
8 posts
www.entityspaces.net
10th Ranked


Re: Is it just me or are data providers done wrong? 
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 8:42 AM
User is offline Michael Washington
2848 posts
ADefWebserver.com
5th Ranked










Re: Is it just me or are data providers done wrong? 
Modified By Michael Washington  on 11/5/2006 11:43:28 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
* ADefWebserver.com
* DNN Module Developer's Guide
* IWEB - DNN Web Services
* Silverlight and DotNetNuke
 
New Post 11/6/2006 2:27 PM
User is offline Carlos Rodriguez
526 posts
www.almacigo.com
8th Ranked


Re: Is it just me or are data providers done wrong? 
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 2:18 AM
User is offline Rodney Joyce
1663 posts
www.smart-thinker.com
5th Ranked




Re: Is it just me or are data providers done wrong? 
 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.

Thanks,
Rodney
Smart-Thinker - Social Networking modules for DotNetNuke
The DotNetNuke Directory - Are you listed?
PokerDIY - Example Implementation of DNN Social Network
Do use DNN a lot? Try the DotNetNuke Toolbar to save you time!
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Is it just me or are data providers done wrong?
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


ADefWebserver.com
DotNetNuke® Module Development Help Website
ADefWebserver.com
Get Smarter Mail, SmarterStats, SmarterTickets
Windows mail server, web log analytics, and customer service management software - Free Editions Available!
www.smartertools.com
DotNetNuke Modules, Skins, Training and Consulting
If you want DotNetNuke done right then look no further. Developed Solutions provides module development, skin design, user and developer training and consulting. Based in Adelaide, Australia, we offer our services worldwide.
www.developedsolutions.com.au

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP