473,756 Members | 3,482 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Technique??? Use a web user control to store & share data access component groups

Hello all...

I'm coming from a Borland Delphi background. Delphi has a specific
component called a Data Module. In the designer the Data Module behaves
like a windows form. A developer can drop non-visual (controls) on the data
module surface and wire them up and create procedures, functions, event
procedures. In the source file (code behind file) the Data Module is a
class, and the dropped components are public properties. The event
procedures/functions are public as well. The developer can add additional
public/private/protected procedures, functions, and data members. This
module can be shared among several other modules within the project, by
using a syntax similar to using clause in C#.

The benefits this provides is what I'm attempting to mimic in VS.NET 2003.
If one is designing a single feature of an application, the feature could
most likely be composed of several modules (source files and forms). All of
the data access code and controls for the feature can be centralized by
placing it in a data module. All of the non-data access centric code for
the feature, located in other modules, would talk the to the data module(s)
created for the feature. Data modules even support sub-classing via visual
inheritance.

So I came up with a nice idea of dropping data access controls on to a web
user control to centralize the data access code and controls. However, I
wanted to know what other more experienced VS.NET developers think about the
idea. Are there any pitfalls that could result from this approach? I would
hate to paint myself into a corner. Could I sub-class, via visual form
inheritence, a web user control and further enhanced as well?

Looking forward to your feedback. Cheers.
--JQPDev
Nov 18 '05 #1
5 1963
> So I came up with a nice idea of dropping data access controls on to a web
user control to centralize the data access code and controls. However, I
Surprise. You didn't come up with the idea in the first place. It already
exists in Visual Studio.Net. You might be interested ot know that Anders
Hejlsberg, one of the principal architects of Turbo Pascal and Delphi, was
one of the principal architects of the C# language.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"jqpdev" <jq****@counter attack.com> wrote in message
news:#1******** ******@TK2MSFTN GP09.phx.gbl... Hello all...

I'm coming from a Borland Delphi background. Delphi has a specific
component called a Data Module. In the designer the Data Module behaves
like a windows form. A developer can drop non-visual (controls) on the data module surface and wire them up and create procedures, functions, event
procedures. In the source file (code behind file) the Data Module is a
class, and the dropped components are public properties. The event
procedures/functions are public as well. The developer can add additional
public/private/protected procedures, functions, and data members. This
module can be shared among several other modules within the project, by
using a syntax similar to using clause in C#.

The benefits this provides is what I'm attempting to mimic in VS.NET 2003.
If one is designing a single feature of an application, the feature could
most likely be composed of several modules (source files and forms). All of the data access code and controls for the feature can be centralized by
placing it in a data module. All of the non-data access centric code for
the feature, located in other modules, would talk the to the data module(s) created for the feature. Data modules even support sub-classing via visual inheritance.

So I came up with a nice idea of dropping data access controls on to a web
user control to centralize the data access code and controls. However, I
wanted to know what other more experienced VS.NET developers think about the idea. Are there any pitfalls that could result from this approach? I would hate to paint myself into a corner. Could I sub-class, via visual form
inheritence, a web user control and further enhanced as well?

Looking forward to your feedback. Cheers.
--JQPDev

Nov 18 '05 #2
Thanks Kevin for the update. I knew about Anders. Actually he was
proprositioned by Microsoft a while back. You can call it a very sneaky or
a very smart move on the part of M$. Without Anders we wouldn't have
VB.NET, or C#.net. VB.NET has the equivalent feature set of Delphi v4 and
v5. The same could be said for C#.net in VS.NET 2003. Whidbey/dotnet 2.0
will add some nice features. However, Borland has dotnet enabled all of
their products. I jumped ship because I couldn't find readily available
work in NYC with Delphi. There were some, but mostly scarce.

....and now back to my question. I'm saying that I was the only person to
land on the idea of centralizing data access code & controls in web user
controls. Can you give me some additional details on the pros and cons of
this approach? I'm using VS.NET 2003 if that makes any difference.
"Kevin Spencer" <ke***@takempis .com> wrote in message
news:O0******** ******@TK2MSFTN GP12.phx.gbl...
So I came up with a nice idea of dropping data access controls on to a web user control to centralize the data access code and controls. However, I

