Bridge-Pattern or Entity-Component-System











up vote
0
down vote

favorite












I want to learn how/when/why to use the GoF Design Patterns. These last days are dedicated to the Bridge Pattern, which means:




Decouple an abstraction from its implementation so that the two can vary independently.




Everyone has a different understanding of this vague description, but if I well-understood the global point, it cuts an abstraction into multiple independant implementations which relies on each other, in a chain.





On this premise, let's try to implement a four-arrow remote control. First, let's define what's awaited with interfaces:



public interface ITopBottomButtonsControl
{
void TopButtonPressed();
void BottomButtonPressed();
}

public interface ILeftRightButtonsControl
{
void LeftButtonPressed();
void RightButtonPressed();
}

public interface IRemoteControl :
ILeftRightButtonsControl,
ITopBottomButtonsControl
{ }




Here is an example of the BP implementation:



public class ChannelControl : ILeftRightButtonsControl
{
public void LeftButtonPressed() => Console.WriteLine("Previous channel");
public void RightButtonPressed() => Console.WriteLine("Next channel");
}

public class ChapterControl : ILeftRightButtonsControl
{
public void LeftButtonPressed() => Console.WriteLine("Previous chapter");
public void RightButtonPressed() => Console.WriteLine("Next chapter");
}




public abstract class BPRemoteControl : IRemoteControl
{
ILeftRightButtonsControl LeftRightControl { get; }

public BPRemoteControl(ILeftRightButtonsControl leftRight)
{
LeftRightControl = leftRight;
}

public void LeftButtonPressed() => LeftRightControl.LeftButtonPressed();
public void RightButtonPressed() => LeftRightControl.RightButtonPressed();

public abstract void TopButtonPressed();
public abstract void BottomButtonPressed();
}




public class SpeedControl : BPRemoteControl
{
public SpeedControl(ILeftRightButtonsControl leftRight) : base(leftRight) { }

public override void BottomButtonPressed() => Console.WriteLine("Slow down");
public override void TopButtonPressed() => Console.WriteLine("Speed up");
}

public class VolumeControl : BPRemoteControl
{
public VolumeControl(ILeftRightButtonsControl leftRight) : base(leftRight) { }

public override void BottomButtonPressed() => Console.WriteLine("Volume down");
public override void TopButtonPressed() => Console.WriteLine("Volume up");
}




The fact is that, when I implemented this to test the pattern, it made me think back the Entity Component System. So, I tried to implement the same application, but this time with an ECS approach.

The classes ChannelControl and ChapterControl remains the same, but the rest is different:



public class SpeedControl : ITopBottomButtonsControl
{
public void BottomButtonPressed() => Console.Write("Slow down");
public void TopButtonPressed() => Console.WriteLine("Speed up");
}

public class VolumeControl : ITopBottomButtonsControl
{
public void BottomButtonPressed() => Console.WriteLine("Volume down");
public void TopButtonPressed() => Console.WriteLine("Volume up");
}




public class ECSRemoteController : IRemoteControl
{
private ITopBottomButtonsControl TopBottomButtonsComponent { get; }
private ILeftRightButtonsControl LeftRightButtonsComponent { get; }

public ECSRemoteController(ITopBottomButtonsControl topBottom, ILeftRightButtonsControl leftRight)
{
TopBottomButtonsComponent = topBottom;
LeftRightButtonsComponent = leftRight;
}

public void TopButtonPressed() => TopBottomButtonsComponent.TopButtonPressed();
public void BottomButtonPressed() => TopBottomButtonsComponent.BottomButtonPressed();

public void LeftButtonPressed() => LeftRightButtonsComponent.LeftButtonPressed();
public void RightButtonPressed() => LeftRightButtonsComponent.RightButtonPressed();
}




Finally, these two solutions seems to be the same, with the following difference:




The Bridge Pattern is vertically-organized: S(a -> b -> c)

The Entity-Component-System is horizontally-organized: S(a, b, c)




Is there really a difference between these two solutions? When should one be prefered to the other?





HOW TO TEST: separate the two solutions into two folders BridgePattern and EntityComponentPattern, and fill the console application with the following code:



    static void Main(string args)
{
BridgePattern();
Console.WriteLine();
EntityComponentSystem();
Console.ReadLine();
}

