Jump to content
Rollo62

QuickAccess for uses, in highly modularized designs

Recommended Posts

Posted (edited)

Hi there,

 

I want to show you my approach how to organize and ease modular designs.

Usually I like to have one main access unit, and all much granularized sub-features distributed in separate units.

The main and sub-units build a kind of tree of functionality, where each unit can stand alone, but usually all units are highly related between each other.

 

To access and open those deeper layer units is usually much of a click-drill-down the unit tree, or a lot of search and select via search function or other tools.

 

Here is the general layout I like to use, which has a lot of advantages for me:

unit My.Thing;

interface

uses
    My.Thing.Intf
  , My.Thing.Factory
//
//  , My.Thing.Impl                    // QuickAccessUses
//  , My.Thing.Events.Intf
//  , My.Thing.Events.Carrier.Intf  
//  , My.Thing.Events.Carrier
//  , My.Thing.Common
//  , My.Thing.Features
//  , My.Thing.Features.Factory
//  , My.Thing.Features.Impl
//  , My.Thing.Feature.Intf
  ;

You can place the cursor on the unit names, even if its inside of a comment, and with right click "Open file at cursor" you can directly open the desired unit.

 

The advantages I see from my point of view:

- a single point of access, for a larger structural, modularized tree

- immediately all of the close-related units are visible on the screen

- directly see the kind of structure, maybe leads to further unit refactorings

- it is a most easy and fast way to find and navigate to the desired unit, and to open it

- no tipping of unit names into searchboxes

 

The disadvantages:

- None ( except putting some extra lines in comments )

 

I like this a lot, and this works only due to the fact that "Open file at cursor" works also within comments.

Thats why I want to ensure that the Embarcadero team is aware of this, and never is going to change the open behaviour in the future editors :classic_smile:

 

 

Edited by Rollo62
  • Like 5

Share this post


Link to post
Posted (edited)

Agreed! There are more reasons for not breaking that functionality. I use it a lot.

Edited by Dany Marmur

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×