J
jqpdev
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
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