码迷,mamicode.com
首页 > 移动开发 > 详细

Template design pattern application in android

时间:2015-07-22 16:05:50      阅读:140      评论:0      收藏:0      [点我收藏+]

标签:design-pattern

The template method allow separate the generic method from a detail context(class) via inheritance
Another advantage:
1.Inheritance implementation means that you will know the actual method implementation class before compilation,it is very big advantage to strategy pattern because it increase viscosity of program.
2.The combination of generic method is limited.
3.The combination of generic method is very meaningful(ease of naming)(allow mapping from requirement).

We normally see it on activity.
技术分享

I have also see the template method in network layer(implemented by foreigner) with the combination of command pattern.If there is a reply below I will added it and explain.

版权声明:本文为博主原创文章,未经博主允许不得转载。

Template design pattern application in android

标签:design-pattern

原文地址:http://blog.csdn.net/chungchi300/article/details/47004365

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!