社区
研发管理
帖子详情
design pattern 's question
gorge_an
2001-08-08 12:05:32
about prototype (原型).
大家好。 在学习design pattern的时候。我对prototype (原型)的具体用途不是很清楚。书上说是为了减少subclass的个数。但是我看好想不是的。希望读过该书的
大虾给我一些提示。希望可以具体的讲一下prototype 的思想!
谢谢了先!
...全文
155
5
打赏
收藏
design pattern 's question
about prototype (原型). 大家好。 在学习design pattern的时候。我对prototype (原型)的具体用途不是很清楚。书上说是为了减少subclass的个数。但是我看好想不是的。希望读过该书的 大虾给我一些提示。希望可以具体的讲一下prototype 的思想! 谢谢了先!
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
5 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
dbbdggdbbdgg
2001-09-09
打赏
举报
回复
关于Pattern的资料,什么都有
http://www.umlchina.com/Pattern/Newindex1.htm
one_add_one
2001-08-11
打赏
举报
回复
gz
jbtan
2001-08-10
打赏
举报
回复
prototype pattern 的确可以减少subclass的数量,但这是后果,而不是目的。我们不能仅仅因为要减少subclass而使用prototype. 此外,如果创建一个对象是耗时操作的话, 我们使用prototype。例如,一个class A的实例包括一个极为复杂(耗时)的查询,而我们需要在不同的地方使用查询结果(当然,可能要求不同的排序或者字段),那么可以通过“克隆”(deep copy or clone)这个实例来得到新的对象,而不是创建A的subclass(比如,仅仅是排序不一样), 去重复耗时操作来得到一个新对象。不限于上述。
请指正。
gorge_an
2001-08-10
打赏
举报
回复
ok thank you
!
gorge_an
2001-08-09
打赏
举报
回复
up
JavaScript
Pat
tern
s
Description What's the best approach for developing an application with JavaScript? This book helps you answer that
que
stio
n with numerous JavaScript coding
pat
tern
s and best practices. If you're an experienced developer looking to solve problems related to objects, functions, inheritance, and other language-specific categories, the abstractions and code templates in this guide are ideal -- whether you're writing a client-side, server-side, or desktop application with JavaScript. Author Stoyan Stefanov includes several examples for each
pat
tern
as well as practical advice for implementing them. What's the best approach for developing an application with JavaScript? This book helps you answer that
que
stio
n with numerous JavaScript coding
pat
tern
s and best practices. If you're an experienced developer looking to solve problems related to objects, functions, inheritance, and other language-specific categories, the abstractions and code templates in this guide are ideal -- whether you're writing a client-side, server-side, or desktop application with JavaScript. Written by JavaScript expert Stoyan Stefanov -- Senior Yahoo! Technical and architect of YSlow 2.0, the web page performance optimization tool -- JavaScript
Pat
tern
s includes practical advice for implementing each
pat
tern
discussed, along with several hands-on examples. You'll also learn about anti-
pat
tern
s: common programming approaches that cause more problems than they solve. * Explore useful habits for writing high-quality JavaScript code, such as avoiding globals, using single var declarations, and more * Learn why literal notation
pat
tern
s are simpler al
tern
atives to constructor functions * Discover different ways to define a function in JavaScript * Create objects that go beyond the basic
pat
tern
s of using object literals and constructor functions * Learn the options available for code reuse and inheritance in JavaScript * Study sample JavaScript approaches to common
design
pat
tern
s such as Singleton, Factory, Decorator, and more * Examine
pat
tern
s that apply specifically to the client-side browser environment
The Complete Computer Vision Course with Python
https://stacksocial.com/sales/the-complete-computer-vision-course-with-python Have you ever wondered how things like self-driving cars, Google image searches, Snapchat and Instagram filters are created? While there are many answers to this
que
stio
n, the umbrella answer is computer vision. In this course, you'll use Python to build a variety of tools that reflect the broad range of computer vision techni
que
s. These technologies are powering the next generation of consumer and enterprise applications and the time to jump in the game is now! -Access 43 lectures & 7 hours of content 24/7 -Build a receipt segmenter to find text in an image -Count coins & dollar bills in an image after creating a currency counter -Find Legend of Zelda rupees using a
pat
tern
matching algorithm -
Design
a face swapping app -Discuss the mathematical theory & processes behind computer vision -Understand fundamental computer vision & image processing techni
que
s
leetcode中国-oracle:Oracle
leetcode中国 买卖股票 从easy一直问到hard 数独 从medium的判断是不是valid 到 hard的solve 数独 从BST里面删除一个node (要求写test case)
design
就是皮毛的问题。。。我几乎就是把Harvard那个intro system
design
最后15min 照搬过去 BQ + 蠡口耳散溜2) BQ + Minimizer 压缩字符串用index替换 Lunch 时间很长估计有1个多小时也会提一些问题 给定range求key BQ + 如何实现elastic的 allocate storage 还有一万个behavior
que
stio
n。。。。。。。 428 无向图最短路径 calculator: 224 227 772 770 394 第一轮: Done: 44. Wildcard Matching 判断source string和
pat
tern
string是否match, ?代表任意一个字母,比如 s = "Happy" p = "H?pp?" 这种情况
laravel-decorator:使用laravel-decorator包轻松装饰您的方法调用
:Christmas_tree: Laravel装饰器 Laravel应用中的装饰器模式 用 :red_heart: 用于智能清洁编码器 尝试将“装饰器”功能从python语言移植到laravel框架。 :delivery_truck: 安装 : composer require imanghafoori/laravel-decorator 什么是"Decorator" :red_
que
stio
n_mark: 装饰器是可调用的,它包装原始装饰的可调用对象,以形成由前两个组成的新可调用对象。 就像一条Python蛇吞下了整个鹿,然后环绕着它的身体! 之后,蛇变得有能力吃和消化草 :herb: 因为里面有一只鹿 从技术上讲, "Decorator" : 1-是“可调用的” 2-需要另一个“ callable”(因为它是唯一的参数,就像一条蛇吞下了另一条蛇一样) 3-并返回一个新的"callable" (内部调用原始的callable ,并在其前后放置一些代码。) 什么 ?!??! ???! (
Design
Pat
tern
Interview
Que
stio
ns - Part 4
This section will cover Bridge
Pat
tern
, Composite
Pat
tern
, Decorator
Pat
tern
, Facade
Pat
tern
, COR
Pat
tern
, Proxy
Pat
tern
, template
Pat
tern
, MVC. Updated with the explanation of Composite
pat
tern
, D
研发管理
1,268
社区成员
28,284
社区内容
发帖
与我相关
我的任务
研发管理
软件工程/管理 管理版
复制链接
扫一扫
分享
社区描述
软件工程/管理 管理版
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章