RetroMocha / obvious

Obvious is a clean architecture.
MIT License
264 stars 16 forks source link

Other Language Support #26

Closed brianknapp closed 11 years ago

brianknapp commented 11 years ago

Obvious is more architecture than framework. In fact what obvious provides is so small that it's really just the contract and hash.has_shape? functionality. It would be good to get other languages involved at some point, so I'm curious, what languages would other people like to see supported?

Languages on my radar: JavaScript/Coffescript, PHP, C#, Lua, Java, Scala, Python...

I have my own reasons why Obvious would be awesome on each different language/platform, but I'm curious what everybody else thinks, so fire away!

darrencauthon commented 11 years ago

I really like the idea. Personally -- I think Javascript would be the first one to go, but maybe it's because I'm working with node as well.

brianknapp commented 11 years ago

JS is interesting for sure, the problem with Obvious in JS is the whole evented vs. not evented thing being an ongoing headache in node. I actually started using an obvious-like structure almost a year ago with node and the friction I ran up against is that you will write a block non-evented of logic, then you need to get some data in the evented model, then you go back to doing some non-evented things, and back and forth.

where I ended up back then was using IcedCoffescript to clean up the mess using await and defer. That was actually really great in many respects, but I didn't think it would work well on a team simply because everyone has to have node + iced coffeescript and so on... It's really out of the norms of node at that point.

Also, that really forces you down the evented model everywhere you write javascript if you want to reuse your app.

Another potential problem is that JS doesn't really care about types most of the time, so enforcing types across boundaries might be an issue, or at the very least, you'd have fewer guarantees from your contracts.

That being said, JS is like the one language that runs basically everywhere, so there are some interesting advantages to being able to write an app in Obvious with JS.

I am actually interested in either figuring out how to make the evented side of things suck less (to write the same code to work on node or in the browser), or to write a JS Obvious that isn't evented all and would allow your server side code to be written in something like RingoJS.

It would be a lot easier to start by skipping the evented side of things, but if we can crack the evented JS nut in an Obvious structure... there would be a lot of value there.

brianknapp commented 11 years ago

Based on my current set of ideas, the next language Obvious is likely to be ported to is either Scala or Go.