» Convenciones.EstiloDeCodigo
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

Convenciones.EstiloDeCodigo

English | French | Italian

The original english version of this page is newer and may contain information this translation does not have! Click here to view the english version.

Para lograr una mejor legibilidad y estandarización del código asociado a vvvv, es necesario adherirse a los lineamientos de estilo de código listados a continuación:

Mayúsculas y minúsculas

Definiciones

Pascal Casing

 RedHotChilliPeppers

Camel Casing

 redHotChilliPeppers

Clases

  • Pascal Casing
//correcto
class RedHot
 
//incorrecto
class TRedHot
class redhot

Interfaces

  • iniciar con una I (por Interface) y continuar con Pascal Casing
//correcto
interface IRedHot
 
//incorrecto
interface RedHotInterface
interface Iredhot

Variables de Clase

  • iniciar con una F (por Field) y continuar Pascal Casing
//correcto
int FChilliPepper
 
//incorrecto
int ChilliPepper 
int FchilliPepper

Variables Locales, Argumentos de Funciones

  • Camel Casing
//correcto
int redPepper;
void Foo(int barCode);
 
//incorrecto
int Redpepper;
int RedPepper;
void Foo(int BarCode);

Variables Globales

  • iniciar con una G y continuar con Pascal Casing
//correcto
int GChilliPepper;
 
//incorrecto
int ChilliPepperGlobal;
int GchilliPepper;

Funciones

  • Pascal Casing
//correcto
PlayMusic();
 
//incorrecto
playMusic();

Eventos

  • iniciar con On.. y continuar con Pascal Casing
//correcto
OnExplode
 
//incorrecto
Explode
Onexplode

Callbacks de Eventos

  • llevan el nombre de sus Eventos correspondientes
  • terminan con ..CB
//correcto
ExplodeCB()
 
//incorrecto
ExplosionCB()
explodeCB()

Llaves

  • las llaves siempre en una línea nueva
//correcto
if true then
{ 
 ...
};
 
//incorrecto
if true then { ... };
if true then {
   ...
 };

Indentación

  • utilizar siempre 4 espacios

Espaciado

  • siempre hay un único espacio después de una coma o punto y coma, nunca antes
//correcto
MyFunction(a, b);
 
//incorrecto
MyFunction( a , b );
  • espacios únicos rodean a los operadores (excepto operadores unarios como el incremento o el NOT lógico)
//correcto
a = b;                       
for (int i = 0; i < 10; ++i) 
 
//incorrecto
a=b;                             
for (int i=0; i<10; ++i)

Guías de Código Adicionales

Note que algunas incompatibilidades con las guías que se listan a continuación (las cuales difieren entre sí a su vez) son deliberadas.

Mono Coding Guidlines

.Net Design Guidlines

Sharp Develop Coding Guidlines

anonymous user login

Shoutbox

~2d ago

joreg: Workshop on 30.11: Strategies for Sound Reactive Graphics: How to control everything through sound Signup here: https://thenodeinstitute.org/courses/ws23-vvvv-02-how-to-control-everything-through-sound/

~12d ago

joreg: The vvvv winter semester course program is out, starting with a free course on November 23rd: https://thenodeinstitute.org/ws23-vvvv-intermediates

~12d ago

LCA: ravazque, this guy is working on this v3 since ever. check: https://nuitrack.com/

~23d ago

~1mth ago

karistouf: done with vvvv beta :) https://vimeo.com/872242439

~2mth ago

joreg: Mapping festical call for projects: https://mappingfestival.com/en/call-for-projects

~2mth ago

joreg: Starting October 16: vvvv beginner class winter 23/24 Sign up here: https://thenodeinstitute.org/courses/ws23-vvvv-beginner-class/