static void BridgePattern()
{
Console.ForegroundColor = ConsoleColor.Cyan;
Console.WriteLine("BridgePattern version");
Console.WriteLine("----------");

IRemoteControl TVRemoteControl = new BridgePattern.VolumeControl(new BridgePattern.ChannelControl());
IRemoteControl DVDRemoteControl = new BridgePattern.SpeedControl(new BridgePattern.ChapterControl());

Console.WriteLine($"1. {nameof(TVRemoteControl)}:");
UseRemoteControl(TVRemoteControl);

Console.WriteLine($"2. {nameof(DVDRemoteControl)}:");
UseRemoteControl(DVDRemoteControl);
}

static void EntityComponentSystem()
{
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("EntityComponentSystem version");
Console.WriteLine("----------");

IRemoteControl TVRemoteControl = new EntityComponentSystem.ECSRemoteController(new EntityComponentSystem.VolumeControl(), new EntityComponentSystem.ChannelControl());
IRemoteControl DVDRemoteControl = new EntityComponentSystem.ECSRemoteController(new EntityComponentSystem.SpeedControl(), new EntityComponentSystem.ChapterControl());

Console.WriteLine($"1. {nameof(TVRemoteControl)}:");
UseRemoteControl(TVRemoteControl);

Console.WriteLine($"2. {nameof(DVDRemoteControl)}:");
UseRemoteControl(DVDRemoteControl);
}

static void UseRemoteControl(IRemoteControl remoteControl)
{
remoteControl.LeftButtonPressed();
remoteControl.RightButtonPressed();
remoteControl.TopButtonPressed();
remoteControl.BottomButtonPressed();
}









share|improve this question






















  • [off-topic]....perhaps belongs in another group - but not SO
    – JohnB
    Nov 8 at 10:15












  • Hi, I think you should post this question in code review instead of here: codereview.stackexchange.com
    – Nhan Phan
    Nov 8 at 10:16










  • This question belongs on Code Review : Bridge-Pattern or Entity-Component-System
    – Maxime Recuerda
    Nov 8 at 10:19

















up vote
0
down vote

favorite












I want to learn how/when/why to use the GoF Design Patterns. These last days are dedicated to the Bridge Pattern, which means:




Decouple an abstraction from its implementation so that the two can vary independently.




Everyone has a different understanding of this vague description, but if I well-understood the global point, it cuts an abstraction into multiple independant implementations which relies on each other, in a chain.





On this premise, let's try to implement a four-arrow remote control. First, let's define what's awaited with interfaces:



public interface ITopBottomButtonsControl
{
void TopButtonPressed();
void BottomButtonPressed();
}

public interface ILeftRightButtonsControl
{
void LeftButtonPressed();
void RightButtonPressed();
}

public interface IRemoteControl :
ILeftRightButtonsControl,
ITopBottomButtonsControl
{ }




Here is an example of the BP implementation:



public class ChannelControl : ILeftRightButtonsControl
{
public void LeftButtonPressed() => Console.WriteLine("Previous channel");
public void RightButtonPressed() => Console.WriteLine("Next channel");
}

public class ChapterControl : ILeftRightButtonsControl
{
public void LeftButtonPressed() => Console.WriteLine("Previous chapter");
public void RightButtonPressed() => Console.WriteLine("Next chapter");
}




public abstract class BPRemoteControl : IRemoteControl
{
ILeftRightButtonsControl LeftRightControl { get; }

public BPRemoteControl(ILeftRightButtonsControl leftRight)
{
LeftRightControl = leftRight;
}

public void LeftButtonPressed() => LeftRightControl.LeftButtonPressed();
public void RightButtonPressed() => LeftRightControl.RightButtonPressed();

public abstract void TopButtonPressed();
public abstract void BottomButtonPressed();
}




public class SpeedControl : BPRemoteControl
{
public SpeedControl(ILeftRightButtonsControl leftRight) : base(leftRight) { }

public override void BottomButtonPressed() => Console.WriteLine("Slow down");
public override void TopButtonPressed() => Console.WriteLine("Speed up");
}

public class VolumeControl : BPRemoteControl
{
public VolumeControl(ILeftRightButtonsControl leftRight) : base(leftRight) { }

public override void BottomButtonPressed() => Console.WriteLine("Volume down");
public override void TopButtonPressed() => Console.WriteLine("Volume up");
}




The fact is that, when I implemented this to test the pattern, it made me think back the Entity Component System. So, I tried to implement the same application, but this time with an ECS approach.

