Anyone tried implementing Template Method Design pattern in REST? I am trying to separate common functions across the endpoints into a template method, so the framework is handling some of these. I could not figure out a way to do it. Any ideas?
Have a look at RESTCommand.java from a blog entry discussing Android RESTful pattern .
I'm pretty sure execute()
is a template method (although not the greatest example since it's only calling a single abstract method that's overridden in subclasses). Note that this is likely also the Command pattern.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.