Hacker News new | ask | show | jobs
by marbletiles 5670 days ago
Lets separate out here Job's utopian spin and focus on what I'm actually talking about, which is not "global level code-reuse" or whatever generic strawman you're aiming for.

But let's say I'm writing a web app, perhaps in RoR. I build an entire model for the backend and set up controllers to drive it. Have my HTML views and I'm good to go. Then I want an iPhone client. I have to reimplement that exact same model in Objective-C, and a good portion of the controllers too.

With WO, all that wasted time vanished. The same models and controllers worked for both, right down to the NSString level and below.

Does that let you write once and expand to everything, everywhere? No. But does it take grade-A talent to work across its supported platforms? No.

2 comments

I agree with you that this was the WO vision. I think what we have settled on instead is JSON over RESTful interfaces. The downside is that it takes a lot more code to hook the web logic into the interface. The good side is that it works across languages and technology stacks, you just need a JSON library and an HTTP stack.

This is probably a good trade off, because the "one language for everything" has never succeeded in practice.

The exact same model. This is textbook. In practice? There's going to be differences. The exact same database does not mean the exact same model.

Controllers? Night and day. A complete re-write would be necessary. The app will function entirely different.

Generic strawman? Chill, this isn't slashdot. But to say that the only thing stopping this awesome revolution in software development is that Web Objects wasn't successful seems to me to ignore the grim realities of most software development projects: There isn't the ability, talent, budget or planning to produce truly reusable code.

In practice? I've done this. The controllers change only as much as needed to accommodate the new views. If your model has differences you've coupled it too tightly.

"only thing stopping this awesome revolution in software development"

I thought you said this wasn't slashdot? Who is talking about an awesome revolution? I am talking about a smarter way of building software across different platforms, a way that worked then and would work now to solve real problems that we have.

The fact that the solution is in a space that has long been occupied by the type of wishful thinking that has clearly hurt you in the past doesn't mean you get to write the entire concept off.