Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / June 2006

Tip: Looking for answers? Try searching our database.

.Net framework and VB

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Prateek - 30 Jun 2006 14:41 GMT
Hi,

I have recently started coding and designing the ,.NET based system
using different technology involved in .NET and well from the subject
line of this post, it is obvious that I am coming from a VB background.

I have many years of expirance in designing distributed system based on

VB, C++ and SQL Server but when I have tried .NET it is a complete new
exerince for me and I am not hesitant in saying this is a damm cool
stuff from MS.

Now in this regards, I got a question but I am really not sure what is
the case in .NET.

In earlier days, when I used to design classes based on limited VB
object based model, we used to create 2 different callses for one
business component. One class which is used for all database read
operation and another for database write, update and delete opeation.
Now, why we were doing this so because of the locking in database via
VB programs. if all database select operation id seperated from
database write operation it palces less locks and almost comes out
immediatly by removing database locks (Offcorse when all the VB dlls
are regirsted in COM+). Now I wanted know is this still applicable in
.NET.

For example, if I want to write a Cusomter business component, do I
still have to seperate  out the select and updates in seperate classes.

In earlier days, I used to designed a dll with following classes.

CustomerRead (Main class to read, exposed to world)
CustomerWrite (Main class to write, exposed to world)
CustomerSingleSelect - a calss which gets data from customer based on
primary key and always return me a sigle row
CustomerMultiSelect - a class which gets the data from customer where
select operation is not based on its primay key.
CustomerModify - a class to modify customer.

Belive me this approch was much faster then everything in one class.
But this was the case in VB time. Does this still a case in .NET?

Thanks & Regards,

pb
sloan - 30 Jun 2006 15:11 GMT
I would say most people put the code in a common object.

CustomerController
or
CustomerManager

Which does actions on/with the Customer object.

You can find my take on it at:
http://sholliday.spaces.msn.com/             6/5/2006         5/24/2006
entries
(2.0 and 1.1 respectively)

> Hi,
>
[quoted text clipped - 41 lines]
>
> pb
Norman Yuan - 30 Jun 2006 15:17 GMT
I do not understand you claim.

For example:

My ClassA has two methods to retreive data from DB and update DB:

ClassA.GetDataFromDB()
ClassA.UpdateDataToDB()

Then, you build two classes, each has only one method

ClassA.GetDataFromDB()
ClassB.UpdateDataToDB()

Assume all logics in the two methods are the same. Why your class' method
call is faster than mine? There should not be any difference on the process
of the method being executed, whether it is done in classical VB or .NET.

> Hi,
>
[quoted text clipped - 41 lines]
>
> pb
Prateek - 30 Jun 2006 15:33 GMT
Hi,

I my experience, all DB operation puts locks on the tables so as the
read operation. But if u have both the method in one calss and many
user is calling any one of the method then locks will not be release
from database so your read operation will take same anout of time as
write operation but in reality read operaiton is faster then write
operation as it puts less lock.

So by seperating read and write u can achive a good performace in very
large Distrubuted application.

> I do not understand you claim.
>
[quoted text clipped - 59 lines]
> >
> > pb
Scott M. - 30 Jun 2006 16:02 GMT
I have used VB and VB.NET and not experienced anything like you have.

Whether the code is all in one class or not has nothing to do with database
locking.  It doesn't in VB.NET and it didn't in VB either.

If your code is written properly (or *was* written properly in VB), the
location of the code wouldn't matter.

> Hi,
>
[quoted text clipped - 72 lines]
>> >
>> > pb
Prateek - 30 Jun 2006 15:44 GMT
In addition to my comment, if the logic is same then I would seperat
out that logic into somekind of controller class and whoudl create 2
seperate calss one for read and another to write which will be then
called from controller class.

Regards,

pb.

> I do not understand you claim.
>
[quoted text clipped - 59 lines]
> >
> > pb

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.