Surprise. You didn't come up with the idea in the first place. It already
exists in Visual Studio.Net. You might be interested ot know that Anders
Hejlsberg, one of the principal architects of Turbo Pascal and Delphi, was
one of the principal architects of the C# language.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"jqpdev" <jq****@counter attack.com> wrote in message
news:#1******** ******@TK2MSFTN GP09.phx.gbl...
Hello all...

I'm coming from a Borland Delphi background. Delphi has a specific
component called a Data Module. In the designer the Data Module behaves
like a windows form. A developer can drop non-visual (controls) on the data
module surface and wire them up and create procedures, functions, event
procedures. In the source file (code behind file) the Data Module is a
class, and the dropped components are public properties. The event
procedures/functions are public as well. The developer can add

additional public/private/protected procedures, functions, and data members. This
module can be shared among several other modules within the project, by
using a syntax similar to using clause in C#.

The benefits this provides is what I'm attempting to mimic in VS.NET 2003. If one is designing a single feature of an application, the feature could most likely be composed of several modules (source files and forms). All of
the data access code and controls for the feature can be centralized by
placing it in a data module. All of the non-data access centric code

for the feature, located in other modules, would talk the to the data

module(s)
created for the feature. Data modules even support sub-classing via

visual
inheritance.

So I came up with a nice idea of dropping data access controls on to a web user control to centralize the data access code and controls. However, I wanted to know what other more experienced VS.NET developers think about

the
idea. Are there any pitfalls that could result from this approach? I

would
hate to paint myself into a corner. Could I sub-class, via visual form
inheritence, a web user control and further enhanced as well?

Looking forward to your feedback. Cheers.
--JQPDev


Nov 18 '05 #3
BTW... How did you get MVP title?
Nov 18 '05 #4
Hey... I have a lot of experience with DataModules (Delphi since 1.0). I
also used them quite a bit in the Delphi world. The equivalent (for me) is
to utilize web services and pass ADO.NET Dataset objects back-and-forth
between the web service and the front end(s). The ADO.NET DataSet object is
actually a container (just like the DataModule). You can drag and drop
multiple tables (which builds a DataTable object inside the DataSet object)
into a single DataSet. One way to look at it is thus:

DataModule = DataSet
TQuery/TTable = DataTable (visually dropped into a DataSet. optionally use
DataAdapter to populate/update)

One nice feature about the ADO.NET is that you can setup relationships
between tables with cascading updates/etc.

For stored procedures I use "pass through" web service calls (to the same
'class' that handles updates/reads/etc on my ADO.NET dataset tables). The
ADO.NET Dataset is serializable, therefore it passes directly to/from a
webservice...

Not sure how the rest of the world does this, but that is how I segregate
and use it. My ASP.NET webforms and/or WinForms only reference ADO.NET
Datasets (no native SQL connections/access in this layer, all done in web
service layer). Seems to work pretty good.

and I have also
"jqpdev" <jq****@counter attack.com> wrote in message
news:O7******** ******@TK2MSFTN GP11.phx.gbl...
Thanks Kevin for the update. I knew about Anders. Actually he was
proprositioned by Microsoft a while back. You can call it a very sneaky or a very smart move on the part of M$. Without Anders we wouldn't have
VB.NET, or C#.net. VB.NET has the equivalent feature set of Delphi v4 and
v5. The same could be said for C#.net in VS.NET 2003. Whidbey/dotnet 2.0
will add some nice features. However, Borland has dotnet enabled all of
their products. I jumped ship because I couldn't find readily available
work in NYC with Delphi. There were some, but mostly scarce.

...and now back to my question. I'm saying that I was the only person to
land on the idea of centralizing data access code & controls in web user
controls. Can you give me some additional details on the pros and cons of
this approach? I'm using VS.NET 2003 if that makes any difference.
"Kevin Spencer" <ke***@takempis .com> wrote in message
news:O0******** ******@TK2MSFTN GP12.phx.gbl...
So I came up with a nice idea of dropping data access controls on to a web user control to centralize the data access code and controls. However,
I

Surprise. You didn't come up with the idea in the first place. It already
exists in Visual Studio.Net. You might be interested ot know that Anders
Hejlsberg, one of the principal architects of Turbo Pascal and Delphi, was one of the principal architects of the C# language.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"jqpdev" <jq****@counter attack.com> wrote in message
news:#1******** ******@TK2MSFTN GP09.phx.gbl...
Hello all...

