473,395 Members | 1,647 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.

Any Delphi Programmers? I need help big time...

I was wondering if .NET had the equivalent of Frames, Global Objects, and
most importantly DataModules like in Delphi?
Oct 6 '06 #1
5 1461
It's been a while but let me see if I can make some suggestions that you will
find helpful.

Frames are essentially ways of reusing forms.
..NET offers three options
1. Use user templates to get save the base form. You can create your own
templates. Then select the appropriate user template when creating a new form
in the IDE. Modify the new form as appropriate.

2. You can use inheritance to create a stack up of structures each of which
is a form since you start with a form but each layer adds some functionality.
(My main form is something like 5 layers above the base form derived from
windows.forms.form.) I didn't create a template (as in 1) so after creating a
new windows form I go into the designer.vb for the new form and change the
inherits to the appropriate member in my library.

3. You can use user controls to encompass a lot of stuff (as in everything
in your frame.) You can put that user control on the tool bar and drag it on
to a newly created form.

Bottom line lots of ways to handle the idea of frames.

---------------

Data modules. You'll have to work a bit harder here. You can define data
sets which have one or more data tables in them. You can control various
behaviors at the event level for fields, tables, etc. In a dataset you can
also provide for connecting to an external database and for manipulating the
data. (The exact details depend upon whether you are going against an SQL
engine or an ODBC engine and because of MS design decisions never the twain
shall meet. If a database engine is to be involved settle on SQL or ODBC
right at the beginning. If you have your choice consider the ease of use of
the relatively new MS SQL desktop engine which you may freely distribute.)
You can put multiple data sets into a library. You can put the datasets on a
tool bar and drag them on as needed or simply instantiate them in your code.
If you have existing databases, you can automagically use the IDE to create
the data sets. (I haven't done this lately so I won't spout off on it.)

You can even do things like use the data sets against XML so that you don't
even need a database engine going to get to data. You just read the XML into
the data set when you need it in the program. In a few lines you can also
encrypt and/or compress the XML. I reduced the hassles of a 2 MB ACCESS
database with its attendant DLL hell to 100 KB and about 6 lines for writing
it and 6 lines for reading it!

As you can see the possibilities of encapsulation are endless as are the
various ways of handling data.

Global Objects. Don't remember this as a concept in Delphi though I probably
used it all the time:-)))
You have complete control over the exposure of stuff in libraries and
programs. For example I have a units library that handles the engineering
conversions between US and metric units. It exposes its various routines and
thingies by marking them public. In other modules I just code
units.convert(...) when I want to do a conversion. I just as easily refert to
units.g when want the acceleration of gravity. It is a global constant but it
could just as easily be a global object.

So it's very straight forward. HOWEVER, before you code anything make sure
that you thoroughly understand why properties are neat. Those of us who
remember teaching structured programming when it first came out will also
strongly urge you to do a careful analysis of what should be global and what
should not. Life is much cleaner when you pass nearly everything as
parameters. In my current work I'm instantiating all the data tables in the
main form. I pass the main form to any routine that needs multiple thingies
that are in the main form rather than passiing the individual thingies. THen
I can refer to the thingies in the routine through the main form.

Regards,
Al

--
Regards,
Al Christoph
Senior Consultant
Three Bears Software, LLC
just right software @ just right prices @ 3bears.biz
Microsoft Certified Partner (ISV)
Coming soon: Windows Mail for Vista.

"Ming Yeung" wrote:
I was wondering if .NET had the equivalent of Frames, Global Objects, and
most importantly DataModules like in Delphi?
Oct 6 '06 #2
Thanks for the response Chris...

Basically what i am looking for is having a global dataset, whether it be
created at design time or at run time...

For instance I want to create a customers dataset, that is attached to a
combo box, when i select a customer from the combo box, i want the underlying
dataset to go to that record, so that any other controls that use a
datasource asscoiated with the customers dataset will reflect the change
Oct 6 '06 #3
I was just reading the difference between Delphi and .NET and I realized that
..NET allows circular reference. That will definetly help if I want to use
the concept of global objects.
Oct 6 '06 #4
Dephi and .NET...come to think of it they are very much the same. Its good MS
adopted the concepts so late in the game, or Borland might have sued. :))
Oct 7 '06 #5
You may wish to investigate the history of .net. If memory serves me
correctly MS lured away some key Borland compiler folk a while back and they
made a big difference.

Has Borland figured out what it wants to do when it grows up?

On the techie side, the original poster will have no problems doing what she
wants. You can isolate things and inherit things and protect things and
expose things to your hearts content. From experience, I'd strongly suggest
that good structuring and programming practices will pay off.
--
Regards,
Al Christoph
Senior Consultant
Three Bears Software, LLC
just right software @ just right prices @ 3bears.biz
Microsoft Certified Partner (ISV)
Coming soon: Windows Mail for Vista.

"LouArnold" wrote:
Dephi and .NET...come to think of it they are very much the same. Its good MS
adopted the concepts so late in the game, or Borland might have sued. :))
Oct 7 '06 #6

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

Similar topics

15
by: windozbloz | last post by:
Bye Bye Billy Bob... I'm back with one more question, then I'll chill. I have scoured the news and net for info about Borlands KYLIX 3 and have found little technical info about it. Their...
4
by: John Baker | last post by:
I was installing the 30-day trial version of Delphi 7, and I got a message that it wanted to change a registry key concerning Just-In-Time Debugging that currently indicates Visual Studio. Can...
6
by: Erva | last post by:
Hi, Is there someone who has moved from Delphi to VS.NET? I'am using Delphi currently but seriously considering to moving VS.NET. I would like to hear if someone has already done that, is it...
10
by: lukeharpin | last post by:
Hi World, We have been developing Engineering software in Delphi 3,4,5,6,7 for a few years now. This morning we had a discussion about OOP and re-programming the software to which the question...
13
by: lukeharpin | last post by:
Hi World, We have been developing Engineering software in Delphi 3,4,5,6,7 for a few years now. This morning we had a discussion about OOP and re-programming the software to which the question...
4
by: Ricardo Magalhaes | last post by:
Hi I need to call Delphi DLL from my VB.NET application. I try to add a reference into my Visual Studio Solution but an error occurs saying that it must be an COM DLL. I have many Delphi DLL...
5
by: Dinesh Kumar | last post by:
Hi all I am using VB.NET for a Connector dll in Delphi client and some webservice . can you tell me how to handle pointers in Vb.net which are passed by delphi client as parameters in function...
4
by: Hafiz | last post by:
Hello, do you have any idea which Hashtable takes more memory ...I mean if we declare Hashtable in C# and in Delphi which one take more memorey? any idea ? regards,
14
by: ApexData | last post by:
I am considering building some distributable commercial applications. For about a year now, I have been using Access2000. This was my first venture into object oriented database development. ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.