Question

What is the advantage of fast tags over groovy tags in Play? I have seen a lot of things happening recently with it, but am not quite sure what the point is?

Was it helpful?

Solution

Groovy tags give you the ability to abstract your presentation logic, but there are times, just like when using java extensions, that you need more complex logic or business logic specific to the view, that you do not want to build using scripts or scriptlets.

Fast tags are built in java rather than groovy, so give you the power to build neat tags with complex logic without compromising the mvc architecture of havingcompex logic in the view.

OTHER TIPS

With Fast Tags you have full Java-Support with code completion and compiler check. Furthermore they are faster, which could be in some situation important. But I think in most cases the normal tags are quite good, only in special cases (complex logic or performance) the fast tags are the better choice.

In addition to the two former answers (complex logic, code completion and compiler checks) I would add performance improvement that comes from using java instead of groovy and, very immportant in deed, the ability to debug code. Just put a breakpoint in the FastTag source code and the debugger will stop there.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top