Web 开发中的 Objective-C

发布于 2024-12-03 20:20:52 字数 1435 浏览 1 评论 0原文

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

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

发布评论

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

评论(5

鲜血染红嫁衣 2024-12-10 20:20:52

市场已经确定的答案是,是的,这是可能的,但不,尝试将这样的东西推向市场是不可行的。 Apple 的 WebObjects(Apple 在线商店使用的)曾经是 Objective-C,甚至他们将其转移到了 Java。

至于 GNU Objective-C 工具链,我对其未来也不会非常乐观。自从转向 GPLv3 以来,Apple 已经抛弃了它们并围绕 LLVM 构建了自己的 Objective-C 编译器,因此这些代码路径在 GNU 方面可能会变得有点生疏。 GNU“支持”阳光下的一切,但是使用的东西越多,其实现就越受到审查。

至于“我用过”这一点,是的,我当时使用的是 WebObjects 的 Objective-C 变体。它在当时相当不错,但 Objective-C 相对较低级别的内存分配需求及其非 C 语法使其有点尴尬。它的强类型对于核心开发来说非常有用,但对于 Web 开发的“脚本”方面来说却是负担。

最后,如果一种语言是图灵完备的,理论上你可以用一种语言做任何你可以用另一种语言做的事情,但是缺乏用于解析器、脚本、数据库交互、索引等的库生态系统,意味着你将与 Java 或 JVM 兼容语言相比,它的起点相当深。

The answer that the market has pretty definitely settled on is that yes, it's possible, and no, it's not feasible to try to push such a thing on the market. Apple's WebObjects (what the Apple Online Store uses) used to be Objective-C and even they moved it to Java.

As for the GNU Objective-C toolchain, I wouldn't be hugely optimistic about its future, either. Since they moved to GPLv3, Apple has dumped them and built their own Objective-C compilers around LLVM, so those code paths are probably getting a little rusty on the GNU side. GNU "supports" everything under the sun, but the more something gets used the more its implementation gets vetted.

As for the "I've used" bit, yes, I used the Objective-C variant of WebObjects back in the day. It was pretty good for its time, but Objective-C's relatively low-level memory allocation needs and its non-C syntax made it a little awkward. And its strong typing was great for core development but burdensome for the "scripting" aspects of web development.

In the end if a language is Turing-complete you could theoretically do anything in one language you could do in another, but the lack of an ecosystem of libraries for parsers, scripting, database interactions, indexing, etc., means you'll be starting from a pretty deep valley compared to Java or a JVM-compatible language.

枕花眠 2024-12-10 20:20:52

有一个名为 Cappuccino 的 JavaScript 框架,它使用的语法与 Objective-C 非常相似,他们称之为 Objective-J。但作为一名长期的 Cocoa 开发者,我更喜欢 Sproutcore,它没有复制 Objective-C 语法,但它确实借鉴了一些想法Cocoa 是由前苹果工程师创建的。

如果您正在考虑服务器端开发,我想您可以做到,但是学习一些流行的服务器端语言可能比使用 Objective-C 来启动和运行它要花费更少的精力

There is a javascript framework called Cappuccino that uses syntax very similar to Objective-C they call Objective-J. But as a long-time Cocoa developer, I prefer Sproutcore which doesn't copy Objective-C syntax, but it does borrow some ideas from Cocoa as it was created by former Apple engineers.

If you were thinking server-side development, I guess you could do it but it would probably take less effort to learn some popular server-side language than to get it all up and running with Objective-C

北座城市 2024-12-10 20:20:52

有小泡沫。然而,它自 2010 年以来就没有更新过,主要是因为 Rails 和 Django 等其他语言的成熟框架。

There is Frothkit. However, it hasn't been updated since 2010, primarily because of mature frameworks for other languages like Rails and Django.

无声情话 2024-12-10 20:20:52

Apple 的 WebObjects 在移植到 Java 之前最初是一个 Objective-C 平台。 GNUStep 的一个子项目,名为 GNUStepWeb,旨在与 WebObjects 4.5 兼容 - -支持 Objective-C 的最后一个版本(2000 年发布)。我不确定实施的完成程度如何,但一年多来并没有太大的进展。

Apple's WebObjects was originally an Objective-C platform before it was ported to Java. A sub-project of GNUStep, called GNUStepWeb, aims to be compatible with WebObjects 4.5---the last version to support Objective-C (released in 2000). I'm not sure how complete the implementation is, but there hasn't been much development in over a year.

只有影子陪我不离不弃 2024-12-10 20:20:52

Apple 曾经(并且仍然部分地)使用 WebObjects 构建他们的 Web 内容,它移植了 MVC 结构以及 Cocoa 应用程序的许多设计模式到基于 Java 的 Web 服务器框架。我最近看到有人试图用 Obj-J 创建一个名为 Womble 的服务器端框架。不过,看起来仍然很原始。不管怎样,我不知道纯 Obj-C Web 框架实现......

Apple used to (and still partly does) build their web stuff using WebObjects, which ports the MVC structure and many design patterns of Cocoa apps to a Java-based web-server framework. I recently saw that someone is trying to create a server-side framework with Obj-J called Womble. Looks quite raw still, though. Either way, I'm not aware of a pure Obj-C web-framework implementation...

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