Live data from Hacker News

The DCI Architecture: A New Vision of Object-Oriented Programming (2009)

artima.com

21–25 of 25 posts

Re: The DCI Architecture: A New Vision of Object-Oriented Programming (2009)

#21
post #6
post #2

The most interesting part is that as good as this sounds I haven't heard of it again since that article first came out.

The problem with DCI is that it didn't have native support in any programming language. Coplien, one of the co-founders of DCI is actually working on a programming language called Trygve which implements these ideas. https://github.com/jcoplien/trygve

To be honest, the ideas on the article look that they can be implemented in a straight way using Lisp's CLOS.

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."

https://github.com/pcostanza/contextl

Re: The DCI Architecture: A New Vision of Object-Oriented Programming (2009)

#22

DCI piqued my interest when I first heard about it. It seemed to solve some problems I was seeing in the typical model structure of MVC apps. In the end while I still agree with the principles behind context (keeping the primary workflow of a code module linear and organized in one place) I found interactions (mixing in behaviour with data) to be largely unnecessary in actual practice. The problem DCI purports to sol…

Do you think most devs spend enough time thinking through a good way to model what they're building?

In my experience, most devs start with an ORM/data store/framework/pattern and try to shoehorn the solution into it.

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.

[0] https://en.m.wikipedia.org/wiki/Domain-driven_design

[1] https://martinfowler.com/bliki/CQRS.html

Re: The DCI Architecture: A New Vision of Object-Oriented Programming (2009)

#23
post #18
post #6

Earlier quoted context omitted.

The problem with DCI is that it didn't have native support in any programming language. Coplien, one of the co-founders of DCI is actually working on a programming language called Trygve which implements these ideas. https://github.com/jcoplien/trygve

Is that still being developed? Has some recent commits, but parts of the manual are clearly somewhat out-of-date; for instance, in 5.3.1 (Defining Generics) there's a "try doing that in Java!" that's trivially accomplishable with Java generics.

Since when can you create new objects of a generic type T in java using "new"?

    class MyGeneric 
    {
         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.

Re: The DCI Architecture: A New Vision of Object-Oriented Programming (2009)

#24
post #10
post #6

Earlier quoted context omitted.

The problem with DCI is that it didn't have native support in any programming language. Coplien, one of the co-founders of DCI is actually working on a programming language called Trygve which implements these ideas. https://github.com/jcoplien/trygve

Trygve development has been effectively abandoned.

On whose authority? As of this week there is a new debugger interface.

Re: The DCI Architecture: A New Vision of Object-Oriented Programming (2009)

#25
post #15
post #5

Earlier quoted context omitted.

I spent quite a lot of time exploring ECS before building my own ECS library for developing 2D games. I have found that with my (minuscule) ECS library it greatly alleviates just about all of the issues I was facing with normal OOP. Everything scales extremely well, the code is almost crystal clear, and it makes code structure very simple. I'm not sure how you could effectively apply ECS outside of simulation style a…

It's strange that ECSs only have traction in game development. I agree with all the advantages you mentioned, but additionally, they solve the structure-of-arrays/array-of-structures performance discrepancy; this is something Jon Blow is working on with his Jai language. > I spent quite a lot of time exploring ECS before building my own ECS library for developing 2D games. Is it publicly available?

It is available on Github:

https://github.com/jackwlee01/Easy-ECS

It is an AS3 library that I use for my Adobe Air games.

Post reply on HN