Home All Groups Group Topic Archive Search About

.Net framework and VB

Author
30 Jun 2006 1:41 PM
Prateek
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

Author
30 Jun 2006 2:11 PM
sloan
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)




Show quote
"Prateek" <prateekb***@gmail.com> wrote in message
news:1151674887.103666.126870@m73g2000cwd.googlegroups.com...
> 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
>
Author
30 Jun 2006 2:17 PM
Norman Yuan
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.

Show quote
"Prateek" <prateekb***@gmail.com> wrote in message
news:1151674887.103666.126870@m73g2000cwd.googlegroups.com...
> 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
>
Author
30 Jun 2006 2:33 PM
Prateek
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.

Norman Yuan wrote:

Show quote
> 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.
>
> "Prateek" <prateekb***@gmail.com> wrote in message
> news:1151674887.103666.126870@m73g2000cwd.googlegroups.com...
> > 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
> >
Author
30 Jun 2006 3:02 PM
Scott M.
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.



Show quote
"Prateek" <prateekb***@gmail.com> wrote in message
news:1151677997.363721.170780@y41g2000cwy.googlegroups.com...
> 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.
>
> Norman Yuan wrote:
>
>> 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.
>>
>> "Prateek" <prateekb***@gmail.com> wrote in message
>> news:1151674887.103666.126870@m73g2000cwd.googlegroups.com...
>> > 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
>> >
>
Author
30 Jun 2006 2:44 PM
Prateek
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.

Norman Yuan wrote:

Show quote
> 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.
>
> "Prateek" <prateekb***@gmail.com> wrote in message
> news:1151674887.103666.126870@m73g2000cwd.googlegroups.com...
> > 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
> >

AddThis Social Bookmark Button