In Delphi we are used to place our dataset controls on a datamodule. This offered natural seperation between the GUI (the form) and the business logic. In .NET however there is no such thing as a datamodule. If you want to use the data components you must place them on your form.
Well that is now the one place where you don't want them to be!
Off course you could make your own class and code your way out, but I find it very usefull if you can visually design your data layer. On the other hand you could use VCL.NET and have full profit of the datamodule again. :-)
In Winforms however there is a very easy way to simulate the Delphi datamodule. It takes just two steps to get one:
(Open a new winform application)
The steps are for Delphi 8 and might be a bit different for Delphi 2005.
1. Choose File - New - Other, choose folder Delphi for .Net projects - New Files.
Choose: Component for Windowsforms
You will now have a component in your project which is a non visual container where you can place non visual components.
2. Drop BdpConnections and adatapters on the component and add the component to the uses of the form.
Off course this works also in Visual Studio 2003.
Well it maybe not the most elegant solution, but it works fine and gives you more control in seperation your GUI and data layer.
Programming blogs containing .NET, C#, LINQ, Objective-C and Delphi experiences
Subscribe to:
Post Comments (Atom)
Use an image as your UIBarButtonItem
Using an image as your UIBarButtonItem in your navigationcontroller bar can only be achieved by using a common UIButton as the BarButtonItem...
-
In ASP.NET it is easy to set the prefered authentication method in the web.config file. For external websites this is set mostly to Forms ...
-
Using an image as your UIBarButtonItem in your navigationcontroller bar can only be achieved by using a common UIButton as the BarButtonItem...
-
How to get, for example, all the hyperlinks from a webpage, which is loaded in your iPhone app using the UIWebView control? (Xcode's web...
No comments:
Post a Comment