CC.
CC.

Reputation: 2928

play framework 2 - static methods

I'm a java developper for some while. Recently I've started working with play framework (in java, not scala) and what I like about it the most, is the stateless application type. The question I have right now is :

Upvotes: 2

Views: 207

Answers (1)

travega
travega

Reputation: 8415

It's not a dumb question. You could theoretically use all static methods but it is not a good coding practice. Instead you can use something like domain objects that you pass around your program. You can change the data in a domain object as it is passed around and it only exists for the life cycle of your current execution stack (that is of course unless you persist it).

This will keep your program stateless and prevent you having to use all static methods.

Upvotes: 1

Related Questions