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  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
Verndale
 


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 6:46 AM
User is offline Scott Schecter
155 posts
scottschecter.com
9th Ranked


Re: Is it just me or are data providers done wrong? 
Modified By Scott Schecter  on 11/4/2006 9:28:23 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 7:57 AM
User is offline Jeff Smith
14 posts
www.venexus.com/
10th Ranked




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

 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
Venexus, Inc.
 
New Post 11/4/2006 8:36 AM
User is offline michael jackson
172 posts
Brillnat.com
9th Ranked


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

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 8:52 AM
User is offline Scott Schecter
155 posts
scottschecter.com
9th Ranked


Re: Is it just me or are data providers done wrong? 
Modified By Scott Schecter  on 11/4/2006 10:59:21 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 9:29 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/4/2006 11:38:13 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
    * ADefWebserver.com
    * DNN Module Developer's Guide
    * IWEB - DNN Web Services
    * Silverlight and DotNetNuke
     
    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.

     


    DNNhost Scandinavia
    SUPER fast QuadCore DELL servers, MSSQL servers, DotNetPanel, daily backup, Check out our customers websites
    DNNhost.dk
    Personify Design, Inc.
    Seattle-based Personify Design has developed customized DotNetNuke websites for a wide range of customers to meet many different types of needs, including distributed authorship across thousands of pages to integrated Verisign e-commerce capabilities.
    www.personifydesign.com
    DNN Outsourcing
    50% more affordable services comparing to Western Europe and US: Custom DotNetNuke module development, skins, consulting, maintainence... Over 15.000 working hours of experience in custom DotNetNuke Solutions development, 8 years experience in outsourcing, excellent references!
    www.dnnoutsourcing.com

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