SlideShare a Scribd company logo
1 of 8
Download to read offline
Programming Design Guidelines



                     Programming Design Guidelines
                          Collected and composed by Stefan Ziegler.
                                          May 2002.

Hungarian Notation of Programming Code

Generals
Developping application there is often the question of how to name variables,
constants, objects, etc… Developping within a tem the standardization of name
conventions is very important. The set-up of a unique reglementation for naming
classes and categories of objects.
This is necessary for a common understanding within a team and for further
development or maintenance of an application.

History
Dr. Charles Simonyi developed the convention at Microsoft, where it is used in the
Windows source code. Microsoft says it’s known as Hungarian notation because the
prefixes make the names seem to be non-English and also because Simonyi is from
Hungary.

Description of a module (a “bean”)
Every module has a descriptive intro

       ‘-----------------------------------------------
       ‘module:
       ‘author:
       ‘date:
       ‘comment:
       ‘-----------------------------------------------
       ‘-----------------------------------------------
       ‘history:
       ‘<date>: comment
       ‘-----------------------------------------------



       ‘-----------------------------------------------
       ‘function:
       ‘author:
       ‘date:
       ‘comment:
       ‘parameters:
       ‘output:
       ‘-----------------------------------------------

It is recommended inserting comments during the development. The code is more
readable while development is in progress and documentation would not be forgotten.

Annotation for SAP ABAP programming
Usage of the following header is mandantory:



                                                                                 Page 1 of 5
Programming Design Guidelines

         *********************************************
         * Name: program name
         * Title: short title
         * Update? please insert no or the updated db name(s)
         *********************************************
         * Function:
         * fill in a short description of this program (1-3 lines)
         *********************************************
         * Author: First author of this program
         * Date: creation date of this program
         *********************************************
         * History:
         * Change-# + Date + Developer’s Name + Case / Project-#
         * Description
         * …
         *********************************************

Naming of Variables
First of all there are some basics about naming of variables. Every variable is to be
defined at the beginning of the code. Names can be 255 characters long. The names
can consist out of letters, numbers, underscores, etc… The datatype is to be named at
the beginning of the name of the variable. You must not use reserved words for names
of variables. Split merged words by using capitals like: sFirstnameLastname

Using VB try to switch on the explicit declaration of variables by using option
explicit. Using this switch each variable has to be defined before you can use it.


Code Documentation
Essential paragraphs of code should be documentd. Using the apostroph ‘ is shorter
and more readable.


GUI Screen Objects
Having a GUI form there are a lot of components a user can work with. Writing the
code it is important having a unique convention of naming these components.

 Object                          Prefix       Example

 Form                            frm          frmFileOpen

 Check box                       chk          chkReadOnly

 Combo box                       cbo          cboEnglish

 Command button                  cmd          cmdCancel

 Directory list box              dir          dirSource

 File list box                   fil          filSource

 Frame                           fra          fraLanguage

 Image                           img          imgIcon




                                                                              Page 2 of 5
Programming Design Guidelines

 List box                              lst             lstPolicyCodes

 Option button                         opt             optFrench

 Text box                              txt             txtGetText

 Dictionary                            dic             dicList

 Object                                obj             objUserTable

 ODBC Database                         db              dbAccounts

 Field collection                      fld             fldCustomer


For a detailed list see: http://support.microsoft.com/support/kb/articles/q173/7/38.asp

Additional annotation: constants are defined in capitals.


Sample of Detailed Dialog Box
Find enclosed a sample screen shot of a detailed dialog box:
1: group, frame
2: label with text box
3: drop down field
4: check box
5: command buttons, with <OK> as default button (react with <enter> key),
<Abbrechen> (=<cancel>) goes with <esc>-key, and <Übernehmen> is deactivated
6: tabs
7: slider
8: radio buttons
9: spin button
10: progress bar




                                                                                          Page 3 of 5
Programming Design Guidelines




       fig.1: sample screen shot of detailed dialog box



Naming of Functions
Functions and variables should have a name explaining their mission itself. Using this
readability increases tremendous.
Having the scope of producing international code for international programmers
english is the language used for naming of variables.


