mojoPortal data layer

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
11/9/2006 2:26:21 AM
Gravatar
Total Posts 10

mojoPortal data layer

Hey,

I noticed that many of the methods in dbPortal.cs (MSSQLData) return IDataReader. I think that it isn't a good idea to return such objects which are closely related to database connections. I think that such functions should return DataTables or DataRows or even objects representing requested data.

11/9/2006 3:26:51 AM
Gravatar
Total Posts 18439

Re: mojoPortal data layer

Well DataReaders are very fast, this is one reason mojoPortal is fast.

I don't see a problem since we only reference System.Data in the business layer and the web, we never references a specific data layer like System.Data.SqlClient.

IDataReader is no more specific than DataTable, both are in System.Data. Yes you have to remember to close the reader but this is a worthwhile tradeoff for perfomance in my opinion.

I can see why from an OOP purist view you might rather have collections of objects but populating a collection of business objects is a lot of extra overhead when you are only going to databind it. I prefer to databind to the lightest weight fastest source.

Cheers,

Joe
11/10/2006 3:19:37 AM
Gravatar
Total Posts 19

Re: mojoPortal data layer

For MSSQL:

I think that the data access application block sqlhelper.cs is outdated.

We should use Enterprise Library Data Access Applicaton Block 2.0 January

-Thanh

11/10/2006 5:15:48 AM
Gravatar
Total Posts 18439

Re: mojoPortal data layer

Unless they have changed the license I don't think we can use it.

I had someone look at the license for the application blocks quite a while ago and unfortunately it is not a compatible open source license.


Joe
You must sign in to post in the forums. This thread is closed to new posts.