| %2008/%09/%14 %00:%Sep | Marielle Lange |
* singleton
A language is called object-oriented if it supports inheritance, encapsulation and polymorphism.
* Inheritance
* Inheritance allows… | object-oriented, actionscript-3 |
| %2012/%03/%12 %19:%Mar | Marielle Lange |
Definition
* multi-purpose
* commoditized services
* API abstraction
* best practices built-in
* globally available (js limitation)
* “ever… | javascript, object-oriented |
| %2012/%03/%12 %01:%Mar | Marielle Lange |
(source: Rethinking JavaScript Objects)
Dispatching property change event
(source: Rethinking JavaScript Objects)
Data type validation
Creating … | javascript, object-oriented |
| %2012/%03/%14 %03:%Mar | Marielle Lange |
A facade serves as an abstraction of the application core which sits between the mediator and our modules - it should ideally be the only other part of th… | javascript, object-oriented, design-pattern |
| %2012/%03/%14 %19:%Mar | |
See also:
* Inheritance Systems
Types
* prototypical-inheritance (aka, object-based inheritance or inheritance by delegation). Extends method.
Li… | javascript, object-oriented, inheritance |
| %2012/%03/%13 %16:%Mar | Marielle Lange |
Loose coupling allows you to make changes to one module without afecting the others.
Module Rules
Module Sandbox (aka Module Library shared across modu… | javascript, object-oriented |
| %2012/%03/%12 %04:%Mar | Marielle Lange |
See also:
* JQuery Plugins
* CommonJS modules
What is a Module?
* Strict definition from Wikipedia
* single-purpose
* self-contained
* in… | javascript, object-oriented |
| %2012/%03/%12 %01:%Mar | Marielle Lange |
To avoid the perils of globally scoped variables and functions, it is advisable to create a single global object for the purposes of namespacing the rest … | javascript, object-oriented |
| %2012/%03/%14 %02:%Mar | Marielle Lange |
If you find yourself not requiring specific properties or methods to be private, the object literal pattern is a more than suitable alternative.
Note: (1… | javascript, object-oriented |
| %2012/%03/%06 %19:%Mar | Marielle Lange |
js
* scope
* closure
oo-js
* namespace (simulating it)
* static (properties and methods)
* private (simulating it)
* accessors (getters and … | object-oriented |
| %2012/%03/%12 %01:%Mar | Marielle Lange |
Simulating Private Properties
A local variable in a function is normally not accessible from outside the function. After the function exits, for all prac… | javascript, object-oriented |
| %2012/%03/%14 %18:%Mar | Marielle Lange |
A case of object-based inheritance
objects inherit from objects
(source: Advanced WEb applications with OO Javascript)
As Douglas Crockford says in … | javascript, object-oriented, inheritance |
| %2012/%03/%12 %19:%Mar | Marielle Lange | | javascript, object-oriented |
| %2012/%03/%12 %01:%Mar | Marielle Lange |
static properties and methods
(source: Advanced WEb applications with OO Javascript) | javascript, object-oriented |
| %2012/%03/%14 %23:%Mar | Marielle Lange |
Classes have too many responsibilities in programming [3]. In many languages, classes are the prime (or only) mechanism for the conceptual classification… | object-oriented |
| %2012/%03/%14 %18:%Mar | |
Systems
* traits-inheritance
* mixin-inheritance
Languages
* JavaScript
Inheritance in object-oriented languages is well-established as an incr… | object-oriented, architecture |
| %2012/%03/%14 %20:%Mar | Marielle Lange |
Aspect-oriented programming (AOP) is a form of metaprogramming, where advice is weaved into existing code [21].
(source: Metaprogramming with Traits, PD… | object-oriented, inheritance |
| %2012/%03/%14 %18:%Mar | Marielle Lange |
Classes inheriting from classes.
The simplest model, adopted, e.g., in Java [Sun 2007] and C# [Microsoft 2007]. The inheritance relation forms a tree, an… | object-oriented, inheritance |
| %2012/%03/%14 %18:%Mar | |
Systems
* class-based
* object-based
* multiple-inheritance
* traits
* mixin
* aspect
* behavior
Implementations
* JavaScript
In gen… | object-oriented, architecture |
| %2012/%03/%12 %01:%Mar | Marielle Lange |
See also:
* Inheritance Systems
Types
* prototypical-inheritance (aka, object-based inheritance or inheritance by delegation). Extends method.
Li… | javascript, object-oriented, inheritance |
| %2012/%03/%14 %18:%Mar | Marielle Lange |
Implementations:
* Sencha Class Mixins
Mixins. There are essentially two kinds of mixins, mixin-classes and mixin- modules.
A mixin-class is like a c… | object-oriented, inheritance |
| %2012/%03/%14 %18:%Mar | Marielle Lange |
A richer but debated model (adopted, e.g., in C++ [Stroustrup 1997]): a derived class can inherit from many parent classes (forms an inheritance directed … | object-oriented, inheritance |
| %2012/%03/%14 %18:%Mar | Marielle Lange |
Also called delegation-based inheritance or prototypical inheritance in Javascript
e.g., in Self [Ungar and Smith 1987] and Obliq [Cardelli 1995].
The … | object-oriented, inheritance |
| %2012/%03/%14 %18:%Mar | Marielle Lange |
* Why, What, When
* Composition Mechanisms
* Implementation
* Concerns
Traits vs Class
A class has contradicting goals
* Generator of instanc… | object-oriented, inheritance, traits |
| %2012/%03/%16 %22:%Mar | Marielle Lange |
Why traits?
Traits are a programming language technology that promote the reuse of methods between unrelated classes.
(source: Applying Traits to the Sm… | object-oriented, inheritance, composition, traits |
| %2012/%03/%14 %21:%Mar | Marielle Lange |
A system is a group of interconnected modules, that together fulfill some useful functionality.
An interface specifies a set of services, including condi… | object-oriented, architecture |
| %2010/%07/%12 %18:%Jul | |
(source all 1)
An operation is an identifiable entity that denotes the indivisible primitive of service provision that can be requested. The act of reques… | code, techniques, object-oriented, actions |
| %2010/%07/%12 %18:%Jul | |
See also:
* IDL -- Interface Definition Language
* Designing Interface Components
An interface is a description of a set of possible operations th… | code, techniques, object-oriented, components, gui |
| %2010/%07/%12 %18:%Jul | |
An interface may have attributes. An attribute is logically equivalent to declaring a pair of accessor functions: one to retrieve the value of the attribu… | object-oriented, properties, gui |
| %2010/%07/%12 %18:%Jul | |
(source: all 1)
A type is an identifiable entity with an associated predicate (a single-argument mathematical function with a boolean result) defined ove… | code, techniques, object-oriented |
| %2007/%06/%23 %06:%Jun | Marielle Lange |
References
* Object-Oriented Analysis and Design using the UML. Courseware by QA Group Ltd.
* OOP Demystified. A self-teching guide. By Jim Keogh and … | papers, object-oriented |
| %2010/%07/%12 %18:%Jul | |
Overview
* Which classes and objects exist
* How objects interact
* How objects behave over time
* Structural relationships between classes.
Good… | code, techniques, object-oriented |