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 8:46 AM
 
I use the standard DNN DAL for the modules that I sell on my site, the DNN marketplace, and Snowcovered. I do this simply because nowadays everyone wants to certify your module, and this is the standard they are looking for. As previously noted for small'ish modules with only one or two tables, its no big deal. However, for large custom work and those consulting clients that contact you in some huge panic that have to be done yesterday I use EntitySpaces. If you are frustrated with the DNN DAL for your 'real-life' development needs, I would suggest you take a look. Be forewarned though, after you've used something like ES its hard to go back;)
 
New Post
11/4/2006 9:57 AM
 

AerosSaga wrote
However, for large custom work and those consulting clients that contact you in some huge panic that have to be done yesterday I use EntitySpaces. If you are frustrated with the DNN DAL for your 'real-life' development needs, I would suggest you take a look. Be forewarned though, after you've used something like ES its hard to go back;)

I have used the DAL+/++ methods and find them very convenient if I need to just grab some quick data. And I see no problem with using it for small projects that do not require many data changes or a lot of new features being added in the future. However, if it is a big project or requires lots of queries to the db, a DAL generator is my tool of choice.

I personally was a big fan of the DAL Builder Pro, but since it does not help with DNN 4 dev, it has started to collect dust. A while back I was turned on to EntitySpaces and have not looked back since. Coming from the barbaric ASP/VB world, EntitySpaces has personally made me a better developer. While there is definitely a learning curve for using ES, after you get your head wrapped around it, which doesn't take long, it becomes painful to do development any other way. And my learning curve was simply I could not get over the fact that it really WAS that easy. It was in my nature to feel that I must write more code than was necessary and this app just did it for me. If I had to hand code a big DAL again, I think I would shoot myself in the head.

With moving targets for project requirements, ES is an invaluable tool. If not for the only reason to use ES, everytime the client changes their mind about the data structure, all you have to do is regenerate the generated code, and you are off to developing again. No need to hand code the changes in the DAL, ES does it all for you. I wish I could get back all of those countless hours of hand coded development of sproc/DAL changes. And, with the new admin grid view templates for DNN they have, it just doesn't seem right that development can be that easy.


Jeff Smith
VivoWare, Inc. - Open Source Social Networking Modules for DNN.
 
New Post
11/4/2006 10:36 AM
 

it seems to me that all this discussion leaves us with the fact that modules are database specific unless they include stored procedures for multiple databases.  That to swap out dataproviders you will need stored procedures for each module for that database.   This is true for dal, dal+ and es

We are never going to get to the point where Joe web master (who doesn't code) can implement a DNN site and have a simple choice of MySQL, Oracle or SQL server as his database just by installing a different provider.  Module developers (at least small ones) are not going to want to provide a different version of stored procedures and database object creation scripts for each provider just in case someone someday might use them.   

I think the SQL server momentum of DNN will make it so that there really won't be wide spread use of other dataproviders.  Would DNN be better off dropping the dataprovider concept and its inherit complications?

mj


Michael Jackson
Brillnat.com
Custom module development
Database access tokenized HTML modules
 
New Post
11/4/2006 10:52 AM
 
You are incorrect, EntitySpaces can run the same code against multiple databases, with or without stored procedures. EntitySpaces is provider independent and can dynamically switch between databases at runtime. For example a person could simply have a radio button list in module settings, and switch the active datasource from MSSQL Server, to Oracle, to MySQL, to Access.
// This uses your default config; e.g., Sql Server ("SQL")
OrdersCollection collection = new OrdersCollection();
collection.LoadAll();

// This uses your alternate config; e.g., Access ("ACCESS")
OrdersCollection collection = new OrdersCollection();
collection.es.Connection.Name = "ACCESS";
collection.LoadAll();
You may find more information on this here.
 
New Post
11/4/2006 11:29 AM
 

mhj96813 wrote

I don't see how Michael Washington's description of the DAL and DAL+ explain how it is possible to have modules that don't have separate code for each dataprovider.  Granted that code will not have to be sprinkled throughout the BLL code.  But at some point it eventually calls a stored procedure.   What happens with databases that don't support stored procedures? 

I would just like to add some points about the DAL+

If you use the DotNetNuke.Data.DataProvider.Instance().ExecuteSQL("my sql statement") method of the DAL+ it:

  • If written in standard SQL it works with all databases without ANY changes
  • Is fully supported by the DotNetNuke core and requires no 3rd party components
  • automatically establishes your connection to the currently configured provider. You only have to have that one line of code.
  • If you want a data reader simply put in a line like this: CType(DotNetNuke.Data.DataProvider.Instance().ExecuteSQL("Select * from DesktopModules"), IDataReader)

Remember you can still use stored procedures if you want by using the other methods of the DAL+:

  • ExecuteNonQuery - Used to execute a stored procedure that will not return a value.
  • ExecuteReader - Used to execute a stored procedure that will return multiple records.
  • ExecuteScalar - Used to execute a stored procedure that will return a single value.
  • ExecuteSQL - Used to execute a sql statement.

    See: Super-Simple Module (DAL+)



  • Michael Washington
    http://ADefWebserver.com
    www.ADefHelpDesk.com
    A Free Open Source DotNetNuke Help Desk Module
     
    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