Metaanaguage 描述 MVC 的模型以生成相同的客户端和服务器端代码
我正在寻找一种强大的元语言来描述我打算在离线模式(google-gears + javascript)和服务器端 sqlite + (php/ruby/java 等)下使用的应用程序的行为,并寻找一种好的格式来描述模型的行为可以轻松转换为目标语言。 我是否完全偏离了轨道,还有更好的方法吗?
I am looking for a powerful meta-language to describa behaviour for an application i intend to use in offline mode (google-gears + javascript) and server side sqlite + (php/ruby/java etc) and looking for a good format to describe the model's behaviour which can be easily converted to the target languages.
Am I completely off track, and there is a much better way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您是否查看过 Google Web Toolkit? GWT 允许您编写服务器端 Java 对象,这些对象会为您转换为 Javascript。 这使您根本不用处理浏览器的怪癖。
不过,我不确定 Gears 和 GWT 项目的集成程度如何。 如果它还没有集成,我相信它会在相当短的时间内完成。
编辑:这可能更多的是做你正在寻找的事情的另一种方式,而不是对元语言的建议。
Have you looked at Google Web Toolkit? GWT allows you to write server side Java objects which get translated into Javascript for you. This allows you to not deal with the browser quirks at all.
I'm not sure how well integrated the Gears and GWT projects are, however. If it isn't integrated yet, I'm sure it will be in fairly short order.
Edit: This is probably more of an alternate way of doing what you're looking for, rather than a suggestion for a meta language.
这可能超出了您的范围,但也许您应该考虑 sproutcore。 据我了解,它是一个与后端无关的捆绑式 MVC 架构。
我对此没有太多经验,但听起来有些消费者(例如苹果的 MobileMe)想做你做的同样的事情。
This may be out of your scope, but maybe you should consider sproutcore. From what I understand, it's a bundled up MVC architecture that can be backend-agnostic.
I don't have much experience with it, but it sounds like some of the consumers (apple's MobileMe for instance) want to do the same thing you do.
也许您应该考虑使用 Script#?
Maybe you should consider using Script#?