473,395 Members | 1,869 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,395 software developers and data experts.

Class VS Components


In ASP.NET if am writing a class for Datalayer ,

Public Class XXX{
// I am createing a class file and write all database activity methods there
}
OR

public class XXX : System.ComponentModel.Component{

// I am Creating a component and write all all database activity methods there
}

What is the difference?
The only difference i find is in the second case class inherits some class. and i can drag and drop data controls,
which otherwise in the first case i have to write manually.

Can someone guide me the technical difference and which approach i should take.
Regards,
Nov 18 '05 #1
3 1021
The following article should be helpful:

http://msdn.microsoft.com/library/de...tvscontrol.asp

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

<Jignesh> wrote in message news:uy**************@TK2MSFTNGP12.phx.gbl...

In ASP.NET if am writing a class for Datalayer ,

Public Class XXX{
// I am createing a class file and write all database activity
methods there
}
OR

public class XXX : System.ComponentModel.Component{

// I am Creating a component and write all all database activity methods
there
}

What is the difference?
The only difference i find is in the second case class inherits some class.
and i can drag and drop data controls,
which otherwise in the first case i have to write manually.

Can someone guide me the technical difference and which approach i should
take.
Regards,
Nov 18 '05 #2

Thanks for the link but i could not make a decision.

Actually i have seen people developing web application using "Add componets"
menu for DAL(Data Access Layer). I just wanted to know is that right

bcos as such the only diff between the two is that the other just inherits
System.ComponentModel.Component

and its allows me to drag and drop data controls like (ds, adaptor etc)

"Kevin Spencer" <ke***@takempis.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
The following article should be helpful:

http://msdn.microsoft.com/library/de...tvscontrol.asp
--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

<Jignesh> wrote in message news:uy**************@TK2MSFTNGP12.phx.gbl...

In ASP.NET if am writing a class for Datalayer ,

Public Class XXX{
// I am createing a class file and write all database activity
methods there
}
OR

public class XXX : System.ComponentModel.Component{

// I am Creating a component and write all all database activity methods
there
}

What is the difference?
The only difference i find is in the second case class inherits some class. and i can drag and drop data controls,
which otherwise in the first case i have to write manually.

Can someone guide me the technical difference and which approach i should
take.
Regards,

Nov 18 '05 #3
It isn't a matter of which one is "better." It's a matter of which one is
the appropriate tool for your particular job. The article tells you when to
use one and when to use the other.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Jignesh" <Ji***********@hotmail.com> wrote in message
news:ez**************@TK2MSFTNGP09.phx.gbl...

Thanks for the link but i could not make a decision.

Actually i have seen people developing web application using "Add componets" menu for DAL(Data Access Layer). I just wanted to know is that right

bcos as such the only diff between the two is that the other just inherits
System.ComponentModel.Component

and its allows me to drag and drop data controls like (ds, adaptor etc)

"Kevin Spencer" <ke***@takempis.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
The following article should be helpful:

http://msdn.microsoft.com/library/de...tvscontrol.asp

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

<Jignesh> wrote in message news:uy**************@TK2MSFTNGP12.phx.gbl...

In ASP.NET if am writing a class for Datalayer ,

Public Class XXX{
// I am createing a class file and write all database activity methods there
}
OR

public class XXX : System.ComponentModel.Component{

// I am Creating a component and write all all database activity methods
there
}

What is the difference?
The only difference i find is in the second case class inherits some

class.
and i can drag and drop data controls,
which otherwise in the first case i have to write manually.

Can someone guide me the technical difference and which approach i should take.
Regards,


Nov 18 '05 #4

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

Similar topics

1
by: Hal Vaughan | last post by:
I have a panel in a GUI that has three components: A JTextArea, a JCheckBox and a JButton. When the button is pressed, I want to check the value of the checkbox and get the text of the textarea...
15
by: Steven T. Hatton | last post by:
The following may strike many of you as just plain silly, but it represents the kind of delelima I find myself in when trying to make a design decision. This really is a toy project written for...
4
by: Mike | last post by:
Please help this is driving me nuts. I have 2 forms, 1 user class and I am trying to implement a singleton class. Form 1 should create a user object and populate some properties in user. Form2...
4
by: james | last post by:
I have a custom UserControl, which can have many sub class levels derived from it. I want to be able to discover all the components at Load time, but the only components I can see from the base...
3
by: Richard | last post by:
I have a requirement to put a GDI style circle or rectangle border around the selected row of a datagrid/ It will overlap into the row above and below the selected row. Doing this in a the OnPaint...
6
by: Dave | last post by:
We have developed a few .NET components. The application access these components through well defined interface IOurInterface. The application list display name of each component in the dialog,...
2
by: Chris Puncher | last post by:
Hi. I have a RCW class that was generated by the VS.NET2003 IDE when I added a COM dll reference to my project. This all works fine when I call methods on it. My initial problem is that in...
6
by: ryan.d.rembaum | last post by:
Hello, I have code that I wish to use in many web applications. Basically sort of stand utility stuff. So from Visual Studio Project I select add a component and chose Component Class. Lets...
5
by: RSH | last post by:
I havent been able to set a property from another class with out getting some sort of error. Can someone please tell me what I'm doing wrong here? Public Class Form1
21
by: John Henry | last post by:
Hi list, I have a need to create class methods on the fly. For example, if I do: class Dummy: def __init__(self): exec '''def method_dynamic(self):\n\treturn self.method_static("it's...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.