The tag has no wiki summary.

learn more… | top users | synonyms

5
votes
1answer
40 views

Prototype inheritance with Knockout observables

I'm trying to write a JavaScript library to allow inheritance with knockout. The fundamental problem when implementing inheritance in Knockout is that each Knockout observable is its own instance, ...
4
votes
1answer
58 views

Graceful JavaScript fallback for external web service failure

I use the src.sencha.io service to resize images on the fly according to device width, saving lots of bandwidth on mobiles etc. Sometimes the service fails randomly with a 503 error, so a fallback is ...
0
votes
0answers
31 views

Prototype OO-style of my THREE.JS application in JavaScript

For several months I'm working with JavaScript and THREE.JS library. Firstly I dislike the prototype-based programming, because I have to work a lot of with ...
-3
votes
1answer
43 views

Wanted reference to parent in body of child's method [closed]

After watching this video, I started meddling with prototypal and classical inheritance examples in JavaScript. ...
2
votes
1answer
30 views

Extending prototype of given instance from factory method

I created a rubber ball by extending instance of b2Body prototype of Box2D.js. I get the instance from factory method b2World#CreateBody. ...
2
votes
1answer
131 views

Is my JavaScript OOP style correct?

I have done the following code for testing a web-service. Is my style correct for using OOP in JavaScript? ...
0
votes
1answer
70 views

Coding convention when using differential inheritance

Ever since reading Crockford's "Good Parts" and Johansen's TDD book, I have wanted to use more of the differential inheritance pattern in my coding at work (as in avoiding ...
4
votes
2answers
2k views

Random password generator

I just wrote my first Java class, and I wanted to share it with you and maybe get some quick check from more experiences coders than I am. I want to learn OOP, Java is just the tool I thought was the ...
9
votes
1answer
588 views

Should I put default values of attributes on the prototype to save space?

Suppose I've got a JavaScript function that I'm treating like a class - that is, I want to make many instances of it: ...
7
votes
0answers
148 views

Lua OOP and classically-styled prototypal inheritance

I want to do some object-oriented programming in Lua, and I decided on something like this: ...
3
votes
1answer
248 views

Improve Syntax & Structure

I'm building a small web application and it's starting to get a bit complex. I have reached to a point where I have to run some tests and load some libraries. I made it so I can use it in this way : ...
5
votes
1answer
237 views

Javascript inheritance

I have a simple class inheritance in JS: ...
3
votes
1answer
143 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: ...
1
vote
1answer
146 views

“metaconstructors” for inheritance in js?

Edit - decl smokes dojo.declare - http://jsperf.com/dojo-declare-vs-decl The code has been updated a bit. ...
3
votes
1answer
285 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 ...