Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 619 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
619
Dung lượng
40,06 MB
Nội dung
www.it-ebooks.info Chapter Welcome to Design Patterns Table of Contents Chapter Welcome to Design Patterns Section 1.1 It started with a simple SimUDuck app Section 1.2 But now we need the ducks to FLY Section 1.3 But something went horribly wrong Section 1.4 Joe thinks about inheritance Section 1.5 Sharpen your pencil Section 1.6 How about an interface? Section 1.7 What would you if you were Joe? Section 1.8 The one constant in software development Section 1.9 Sharpen your pencil Section 1.10 Zeroing in on the problem Section 1.11 Separating what changes from what stays the same 10 Section 1.12 Designing the Duck Behaviors 11 Section 1.13 Implementing the Duck Behaviors 13 Section 1.14 There are no Dumb Questions 14 Section 1.15 Sharpen your pencil 14 Section 1.16 Integrating the Duck Behavior 15 Section 1.17 More Integration 16 Section 1.18 Testing the Duck code 18 Section 1.19 Setting behavior dynamically 20 Section 1.20 The Big Picture on encapsulated behaviors 22 Section 1.21 HAS-A can be better than IS-A 23 Section 1.22 Speaking of Design Patterns 24 Section 1.23 Design Puzzle 25 Section 1.24 Overheard at the local diner 26 Section 1.25 Overheard in the next cubicle 27 Section 1.26 The power of a shared pattern vocabulary 28 Section 1.27 How I use Design Patterns? 29 Section 1.28 There are no Dumb Questions 29 Section 1.29 Skeptical Developer-Friendly Patterns Guru 30 Section 1.30 Tools for your Design Toolbox 32 Section 1.31 Design Puzzle Solution 34 Section 1.32 Solutions 35 Chapter Welcome to Design Patterns Head First Design Patterns By Eric Freeman, Elisabeth Freeman, Bert Bates, Kathy Sierra Prepared for Ann Cherkis, Safari ID: maottw@gmail.com ISBN: 0596007124 Publisher: O'Reilly Print Publication Date: 2004/10/25 User number: 1673621 Copyright 2008, Safari Books Online, LLC This PDF is exclusively for your use in accordance with the Safari Terms of Service No part of it may be reproduced or transmitted in any form by any means without the prior written permission for reprints and excerpts from the publisher Redistribution or other use that violates the fair use priviledge under U.S copyright laws (see 17 USC107) or that otherwise violates the Safari Terms of Service is strictly prohibited www.it-ebooks.info Chapter Welcome to Design Patterns Return to Table of Contents Page Intro to Design Patterns :HOFRPHWR 4 'HVLJQ3DWWHUQV 1RZWKDWZH·UHOLYLQJ LQ2EMHFWYLOOHZH·YHMXVWJRW WRJHWLQWR'HVLJQ3DWWHUQV HYHU\RQHLVGRLQJWKHP6RRQ ZH·OOEHWKHKLWRI-LPDQG %HWW\·V:HGQHVGD\QLJKW SDWWHUQVJURXS 6RPHRQHKDVDOUHDG\VROYHG\RXUSUREOHPV,QWKLVFKDSWHU\RX¶OOOHDUQ ZK\DQGKRZ \RXFDQH[SORLWWKHZLVGRPDQGOHVVRQVOHDUQHGE\RWKHUGHYHORSHUVZKR¶YH EHHQGRZQWKHVDPHGHVLJQSUREOHPURDGDQGVXUYLYHGWKHWULS%HIRUHZH¶UHGRQHZH¶OO ORRNDWWKHXVHDQGEHQH¿WVRIGHVLJQSDWWHUQVORRNDWVRPHNH\22GHVLJQSULQFLSOHVDQG ZDONWKURXJKDQH[DPSOHRIKRZRQHSDWWHUQZRUNV7KHEHVWZD\WRXVHSDWWHUQVLVWRORDG \RXUEUDLQZLWKWKHPDQGWKHQUHFRJQL]HSODFHVLQ\RXUGHVLJQVDQGH[LVWLQJDSSOLFDWLRQV ZKHUH\RXFDQDSSO\WKHP,QVWHDGRIFRGHUHXVHZLWKSDWWHUQV\RXJHWH[SHULHQFHUHXVH WKLVLVDQHZFKDSWHU Chapter Welcome to Design Patterns Head First Design Patterns By Eric Freeman, Elisabeth Freeman, Bert Bates, Kathy Sierra Prepared for Ann Cherkis, Safari ID: maottw@gmail.com ISBN: 0596007124 Publisher: O'Reilly Print Publication Date: 2004/10/25 User number: 1673621 Copyright 2008, Safari Books Online, LLC This PDF is exclusively for your use in accordance with the Safari Terms of Service No part of it may be reproduced or transmitted in any form by any means without the prior written permission for reprints and excerpts from the publisher Redistribution or other use that violates the fair use priviledge under U.S copyright laws (see 17 USC107) or that otherwise violates the Safari Terms of Service is strictly prohibited www.it-ebooks.info Chapter Welcome to Design Patterns Return to Table of Contents Page 6LP8'XFN 1\[\IZ\ML_Q\PI[QUXTM;QU=,]KSIXX 2WM_WZS[NWZIKWUXIVa\PI\UISM[IPQOPTa[]KKM[[N]TL]KSXWVL [QU]TI\QWVOIUM;QU=,]KS