Naming Convention Pfqcn

FQCN

Description

Naming stuff is important !

Clear naming an avoid confusion

Fully Qualify “long tail” name avoid conflict

Standard keep it well define even generated

Diff between Name and ID We target ID primarily ID could include the name “Name” with a context

Documentation

Fully Qualified Name FQN : https://en.wikipedia.org/wiki/Fully:qualified:name (opens in a new tab)

Id Attribute

  • Valid on any element except : <base>, <html>, <head>, <meta>, <param>, <script>, <style>, <title>

  • Each Id should be unique in the page as rendered in the browser, which may or may not be all in the same file Can be used as anchor reference in URL

  • Is referenced in CSS or URL with # sign

  • Is referenced in JavaScript with getElementById(), and jQuery by $(#<id>)

  • Shares same name space as name attribute

  • Must contain at least one character

  • Must begin with a letter

  • Must not contain anything other than letters, numbers, underscores (:), dashes (-), colons (:), or periods (.)

  • Is case insensitive

Convention

Convension : https://medium.com/@soni.dumitru/parameter-naming-conventions-rails-forms-bf9bd68302b3 (opens in a new tab)

https://learn.objectiflune.com/blog/data/naming-convention-for-data-fields/ (opens in a new tab)

Example

AWS : Amazon Resource Names => ARN

https://docs.aws.amazon.com/managedservices/latest/userguide/find-arn.html (opens in a new tab)

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER:Tagging.ARN.html (opens in a new tab)

Ex : arn:aws:service:region:account-id:resource-id

Goal

Guildline “right styleguide can significantly increase development speed, debugging, and the implementation of new features”

Ref : https://getbem.com/naming/ (opens in a new tab)

Make it KISS / Reusable

Research

Try to find an already defined suitable standard ?

Case

Edge Feildset Date range DateTime Reports / multiple component SideboxListing

Proposition

Use lowercase Latin letters Separate different words by a hyphen Do not use periods as well as numbers at the beginning of the name Separator “:” Groupe [] ? !!! Not Standard

Definition

Name definition

  • What => username

  • Type => Input

  • Result : username-Input

PFQCN:

*:For us _ PHPCreation Fully Qualify Name Convention => pfqcn_:

1) Indicator => pfqcn:
2) Applica:ion => phprconfig
3) Bundle => configBundle
4) Unit “controller” => tenant
5) Interface / precision => listing
6) Part => Filters
7) Element => Date
8) (optional) In [] for grouping => date[dateStart] / date[dateEnd]

template : Indicator:Application:Bundle:Unit:Interface:Part:Element
Result : pfqcn:phprconfig:configBundle:tenant:listing:filters:date

template : Indicator:Application:Bundle:Unit:Interface:Part:Element[optional]
Result#8 : pfqcn:phprconfig:configBundle:tenant:listing:filters:date[dateStart]

Example

example : pfqcn:phprconfig:configBundle:tenant:listing:filters:search

example : pfqcn:phprconfig:configBundle:tenant:listing:filters:date

Datetime
example : pfqcn:phprconfig:configBundle:tenant:listing:filters:datetime[date]
example : pfqcn:phprconfig:configBundle:tenant:listing:filters:datetime[time]

Date range
example : pfqcn:phprconfig:configBundle:tenant:listing:filters:date[dateStart]
example : pfqcn:phprconfig:configBundle:tenant:listing:filters:date[dateEnd]

DateTime range (together)

Test Definition

cases

Case#1 Home page

URL : http://localhost:3000/ (opens in a new tab)

Case#2 Login page

URL : http://localhost:3000/login (opens in a new tab)

pfqcn:phprconfig:securityBundle:login:authform:rightside-view

pfqcn:phprconfig:securityBundle:login:leftside-header
pfqcn:phprconfig:securityBundle:login:leftside-header:logo-image

pfqcn:phprconfig:securityBundle:login:leftside-authform
pfqcn:phprconfig:securityBundle:login:leftside-authform:login-title
pfqcn:phprconfig:securityBundle:login:leftside-authform:username-input
pfqcn:phprconfig:securityBundle:login:leftside-authform:password-input
pfqcn:phprconfig:securityBundle:login:leftside-authform:login-button
pfqcn:phprconfig:securityBundle:login:leftside-authform:forgot-link

