Freeplane Scripting - Groovy vs JavaScript, which to learn?

Freeplane Scripting - Groovy vs JavaScript, which to learn?

Postby elwood151 » Sat Mar 08, 2014 6:27 am

I want to automate routine tasks in Freeplane and make it more efficient for me by using the Scripting functions.

I don't have much programming background (some Java OOP basics many years ago and some autodidact VBA knowledge used in MS Office).
I'm currently using the stable version of Freeplane 1.2.24.

In the Freeplane wiki I read, that I can use either Groovy or JavaScript for scripting Freeplane (http://freeplane.sourceforge.net/wiki/i ... /Scripting ).
Freeplane's builtin functionality can be extended by Groovy and JavaScript scripts. Starting with Freeplane 1.3.5_05 you can use many other languages.


As I have to learn each of them I wonder which is the better approach. Is there a difference between the 2 considering Freeplane? Is Groovy better integrated?
If not, I'd think that it would be more useful to me to learn Java Script as it is also used for web programming?
Does this make sense?
elwood151
 
Posts: 24
Joined: Fri Jul 06, 2012 1:41 am

Re: Freeplane Scripting - Groovy vs JavaScript, which to learn?

Postby boercher » Sat Mar 08, 2014 11:10 pm

Difficult question!

Groovy is definitely better integrated with Freeplane as it is its "native" language. It is a very nice language that integrates seamlessly with Java and its collection methods are especially useful in mindmaps where you always have to iterate on lists of nodes:

c.find{ it.text.contains("bla") }.each{ it.add("ok") }

JavaScript is also an interesting language which is currently hyped since it is more and more used outside the web browsers. In Freeplane it needs more verbose code and there are much, much less code examples you can learn from.

If you would like to dive into web programming too, you should give JavaScript a try. But Groovy would be the easier alternative.

Regards, Volker
boercher
 
Posts: 644
Joined: Tue Jul 26, 2011 7:13 am

Re: Freeplane Scripting - Groovy vs JavaScript, which to learn?

Postby elwood151 » Sat Mar 08, 2014 11:27 pm

Thanks, Volker, for your reply!

boercher wrote:JavaScript is also an interesting language which is currently hyped since it is more and more used outside the web browsers. In Freeplane it needs more verbose code and there are much, much less code examples you can learn from.

That's a very strong point for groovy. :D
So I'll start with groovy.
elwood151
 
Posts: 24
Joined: Fri Jul 06, 2012 1:41 am

Re: Freeplane Scripting - Groovy vs JavaScript, which to learn?

Postby boercher » Sat Mar 08, 2014 11:57 pm

Okay, so good luck and don't forget to ask if you need help!

Volker
boercher
 
Posts: 644
Joined: Tue Jul 26, 2011 7:13 am

Re: Freeplane Scripting - Groovy vs JavaScript, which to learn?

Postby elwood151 » Sun Mar 09, 2014 2:05 am

boercher wrote:don't forget to ask if you need help!
Volker

Thanks a lot for this nice, but light-headed offer - so be prepared that I'll pester you with questions :mrgreen:
elwood151
 
Posts: 24
Joined: Fri Jul 06, 2012 1:41 am


Return to Open Discussion

Who is online

Users browsing this forum: No registered users and 1 guest