» fr.Conventions et style de code
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

fr.Conventions et style de code

English | Italian | Spanish

Afin de faciliter la lecture et la standardisation du code dans vvvv, merci de suivre ces quelques conventions :

Casse

Définitions

Pascal Casing

 RedHotChilliPeppers

Camel Casing

 redHotChilliPeppers

Classes

  • Pascal Casing
//bien
class RedHot
 
//pas bien
class TRedHot
class redhot

Interfaces

  • commencent par un I (comme Interface) et s'écrivent en Pascal Casing
//bien
interface IRedHot
 
//pas bien
interface RedHotInterface
interface Iredhot

Variables de classe

  • commencent par un F (comme Field) et s'écrivent en Pascal Casing
//bien
int FChilliPepper
 
//pas bien
int ChilliPepper 
int FchilliPepper

Variables locales, arguments

  • Camel Casing
//bien
int redPepper;
void Foo(int barCode);
 
//pas bien
int Redpepper;
int RedPepper;
void Foo(int BarCode);

Variables globales

  • commencent par un G et s'écrivent en Pascal Casing
//bien
int GChilliPepper;
 
//pas bien
int ChilliPepperGlobal;
int GchilliPepper;

Fonctions

  • Pascal Casing
//bien
PlayMusic();
 
//pas bien
playMusic();

Événements

  • commencent par On.. et s'écrivent en Pascal Casing
//bien
OnExplode
 
//pas bien
Explode
Onexplode

Callbacks

  • portent le même noms que les événements auxquels ils font référence
  • mais terminent par ..CB
//bien
ExplodeCB()
 
//pas bien
ExplosionCB()
explodeCB()

Parenthèses

  • les parenthèses sont toujours sur une nouvelle ligne
//bien
if true then
{ 
 ...
};
 
//pas bien
if true then { ... };
if true then {
   ...
 };

Indentation

  • utilisez toujours 4 espaces

Espacements

  • il y a toujours un espace après un point ou un point-virgule, jamais avant
//bien
MyFunction(a, b);
 
//pas bien
MyFunction( a , b );
  • un espace de part et d'autre des opérateurs (sauf les opérateurs unaires comme l'incrémentation ou le NOT logique)
//bien
a = b;                       
for (int i = 0; i < 10; ++i) 
 
//pas bien
a=b;                             
for (int i=0; i<10; ++i)

Autres guidelines

Notez que les différences avec les autres guides listés ci-dessous (qui différent aussi entre eux) sont volontaires.

Mono Coding Guidlines

.Net Design Guidlines

Sharp Develop Coding Guidlines

anonymous user login

Shoutbox

~2d ago

joreg: Workshop on 09 05: Deepdive into the Stride 3D Engine. Signup here: https://thenodeinstitute.org/courses/ss24-vvvv-advanced-3d-rendering-in-vvvv-with-stride/

~2d ago

tekcor: Dear vvvv community, I am leaving my personal fundraiser here because I know many of you personally, sending love https://t.ly/iV9l_

~3d ago

joreg: Rewatch the 24th vvvvorldwide meetup here: https://www.youtube.com/live/gNszIiRAjDo?si=0RXF0pW73EUaRqGk

~3d ago

joreg: LINK - the vvvv summer camp 2024 is announced: https://visualprogramming.net/blog/2024/link-the-vvvv-summer-camp-24/

~5d ago

joreg: Tonight, May 3, vvvv meetup in Berlin or via stream: https://visualprogramming.net/blog/2024/24.-vvvv-worldwide-meetup/

~8d ago

joreg: Workshop on 02 05: Intro to the Stride 3D Engine. Signup here: https://thenodeinstitute.org/courses/ss24-vvvv-intro-to-the-stride-3d-engine-in-vvvv/

~9d ago

joreg: The new vvvv Show-Off-Reel is out: https://vimeo.com/930568091

~15d ago

joreg: The summer season of vvvv workshops at The NODE Institute is out: https://thenodeinstitute.org/ss24-vvvv-intermediates/