pfqcn:phprconfig:securityBundle:login:leftside-devnote

Case#3.0 CRUD base layout

URL : http://localhost:3000/dashboard (opens in a new tab)

pfqcn:phprconfig:appBundle:main:menu:header:logo-image
pfqcn:phprconfig:appBundle:main:menu:header:close-button

pfqcn:phprconfig:appBundle:main:menu:links:XXX
pfqcn:phprconfig:appBundle:main:menu:links:dashboard-link
pfqcn:phprconfig:appBundle:main:menu:links:tenants-link
pfqcn:phprconfig:appBundle:main:menu:links:hostnames-link
pfqcn:phprconfig:appBundle:main:menu:links:parameters-link

pfqcn:phprconfig:appBundle:main:menu:footer:logout-link

pfqcn:phprconfig:appBundle:dashboard:homepage:crud:XXX
pfqcn:phprconfig:appBundle:dashboard:homepage:header:title-text
pfqcn:phprconfig:appBundle:dashboard:homepage:breadcrumbs:pages-link
pfqcn:phprconfig:appBundle:dashboard:homepage:welcomemessage:title-text
pfqcn:phprconfig:appBundle:dashboard:homepage:welcomemessage:explanation-text

pfqcn:phprconfig:appBundle:dashboard:homepage:tenants-card:xxx
pfqcn:phprconfig:appBundle:dashboard:homepage:tenants-card:tenants-icon-image
pfqcn:phprconfig:appBundle:dashboard:homepage:tenants-card:title-text
pfqcn:phprconfig:appBundle:dashboard:homepage:tenants-card:explanation-text
pfqcn:phprconfig:appBundle:dashboard:homepage:tenants-card:tenants-button

pfqcn:phprconfig:appBundle:dashboard:homepage:hostname-card:xxx
pfqcn:phprconfig:appBundle:dashboard:homepage:hostname-card:hostname-icon-image
pfqcn:phprconfig:appBundle:dashboard:homepage:hostname-card:title-text
pfqcn:phprconfig:appBundle:dashboard:homepage:hostname-card:explanation-text
pfqcn:phprconfig:appBundle:dashboard:homepage:hostname-card:hostname-button

pfqcn:phprconfig:appBundle:dashboard:homepage:parameter-card:xxx
pfqcn:phprconfig:appBundle:dashboard:homepage:parameter-card:parameter-icon-image
pfqcn:phprconfig:appBundle:dashboard:homepage:parameter-card:title-text
pfqcn:phprconfig:appBundle:dashboard:homepage:parameter-card:explanation-text
pfqcn:phprconfig:appBundle:dashboard:homepage:parameter-card:parameter-button

pfqcn:phprconfig:appBundle:dashboard:homepage:footer:php-text

Case#3.1 CRUD Tenant Listing page

URL : http://localhost:3000/tenants (opens in a new tab)

pfqcn:phprconfig:appBundle:main:menu:links:XXX
pfqcn:phprconfig:appBundle:main:menu:links:dashboard-link
pfqcn:phprconfig:appBundle:main:menu:links:tenants-link
pfqcn:phprconfig:appBundle:main:menu:links:hostnames-link
pfqcn:phprconfig:appBundle:main:menu:links:parameters-link

pfqcn:phprconfig:configBundle:tenant:header:title-text
pfqcn:phprconfig:configBundle:tenant:header:breadcrumbs:pages-links
pfqcn:phprconfig:configBundle:tenant:header:tour:tour-button
pfqcn:phprconfig:configBundle:tenant:header:add:add-tenant-button

pfqcn:phprconfig:configBundle:tenant:listing:exports:xxx
pfqcn:phprconfig:configBundle:tenant:listing:exports:list
pfqcn:phprconfig:configBundle:tenant:listing:exports:list:excel-link
pfqcn:phprconfig:configBundle:tenant:listing:exports:list:csv-link

