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

PFQNC:

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

1) Indicator => pfqnc: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 : pfqnc:phprconfig:configBundle:tenant:listing:filters:date

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

Example

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

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

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

Date range
example : pfqnc:phprconfig:configBundle:tenant:listing:filters:date[dateStart]
example : pfqnc: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)

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

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

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

pfqnc:phprconfig:securityBundle:login:leftside-devnote

Case#3.0 CRUD base layout

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

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

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

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

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

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

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

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

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

Case#3.1 CRUD Tenant Listing page

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

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

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

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

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

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

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


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


pfqnc: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)]

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

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

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

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