开放框架VS处理(openFrameworks vs Processing)

编程入门 行业动态 更新时间:2024-10-25 17:19:11
开放框架VS处理(openFrameworks vs Processing)

我一直在阅读很多关于Open Framework和Processing的内容,但是除了C ++和Java之外,还有其他的区别。 有人可以告诉我哪一个是为了什么?

I have been reading a lot about openFrameworks and Processing, But still can't make the distinction other than one is in C++ and the other in Java. Can someone tell me which is for what exactly?

最满意答案

您是正确的,一个是C ++,另一个是Java,这些差异适用于这些框架,所以取决于您的偏好/项目范围,以决定哪一个最适合您。

处理标题

处理中

您可以获得最小的IDE,但也可以轻松使用eclipse或其他Java IDE。 你得到内存管理(垃圾收集) 您可以在线发布小程序(通过Java Applet或使用Canvas 2D 处理 js或p5js的 '瘦身'javascript端口)或Linux / OSX / Windows(通过Java Runtime)的桌面应用程序。 请注意,比Processing 1.5.1更新的版本不再导出applet。 这仍然可以通过命令行或使用eclipse完成。 您可以使用iProcessing或更快的P5Nitro发布到Android和(通过第三方工具)到iPhone,最近也可以使用Raspberry PI 你有来自论坛,相当多的书籍和OpenProcessing , SketchPatch , hascanvas或SketchPad等在线“游乐场”的支持 。

OpenFrameworks徽标

使用OpenFrameworks

你选择你的IDE(OSX上的XCode,Code :: Blocks,VC ++) 你管理自己的记忆(malloc,指针和所有的喜悦) 您可以将项目发布为本机应用程序(不需要运行时) 目前您无法轻松在线发布,但未来可能会发生变化(请参阅Arturo Castro的emscripten进度) 您可以发布到iPhone ,从007到Android和OF0.8到armv6和armv7设备,如Raspberry PI或Pandaboard 您可以从非常活跃和有用的论坛获得支持,并可以在一两 本书中阅读

这些是现在想到的一些事情,可能还有更多。

就我个人而言,我发现在Processing中编写真正基本的丢弃原型更容易。 对于速度不是主要决定因素的情况,Processing可以做得很好,但在其他情况下,我会将Processing原型移植到openframeworks(这在大多数情况下很容易完成)。

一个例子是涉及音频的应用,无论是分析还是综合。 根据复杂性的不同,Java垃圾收集器会在您最不期待的时候进行扫描,并在需要响应时引起烦恼。

总之,两者都非常酷,但openframeworks 更快 。 尽管如此,通过自己管理记忆来支付这个速度。 另外,如果您需要在线部署 ,那么Processing就是您的选择。

另外,如果您对C ++感兴趣,您可能还想看看libcinder或Polycode 。

HTH

You are correct, one is C++ and the other is Java, and those differences apply to these frameworks, so it's up to your preferences/project scope to decide which one is best for you.

processing header

With Processing:

You get a minimal IDE, but can easily use Eclipse or other Java IDEs. You get memory management (garbage collection) You can publish applets online(via Java Applet or 'slimmed down' javascript ports using Canvas 2D with processingjs or p5js) or desktop applications for Linux/OSX/Windows (via Java Runtime). Note that versions newer than Processing 1.5.1 no longer export applets. That can still be done via command line or using eclipse. You can publish to Android and (with 3rd party tools) to iPhone using iProcessing or the faster P5Nitro and more recently on Raspberry PI You get almost 200 Libraries to extend its functionality. You have support from the forums, quite a few books and online 'playgrounds' like OpenProcessing, SketchPatch, hascanvas or SketchPad.

OpenFrameworks logo

With OpenFrameworks:

You choose your IDE (XCode on OSX, Code::Blocks, VC++) You can manage your own memory (malloc, pointers and all that joy), but with modern C++ it's not necessary. You can publish your project as a native application (no runtime needed) You can not currently easily publish online, but this might change in the future(see Arturo Castro's of-emscripten progress) You can publish online using emscripten. You can publish to the iPhone, as of OF 007 to Android and OF 0.8.0 to armv6 and armv7 devices such as Raspberry PI or Pandaboard You get over 2000 Addons (not all are maintained) to extend its functionality. You have support from the very active and helpful forums and can read about it in this online book or on a paper book or two.

These are some of the things the came to mind right now, there could be more.

Personally, I found it easier to write really basic throw-away prototypes in Processing. For situations where speed isn't a major decision factor, Processing does just well, but in other cases, I'd port the Processing prototypes to openFrameworks (which is easy to do most of the time).

An example would be application involving audio, be it analysis or synthesis. Depending on the complexity, the Java Garbage Collector would do a sweep when you least expect it and cause annoyances when you need responsiveness.

In short, both are really cool, but openFrameworks is faster. You pay for that speed by managing memory yourself though.

In terms of deploying online, it really depends on the project: if it's a simple project, probably p5.js might be easiest in terms of integration with other js libraries. The oF export is handy for big bulky complex code that would take too long to manually port to JavaScript, but bare in mind the Emscripten project will be large (e.g. 17.5MB for opencvExample) (and thus not cellular friendly) and you will still need to add your own JS -> C++ bindings if your need to call oF app function from the webpage.

Also, if you're interested in C++, you might want to also have a look at libcinder or Polycode.

HTH

更多推荐

本文发布于:2023-08-06 21:38:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1455354.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:框架   openFrameworks   Processing

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!