pfqcn:phprconfig:configBundle:tenant:listing:actions:xxx
pfqcn:phprconfig:configBundle:tenant:listing:actions:select-text
pfqcn:phprconfig:configBundle:tenant:listing:actions:edit-checkbox-checked
pfqcn:phprconfig:configBundle:tenant:listing:actions:delete-checkbox-checked
pfqcn:phprconfig:configBundle:tenant:listing:actions:show-checkbox-checked
pfqcn:phprconfig:configBundle:tenant:listing:actions:apply-button

pfqcn:phprconfig:configBundle:tenant:listing:fields:xxx
pfqcn:phprconfig:configBundle:tenant:listing:fields:select-text
pfqcn:phprconfig:configBundle:tenant:listing:fields:id-checkbox-unchecked
pfqcn:phprconfig:configBundle:tenant:listing:fields:name-checkbox-unchecked
pfqcn:phprconfig:configBundle:tenant:listing:fields:stack-checkbox-unchecked
pfqcn:phprconfig:configBundle:tenant:listing:fields:tenant-checkbox-unchecked
pfqcn:phprconfig:configBundle:tenant:listing:fields:action-checkbox-unchecked
pfqcn:phprconfig:configBundle:tenant:listing:fields:apply-button

pfqcn:phprconfig:configBundle:tenant:listing:filters:filters-button


pfqcn:phprconfig:configBundle:tenant:listing:list:title-text
pfqcn:phprconfig:configBundle:tenant:listing:list:click-text
pfqcn:phprconfig:configBundle:tenant:listing:list:tenantID-sort
pfqcn:phprconfig:configBundle:tenant:listing:list:name-sort
pfqcn:phprconfig:configBundle:tenant:listing:list:stack-sort
pfqcn:phprconfig:configBundle:tenant:listing:list:actions-text
pfqcn:phprconfig:configBundle:tenant:listing:list:tenantID-link
pfqcn:phprconfig:configBundle:tenant:listing:list:name-text
pfqcn:phprconfig:configBundle:tenant:listing:list:stack-text
pfqcn:phprconfig:configBundle:tenant:listing:list:actions:edit-button
pfqcn:phprconfig:configBundle:tenant:listing:list:actions:delete-button
pfqcn:phprconfig:configBundle:tenant:listing:list:actions:open-button
pfqcn:phprconfig:configBundle:tenant:listing:pages:page-buttons


pfqcn:phprconfig:configBundle:tenant:listing:footer:logout-link

Case#3.2 CRUD Tenant Show page

URL: http://localhost:3000/tenants/[tenant-ID (opens in a new tab)]

pfqcn:phprconfig:appBundle:main:menu:links:XXX
pfqcn:phprconfig:appBundle:main:menu:links:dashboard-link
pfqcn:phprconfig:appBundle:main:menu:links:tenants-link
pfqcn:phprconfig:appBundle:main:menu:links:hostnames-link
pfqcn:phprconfig:appBundle:main:menu:links:parameters-link

pfqcn:phprconfig:configBundle:tenant:header:tenantinfo-title
pfqcn:phprconfig:configBundle:tenant:header:breadcrumbs:pages-links
pfqcn:phprconfig:configBundle:tenant:header:edit:edit-button
pfqcn:phprconfig:configBundle:tenant:header:delete:delete-tenant-button
pfqcn:phprconfig:configBundle:tenant:header:reports:report-tenant-button
pfqcn:phprconfig:configBundle:tenant:header:svg:svg-button????????

pfqcn:phprconfig:configBundle:tenant:show:generalinfo:xxx
pfqcn:phprconfig:configBundle:tenant:?infogeneral?:general:general-title
pfqcn:phprconfig:configBundle:tenant:?:general:id-label
pfqcn:phprconfig:configBundle:tenant:?:general:tenant-value
pfqcn:phprconfig:configBundle:tenant:?:general:name-title
pfqcn:phprconfig:configBundle:tenant:?:general:name-value
pfqcn:phprconfig:configBundle:tenant:?:general:stackname-title
pfqcn:phprconfig:configBundle:tenant:?:general:stackname-value

pfqcn:phprconfig:configBundle:tenant:listing:general:stackname-title