SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Mar 2001
    Location
    nashville, tn, usa
    Posts
    86
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    do your identifiers include a widget type?

    Just wondering if anyone has opinions about whether window identifiers (not the tag) should include a widget reference.

    Example:
    FirstNameText, JobSelect, EnterButton
    or
    FirstNameTextField, JobDropDown, EnterButton

    VS

    FirstName, Job, Enter

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


    [This message has been edited by joe_dickason (edited 11-05-2002).]

  2. #2
    Senior Member
    Join Date
    Oct 2001
    Location
    NC, United States
    Posts
    148
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: do your identifiers include a widget type?

    its upto the coder/user :-), whichever he is comfortable with

    ------------------
    -gram
    -gram

  3. #3
    Senior Member
    Join Date
    Jul 2001
    Location
    Brookline,NH USA
    Posts
    147
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: do your identifiers include a widget type?

    As previously stated, it's personal preference. It does require a lot of initial maintenance, and could require a global edit replace if the object type changes. I've done scripting with and without, and although I prefer the widget as a prefix similar to VB standards I have to admit that it may not be cost effective unless everyone is onboard. It does allow you to eliminate the numbers when you have several objects using the same identifier:

    - txtUserName
    - lblUserName

    I don't plan to use them in my next big project, for whatever that is worth, just due to the initial effort. A quick ROI is more important.

    ~ Fred

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

  4. #4
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: do your identifiers include a widget type?

    I see it as redundant particularly since all method calls already boil down to the basic form: [container].[object].method().

    Beside being unnecessarily wordy, there is a maintenance cost implied with including the 'wigit' in the name. If the class ever changes - from a DialogBox to a MainWin, for example - you'd have to go back and recode every reference ever made to it in every test you've written.


    John


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

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 11:09 PM.

Copyright BetaSoft Inc.