Structure of Code
Writing programming code branches, statemanrs, conditions, etc.. are included.
Having the best overview, parts of the code belonging together shoul be structured
with tabs. (Ann.: one tab is equal four spaces)

Bad example:

       SubCheckNetworkAddress
       SNetworkAddress”192.168.100.120”                      bad:

       For i=1 To 100                                        no declaration of function
                                  /
                                                             comment
                CallProofAddress                             no decleration of
                                                                    variables
                If bNetworkAddress = True Then               mixture of english /
                                                                    german
                         CallDruckerVerbinden                content of i / z ?


                                                                             Page 4 of 5
Programming Design Guidelines

              End If

              PrintsNetworkAddress                          usable:
                                                            structured
              z = z + 1                                     function calls with call
       Next i
       End Sub




Enclosure
Find enclosed a short overview of naming Java objects.




                                                                            Page 5 of 5
http://support.microsoft.com/support/kb/articles/q173/7/38.asp

Object                             Prefix                Example
--------------------------------------------------------------------------
Form                               efrm                   frmFileOpen
Check box                          chk                   ReadOnly
Combo box                          cbo                   cboEnglish
Data-bound combo box               dbc                   dbcEnglish
Command button                     cmd                   cmdCancel
Data                               dat                   datBiblio
Directory list box                 dir                   dirSource
Drive list box                     drv                   drvTarget
File list box                      fil                   filSource
Frame                              fra                   fraLanguage
Grid                               grd                   grdPrices
Data-bound grid                    dbg                   dbgPrices
Horizontal scroll bar              hsb                   hsbVolume
Image                              img                   imgIcon
Label                              lbl                   lblHelpMessage
Line                               lin                   linVertical
List box                            lst                  lstPolicyCodes
Data-bound list box                dbl                   dblPolicyCode
Menu                               mnu                   mnuFileOpen
OLE container                      ole                   oleObject1
Option button                      opt                   optFrench
Picture box                        pic                   picDiskSpace
Shape                              shp                   shpCircle
Text box                           txt                   txtGetText
Timer                              tmr                   tmrAlarm

Object                             Prefix                Example
------------------------------------------------------------------------
Vertical scroll bar                vsb                   vsbRate
Animation button                   ani                   aniMailBox
bed       Pen                      Bedit                 bedFirstName
Checkbox                           chk                   chkReadOnly
Picture clip                       clp                   clpToolbar
Communications                     com                   comFax
Control                            ctl                   ctrCurrent
Data control                       dat                   datBiblioDirectory
Directory list box                 dir                   dirSource
Common dialog ctrl                 dlg                   dlgFileOpen
Drive list box                     drv                   drvTarget
File list box                      fil                   filSource
Form                               frm                   frmEntry
Frame (3d)                         fra                   fraStyle
Gauge                              gau                   gauStatus
Group push button                  gpb                   gpbChannel
Graph                              gra                   graRevenue
Grid                               grd                   grdPrices
Pen Hedit                          hed                   hedSignature
Horizontalscrollbar                hsb                   hsbVolume
Image                              img                   imgIcon
Pen Ink                            ink                   inkMap
Keyboard key status                key                   keyCaps
Label                              lbl                   lblHelpMessage
Line                               lin                   linVertical
MDI child form                     mdi                   mdiNote
MAPI message                       mpm                   mpmSentMessage
MAPI session                       mps                   mpsSession
MCI                                mci                   mciVideo
Menu                               mnu                   mnuFileOpen
Object                             obj                   objUserTable
Option Button (3d)                 opt                   optRed
Outline control                    out                   outOrgChart
3d Panel                           pnl (3d)              pnlTitleList
Report control                     rpt                   rptQtr1Earnings
Shape controls                     shp                   shpCircle
Spin control                       spn                   spnPages
Timer                              tmr                   tmrAlarm
Vertical scroll bar                vsb                   vsbRate

Database Objects                   Prefix                Example
--------------------------------------------------------------------------
ODBC Database                      db                    dbAccounts
ODBC Dynaset object                dyn                   dynSalesByRegion
Field collection                   fld                   fldCustomer
Field object                       fld                   fldAddress
Form                               frm                   frmNewUser
Index object                       idx                   idxAge
Index collection                   idx                   idxNewAge
Macro                              mcr                   mcrCollectUsers
QueryDef object                    qry                   qrySalesByRegion
Query                              qry                   qrySalesByRegion
Report                             rpt                   rptAnnualSales
Snapshot object                    snp                   snpForecast
Table object                       tbl                   tblCustomer
TableDef object                    tbd                   tbdCustomers

