I think what distinguishes on line code generation is the business model. There have been dozens of open-source C++ serialization libraries that have come and gone over the past 20 years and I think that's largely because they haven't had a viable business model. It isn't impossible to build a company around open source, but it is very difficult and growing more so each day.

I've seen some things out there based on data-model inspection and then compilation via an on-line service you submit your system architecture to and it constructs it... it worked well for business apps, just not sure about its long-term reliability (i.e., will it still be around in 5-10 years).

There's a difference between online code generation and simply code generation though. Generating entities/ORM from a schema (re: wood_brian's link) has been done to various degrees of success for ages.

I think that it will continue to occur for a while since it'll continue to be painful and tedious for a while. If anything, it will go away if/when NoSQL sort of things win (I'm not convinced that will occur).

Providing such mechanisms via a service is... kinda dumb and not really helpful.

There's a difference between online code generation and simply code generation though. Generating entities/ORM from a schema (re: wood_brian's link) has been done to various degrees of success for ages.

I think that it will continue to occur for a while since it'll continue to be painful and tedious for a while. If anything, it will go away if/when NoSQL sort of things win (I'm not convinced that will occur).

Providing such mechanisms via a service is... kinda dumb and not really helpful.

I'm not convinced there's a viable business model other than as a service. I don't know if people need more examples, but s11n.net is a recent example of bad luck with the older approach. The guy who runs that has a note on the site saying his costs are increasing and the site may go away. (Best wishes to him. I know he's worked hard to build a quality library.)

Trying to make money off of code generation is a losing proposition, regardless of business model.

Agree or disagree: It used to be easier to make money from a traditional C++ library than it is today?I did find new advertising on my site last month. I'm not raking in the money, but the company is in better shape today than it was a few years ago.

Personally, I see code generation of this kind as basically the same thing as starting a stand in the local shopping mall food court that offers to microwave anything you bring them for a modest fee.

Yes, it's technically possible, but I really fail to see who the target market would be. Either you just bought hot food from the food court, or you're not at the food court and the microwave stand isn't accessible. Maybe once in a blue moon someone would have a good reason to take something to the food court microwave stand, but are they going to want to spend $5 on it? Or would they just go home and use the microwave they already own, for free? (Suppose you want to do something cool like microwave a DVD. It's amazing to watch, incredibly dangerous to your health, and a bad idea, so don't do it. But are you gonna waste $5 and risk getting kicked out of the mall for causing a health hazard when you could just nuke the damn thing in your basement instead?)

To clarify slightly: when I want to do code generation, it's for things that are generally either (A) extremely well understood (say, parser generation) or (B) extremely domain specific. In the former case, I don't want a service because there's already excellent software that does it for free. In the latter case, I don't want a service, because I'm probably going to be the only person with my exact requirements and desires for the generation process. It'd be far more work to codify the generation into a mechanism that a service can understand than to just write the bloody code generator myself.

Code generation is not hard. When you need it, you either use an existing solution, or you roll one that's hand-tailored to what you need.

You'd never spend money on a mall-microwave-stand, and you'd never spend money on a code generation service.