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?
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.
With Processing:
With OpenFrameworks:
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