The DCI Architecture: A New Vision of Object-Oriented Programming (2009)
artima.com
artima.com
The problem DCI purports to solve with OOP is in fact largely caused by failing top apply OOP properly (yeah, yeah no true Scotsman...). Issues like overloading objects with too many responsibilities (MVC models do this almost always), relying on inheritance when composition is what is needed, not defining and enforcing module or transactional boundaries and naively applying DRY to everything all lead to high coupling and low cohesion and ultimately cause the problems that DCI attempts to solve. However they can be solved by simple avoiding the above and using simple principled objects with clear dependency trees and boundaries.
Bottom line: Follow the basic principles of OOP and SOLID instead of just paying them lip service and no secret sauce is required.
Does this align with what you are saying?
o Aspect-oriented: Additional behavior can be injected into classes https://en.wikipedia.org/wiki/Aspect-oriented_programming
o Context-oriented: Behavior depends on the context http://www.jot.fm/issues/issue_2008_03/article4/
o Concept-oriented: Behavior is split between references and objects http://conceptoriented.org/
o Subject-oriented: Behavior is split between objects and subjective perceptions (subjects) https://en.wikipedia.org/wiki/Subject-oriented_programming
I think Domain Driven Design[0] has held up well as an alternative to this - especially the strategic design patterns. The DDD strategic patterns are all about expressing the model in the domain language and finding the boundaries around clusters of interrelated model concepts (DDD calls these "Bounded Contexts").
DDD is often mentioned alongside CQRS[1] these days, but it also works for plain old OOP and functional systems as well.
If you want to play Entity-Component-System. I'd suggest you check out A-Frame, a WebVR framework that uses and promotes Entity-Component-System: https://aframe.io/
For UI the issue is one of expressing lightweight dependencies, which may be detached and recombined easily. I am currently exploring an approach that combines "imgui" concepts with hierarchical path data, akin to the hard and symbolic links in Unix. Having the path as data allows assemblages of partial routes to be combined to express a "final" data point. The data itself may not entirely exist in a physical tree structure but instead be a combination of procedural data, stored data, and a parser.
When you further qualify by time/transaction you get EAVT like Datomic and then just do queries (potentially recursive), and can implement semantics like "classes" over it.
> I spent quite a lot of time exploring ECS before building my own ECS library for developing 2D games.
Is it publicly available?
https://github.com/jackwlee01/Easy-ECS
It is an AS3 library that I use for my Adobe Air games.
class MyGeneric<GenericType>
{
public GenericType stupidJava()
{
return new GenericType();
}
}
You still can't do that with java. In order to create a new instance from a generic type you must use the reflection mechanism. Or alternatively do what Java people did for ages, factory classes.Trygve allows you to use "new" keyword. So no, the manual is correct.
EDIT: The post below beat me to it, it was already implemented in CLOS...
"ContextL is a CLOS extension for Context-oriented Programming (COP), and was the first language extension that explicitly supports COP when it was originally introduced in 2005."