We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I mean… the biggest thing seems to be "processing in pure js" but I tried processing.js and wrote it in pure js too.. so.. why choose one instead of the other?
Answers
Maybe this explains it a bit more: https://github.com/lmccart/p5.js#how-is-this-different-than-processingjs
Let me first say that I haven't really used either so far (instead using processing default java mode 100% of the time), but that I am really intrigued by the new p5.js. It has a solid presentation and documentation. While using javascript is possible in processing.js, I think the main goal is converting a 'regular' processing sketch to javascript behind-the-scenes. On the other hand p5.js doesn't convert anything, it provides an API inspired by Processing to write directly in javascript. This creates more transparency to the user and easier integration with other javascript elements and libraries. Also it makes the transition easier for Processing coders, who want to learn / move to javascript. Of course, those that don't want to learn any javascript, may be better off with processing.js as it converts the code for them. Personally I am much more in tune with the underlying design principles of p5.js. In part because I currently have an interest in learning webdesign (html, css, js, etc.) and the possibilities of doing web-based coding projects.
Also see: https://github.com/lmccart/p5.js#how-is-this-different-than-processingjs
Methinks that we can already write web applications using CoffeeScript mode!
CoffeeScript is like JS on wheels. It has a class structure similar to Java's, but has access to all JS libs instead!
I'm somewhat worried that JS's raw prototype syntax can be too much for the Processing's main target audience!
Focusing on p5.js in detriment to processing.js seems a tad unwise to me!
Also, both JS & CS modes can have ".js" extension tabs, which allow real JavaScript programming.
That's equivalent in having ".java" tabs in Java mode!
I think the main benefit is easier debugging. Using processing.js I had some problems, which required a lot of time to fix. Sometimes you need to work directly in the browser, e.g. when you interacting with other DOM-elements. It can be quite hard to find mistakes, when the line-numbers cannot be mapped back to your code. I have not tried p5.js but I’m looking forward to new web-projects with it!