2
votes
2answers
79 views

Best coding practice for classes

I just have a somewhat simple question on coding practices. I have never written a large application before and I am currently working on building a game engine in Javascript. The part that confuses ...
1
vote
1answer
92 views

Is this a good JavaScript class?

I'm trying to get my head around object oriented programming, and I'm starting in JavaScript. I have put a working demo of my code on JSFiddle (here), but the class is below. My main concerns are ...
5
votes
1answer
218 views

Javascript inheritance

I have a simple class inheritance in JS: var Class = function(){}; Class.extend = function(){ var Extended = function(constructor){ function extend_obj(destination, source) { ...
3
votes
2answers
197 views

JavaScript (multiple) inheritance / mixins

I'm quite new to JavaScript, and I'm trying to understand the idea behind inheritance in JavaScript. I've read a bit about it, and I don't want to mess with prototypes (which I don't yet fully ...
0
votes
0answers
110 views

Implementation of Javascript Classes and Inheritance

I've created a simple Javascript library to be able to create "classes" and extend them defining instance and static methods and variables. It consists in a simple function Class with two methods: ...
3
votes
1answer
254 views

“Class” design in javascript

I'm a systems programmer teaching myself javascript. Prototypal inheritance is completely new to me, so I could use some best practices advice here. I made a simple game (breakout) for my first ...
1
vote
1answer
481 views

Javascript filter class to hide and show content on data-attributes

I'm a hacker, not a trained engineer. I ask/answer specific questions on StackOverflow and am pretty confident in my ability to get the browser to do what I want, I thought I could benefit a great ...