I'm coming from a Borland Delphi background. Delphi has a specific
component called a Data Module. In the designer the Data Module
behaves like a windows form. A developer can drop non-visual (controls) on the data
module surface and wire them up and create procedures, functions,
event procedures. In the source file (code behind file) the Data Module is a class, and the dropped components are public properties. The event
procedures/functions are public as well. The developer can add
additional public/private/protected procedures, functions, and data members. This module can be shared among several other modules within the project, by using a syntax similar to using clause in C#.

The benefits this provides is what I'm attempting to mimic in VS.NET 2003. If one is designing a single feature of an application, the feature could most likely be composed of several modules (source files and forms). All
of
the data access code and controls for the feature can be centralized by placing it in a data module. All of the non-data access centric code

for the feature, located in other modules, would talk the to the data

module(s)
created for the feature. Data modules even support sub-classing via

visual
inheritance.

So I came up with a nice idea of dropping data access controls on to a web user control to centralize the data access code and controls. However, I
wanted to know what other more experienced VS.NET developers think

about the
idea. Are there any pitfalls that could result from this approach? I

would
hate to paint myself into a corner. Could I sub-class, via visual

form inheritence, a web user control and further enhanced as well?

Looking forward to your feedback. Cheers.
--JQPDev



Nov 18 '05 #5
Jamie,

Thanks for responding. I also considered this approach as well. However,
I'm still experimenting with webservices and I'm still getting to know how
they Microsoft implements things. I think Borland has a cleaner approach to
building webservices, but then again that is a bias statement coming from
one who has a background in Borland's tools.

"Jamie Dulaney" <jd******@softw areexperts.net> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
Hey... I have a lot of experience with DataModules (Delphi since 1.0). I
also used them quite a bit in the Delphi world. The equivalent (for me) is to utilize web services and pass ADO.NET Dataset objects back-and-forth
between the web service and the front end(s). The ADO.NET DataSet object is actually a container (just like the DataModule). You can drag and drop
multiple tables (which builds a DataTable object inside the DataSet object) into a single DataSet. One way to look at it is thus:

DataModule = DataSet
TQuery/TTable = DataTable (visually dropped into a DataSet. optionally use
DataAdapter to populate/update)

One nice feature about the ADO.NET is that you can setup relationships
between tables with cascading updates/etc.

For stored procedures I use "pass through" web service calls (to the same
'class' that handles updates/reads/etc on my ADO.NET dataset tables). The
ADO.NET Dataset is serializable, therefore it passes directly to/from a
webservice...

Not sure how the rest of the world does this, but that is how I segregate
and use it. My ASP.NET webforms and/or WinForms only reference ADO.NET
Datasets (no native SQL connections/access in this layer, all done in web
service layer). Seems to work pretty good.

and I have also
"jqpdev" <jq****@counter attack.com> wrote in message
news:O7******** ******@TK2MSFTN GP11.phx.gbl...
Thanks Kevin for the update. I knew about Anders. Actually he was
proprositioned by Microsoft a while back. You can call it a very sneaky or
a very smart move on the part of M$. Without Anders we wouldn't have
VB.NET, or C#.net. VB.NET has the equivalent feature set of Delphi v4 and
v5. The same could be said for C#.net in VS.NET 2003. Whidbey/dotnet 2.0 will add some nice features. However, Borland has dotnet enabled all of
their products. I jumped ship because I couldn't find readily available
work in NYC with Delphi. There were some, but mostly scarce.

...and now back to my question. I'm saying that I was the only person to land on the idea of centralizing data access code & controls in web user
controls. Can you give me some additional details on the pros and cons of this approach? I'm using VS.NET 2003 if that makes any difference.
"Kevin Spencer" <ke***@takempis .com> wrote in message
news:O0******** ******@TK2MSFTN GP12.phx.gbl...
> So I came up with a nice idea of dropping data access controls on to a
web
> user control to centralize the data access code and controls. However,
I

Surprise. You didn't come up with the idea in the first place. It

already exists in Visual Studio.Net. You might be interested ot know that
Anders Hejlsberg, one of the principal architects of Turbo Pascal and Delphi,

