Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Best scheme for naming units/forms in large project
Tue, Oct 4 2016 10:25 PMPermanent Link

TD

Advanced Data Systems, Inc.

I am new to EWB2 but hope to create project that will have many forms.  What would be the best way to name the units and the forms they represent, i.e.  just take the default names and keep track of them in a spreadsheet as to what each does or give each a meaningful name?

What scheme do you guys use?

Thanks,
TD
Wed, Oct 5 2016 4:48 AMPermanent Link

Matthew Jones

TD wrote:

> I am new to EWB2 but hope to create project that will have many forms.  What would be the best way to name the units and the forms they represent, i.e.  just take the default names and keep track of them in a spreadsheet as to what each does or give each a meaningful name?
>
> What scheme do you guys use?


I name everything the same. Well, that is, there is a scheme. Forms are TfrmReport and stored in fReport.wbs. Sub-forms would be TfrmReportDetail and fReportDetail.wbs.

Units are prefixed with u, and follow the class name, one per file (in general). So TDataStore is in uDataStore.wbs. What makes this good is that when you want to add a TDataStore to your code, and it gets a compile error for not being known, you just copy and paste the class name to the uses clause and replace the T with u and you are working. I also did this with by general purpose DebugReport function, which is, of course, in uDebugReport.wbs.

Works well for me!


--

Matthew Jones
Sat, Oct 8 2016 9:37 PMPermanent Link

erickengelke

Avatar

TD wrote:

> I am new to EWB2 but hope to create project that will have many forms.  What would be the best way to name the units and the forms they represent, i.e.  just take the default names and keep track of them in a spreadsheet as to what each does or give each a meaningful name?

>What scheme do you guys use?

I name forms: formLogin, formMain, etc.
I name units login, main, etc. identical to the form contained inside.

Erick
Sun, Oct 9 2016 11:28 AMPermanent Link

Bill

TD wrote:

> I am new to EWB2 but hope to create project that will have many forms.  What would be the best way to name the units and the forms they represent, i.e.  just take the default names and keep track of them in a spreadsheet as to what each does or give each a meaningful name?

>What scheme do you guys use?

I prepend FormName with "f" so MainForm'll be "fMainForm" and the unit 'll be "uMainForm". The same for units of pure code so MyObjectsModel 'll be "uMyObjectsModel" and so on.
Tue, Oct 11 2016 1:44 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Bill,

<< I prepend FormName with "f" so MainForm'll be "fMainForm" and the unit 'll be "uMainForm". The same for units of pure code so MyObjectsModel 'll be "uMyObjectsModel" and so on. >>

That's a good naming scheme.  I should use something like that, but don't...

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Oct 11 2016 3:03 PMPermanent Link

rbaroniunas

Baron Software

Avatar

I agree with "f" in front of forms and "u" in front of units as described.
Richard Baroniunas
Software Developer and DBA
Richard@Baronsoftware.com
Image