The classes ChannelControl and ChapterControl remains the same, but the rest is different:



public class SpeedControl : ITopBottomButtonsControl
{
public void BottomButtonPressed() => Console.Write("Slow down");
public void TopButtonPressed() => Console.WriteLine("Speed up");
}

public class VolumeControl : ITopBottomButtonsControl
{
public void BottomButtonPressed() => Console.WriteLine("Volume down");
public void TopButtonPressed() => Console.WriteLine("Volume up");
}




public class ECSRemoteController : IRemoteControl
{
private ITopBottomButtonsControl TopBottomButtonsComponent { get; }
private ILeftRightButtonsControl LeftRightButtonsComponent { get; }

public ECSRemoteController(ITopBottomButtonsControl topBottom, ILeftRightButtonsControl leftRight)
{
TopBottomButtonsComponent = topBottom;
LeftRightButtonsComponent = leftRight;
}

public void TopButtonPressed() => TopBottomButtonsComponent.TopButtonPressed();
public void BottomButtonPressed() => TopBottomButtonsComponent.BottomButtonPressed();

public void LeftButtonPressed() => LeftRightButtonsComponent.LeftButtonPressed();
public void RightButtonPressed() => LeftRightButtonsComponent.RightButtonPressed();
}




Finally, these two solutions seems to be the same, with the following difference:




The Bridge Pattern is vertically-organized: S(a -> b -> c)

The Entity-Component-System is horizontally-organized: S(a, b, c)




Is there really a difference between these two solutions? When should one be prefered to the other?





HOW TO TEST: separate the two solutions into two folders BridgePattern and EntityComponentPattern, and fill the console application with the following code:



    static void Main(string args)
{
BridgePattern();
Console.WriteLine();
EntityComponentSystem();
Console.ReadLine();
}

static void BridgePattern()
{
Console.ForegroundColor = ConsoleColor.Cyan;
Console.WriteLine("BridgePattern version");
Console.WriteLine("----------");

IRemoteControl TVRemoteControl = new BridgePattern.VolumeControl(new BridgePattern.ChannelControl());
IRemoteControl DVDRemoteControl = new BridgePattern.SpeedControl(new BridgePattern.ChapterControl());

Console.WriteLine($"1. {nameof(TVRemoteControl)}:");
UseRemoteControl(TVRemoteControl);

Console.WriteLine($"2. {nameof(DVDRemoteControl)}:");
UseRemoteControl(DVDRemoteControl);
}

static void EntityComponentSystem()
{
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("EntityComponentSystem version");
Console.WriteLine("----------");

IRemoteControl TVRemoteControl = new EntityComponentSystem.ECSRemoteController(new EntityComponentSystem.VolumeControl(), new EntityComponentSystem.ChannelControl());
IRemoteControl DVDRemoteControl = new EntityComponentSystem.ECSRemoteController(new EntityComponentSystem.SpeedControl(), new EntityComponentSystem.ChapterControl());

Console.WriteLine($"1. {nameof(TVRemoteControl)}:");
UseRemoteControl(TVRemoteControl);

Console.WriteLine($"2. {nameof(DVDRemoteControl)}:");
UseRemoteControl(DVDRemoteControl);
}

static void UseRemoteControl(IRemoteControl remoteControl)
{
remoteControl.LeftButtonPressed();
remoteControl.RightButtonPressed();
remoteControl.TopButtonPressed();
remoteControl.BottomButtonPressed();
}









share|improve this question






















  • [off-topic]....perhaps belongs in another group - but not SO
    – JohnB
    Nov 8 at 10:15












  • Hi, I think you should post this question in code review instead of here: codereview.stackexchange.com
    – Nhan Phan
    Nov 8 at 10:16










  • This question belongs on Code Review : Bridge-Pattern or Entity-Component-System
    – Maxime Recuerda
    Nov 8 at 10:19















up vote
0
down vote

favorite









up vote
0
down vote

favorite











I want to learn how/when/why to use the GoF Design Patterns. These last days are dedicated to the Bridge Pattern, which means:




Decouple an abstraction from its implementation so that the two can vary independently.




Everyone has a different understanding of this vague description, but if I well-understood the global point, it cuts an abstraction into multiple independant implementations which relies on each other, in a chain.





On this premise, let's try to implement a four-arrow remote control. First, let's define what's awaited with interfaces:



public interface ITopBottomButtonsControl
{
void TopButtonPressed();
void BottomButtonPressed();
}

public interface ILeftRightButtonsControl
{
void LeftButtonPressed();
void RightButtonPressed();
}

public interface IRemoteControl :
ILeftRightButtonsControl,
ITopBottomButtonsControl
{ }




Here is an example of the BP implementation:



public class ChannelControl : ILeftRightButtonsControl
{
public void LeftButtonPressed() => Console.WriteLine("Previous channel");
public void RightButtonPressed() => Console.WriteLine("Next channel");
}

public class ChapterControl : ILeftRightButtonsControl
{
public void LeftButtonPressed() => Console.WriteLine("Previous chapter");
public void RightButtonPressed() => Console.WriteLine("Next chapter");
}




public abstract class BPRemoteControl : IRemoteControl
{
ILeftRightButtonsControl LeftRightControl { get; }

public BPRemoteControl(ILeftRightButtonsControl leftRight)
{
LeftRightControl = leftRight;
}

public void LeftButtonPressed() => LeftRightControl.LeftButtonPressed();
public void RightButtonPressed() => LeftRightControl.RightButtonPressed();

public abstract void TopButtonPressed();
public abstract void BottomButtonPressed();
}




public class SpeedControl : BPRemoteControl
{
public SpeedControl(ILeftRightButtonsControl leftRight) : base(leftRight) { }

public override void BottomButtonPressed() => Console.WriteLine("Slow down");
public override void TopButtonPressed() => Console.WriteLine("Speed up");
}

public class VolumeControl : BPRemoteControl
{
public VolumeControl(ILeftRightButtonsControl leftRight) : base(leftRight) { }

public override void BottomButtonPressed() => Console.WriteLine("Volume down");
public override void TopButtonPressed() => Console.WriteLine("Volume up");
}




The fact is that, when I implemented this to test the pattern, it made me think back the Entity Component System. So, I tried to implement the same application, but this time with an ECS approach.

The classes ChannelControl and ChapterControl remains the same, but the rest is different:



public class SpeedControl : ITopBottomButtonsControl
{
public void BottomButtonPressed() => Console.Write("Slow down");
public void TopButtonPressed() => Console.WriteLine("Speed up");
}

public class VolumeControl : ITopBottomButtonsControl
{
public void BottomButtonPressed() => Console.WriteLine("Volume down");
public void TopButtonPressed() => Console.WriteLine("Volume up");
}




public class ECSRemoteController : IRemoteControl
{
private ITopBottomButtonsControl TopBottomButtonsComponent { get; }
private ILeftRightButtonsControl LeftRightButtonsComponent { get; }

public ECSRemoteController(ITopBottomButtonsControl topBottom, ILeftRightButtonsControl leftRight)
{
TopBottomButtonsComponent = topBottom;
LeftRightButtonsComponent = leftRight;
}

public void TopButtonPressed() => TopBottomButtonsComponent.TopButtonPressed();
public void BottomButtonPressed() => TopBottomButtonsComponent.BottomButtonPressed();

public void LeftButtonPressed() => LeftRightButtonsComponent.LeftButtonPressed();
public void RightButtonPressed() => LeftRightButtonsComponent.RightButtonPressed();
}




Finally, these two solutions seems to be the same, with the following difference:




The Bridge Pattern is vertically-organized: S(a -> b -> c)

The Entity-Component-System is horizontally-organized: S(a, b, c)




Is there really a difference between these two solutions? When should one be prefered to the other?





HOW TO TEST: separate the two solutions into two folders BridgePattern and EntityComponentPattern, and fill the console application with the following code:



    static void Main(string args)
{
BridgePattern();
Console.WriteLine();
EntityComponentSystem();
Console.ReadLine();
}

static void BridgePattern()
{
Console.ForegroundColor = ConsoleColor.Cyan;
Console.WriteLine("BridgePattern version");
Console.WriteLine("----------");

IRemoteControl TVRemoteControl = new BridgePattern.VolumeControl(new BridgePattern.ChannelControl());
IRemoteControl DVDRemoteControl = new BridgePattern.SpeedControl(new BridgePattern.ChapterControl());

Console.WriteLine($"1. {nameof(TVRemoteControl)}:");
UseRemoteControl(TVRemoteControl);

Console.WriteLine($"2. {nameof(DVDRemoteControl)}:");
UseRemoteControl(DVDRemoteControl);
}

