473,386 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Best practice - Connected/Disconnected mode - and more

Hello,

I'm looking for documentation with "Best Practice" for ASP.NET application

In which case use Connected or Disconnected mode

Typed dataset or not ?

I didn'd find anything pertinent ....

If you have a good link you are welcome :)

Regards,
Jun 27 '08 #1
2 3287
In many ways, this is like asking: Which is better, a hammer or a
screwdriver?

It really depends on your goals. Let me give a what if. Suppose you want the
highest performing application. It is going to be a monolithic application
where all of the code is in a single executable. It will also likely be in
assembly code of some sort or at the very least some lower level language
like C. The reason is you do not want anything more than one executable is
you do not want to take any chances of marshalling across any boundaries.
Now, there are times you need this application. But, in most cases, you have
to trade off some of this performance for things like maintainability,
scalability, etc.
In which case use Connected or Disconnected mode
In general, you will want to build software as a service. The implication
here is your data layer is considered a service that your business layer
uses. Your business layer is a service your UI works with. I say works with
here, as we are moving more towards MVC and MVP type of patterns in this
space. This means the controller marries pieces and not an ASPX page. While
the difference is subtle in some ways, it is radical in others.

Taking this model, it makes sense that data is portable. It cannot be easily
portable if you are connected to the source all of the time. Now, what you
choose to use for portability is up for grabs. The trend is towards custom
objects, but custom objects have a downside of potentially being coupled
tightly to your data model. This leads people to ORM tools, of which LINQ is
not one, no matter what people sell it at (LINQ is ORM-like in many ways,
thus the confusion). THe push to ORM is so you can regenerate your objects
when business changes without having to resort to a lot of recoding.

But, you might decide that a DataSet is fine as a custom object. It is
deconstructable into individual objects, so this is not necessarily a bad
thing.

What is important here is you really cannot stay connected all the time.
First, it requires that you maintain a connection to a database, which is an
expensive resource to remain connected to. This is due to many factors,
including the memory on the database server (and web server) to maintain the
connection, as well as the expense of locking, etc.
Typed dataset or not ?
The biggest benefit of being strongly typed is finding out you have a
problem at design time rather than run time. Depending on what resources
your company has devoted to testing, this can be critical to a good
application. Does this mean a strongly typed Dataset? Not necessarily, as
business objects are also "strongly typed". In many circles, the move is
away from strongly typed datasets to LINQ, but this is a good strategy, long
term, if you are flipping from the anonymous types to actual business
objects, especially if you are moving objects across class boundaries.

Hope this helps clear up the mud a bit.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

********************************************
| Think outside the box! |
********************************************
"Gabriel" <no****@nospam.comwrote in message
news:e9**************@TK2MSFTNGP02.phx.gbl...
Hello,

I'm looking for documentation with "Best Practice" for ASP.NET application

In which case use Connected or Disconnected mode

Typed dataset or not ?

I didn'd find anything pertinent ....

If you have a good link you are welcome :)

Regards,
Jun 27 '08 #2
Hi

If its a matter of data access performance ... i would rather use the
old fashion data reader... but
if developer productivity is key term over performance then linq is
better...

http://alexpinsker.blogspot.com/2007...g-linq-vs.html
Thanks
Munna
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

131
by: Peter Foti | last post by:
Simple question... which is better to use for defining font sizes and why? px and em seem to be the leading candidates. I know what the general answer is going to be, but I'm hoping to ultimately...
0
by: Johannes Unfried | last post by:
Problem Best practice needed to marshal STL data from managed code to unmanaged code & vice vers Details managed code is written in managed C++ & accesses the unmanaged code (i.e. lives in a...
4
by: RS | last post by:
Hello All, Does anyone know what the best practice is for updating database schema? We are designing a smart client application where the .Net application is used online and offline. If the...
9
by: Steven Nagy | last post by:
I know that .NET is based on a disconnected architecture, but I can't conceive of why continually opening and closing a connection would be faster than leaving a connection open. So I ran a test...
1
by: dejavue82 | last post by:
Hello fellow programmers! My question concerns the scalability of database access. In coldfusion (or php for that matter) for example, there seems to be only the connected model for accessing a...
16
by: Rex | last post by:
Hi All - I have a question that I think MIGHT be of interest to a number of us developers. I am somewhat new to VIsual Studio 2005 but not new to VB. I am looking for ideas about quick and...
51
by: bigHairy | last post by:
Hello. I have been teaching myself .NET over the last few months and have had some success. I would like to ask a question though... A number of examples I have followed have the following in...
5
by: Eric Fortin | last post by:
I have a disconnected handheld device that I want to send the results of the day to a database through a web service (on an intranet) What's the best method to do this? XML? Tab...
4
by: keithseah | last post by:
Hi all, i've been having this problem and its kiiling me! i'm a newbie at this so i hope someone would be able to help me. picture link:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.