在 FreeBSD 上使用 Objective-C 开发 Web 应用程序

发布于 2025-01-05 17:52:38 字数 687 浏览 0 评论 0原文

我看到Clang 3.0端口包含Objective-C作为开发语言,此外,我还发现了这个端口“libobjc2-1.6”(支持Obj-C 2功能的Replacement Objective-C运行时)和“ofc-0.8.1_5” (Objective-C 基础类库)。

假设我们正在考虑在 FreeBSD 上使用 Objective-C 来开发基于 Web 的应用程序(相对于使用 Java 并在 Tomcat/Glassfish 上运行),我们该如何实现呢?

Objective-C 开发实际上可以在 FreeBSD (9.0) 上运行吗?

需要下载和安装哪些东西(框架/库)?

什么IDE?

正如我提到的,假设我们打算开发一个 Web 应用程序,那么库是什么?/libraries(我们还看到有“GNUstepWeb” - WebObjects 的后继者 - 这是我们应该考虑的 Web 库吗?这是唯一的一个吗? - 其他替代方案怎么样?此外,GNUstep/GNUstepWeb 可以在 Clang 3.0 下编译或使用那些 Objective-C 端口(“libobjc2-1.6”和上面提到的“ofc-0.8.1_5”)是否相关?

应用程序项目开发(并部署在 FreeBSD 上)吗?

有人使用 Objective-C 在 FreeBSD 上成功完成了Web RESTful)调用并与数据库对话(对于传统和/或 NoSQL 数据库)。

I saw that the Clang 3.0 port includes Objective-C as a development language, and furthermore, I also found this port "libobjc2-1.6" (Replacement Objective-C runtime supporting Obj-C 2 features) and "ofc-0.8.1_5" (The Objective-C Foundation Classes library).

Let's say we are considering to use Objective-C on FreeBSD to develop a web-based application (vs. using Java and running it on Tomcat/Glassfish), how do we approach it?

Does Objective-C development actually work on FreeBSD (9.0)?

What are the things (frameworks/library) to download and install?

What IDE?

As I mentioned that let's say we intend to develop a web application, what are the library?/libraries (We also saw that there is "GNUstepWeb" - successor to WebObjects - is this the web library we should consider? Is this the ONLY ONE - what about other alternatives? Further, can GNUstep/GNUstepWeb compile under Clang 3.0 or make use of those Objective-C ports ("libobjc2-1.6" and "ofc-0.8.1_5") mentioned above? Are those ports relavant?

Has anyone successfully done a web application project development on FreeBSD using Objective-C (and deployed on FreeBSD)?

Note: Web-based applications means it takes in HTTP (RESTful) calls and talks to a database (for traditional and/or NoSQL databases).

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

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

发布评论

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

评论(5

哆兒滾 2025-01-12 17:52:38

http://cocotron.org,Apple 的 Objective-C 运行时的端口(更像是重写)。

我仍然建议不要将 ObjC 用于 Web 堆栈。我以前这样做过,我必须说它涉及大量非常常见的代码,您需要实现这些代码才能实现基本的 HTTP 服务器功能。

另外,Cocotron 并不是真的那么快(作为运行时)。对于桌面应用程序来说这是可以的,但网络世界的限制要严格得多。

There is http://cocotron.org, a port (more like re-write) of Apple's runtime for Objective-C.

I still could advice against using ObjC for web stack. I did that previously, and I must say that it involves a big chunk of pretty common code that you will need to implement for basic HTTP server functionality.

Also, Cocotron is not really that fast (as a runtime). It's ok for desktop applications, but web world is much more restrictive.

马蹄踏│碎落叶 2025-01-12 17:52:38

我正在编写一个支持此功能的库,使用 FastCGI 来连接名为 CGIKit 的服务器(https://github.com/xcvista/CGIKit )并且它适用于 GNUstep 而不是 Cocoatron。

I am writing a library supporting this using FastCGI to interface the server called CGIKit (https://github.com/xcvista/CGIKit) and it works on GNUstep instead of Cocoatron.

够钟 2025-01-12 17:52:38

有人似乎成功为 FreeBSD 9.x 构建 Objective-C 程序

如果您不介意使用 Apple,则无需担心 IDE。可以在 Mac 上编写并在 FreeBSD 上运行。 (我个人认为这是两全其美的)IMO,如果有一个支持 Objective-C 的服务器操作系统,FreeBSD 将是第一个。

更严重的问题是库和框架。即使在 OSX 上,我们在 Objective-C 中也没有太多用于 Web 服务器开发的选项。但我们可以包装现有的 C/C++ 库(就像许多优秀的 Node.js、Python、Ruby 库所做的那样),我认为我们可以通过少量的努力获得一堆选项。

有些人担心安全。而且我一直想知道网络上有多少基础程序是用C/C++和其他语言编写的。

Someone seems having success building Objective-C program for FreeBSD 9.x

You don't need to worry about the IDE if you don't mind using Apple. It would be possible to write on Mac, and run on FreeBSD. (personally I think this is the best of both world) IMO, if there's a server OS with Objective-C ready, FreeBSD will be first one.

More serious problem is libraries and frameworks. We don't have much options in Objective-C for web server development even on OSX. But we can wrap existing C/C++ libraries, (just as like many great node.js, Python, Ruby libraries do) and I think we may can get bunch of options with small efforts.

Some people worry about security. And I always wonder how many foundational programs on the network are written in C/C++ and other languages.

嘿哥们儿 2025-01-12 17:52:38

在他的博客文章 “在服务器上使用 Objective-C ” Graham Lee 描述了如何设置一个最小的 GNUStep-WebApp。显然,GNUstep-make 的构建指令会有所不同,但除此之外,这似乎是一个不错的起点。

他撰写了其他几篇文章(jQuery、AJAX)进一步探索 GSW。

In his blog post “Using Objective-C on the server” Graham Lee describes how to set up a minimal GNUStep-WebApp. Obviously, the build instruction for GNUstep-make would differ, but other than that this seems like a nice starting point.

He wrote several other posts (jQuery, AJAX) further exploring GSW.

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