was one of the principal architects of the C# language.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"jqpdev" <jq****@counter attack.com> wrote in message
news:#1******** ******@TK2MSFTN GP09.phx.gbl...
> Hello all...
>
> I'm coming from a Borland Delphi background. Delphi has a specific
> component called a Data Module. In the designer the Data Module behaves > like a windows form. A developer can drop non-visual (controls) on the data
> module surface and wire them up and create procedures, functions, event > procedures. In the source file (code behind file) the Data Module is a
> class, and the dropped components are public properties. The event
> procedures/functions are public as well. The developer can add

additional
> public/private/protected procedures, functions, and data members. This > module can be shared among several other modules within the project, by > using a syntax similar to using clause in C#.
>
> The benefits this provides is what I'm attempting to mimic in VS.NET

2003.
> If one is designing a single feature of an application, the feature

could
> most likely be composed of several modules (source files and forms).

All
of
> the data access code and controls for the feature can be centralized by > placing it in a data module. All of the non-data access centric
code for
> the feature, located in other modules, would talk the to the data
module(s)
> created for the feature. Data modules even support sub-classing via
visual
> inheritance.
>
> So I came up with a nice idea of dropping data access controls on to
a web
> user control to centralize the data access code and controls.

However,
I
> wanted to know what other more experienced VS.NET developers think

about the
> idea. Are there any pitfalls that could result from this approach?
I would
> hate to paint myself into a corner. Could I sub-class, via visual

form > inheritence, a web user control and further enhanced as well?
>
> Looking forward to your feedback. Cheers.
> --JQPDev
>
>



Nov 18 '05 #6

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

Similar topics

8
2747
by: Pete Wittig | last post by:
Hello, I am wondering if it is possible to create a networked application with C# that is seen as a windows user. For example, if Bob logged onto windows and then started the application, any access to the network made through the application would be seen as 'C# application user' and not 'Bob'. What I want to accomplish is to create an encrypted folder on a server where files within the folder can be accessed through the application,...
7
2918
by: jsale | last post by:
I'm currently using ASP.NET with VS2003 and SQL Server 2003. The ASP.NET app i have made is running on IIS v6 and consists of a number of pages that allow the user to read information from the database into classes, which are used throughout the application. I have made class collections which, upon reading from the DB, create an instance of the class and store the DB values in there temporarily. My problem is that if user1 looks at...
4
3536
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The objective in utilizing this new deployment method is to reduce the maintenance overhead as well as making it easier for my users to setup and run the application initially. I have VS 2002, Windows XP, Access XP(2000 format). He is my problem....
4
2534
by: Michael | last post by:
Dear all .. If I want to use develop a user control and declare a public property which the type is System.Windows.Forms.GridTableStylesCollection For example : Public Class LookAndView Inherits System.Windows.Forms.UserControl Private _Collection As GridTableStylesCollection
2
1470
by: Niklas Norrthon | last post by:
I want to share a technique I recently have found to be useful to get around some obstacles that data protection can raise. Consider the following class: // foo.h #ifndef H_FOO #define H_FOO class Foo
7
2400
by: Cheryl Langdon | last post by:
Does anyone know if there is a way to globally turn off ALL control tips in Access 2003 using VBA code? Thanks. --- CL
8
3186
by: mark.norgate | last post by:
I've run into a few problems trying to use generics for user controls (classes derived from UserControl). I'm using the Web Application model rather than the Web Site model. The first problem I'm having is that the partial class signature in my projectDetails.ascx.cs file looks like this: public partial class ProjectDetailsControl<TEntryServiceProvider: UserControl, INamingContainer where TEntryServiceProvider : IEntryServiceProvider...
0
1439
by: Kristian Frost | last post by:
Hi, I'm just getting started with VB.Net, and I'm having trouble getting the routing around of some of the data straight in my mind, which has led me to the following problem. Basically, I'm trying to create an object that will monitor the status of some switches. I created a User Control to put into a form, on which I want to have five graphical representations of LEDs, which I've got working, light up and turn off when the...
33
11864
by: JamesB | last post by:
I am writing a service that monitors when a particular app is started. Works, but I need to get the user who is currently logged in, and of course Environment.UserName returns the service logon (NT_AUTHORITY\SYSTEM). I understand that when the service starts, no user may be logged in, but that's ok, as the app I am monitoring can only be run by a logged in user. Do I need to use WMI to get the user context of Explorer.exe or is there a...
0
9462
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9287
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10046
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9886
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9722
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8723
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7259
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5155
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.