Metaanaguage 描述 MVC 的模型以生成相同的客户端和服务器端代码

发布于 2024-07-04 21:49:47 字数 153 浏览 4 评论 0原文

我正在寻找一种强大的元语言来描述我打算在离线模式(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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

执手闯天涯 2024-07-11 21:49:47

您是否查看过 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.

风向决定发型 2024-07-11 21:49:47

这可能超出了您的范围,但也许您应该考虑 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.

白衬杉格子梦 2024-07-11 21:49:47

也许您应该考虑使用 Script#

Maybe you should consider using Script#?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文