FIleMaker Coding Standards & Management Best Practices

25
FM Coding Standards & Management Best Practices Presenter: Manjit Behera, Mindfire Solutions Date: 18/06/2014

description

This presentation involves coverage of details on Coding Standards, best code practices and management of FileMaker projects.

Transcript of FIleMaker Coding Standards & Management Best Practices

Page 1: FIleMaker Coding Standards & Management Best Practices

FM Coding Standards&

Management Best Practices

Presenter: Manjit Behera, Mindfire SolutionsDate: 18/06/2014

Page 2: FIleMaker Coding Standards & Management Best Practices

Presenter: Manjit Behera, Mindfire Solutions

FM0-305/307 - FileMaker 11 and 12 certified developerAbout Me

Skills: FileMaker 9-13, Oracle 10g, HTML 3, CSS, Javascript, PHP.

Connect Me:Facebook: https://www.facebook.com/manjitbeheraLinkedIn: http://www.linkedin.com/pub/manjit-kumar/22/1b4/310Twitter: https://twitter.com/mastermind____Google+: https://www.google.com/+mastermindmanjit

Contact Me:Email: [email protected] / [email protected]: mfsi_manjitb

Page 3: FIleMaker Coding Standards & Management Best Practices

Presenter: Manjit Behera, Mindfire Solutions

AgendaAgenda

Filemaker Coding Standard

Mindfire Coding Standard

Application/Customize Coding Standard

Project Management

Backup and Updates

Page 4: FIleMaker Coding Standards & Management Best Practices

What is Coding Standard ?What is Coding Standard ?

Coding standards/conventions are a set of guidelines for a specific programming language that recommend programming style, practices and methods for each aspect of a piece program written in this language.

These conventions usually cover file organization, indentation, comments, declarations, statements, white space, naming conventions, programming practices, programming principles, programming rules of thumb, architectural best practices, etc.

Presenter: Manjit Behera, Mindfire Solutions

Page 5: FIleMaker Coding Standards & Management Best Practices

Filemaker Coding StandardFilemaker Coding Standard

Camel Case ( e.g. contactFirstName )

Pascal Case ( e.g. ContactFirstName )

Underscore format ( e.g. contact_first_name )

Generally there are 3 types of naming conventions in Filemaker.

Presenter: Manjit Behera, Mindfire Solutions

Page 6: FIleMaker Coding Standards & Management Best Practices

Filemaker Coding StandardFilemaker Coding Standard

Database Definitions (e.g. Tables, Fields, TOGs )

Layouts ( e.g. ContactFirstName )

Scripts ( e.g. Title, Comments, Variables )

Generally there are 3 areas to implement Naming Conventions in Filemaker.

Presenter: Manjit Behera, Mindfire Solutions

Page 7: FIleMaker Coding Standards & Management Best Practices

Naming Conversions : Tables Naming Conversions : Tables