static void EntityComponentSystem()
{
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("EntityComponentSystem version");
Console.WriteLine("----------");

IRemoteControl TVRemoteControl = new EntityComponentSystem.ECSRemoteController(new EntityComponentSystem.VolumeControl(), new EntityComponentSystem.ChannelControl());
IRemoteControl DVDRemoteControl = new EntityComponentSystem.ECSRemoteController(new EntityComponentSystem.SpeedControl(), new EntityComponentSystem.ChapterControl());

Console.WriteLine($"1. {nameof(TVRemoteControl)}:");
UseRemoteControl(TVRemoteControl);

Console.WriteLine($"2. {nameof(DVDRemoteControl)}:");
UseRemoteControl(DVDRemoteControl);
}

static void UseRemoteControl(IRemoteControl remoteControl)
{
remoteControl.LeftButtonPressed();
remoteControl.RightButtonPressed();
remoteControl.TopButtonPressed();
remoteControl.BottomButtonPressed();
}









share|improve this question













I want to learn how/when/why to use the GoF Design Patterns. These last days are dedicated to the Bridge Pattern, which means:




Decouple an abstraction from its implementation so that the two can vary independently.




Everyone has a different understanding of this vague description, but if I well-understood the global point, it cuts an abstraction into multiple independant implementations which relies on each other, in a chain.





On this premise, let's try to implement a four-arrow remote control. First, let's define what's awaited with interfaces:



public interface ITopBottomButtonsControl
{
void TopButtonPressed();
void BottomButtonPressed();
}

public interface ILeftRightButtonsControl
{
void LeftButtonPressed();
void RightButtonPressed();
}

public interface IRemoteControl :
ILeftRightButtonsControl,
ITopBottomButtonsControl
{ }




Here is an example of the BP implementation:



public class ChannelControl : ILeftRightButtonsControl
{
public void LeftButtonPressed() => Console.WriteLine("Previous channel");
public void RightButtonPressed() => Console.WriteLine("Next channel");
}

public class ChapterControl : ILeftRightButtonsControl
{
public void LeftButtonPressed() => Console.WriteLine("Previous chapter");
public void RightButtonPressed() => Console.WriteLine("Next chapter");
}




public abstract class BPRemoteControl : IRemoteControl
{
ILeftRightButtonsControl LeftRightControl { get; }

public BPRemoteControl(ILeftRightButtonsControl leftRight)
{
LeftRightControl = leftRight;
}

public void LeftButtonPressed() => LeftRightControl.LeftButtonPressed();
public void RightButtonPressed() => LeftRightControl.RightButtonPressed();

public abstract void TopButtonPressed();
public abstract void BottomButtonPressed();
}




public class SpeedControl : BPRemoteControl
{
public SpeedControl(ILeftRightButtonsControl leftRight) : base(leftRight) { }

public override void BottomButtonPressed() => Console.WriteLine("Slow down");
public override void TopButtonPressed() => Console.WriteLine("Speed up");
}

public class VolumeControl : BPRemoteControl
{
public VolumeControl(ILeftRightButtonsControl leftRight) : base(leftRight) { }

public override void BottomButtonPressed() => Console.WriteLine("Volume down");
public override void TopButtonPressed() => Console.WriteLine("Volume up");
}




The fact is that, when I implemented this to test the pattern, it made me think back the Entity Component System. So, I tried to implement the same application, but this time with an ECS approach.

The classes ChannelControl and ChapterControl remains the same, but the rest is different:



public class SpeedControl : ITopBottomButtonsControl
{
public void BottomButtonPressed() => Console.Write("Slow down");
public void TopButtonPressed() => Console.WriteLine("Speed up");
}

public class VolumeControl : ITopBottomButtonsControl
{
public void BottomButtonPressed() => Console.WriteLine("Volume down");
public void TopButtonPressed() => Console.WriteLine("Volume up");
}




public class ECSRemoteController : IRemoteControl
{
private ITopBottomButtonsControl TopBottomButtonsComponent { get; }
private ILeftRightButtonsControl LeftRightButtonsComponent { get; }

public ECSRemoteController(ITopBottomButtonsControl topBottom, ILeftRightButtonsControl leftRight)
{
TopBottomButtonsComponent = topBottom;
LeftRightButtonsComponent = leftRight;
}

public void TopButtonPressed() => TopBottomButtonsComponent.TopButtonPressed();
public void BottomButtonPressed() => TopBottomButtonsComponent.BottomButtonPressed();

public void LeftButtonPressed() => LeftRightButtonsComponent.LeftButtonPressed();
public void RightButtonPressed() => LeftRightButtonsComponent.RightButtonPressed();
}




