This repository has been archived by the owner on Oct 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Flag Comment
Pouya Kary edited this page Mar 5, 2016
·
3 revisions
A flag comment is used to point the major divisions within your code. For example say you have a GUI app on just one file. Then your MVC model will be divided to:
Remember that the flag comment is the biggest scope comment. It means it's larger than the class
comment. Only use flag comment when some files are merged into one file. For when you have different classes or namespaces or parts of theme grouped together in one file.
//
// ────────────────────────────────────────────────── I ──────────
// :::::: M O D E L : : : : : : : :
// ────────────────────────────────────────────────────────────
//
//
// ─── MODEL FUNC 1 ─────────────────────────────────────────────────────
//
function ModelFunc1 ( ) {
...
}
//
// ─── MODEL FUNC 2 ─────────────────────────────────────────────────────
//
function ModelFunc2 ( ) {
...
}
// ──────────────────────────────────────────────────────────────────────
//
// ──────────────────────────────────────────────── II ──────────
// :::::: V I E W : : : : : : : :
// ──────────────────────────────────────────────────────────
//
//
// ─── VIEW FUNC 1 ──────────────────────────────────────────────────────
//
function ViewFunc1 ( ) {
...
}
//
// ─── VIEW FUNC 2 ──────────────────────────────────────────────────────
//
function ViewFunc2 ( ) {
...
}
// ──────────────────────────────────────────────────────────────────────
//
// ──────────────────────────────────────────────────────────── III ──────────
// :::::: C O N T R O L L E R : : : : : : : :
// ──────────────────────────────────────────────────────────────────────
//
//
// ─── CONTROLLER FUNC 1 ────────────────────────────────────────────────
//
function ControllerFunc1 ( ) {
...
}
//
// ─── CONTROLLER FUNC 2 ────────────────────────────────────────────────
//
function ControllerFunc2 ( ) {
...
}
// ──────────────────────────────────────────────────────────────────────
![](https://cloud.githubusercontent.com/assets/2157285/13235210/f59c2db2-d9d1-11e5-8d10-9540b1a175f2.png)