简体   繁体   English

可可,Objective-C到HTML?

[英]Cocoa, Objective-C to HTML?

As far as I've been able to find, there seems to be one option for building websites/web applications in Objective-J with Cappuccino. 据我所能找到的,似乎有一种选择可以使用Cappuccino在Objective-J中构建网站/ Web应用程序。

The .NET is a huge framework that of course can compile for the web. .NET是一个巨大的框架,当然可以为网络编译。 I don't think it's a stupid question to ask whether or not Objective-C can be used for the same purpose. 我认为问Objective-C是否可以用于同一目的并不是一个愚蠢的问题。

Apple doesn't advertise being able to develop websites with Objective-C, but I thought I'd ask anyways. Apple并没有宣传能够使用Objective-C开发网站的广告,但我还是想问一下。

Other than Cappuccino, is it possible or just completely not possible? 除了卡布奇诺咖啡,还有可能吗?

It'd be possible to build websites in Objective-C, the same way you'd be able to do it in C++ or even C. 可以在Objective-C中建立网站,就像在C ++甚至C中建立网站一样。

There are pros and cons to both. 两者都有优点和缺点。 The main pro is that these languages are generally more mature, robust and better featured than php, ruby etc. However, since they are not generally used for that purpose (unfortunately), there aren't many frameworks and/or workflows available. 主要的优点是,这些语言通常比php,ruby等更成熟,健壮且功能更好。但是,由于它们通常不用于此目的(不幸的是),因此没有很多可用的框架和/或工作流。 The most recognized for Obj-C is GNUstepWeb . Obj-C最受认可的是GNUstepWeb

You also have to consider what you're doing. 您还必须考虑自己在做什么。 If you're building a web application that involves models, reports, etc, this would be a good way to go. 如果您要构建包含模型,报表等的Web应用程序,那么这将是一个不错的方法。 On the other hand, if you're building a smaller website with more common features, chances are one of the "traditional" web-development platforms is going to be a better match. 另一方面,如果您要构建一个具有更多常用功能的小型网站,则“传统”网络开发平台之一将是一个更好的选择。

I thought you might be interested in something like Cappuccino (Aka Objective-J) which is similar to Objective-C (in some ways) but fully designed for creating web application front ends. 我认为您可能对像Cappuccino(Aka Objective-J)之类的东西感兴趣,该东西类似于Objective-C(在某些方面),但完全为创建Web应用程序前端而设计。 It compiles to Javascript. 它编译为Javascript。

WebObjects was an Objective C framework, but transitioned to Java a decade ago. WebObjects是一个Objective C框架,但十年前过渡到Java。 However, it still has the Cocoa/Obj C feel, still using foundation classes such as NSArray as well as key concepts like KVC and MVC. 但是,它仍然具有Cocoa / Obj C的感觉,仍然使用诸如NSArray之类的基础类以及诸如KVC和MVC之类的关键概念。 The Apple online store and the iTunes Store are two successful examples of web applications written using WebObjects. Apple在线商店和iTunes Store是使用WebObjects编写的两个成功的Web应用程序示例。

Your question isn't stupid - but it is very broad and hard to answer. 您的问题并不愚蠢-但范围很广,很难回答。 Are you talking about outputting HTML? 您在谈论输出HTML吗? Or are you talking about server side programming? 还是您在谈论服务器端编程? Objective-C using Cocoa, or just vanilla Objective-C? 使用可可粉还是仅仅使用香草Objective-C制成的Objective-C?

To start with, anything using cocoa frameworks cannot be compiled for the web. 首先,任何使用可可框架的东西都无法在网络上编译。 Period. 期。 You can imitate the Cocoa frameworks (like Cappuccino does), but it is not a small task. 您可以模仿Cocoa框架(就像Cappuccino一样),但这并不是一件容易的事。

It is possible to do web development with Objective-c (server-side), but it is not really feasible at the moment because you would have to write the libraries from scratch, and with so many other options out there for web development with complete frameworks (Ruby, PHP, Python, Java, etc) there really isn't any reason to do so. 可以使用Objective-c(服务器端)进行Web开发,但目前还不可行,因为您必须从头开始编写库,并且还有许多其他选项可以用于完整的Web开发框架(Ruby,PHP,Python,Java等),实际上没有任何理由。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM