Skip to content

Latest commit

 

History

History
223 lines (141 loc) · 5.06 KB

code-style.md

File metadata and controls

223 lines (141 loc) · 5.06 KB

🎮 Corifeus Matrix

Code style

Cases we use

camelCase = theFirstIsSmallTheRestIsCapital

kebab-case = meaning-only-lower-case-and-a-z-and-dash-and-numbers

PascalCase = JustAlphaAndAlwaysCapitalWords

CSS Prefix

kebab-case

Prefix so that get away form namespace clashes.

.cory = corifeus

.cory-something { font-family: "Corifeus"; }

HTML Prefix

kebab-case

Prefix so that get away form namespace clashes. It is both for tags and attributes.

cory = corifeus

<cory-element cory-attribute="kebab-case" class="cory-something"/>

Url

kebab-case

https://localhost/very-long-sentance/is/just/kebab-case.html

Path

kebab-case

/module-one/love/live/path.js

/try/code-style/by/class.js

Filename

kebab-case

// function
camel-case.js

// class
camel-case-is-kebab-as-well.js

// html file
kebab-case.html

// regular file
kebab-case.any
kebab-case.js
kebab-case.pdf
kebab-case.html
kebab-case.css

Namespace

camelCase

The namespace = corifeus

// JavaScript 
global.corifeus.camelCase = () => console.log('camelCase');
global.corifeus.camelCase = class camelCaseClass {};

Variables

camelCase

// JavaScript 
const variableIsCool = 'camelCase';
let anotherVariable = false;
var oldTypeVariable = 'cool';

Functions

camelCase

// JavaScript 
function justSimpleFunction() {
    console.log('alsoCamelCase')
}

Prototype based class

I prefer camelCase , though PascalCase is fine.

// JavaScript
function prototypeBasedClass() {
    console.log('likeAClassIsCamelCase');
}

prototypeBasedClass.staticFunction = function() {}

prototypeBasedClass.staticVariable = true;

prototypeBasedClass.prototype.instanceFunction = function() {} 

prototypeBasedClass.prototype.instanceVariable = true; 

Classes

I rarely use classes, but sometimes it is good, I prefer camelCase but for classes it is ok to use PascalCase.

camelCase

// JavaScript
class simpleClass {
    constructor() {}
    
    instanceFunctionCamelCase() {}
    
    get instanceProperty() { return true; }
    set instanceProperty(value) { this._instanceProperty = value; }
    
    static classMethod() { console.log('camelCase'); }
    static get classProperty() { return 'camelCase'; }
    
}

Objects

camelCase

// JavaScript 
const objects = {
    variableNow: camelCase,
    methodName: camelCase,
    nameOfTheClass: camelCase,
    staticFuncitonName: camelCase.static,
    instance: camelCase.variable            
}

🚀 Quick and Affordable Web Development Services

If you want to quickly and affordably develop your next digital project, visit corifeus.eu for expert solutions tailored to your needs.


🌐 Powerful Online Networking Tool

Discover the powerful and free online networking tool at network.corifeus.com.

🆓 Free
Designed for professionals and enthusiasts, this tool provides essential features for network analysis, troubleshooting, and management.
Additionally, it offers tools for:

  • 📡 Monitoring TCP, HTTP, and Ping to ensure optimal network performance and reliability.
  • 📊 Status page management to track uptime, performance, and incidents in real time with customizable dashboards.

All these features are completely free to use.


❤️ Support Our Open-Source Project

If you appreciate our work, consider ⭐ starring this repository or 💰 making a donation to support server maintenance and ongoing development. Your support means the world to us—thank you!


🌍 About My Domains

All my domains, including patrikx3.com, corifeus.eu, and corifeus.com, are developed in my spare time. While you may encounter minor errors, the sites are generally stable and fully functional.


📈 Versioning Policy

Version Structure: We follow a Major.Minor.Patch versioning scheme:

  • Major: 📅 Corresponds to the current year.
  • Minor: 🌓 Set as 4 for releases from January to June, and 10 for July to December.
  • Patch: 🔧 Incremental, updated with each build.

🚨 Important Changes: Any breaking changes are prominently noted in the readme to keep you informed.


CORIFEUS Build v2025.4.116

Donate for PatrikX3 / P3X Contact Corifeus / P3X Like Corifeus @ Facebook