客户端和服务器都在 iPhone 上运行的客户端-服务器 Web 应用程序 - 这可能吗?

发布于 2024-10-08 21:25:46 字数 302 浏览 0 评论 0原文

我想使用传统上用于 Web 应用程序的工具构建一个简单的本机 iPhone 应用程序。 我更喜欢使用 jQTouch 和 Rails 之类的东西,但我希望它可以离线工作(不需要互联网连接或服务器)。

是否有一个框架可以通过封装轻量级 Web 服务器和服务器端应用程序框架(Rails 或可以在手机上运行的更简单、更轻量级的框架)来简单创建本机 iOS aps,从而允许您编写客户端代码在 HTML+JavaScript 中?

如果没有这样的事情,有没有办法创建一个基本上只有客户端组件和持久数据存储的应用程序(使用 HTML+JS)?

谢谢。

I'd like to build a simple native iPhone app with tools traditionally used for web apps.
I would prefer to use something like jQTouch and Rails, but I want it to work offline (not require an internet connection or a server).

Is there a framework that enables simple creation of native iOS aps by encapsulating a lightweight web server and a server-side app framework (Rails or something simpler and more lightweight that can run on a phone), thus allowing you to write the client side code in HTML+JavaScript ?

If there is not such a thing, is there a way to create an app (with HTML+JS) that basically only has a client-side component with persistent data storage?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

一念一轮回 2024-10-15 21:25:46

您尝试过Phonegap吗?

www.phonegap.com

您使用 HTML/CSS/JavaScript 编写应用程序。

您可以通过 JavaScript 访问手机 API - 繁荣!

还; Appcelerator Titanium 将是一个选项:http://www.appcelerator.com/

-IMO Titanium 更强大,并提供更原生的外观。

为什么要在 iPhone 上运行网络服务器?
是为了给母舰发回数据吗?

Have you tried Phonegap?

www.phonegap.com

You write your app in HTML/CSS/JavaScript.

You access the phones APIs through JavaScript - boom!

Also; Appcelerator Titanium would be an option: http://www.appcelerator.com/

-IMO Titanium is more powerful, and offers a more native look.

Why would you want to run a webserver off of the iPhone?
Is it so that you could send back data to the mothership?

ぺ禁宫浮华殁 2024-10-15 21:25:46

是的,您可以在 iPhone 应用程序中包含一个在另一个线程中运行的轻量级 http 服务器,并让您的 UIWebView 连接到它。但是,除非您打算创建一个更高级的 Web 服务器来生成动态内容,否则将 HTML/CSS/Javascript 内容下载到本地目录,然后在离线时将任何 URL 指向这些本地文件可能很容易。

Yes, you can included a lightweight http server running in another thread inside your iPhone app, and have your UIWebView connect to it. But unless you are going to do a fancier web server that generates dynamic content, it might be easy to just download your HTML/CSS/Javascript content to a local directory, and then point any URLs to those local files when offline.

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