Naming of tables are straight forward and must follow Camel Case conversion. A table name should not be include space or any special characters (e.g. #,$,=,@,%, etc).

Presenter: Manjit Behera, Mindfire Solutions

Page 8: FIleMaker Coding Standards & Management Best Practices

Naming Conversions : Fields Naming Conversions : Fields

Naming of Fields are straight forward and must follow either Camel Case or Pascal Case conversion. A Field name shouldn't have any special characters (e.g. #,$,=,@,%, etc). It is advisable not to include space to the fields that are used in calculations.

Presenter: Manjit Behera, Mindfire Solutions

Below are the abbreviations used for different Field Types: n = Number t = Text d = Date i = Time m = TimeStamp R = Container s = Summary p = Repetition

It is a good practice to use these abbreviations in the Field Names to denote their data type. e.g FirstName_xt, Salary_xn, DateOfBirth_xd

Page 9: FIleMaker Coding Standards & Management Best Practices

Naming Conversions : Fields Naming Conversions : Fields

In the database the table definition i.e the fields should be by default sorted by field name. Below are few standards to be followed while naming the fields:

Presenter: Manjit Behera, Mindfire Solutions

Key field naming:- All the key fields should be prefixed with the letter “k”.- Use triple underscores before a primary key field name. e.g ___kp<Field

Type>_<Field Name>- Use double underscores before a foriegn key field name. e.g __kf<Field

Type>_<Field Name>- Use single underscores before a alternate key field name. e.g _ka<Field

Type>_<Field Name>

Examples: ___kpn_ContactId, __kft_CompanyId, _kat_CompanyName

Global fields naming:- Global fields name should start with the character “g”. e.g g<Field

Type>_<Field Name>

Examples: gn_CurrentContactId, gt_SelectedCompany, gr_NewButton, gm_CurrentTimeStamp

Page 10: FIleMaker Coding Standards & Management Best Practices

Naming Conversions : Fields Naming Conversions : Fields

Presenter: Manjit Behera, Mindfire Solutions

Utility/Development fields naming:- Utility field names should be prefixed with “z” and Developer Utility field

should be suffixed as “zz”. e.g z_<Field Name>, zz_<Field Name>

Examples: z_Constant1, zz_ActiveStatus

Calculation fields naming:- Calculation field name should suffix or prefix the phrase “c<Calculation

Return Type>” to the field name. e.g ct_<Field Name> or <Field Name>_ct

Examples: FullName_ct, LinePrice_cn, AddNewRecordButton_cr, cr_DeleteRecordButton

Summary fields naming:- Summary fields should prefixed with the character “s_” e.g s_<Field Name>

Examples: s_TotalPrice, s_NumbersOfContacts

Page 11: FIleMaker Coding Standards & Management Best Practices

Naming Conversions : TOGs Naming Conversions : TOGs

Presenter: Manjit Behera, Mindfire Solutions

Anchor Buoy's convention should be followed to name the Table Occurrences in the Relationship Graph. Mostly 3 alphabet used for abbreviation of the Table TOGs.

Page 12: FIleMaker Coding Standards & Management Best Practices

Naming Conversions : Layouts Naming Conversions : Layouts

Presenter: Manjit Behera, Mindfire Solutions

Layouts should be named as e.g. <Description of the layout>_<Table Occurrence Name>

Examples: Company Details_CMT, Company List_CMT

In case to differentiate between Utility and User Interaction layouts layout name can prefixed with some text like UI for User Interacting layout e.g. UI_<Description of the layout>[<Table Occurrence Name> ]

If there are grouping/section maintain in a large project use the section name before the Layout Descriptions. e.g. UI_<Module/Section Name>_ <Description of the layout>[<Table Occurrence Name>]

Examples: UI_CompanyDetails[CMT], UI_Admin_RoleDetails[ROL]

Page 13: FIleMaker Coding Standards & Management Best Practices

Naming Conversions : Custom Functions Naming Conversions : Custom Functions

Presenter: Manjit Behera, Mindfire Solutions

- Public Custom Functions e.g CustomFunctionName_CFpub(parameterOne, parameterTwo )

- Private Custom Functions e.g CustomFunctionName_CFpvt(parameterOne, parameterTwo )

- Custom Function Parameters - camelCase- Function Headers1.Author Name2.Created On3.Function Name4.Description5.Function Parameters6.Return Type

Examples: RoundUp_CFNpub (number ; decimals)

Page 14: FIleMaker Coding Standards & Management Best Practices

Naming Conversions : Custom Functions Naming Conversions : Custom Functions

Presenter: Manjit Behera, Mindfire Solutions

Page 15: FIleMaker Coding Standards & Management Best Practices

Naming Conversions : Naming Conversions : ScriptsScripts

Presenter: Manjit Behera, Mindfire Solutions

Script Grouping: Scripts should be grouped in folders and sub folders based on the modules they are used in.Script Naming: <Anchor TO Name / Type of script>_ScriptName. <Type of script> can be [UTL], [BTN], [TRG], etc. based on the purpose or type of script. If the script is attached to any button then prefix [BTN]_ before the script name. Similarly for utility scripts prefix [UTL], for scripts used at triggers name it as [TRG]_, [SUB]_ for sub scripts etc.Script Header:1.Script Name2.Created On3.Purpose4.Declared Variables5.Referenced Variables (Global Variables)6.Parameters (i.e List any parameters required for the script7.Subscripts Used8.Calling Scripts Variables Naming: (Local and Global): camelCaseInline Comments: Purpose of a section (i.e multiple script steps)

Examples: [BTN]_New Company, [UTL]_Sort Records, [SUB]_Import Related Contacts

Page 16: FIleMaker Coding Standards & Management Best Practices

Naming Conversions : Naming Conversions : ScriptsScripts

Presenter: Manjit Behera, Mindfire Solutions

Page 17: FIleMaker Coding Standards & Management Best Practices

Naming Conversions : Naming Conversions : Value ListValue List

Presenter: Manjit Behera, Mindfire Solutions

To name value list use suffixes with the name of the list. The Suffixes are as follows:

c = Custom Valuex = Value list from another filed = Value list from field, including all values (for Dynamic)r = Value list from field, including related values (for Related)

Examples: Status List_c, Company Id and Name List_d, Company Contact Persons_r

Page 18: FIleMaker Coding Standards & Management Best Practices

Mindfire Coding StandardMindfire Coding Standard

Like other standard organizations Mindfire is also having a language specific naming conventions by following the Standard Coding of Filemaker.

Presenter: Manjit Behera, Mindfire Solutions

Page 19: FIleMaker Coding Standards & Management Best Practices

Application/Customize Coding StandardApplication/Customize Coding Standard

This is the naming conversions that follows for a particular project/company which might not be a standard coding of respective language.

Presenter: Manjit Behera, Mindfire Solutions

Page 20: FIleMaker Coding Standards & Management Best Practices

Benefits of Coding StandardBenefits of Coding Standard

Software maintenance

Software engineering

Driving down complexity

Quality

Re-factoring

Presenter: Manjit Behera, Mindfire Solutions

Page 21: FIleMaker Coding Standards & Management Best Practices

Project ManagementProject Management

Folder Structure

Coding Standard

Code Management

Consistency

Performance

Security

Presenter: Manjit Behera, Mindfire Solutions

Page 22: FIleMaker Coding Standards & Management Best Practices

Backup and UpdatesBackup and Updates

Periodical Backup

Record Updates

Cloud Storage

SVN Usages

Presenter: Manjit Behera, Mindfire Solutions

Page 23: FIleMaker Coding Standards & Management Best Practices

Presenter: Manjit Behera, Mindfire Solutions

Question and Answer

Page 24: FIleMaker Coding Standards & Management Best Practices

Thank you

Presenter: Manjit Behera, Mindfire Solutions

Page 25: FIleMaker Coding Standards & Management Best Practices

www.mindfiresolutions.com

https://www.facebook.com/MindfireSolutions

http://www.linkedin.com/company/mindfire-solutions

http://twitter.com/mindfires