The following table lists standard third-party vendor name prefix characters to
be used with control prefixes:

Vendor                         Abbreviation
-------------------------------------------
MicroHelp (VBTools)            m
Pioneer Software Q+E Database p
Crescent Software              c
Sheridan Software              s
Other (miscellaneous)          o

Objects                            Prefix                Example
---------------------------------------------------------------------
Alarm(Microhelp)                   almm                  almmAlarm
Animate(Microhelp)                 anim                  animAnimate
Callback(Microhelp)                calm                  callback
Combo Box(Pioneer)                 cbop                  cbopComboBox
Combo Box(Sheridan)                cbos                  cbosComboBox
DB_Check(Pioneer)                  chkp                  chkpCheckBox
chart(Microhelp)                    tm     tmChart
Clock(Microhelp)                    clkm   clkmClock
Command Button(Microhelp)           cmdm   cmdmCommandButton
DB_Command(Pioneer)                 cmdp   cmdpCommandButton
Command Button(Group)(Microhelp)    cmgm   cmgmBtton
Command Button (icon) (Microhelp)   cmim   cmimCommandButton
CardDeck(Microhelp)                 crdm   crdmCard
Dice(Microhelp)                     dicm   dicmDice
SSDir(Sheridan)                     dirs   dirsDirList
SSDrive(Sheridan)                   drvs   drvsDriveList
File List(Microhelp)                film   filmFileList
SSFile(Sheridan)                    fils   filsFileList
Flip(Microhelp)                     flpm   flpmButton
Form Scroll(Microhelp)              fsrm   fsrmFormScroll
Gauge(Microhelp)                    gagm   gagmGauge
Graph(Other)                        gpho   gphoGraph
Q_Grid(Pioneer)                     grdp   grdpGrid
Horizontal Scroll Bar(Microhelp)    hsbm    hsbmScroll
DB_Hscroll(Pioneer)                 hsbp    hsbpScroll
Histo(Microhelp)                    hstm    hstmHistograph
Invisible(Microhelp)                invm    invmInvisible
Icon Tag(Microhelp)                 itgm    itgmListBox
Key State(Microhelp                 kstm    kstmKeyState
Label (3d) (Microhelp)              lblm    lblmLabel
Line(Microhelp)                     linm    linmLine
DB_List(Pioneer)                    lstp    lstpListBox
SSList(Sheridan)                    lsts    lstsListBox
MDI Control(Microhelp)              mdcm    mdcmMDIChild
SSMenu(Sheridan)                    mnus    mnusMenu
Marque(Microhelp)                   mrqm    mrqmMarque
OddPic(Microhelp)                   odpm    odpmPicture
Picture(Microhelp)                  picm    picmPicture
DB_Picture(Pioneer)                 picp    picpPicture
Property Vwr(Microhelp)             pvrm    vrmPropertyViewer
DB_RadioGroup(Group)(Pioneer)       radp    radqRadioGroup
Slider(Microhelp)                   sldm    sldmSlider
Spinner(Microhelp)                  spnm    spnmSpinner
Spreadsheet(Microhelp)              sprm    sprmSpreadsheet
Stretcher(Microhelp)                strm    strmStretcher
Screen Saver(Microhelp)             svrm    svrmSaver
Switcher(Microhelp)                 swtm    swtmSwitcher
Tag(Microhelp)                      tagm    tagmListBox
Timer(Microhelp)                    tmrm    tmrmTimer
ToolBar(Microhelp)                  tolm    tolmToolBar
Tree(Microhelp)                     trem    tremTree
Input(Microhelp) (Text)             txtm    inpmText
DB_Text(Microhelp)                  txtp    txtpText
Vertical Scroll Bar(Microhelp)      vsbm    vsbmScroll
DB_VScroll(Pioneer)                 vsbp    vsbpScroll

More Related Content

What's hot

Rpg Pointers And User Space
Rpg Pointers And User SpaceRpg Pointers And User Space
Rpg Pointers And User Spaceramanjosan
 
C LANGUAGE UNIT-1 PREPARED BY MVB REDDY
C LANGUAGE UNIT-1 PREPARED BY MVB REDDYC LANGUAGE UNIT-1 PREPARED BY MVB REDDY
C LANGUAGE UNIT-1 PREPARED BY MVB REDDYRajeshkumar Reddy
 
C++ questions And Answer
C++ questions And AnswerC++ questions And Answer
C++ questions And Answerlavparmar007
 
Report on c and c++
Report on c and c++Report on c and c++
Report on c and c++oggyrao
 
Google Objective-C Style Guide
Google Objective-C Style GuideGoogle Objective-C Style Guide
Google Objective-C Style GuideWinston Hsieh
 
Presentation 5th
Presentation 5thPresentation 5th
Presentation 5thConnex
 
Csphtp1 18
Csphtp1 18Csphtp1 18
Csphtp1 18HUST
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAAiman Hud
 
Extracting text from PDF (iOS)
Extracting text from PDF (iOS)Extracting text from PDF (iOS)
Extracting text from PDF (iOS)Kaz Yoshikawa
 
Your Own Metric System
Your Own Metric SystemYour Own Metric System
Your Own Metric SystemErin Dees
 
Functions, Strings ,Storage classes in C
 Functions, Strings ,Storage classes in C Functions, Strings ,Storage classes in C
Functions, Strings ,Storage classes in Carshpreetkaur07
 
Clean code _v2003
 Clean code _v2003 Clean code _v2003
Clean code _v2003R696
 
A DSL to feedback formal verification results
A DSL to feedback formal verification resultsA DSL to feedback formal verification results
A DSL to feedback formal verification resultsMarc Pantel
 

What's hot (19)

Rpg Pointers And User Space
Rpg Pointers And User SpaceRpg Pointers And User Space
Rpg Pointers And User Space
 
Basic c
Basic cBasic c
Basic c
 
C LANGUAGE UNIT-1 PREPARED BY MVB REDDY
C LANGUAGE UNIT-1 PREPARED BY MVB REDDYC LANGUAGE UNIT-1 PREPARED BY MVB REDDY
C LANGUAGE UNIT-1 PREPARED BY MVB REDDY
 
C++ questions And Answer
C++ questions And AnswerC++ questions And Answer
C++ questions And Answer
 
C Programming Project
C Programming ProjectC Programming Project
C Programming Project
 
Report on c and c++
Report on c and c++Report on c and c++
Report on c and c++
 
Google Objective-C Style Guide
Google Objective-C Style GuideGoogle Objective-C Style Guide
Google Objective-C Style Guide
 
Presentation 5th
Presentation 5thPresentation 5th
Presentation 5th
 
Csphtp1 18
Csphtp1 18Csphtp1 18
Csphtp1 18
 
No comment
No commentNo comment
No comment
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
Extracting text from PDF (iOS)
Extracting text from PDF (iOS)Extracting text from PDF (iOS)
Extracting text from PDF (iOS)
 
Structures
StructuresStructures
Structures
 
Bcsl 031 solve assignment
Bcsl 031 solve assignmentBcsl 031 solve assignment
Bcsl 031 solve assignment
 
Your Own Metric System
Your Own Metric SystemYour Own Metric System
Your Own Metric System
 
Functions, Strings ,Storage classes in C
 Functions, Strings ,Storage classes in C Functions, Strings ,Storage classes in C
Functions, Strings ,Storage classes in C
 
Structures-2
Structures-2Structures-2
Structures-2
 
Clean code _v2003
 Clean code _v2003 Clean code _v2003
Clean code _v2003
 
A DSL to feedback formal verification results
A DSL to feedback formal verification resultsA DSL to feedback formal verification results
A DSL to feedback formal verification results
 

Viewers also liked

Designing With User In Mind
Designing With User In MindDesigning With User In Mind
Designing With User In Mindintuitiv.de
 
Twitter Auf Zehn Seiten
Twitter Auf Zehn SeitenTwitter Auf Zehn Seiten
Twitter Auf Zehn Seitenintuitiv.de
 
Arbeitsprozess Intuitiv
Arbeitsprozess IntuitivArbeitsprozess Intuitiv
Arbeitsprozess Intuitivintuitiv.de
 
Introduction to My SQL
Introduction to My SQLIntroduction to My SQL
Introduction to My SQLCOMMON Europe
 
Ppt INFORMATIVE PRACTICES for class 11th chapter 14
Ppt INFORMATIVE PRACTICES for class 11th chapter 14Ppt INFORMATIVE PRACTICES for class 11th chapter 14
Ppt INFORMATIVE PRACTICES for class 11th chapter 14prashant0000
 
Spectrum Software Management
Spectrum Software ManagementSpectrum Software Management
Spectrum Software Managementintuitiv.de
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabatinabati
 
DBMS lab manual
DBMS lab manualDBMS lab manual
DBMS lab manualmaha tce
 
Top 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and AnswersTop 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and Answersiimjobs and hirist
 
A must Sql notes for beginners
A must Sql notes for beginnersA must Sql notes for beginners
A must Sql notes for beginnersRam Sagar Mourya
 
Sql queries with answers
Sql queries with answersSql queries with answers
Sql queries with answersvijaybusu
 

Viewers also liked (19)

Designing With User In Mind
Designing With User In MindDesigning With User In Mind
Designing With User In Mind
 
Twitter Auf Zehn Seiten
Twitter Auf Zehn SeitenTwitter Auf Zehn Seiten
Twitter Auf Zehn Seiten
 
Arbeitsprozess Intuitiv
Arbeitsprozess IntuitivArbeitsprozess Intuitiv
Arbeitsprozess Intuitiv
 
Sql dml & tcl 2
Sql   dml & tcl 2Sql   dml & tcl 2
Sql dml & tcl 2
 
Introduction to My SQL
Introduction to My SQLIntroduction to My SQL
Introduction to My SQL
 
Ppt INFORMATIVE PRACTICES for class 11th chapter 14
Ppt INFORMATIVE PRACTICES for class 11th chapter 14Ppt INFORMATIVE PRACTICES for class 11th chapter 14
Ppt INFORMATIVE PRACTICES for class 11th chapter 14
 
Spectrum Software Management
Spectrum Software ManagementSpectrum Software Management
Spectrum Software Management
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabati
 
SQL BASIC QUERIES SOLUTION ~hmftj
SQL BASIC QUERIES SOLUTION ~hmftjSQL BASIC QUERIES SOLUTION ~hmftj
SQL BASIC QUERIES SOLUTION ~hmftj
 
Dbms viva questions
Dbms viva questionsDbms viva questions
Dbms viva questions
 
DBMS lab manual
DBMS lab manualDBMS lab manual
DBMS lab manual
 
Sql queires
Sql queiresSql queires
Sql queires
 
Dbms lab questions
Dbms lab questionsDbms lab questions
Dbms lab questions
 
DBMS Practical File
DBMS Practical FileDBMS Practical File
DBMS Practical File
 
Best sql plsql material
Best sql plsql materialBest sql plsql material
Best sql plsql material
 
Top 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and AnswersTop 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and Answers
 
Data Base Management System
Data Base Management SystemData Base Management System
Data Base Management System
 
A must Sql notes for beginners
A must Sql notes for beginnersA must Sql notes for beginners
A must Sql notes for beginners
 
Sql queries with answers
Sql queries with answersSql queries with answers
Sql queries with answers
 

Similar to Programming Design Guidelines

Generics Tutorial
Generics TutorialGenerics Tutorial
Generics Tutorialwasntgosu
 
C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1ReKruiTIn.com
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010Satish Verma
 
0100_Embeded_C_CompilationProcess.pdf
0100_Embeded_C_CompilationProcess.pdf0100_Embeded_C_CompilationProcess.pdf
0100_Embeded_C_CompilationProcess.pdfKhaledIbrahim10923
 
02 c++g3 d
02 c++g3 d02 c++g3 d
02 c++g3 dmahago
 
Visual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 OverviewVisual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 Overviewbwullems
 
117 A Outline 25
117 A Outline 25117 A Outline 25
117 A Outline 25wasntgosu
 
Generics Tutorial
Generics TutorialGenerics Tutorial
Generics Tutorialwasntgosu
 
PDC Video on C# 4.0 Futures
PDC Video on C# 4.0 FuturesPDC Video on C# 4.0 Futures
PDC Video on C# 4.0 Futuresnithinmohantk
 
Altium script examples reference
Altium  script examples reference Altium  script examples reference
Altium script examples reference jigg1777
 
Creating Domain Specific Languages in F#
Creating Domain Specific Languages in F#Creating Domain Specific Languages in F#
Creating Domain Specific Languages in F#Tomas Petricek
 

Similar to Programming Design Guidelines (20)

C# note
C# noteC# note
C# note
 
Generics Tutorial
Generics TutorialGenerics Tutorial
Generics Tutorial
 
C notes.pdf
C notes.pdfC notes.pdf
C notes.pdf
 
C# tutorial
C# tutorialC# tutorial
C# tutorial
 
C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
 
0100_Embeded_C_CompilationProcess.pdf
0100_Embeded_C_CompilationProcess.pdf0100_Embeded_C_CompilationProcess.pdf
0100_Embeded_C_CompilationProcess.pdf
 
Xtext Webinar
Xtext WebinarXtext Webinar
Xtext Webinar
 
02 c++g3 d
02 c++g3 d02 c++g3 d
02 c++g3 d
 
C LANGUAGE NOTES
C LANGUAGE NOTESC LANGUAGE NOTES
C LANGUAGE NOTES
 
Visual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 OverviewVisual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 Overview
 
117 A Outline 25
117 A Outline 25117 A Outline 25
117 A Outline 25
 
Generics Tutorial
Generics TutorialGenerics Tutorial
Generics Tutorial
 
PDC Video on C# 4.0 Futures
PDC Video on C# 4.0 FuturesPDC Video on C# 4.0 Futures
PDC Video on C# 4.0 Futures
 
Altium script examples reference
Altium  script examples reference Altium  script examples reference
Altium script examples reference
 
Xtext Webinar
Xtext WebinarXtext Webinar
Xtext Webinar
 
VB Dot net
VB Dot net VB Dot net
VB Dot net
 
Switch case and looping
Switch case and loopingSwitch case and looping
Switch case and looping
 
C sharp
C sharpC sharp
C sharp
 
Creating Domain Specific Languages in F#
Creating Domain Specific Languages in F#Creating Domain Specific Languages in F#
Creating Domain Specific Languages in F#
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

Recently uploaded (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Programming Design Guidelines

  • 1. Programming Design Guidelines Programming Design Guidelines Collected and composed by Stefan Ziegler. May 2002. Hungarian Notation of Programming Code Generals Developping application there is often the question of how to name variables, constants, objects, etc… Developping within a tem the standardization of name conventions is very important. The set-up of a unique reglementation for naming classes and categories of objects. This is necessary for a common understanding within a team and for further development or maintenance of an application. History Dr. Charles Simonyi developed the convention at Microsoft, where it is used in the Windows source code. Microsoft says it’s known as Hungarian notation because the prefixes make the names seem to be non-English and also because Simonyi is from Hungary. Description of a module (a “bean”) Every module has a descriptive intro ‘----------------------------------------------- ‘module: ‘author: ‘date: ‘comment: ‘----------------------------------------------- ‘----------------------------------------------- ‘history: ‘<date>: comment ‘----------------------------------------------- ‘----------------------------------------------- ‘function: ‘author: ‘date: ‘comment: ‘parameters: ‘output: ‘----------------------------------------------- It is recommended inserting comments during the development. The code is more readable while development is in progress and documentation would not be forgotten. Annotation for SAP ABAP programming Usage of the following header is mandantory: Page 1 of 5
  • 2. Programming Design Guidelines ********************************************* * Name: program name * Title: short title * Update? please insert no or the updated db name(s) ********************************************* * Function: * fill in a short description of this program (1-3 lines) ********************************************* * Author: First author of this program * Date: creation date of this program ********************************************* * History: * Change-# + Date + Developer’s Name + Case / Project-# * Description * … ********************************************* Naming of Variables First of all there are some basics about naming of variables. Every variable is to be defined at the beginning of the code. Names can be 255 characters long. The names can consist out of letters, numbers, underscores, etc… The datatype is to be named at the beginning of the name of the variable. You must not use reserved words for names of variables. Split merged words by using capitals like: sFirstnameLastname Using VB try to switch on the explicit declaration of variables by using option explicit. Using this switch each variable has to be defined before you can use it. Code Documentation Essential paragraphs of code should be documentd. Using the apostroph ‘ is shorter and more readable. GUI Screen Objects Having a GUI form there are a lot of components a user can work with. Writing the code it is important having a unique convention of naming these components. Object Prefix Example Form frm frmFileOpen Check box chk chkReadOnly Combo box cbo cboEnglish Command button cmd cmdCancel Directory list box dir dirSource File list box fil filSource Frame fra fraLanguage Image img imgIcon Page 2 of 5
  • 3. Programming Design Guidelines List box lst lstPolicyCodes Option button opt optFrench Text box txt txtGetText Dictionary dic dicList Object obj objUserTable ODBC Database db dbAccounts Field collection fld fldCustomer For a detailed list see: http://support.microsoft.com/support/kb/articles/q173/7/38.asp Additional annotation: constants are defined in capitals. Sample of Detailed Dialog Box Find enclosed a sample screen shot of a detailed dialog box: 1: group, frame 2: label with text box 3: drop down field 4: check box 5: command buttons, with <OK> as default button (react with <enter> key), <Abbrechen> (=<cancel>) goes with <esc>-key, and <Übernehmen> is deactivated 6: tabs 7: slider 8: radio buttons 9: spin button 10: progress bar Page 3 of 5
  • 4. Programming Design Guidelines fig.1: sample screen shot of detailed dialog box Naming of Functions Functions and variables should have a name explaining their mission itself. Using this readability increases tremendous. Having the scope of producing international code for international programmers english is the language used for naming of variables. Structure of Code Writing programming code branches, statemanrs, conditions, etc.. are included. Having the best overview, parts of the code belonging together shoul be structured with tabs. (Ann.: one tab is equal four spaces) Bad example: SubCheckNetworkAddress SNetworkAddress”192.168.100.120” bad: For i=1 To 100 no declaration of function / comment CallProofAddress no decleration of variables If bNetworkAddress = True Then mixture of english / german CallDruckerVerbinden content of i / z ? Page 4 of 5
  • 5. Programming Design Guidelines End If PrintsNetworkAddress usable: structured z = z + 1 function calls with call Next i End Sub Enclosure Find enclosed a short overview of naming Java objects. Page 5 of 5
  • 6. http://support.microsoft.com/support/kb/articles/q173/7/38.asp Object Prefix Example -------------------------------------------------------------------------- Form efrm frmFileOpen Check box chk ReadOnly Combo box cbo cboEnglish Data-bound combo box dbc dbcEnglish Command button cmd cmdCancel Data dat datBiblio Directory list box dir dirSource Drive list box drv drvTarget File list box fil filSource Frame fra fraLanguage Grid grd grdPrices Data-bound grid dbg dbgPrices Horizontal scroll bar hsb hsbVolume Image img imgIcon Label lbl lblHelpMessage Line lin linVertical List box lst lstPolicyCodes Data-bound list box dbl dblPolicyCode Menu mnu mnuFileOpen OLE container ole oleObject1 Option button opt optFrench Picture box pic picDiskSpace Shape shp shpCircle Text box txt txtGetText Timer tmr tmrAlarm Object Prefix Example ------------------------------------------------------------------------ Vertical scroll bar vsb vsbRate Animation button ani aniMailBox bed Pen Bedit bedFirstName Checkbox chk chkReadOnly Picture clip clp clpToolbar Communications com comFax Control ctl ctrCurrent Data control dat datBiblioDirectory Directory list box dir dirSource Common dialog ctrl dlg dlgFileOpen Drive list box drv drvTarget File list box fil filSource Form frm frmEntry Frame (3d) fra fraStyle Gauge gau gauStatus Group push button gpb gpbChannel Graph gra graRevenue Grid grd grdPrices Pen Hedit hed hedSignature Horizontalscrollbar hsb hsbVolume Image img imgIcon Pen Ink ink inkMap
  • 7. Keyboard key status key keyCaps Label lbl lblHelpMessage Line lin linVertical MDI child form mdi mdiNote MAPI message mpm mpmSentMessage MAPI session mps mpsSession MCI mci mciVideo Menu mnu mnuFileOpen Object obj objUserTable Option Button (3d) opt optRed Outline control out outOrgChart 3d Panel pnl (3d) pnlTitleList Report control rpt rptQtr1Earnings Shape controls shp shpCircle Spin control spn spnPages Timer tmr tmrAlarm Vertical scroll bar vsb vsbRate Database Objects Prefix Example -------------------------------------------------------------------------- ODBC Database db dbAccounts ODBC Dynaset object dyn dynSalesByRegion Field collection fld fldCustomer Field object fld fldAddress Form frm frmNewUser Index object idx idxAge Index collection idx idxNewAge Macro mcr mcrCollectUsers QueryDef object qry qrySalesByRegion Query qry qrySalesByRegion Report rpt rptAnnualSales Snapshot object snp snpForecast Table object tbl tblCustomer TableDef object tbd tbdCustomers The following table lists standard third-party vendor name prefix characters to be used with control prefixes: Vendor Abbreviation ------------------------------------------- MicroHelp (VBTools) m Pioneer Software Q+E Database p Crescent Software c Sheridan Software s Other (miscellaneous) o Objects Prefix Example --------------------------------------------------------------------- Alarm(Microhelp) almm almmAlarm Animate(Microhelp) anim animAnimate Callback(Microhelp) calm callback Combo Box(Pioneer) cbop cbopComboBox Combo Box(Sheridan) cbos cbosComboBox DB_Check(Pioneer) chkp chkpCheckBox
  • 8. chart(Microhelp) tm tmChart Clock(Microhelp) clkm clkmClock Command Button(Microhelp) cmdm cmdmCommandButton DB_Command(Pioneer) cmdp cmdpCommandButton Command Button(Group)(Microhelp) cmgm cmgmBtton Command Button (icon) (Microhelp) cmim cmimCommandButton CardDeck(Microhelp) crdm crdmCard Dice(Microhelp) dicm dicmDice SSDir(Sheridan) dirs dirsDirList SSDrive(Sheridan) drvs drvsDriveList File List(Microhelp) film filmFileList SSFile(Sheridan) fils filsFileList Flip(Microhelp) flpm flpmButton Form Scroll(Microhelp) fsrm fsrmFormScroll Gauge(Microhelp) gagm gagmGauge Graph(Other) gpho gphoGraph Q_Grid(Pioneer) grdp grdpGrid Horizontal Scroll Bar(Microhelp) hsbm hsbmScroll DB_Hscroll(Pioneer) hsbp hsbpScroll Histo(Microhelp) hstm hstmHistograph Invisible(Microhelp) invm invmInvisible Icon Tag(Microhelp) itgm itgmListBox Key State(Microhelp kstm kstmKeyState Label (3d) (Microhelp) lblm lblmLabel Line(Microhelp) linm linmLine DB_List(Pioneer) lstp lstpListBox SSList(Sheridan) lsts lstsListBox MDI Control(Microhelp) mdcm mdcmMDIChild SSMenu(Sheridan) mnus mnusMenu Marque(Microhelp) mrqm mrqmMarque OddPic(Microhelp) odpm odpmPicture Picture(Microhelp) picm picmPicture DB_Picture(Pioneer) picp picpPicture Property Vwr(Microhelp) pvrm vrmPropertyViewer DB_RadioGroup(Group)(Pioneer) radp radqRadioGroup Slider(Microhelp) sldm sldmSlider Spinner(Microhelp) spnm spnmSpinner Spreadsheet(Microhelp) sprm sprmSpreadsheet Stretcher(Microhelp) strm strmStretcher Screen Saver(Microhelp) svrm svrmSaver Switcher(Microhelp) swtm swtmSwitcher Tag(Microhelp) tagm tagmListBox Timer(Microhelp) tmrm tmrmTimer ToolBar(Microhelp) tolm tolmToolBar Tree(Microhelp) trem tremTree Input(Microhelp) (Text) txtm inpmText DB_Text(Microhelp) txtp txtpText Vertical Scroll Bar(Microhelp) vsbm vsbmScroll DB_VScroll(Pioneer) vsbp vsbpScroll