Hi all,
i have seen xwiki can do lot of stuff with groovy and velocity.I am new to
groovy so trying to understand how groovy and velocty can benefit xwiki and
ultimately end user. As most of the site says groovy and java are almost
similar. so why xwiki is using groovy when it built upon java. As per my
understanding xwiki is using groovy as scripting language where admin can
write groovy scripts at run time from UI which needs not nto be compiled
but work like in the similar fashion to java. Internally we are passing
this grrovy script as string to server which is compilinh it and executing
it at run time. Right?
Now second part is why velocity in xwiki? Velocity is used in similar
fashin to groovy in xwiki but difference is that any user without
programming rights also can write velocity scripts as it has access to
limited set of apis . Apart from that we can also write front end in
velocity script like if i write
{velocity}Hello:$xContext.getUser(){velocity} it will simply say
Hello:Scott on UI
but inside groovy scriplets everything will be taken as java code. Right?