对于什么程序是Objective C和Ruby理想的Mac? [英] For what programs are Objective C and Ruby ideal on the Mac?

查看:140
本文介绍了对于什么程序是Objective C和Ruby理想的Mac?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为一个Mac的外人似乎两个流行的编程语言在Mac上似乎是Objective C和Ruby。



从我理解的主要的API Cocoa似乎写入并针对Objective C进行优化,但是也可以使用Ruby。



有不同的区域,每种语言都是理想的,例如,我可以想象Objective C可以是一个GUI层或独立的桌面应用程序的理想选择,而Ruby可能适用于Web服务等。经典的业务逻辑或数据访问层是什么?



例如,什么语言将是服务库的好选择?我们可以用一种语言编写一个库,并用另一种语言编写的主程序链接到它吗?



如果我想使用域驱动设计和依赖注入哪些语言可以支持每个关注?



只是一个奇怪的局外人。

解决方案

如果我要写一个大的应用程序,我会坚持Objective-C。这不难,它是最支持的选项,对于可预见的,它将保持这种方式。至于Ruby,以前在Cocoa中已经不再存在Java支持。我不喜欢有一个大的遗留应用程序混合Java和Objective-C编写,并有可能重写Java部分或坚持使用旧的操作系统。



前面的段落适用于编写纯桌面应用程序,如果你想要并且可以编写一个应用程序的一部分作为本地web服务,这将是完全不同的,因为Ruby支持将更加可靠,取决于你的人,经验,目标和其他变量。)



依赖注入和DDD都是抽象的想法,所以是的,你当然可以在Cocoa中这样做。我不知道有多少Mac开发者。对于DI,对Cocoa和整个技术栈中的松散耦合有很强的支持(见Interface Builder,KVO / KVC或bindings)。



希望有帮助。 / p>

as a Mac outsider it seems that two popular programming languages on the Mac appear to be Objective C and Ruby.

From what I understand the main API Cocoa seems to be written in and optimized for Objective C, but it is also possible to use Ruby for that.

Are there different areas where each language is ideal, for example, I could imagine Objective C could be ideal for a GUI layer, or standalone desktop app, and Ruby could be good for web services etc. What about classic business logic, or data access layers?

What language would be a good choice for a library of services for example? Can we write a library in one language and link to it from a main program written in the other language?

If I wanted to write a layered enterprise application using domain driven design and dependency injection which languages could support each concerns? Are things like DDD and DI common amongst Mac devs?

Just a curious outsider.

解决方案

If I were to write a big application, I would stick to Objective-C only. It’s not hard, it’s the most supported option and for the foreseeable it will stay that way. As for Ruby, there used to be Java support in Cocoa that does not exist anymore. I’d hate to have a large legacy application written in mixture of Java and Objective-C and having the prospect of rewriting the Java parts or sticking with older OS.

(The previous paragraph applies to writing pure desktop applications. If you wanted and could write a part of the application say as a local webservice it would be quite different, as the Ruby support there would be much more dependable. Depends on your people, experience, goals and other variables.)

Dependency Injection and DDD are both abstract ideas, so yes, you can certainly do that in Cocoa. I have no idea about how many Mac devs do it. As for DI, there is strong support for loose coupling in Cocoa and the whole technology stack (see Interface Builder, KVO/KVC or bindings).

Hope that helps.

这篇关于对于什么程序是Objective C和Ruby理想的Mac?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