Re: Correct file naming
From: Steve Troxell (steve_troxell_at_hotmail.com)
Date: 05/23/04
- Next message: JoeH: "Re: Why wasn't the D7 update announced on Delphi Direct?"
- Previous message: Hallvard Vassbotn: "Re: Delphi 8 Book Recomendation"
- Maybe in reply to: Sierra Spartacus: "Re: Correct file naming"
- Next in thread: Kristofer Skaug: "Re: Correct file naming"
- Reply: Kristofer Skaug: "Re: Correct file naming"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 23 May 2004 16:49:35 -0400
Matthew Marsh wrote:
> I am interested to see how others would save and name the following
> Delphi files-
I prefer postfix notation for files names because in a sorted list, it keeps
files grouped together when they are related by function.
SearchForm; SearchFrame; SearchDialog <-- for the UI code
Search; SearchClass <-- for the non-UI code
SearchTests; SearchClassTests <-- for DUnit tests of the searching code
I have a lot of common code shared by multiple projects. Any one project
might be composed of 30% - 60% code which is reuseable by other projects.
For example, if the search units above were part of a project called FooBar,
I'd have:
fbSearchForm
fbSearch
fbSearchTests
Files which are reusable among multiple projects all have a common prefix;
in my case it's a company name abbreviation:
krConnectDialog
krUtilStrings
krUtilSystem
krErrorDialog
krExpressionBuilder
Again, in sorted lists of filenames, this helps separate the project code
from the shared code...usually I am working more frequently within the
project code. Also, in any given unit it is a visual reinforcement when I am
working in a reusable unit and need to think twice about what kind of code
goes in that unit (nothing project-specific). Finally, in USES clauses it
helps me pick out my units from the Delphi units and, more to the point, the
huge number of third-party units used by the project.
I have exceptions for certain commonly referenced project-level files:
AppMainForm
AppDataModule
AppCommon <-- global project-specific types, consts, variables, functions,
procedures.
This has the advantage of keeping these more-or-less "global" entities at
the top of sorted lists.
> I thought you only used abbreviations ( 'frm' ) for component names
> and not file names.
No rules; do what makes sense to you and helps you.
Steve Troxell
- Next message: JoeH: "Re: Why wasn't the D7 update announced on Delphi Direct?"
- Previous message: Hallvard Vassbotn: "Re: Delphi 8 Book Recomendation"
- Maybe in reply to: Sierra Spartacus: "Re: Correct file naming"
- Next in thread: Kristofer Skaug: "Re: Correct file naming"
- Reply: Kristofer Skaug: "Re: Correct file naming"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|