Finally, these two solutions seems to be the same, with the following difference:




The Bridge Pattern is vertically-organized: S(a -> b -> c)

The Entity-Component-System is horizontally-organized: S(a, b, c)




Is there really a difference between these two solutions? When should one be prefered to the other?





HOW TO TEST: separate the two solutions into two folders BridgePattern and EntityComponentPattern, and fill the console application with the following code:



    static void Main(string args)
{
BridgePattern();
Console.WriteLine();
EntityComponentSystem();
Console.ReadLine();
}

static void BridgePattern()
{
Console.ForegroundColor = ConsoleColor.Cyan;
Console.WriteLine("BridgePattern version");
Console.WriteLine("----------");

IRemoteControl TVRemoteControl = new BridgePattern.VolumeControl(new BridgePattern.ChannelControl());
IRemoteControl DVDRemoteControl = new BridgePattern.SpeedControl(new BridgePattern.ChapterControl());

Console.WriteLine($"1. {nameof(TVRemoteControl)}:");
UseRemoteControl(TVRemoteControl);

Console.WriteLine($"2. {nameof(DVDRemoteControl)}:");
UseRemoteControl(DVDRemoteControl);
}

static void EntityComponentSystem()
{
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("EntityComponentSystem version");
Console.WriteLine("----------");

IRemoteControl TVRemoteControl = new EntityComponentSystem.ECSRemoteController(new EntityComponentSystem.VolumeControl(), new EntityComponentSystem.ChannelControl());
IRemoteControl DVDRemoteControl = new EntityComponentSystem.ECSRemoteController(new EntityComponentSystem.SpeedControl(), new EntityComponentSystem.ChapterControl());

Console.WriteLine($"1. {nameof(TVRemoteControl)}:");
UseRemoteControl(TVRemoteControl);

Console.WriteLine($"2. {nameof(DVDRemoteControl)}:");
UseRemoteControl(DVDRemoteControl);
}

static void UseRemoteControl(IRemoteControl remoteControl)
{
remoteControl.LeftButtonPressed();
remoteControl.RightButtonPressed();
remoteControl.TopButtonPressed();
remoteControl.BottomButtonPressed();
}






c# bridge entity-component-system






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 8 at 10:13









Maxime Recuerda

40314




40314












  • [off-topic]....perhaps belongs in another group - but not SO
    – JohnB
    Nov 8 at 10:15












  • Hi, I think you should post this question in code review instead of here: codereview.stackexchange.com
    – Nhan Phan
    Nov 8 at 10:16










  • This question belongs on Code Review : Bridge-Pattern or Entity-Component-System
    – Maxime Recuerda
    Nov 8 at 10:19




















  • [off-topic]....perhaps belongs in another group - but not SO
    – JohnB
    Nov 8 at 10:15












  • Hi, I think you should post this question in code review instead of here: codereview.stackexchange.com
    – Nhan Phan
    Nov 8 at 10:16










  • This question belongs on Code Review : Bridge-Pattern or Entity-Component-System
    – Maxime Recuerda
    Nov 8 at 10:19


















[off-topic]....perhaps belongs in another group - but not SO
– JohnB
Nov 8 at 10:15






[off-topic]....perhaps belongs in another group - but not SO
– JohnB
Nov 8 at 10:15














Hi, I think you should post this question in code review instead of here: codereview.stackexchange.com
– Nhan Phan
Nov 8 at 10:16




Hi, I think you should post this question in code review instead of here: codereview.stackexchange.com
– Nhan Phan
Nov 8 at 10:16












This question belongs on Code Review : Bridge-Pattern or Entity-Component-System
– Maxime Recuerda
Nov 8 at 10:19






This question belongs on Code Review : Bridge-Pattern or Entity-Component-System
– Maxime Recuerda
Nov 8 at 10:19



















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53205561%2fbridge-pattern-or-entity-component-system%23new-answer', 'question_page');
}
);

Post as a guest





































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53205561%2fbridge-pattern-or-entity-component-system%23new-answer', 'question_page');
}
);

Post as a guest




















































































Popular posts from this blog

Landwehr

Reims

Schenkenzell