Soumettre la recherche
Mettre en ligne
6.2 Move Creation Knowledge to Factory - Refactoring to Patterns
•
0 j'aime
•
690 vues
Li-Wei Yao
Suivre
[Refactoring to Patterns] 6.2 Move Creation Knowledge to Factory
Lire moins
Lire la suite
Logiciels
Signaler
Partager
Signaler
Partager
1 sur 11
Recommandé
Recursion schemes in Scala
Recursion schemes in Scala
Arthur Kushka
Refactoring Design Patterns the Functional Way (in Scala)
Refactoring Design Patterns the Functional Way (in Scala)
Kfir Bloch
Object Relational Mapping in PHP
Object Relational Mapping in PHP
Rob Knight
Common ASP.NET Design Patterns - Telerik India DevCon 2013
Common ASP.NET Design Patterns - Telerik India DevCon 2013
Steven Smith
6.3 Encapsulate Classes with Factory - Refactoring to Patterns
6.3 Encapsulate Classes with Factory - Refactoring to Patterns
Li-Wei Yao
Selenium Frameworks
Selenium Frameworks
Dave Haeffner
Abstract factory petterns
Abstract factory petterns
HyeonSeok Choi
Testing the Enterprise Layers - the A, B, C's of Integration Testing - Aslak ...
Testing the Enterprise Layers - the A, B, C's of Integration Testing - Aslak ...
JAXLondon2014
Recommandé
Recursion schemes in Scala
Recursion schemes in Scala
Arthur Kushka
Refactoring Design Patterns the Functional Way (in Scala)
Refactoring Design Patterns the Functional Way (in Scala)
Kfir Bloch
Object Relational Mapping in PHP
Object Relational Mapping in PHP
Rob Knight
Common ASP.NET Design Patterns - Telerik India DevCon 2013
Common ASP.NET Design Patterns - Telerik India DevCon 2013
Steven Smith
6.3 Encapsulate Classes with Factory - Refactoring to Patterns
6.3 Encapsulate Classes with Factory - Refactoring to Patterns
Li-Wei Yao
Selenium Frameworks
Selenium Frameworks
Dave Haeffner
Abstract factory petterns
Abstract factory petterns
HyeonSeok Choi
Testing the Enterprise Layers - the A, B, C's of Integration Testing - Aslak ...
Testing the Enterprise Layers - the A, B, C's of Integration Testing - Aslak ...
JAXLondon2014
Testing the Enterprise layers, with Arquillian
Testing the Enterprise layers, with Arquillian
Virtual JBoss User Group
The path to cdi 2.0
The path to cdi 2.0
Antoine Sabot-Durand
Factory Pattern
Factory Pattern
Deepti C
OSGi: Don't let me be Misunderstood
OSGi: Don't let me be Misunderstood
mikaelbarbero
Js tacktalk team dev js testing performance
Js tacktalk team dev js testing performance
Артем Захарченко
GR8Conf 2009: Industrial Strength Groovy by Paul King
GR8Conf 2009: Industrial Strength Groovy by Paul King
GR8Conf
INTRODUCTION TO MACHINE LEARNING FOR MATERIALS SCIENCE
INTRODUCTION TO MACHINE LEARNING FOR MATERIALS SCIENCE
IPutuAdiPratama
1z0-997-20-oci-professional-incomplete.pdf
1z0-997-20-oci-professional-incomplete.pdf
MohamedHusseinEid
ActiVis: Visual Exploration of Industry-Scale Deep Neural Network Models
ActiVis: Visual Exploration of Industry-Scale Deep Neural Network Models
Minsuk Kahng
HDinsight Workshop - Prerequisite Activity
HDinsight Workshop - Prerequisite Activity
Idan Tohami
Presentation5
Presentation5
Natasha Bains
Workshop - The Little Pattern That Could.pdf
Workshop - The Little Pattern That Could.pdf
TobiasGoeschel
Evolving Your Distributed Cache In A Continuous Delivery World: Tyler Vangorder
Evolving Your Distributed Cache In A Continuous Delivery World: Tyler Vangorder
Redis Labs
Testability for developers – Fighting a mess by making it testable
Testability for developers – Fighting a mess by making it testable
Alexander Tarlinder
Jump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design Pattern
Nishith Shukla
Jump Start To Ooad And Design Patterns
Jump Start To Ooad And Design Patterns
Lalit Kale
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12
Enkitec
SF Big Analytics talk: NVIDIA FLARE: Federated Learning Application Runtime E...
SF Big Analytics talk: NVIDIA FLARE: Federated Learning Application Runtime E...
Chester Chen
Rifartek Robot Training Course - How to use ClientRobot
Rifartek Robot Training Course - How to use ClientRobot
Tsai Tsung-Yi
Ibm urban code_deploy_v6_lab-workbook
Ibm urban code_deploy_v6_lab-workbook
BalipalliGayathri
SSL Certificate and Code Signing
SSL Certificate and Code Signing
Li-Wei Yao
From NAT to NAT Traversal
From NAT to NAT Traversal
Li-Wei Yao
Contenu connexe
Similaire à 6.2 Move Creation Knowledge to Factory - Refactoring to Patterns
Testing the Enterprise layers, with Arquillian
Testing the Enterprise layers, with Arquillian
Virtual JBoss User Group
The path to cdi 2.0
The path to cdi 2.0
Antoine Sabot-Durand
Factory Pattern
Factory Pattern
Deepti C
OSGi: Don't let me be Misunderstood
OSGi: Don't let me be Misunderstood
mikaelbarbero
Js tacktalk team dev js testing performance
Js tacktalk team dev js testing performance
Артем Захарченко
GR8Conf 2009: Industrial Strength Groovy by Paul King
GR8Conf 2009: Industrial Strength Groovy by Paul King
GR8Conf
INTRODUCTION TO MACHINE LEARNING FOR MATERIALS SCIENCE
INTRODUCTION TO MACHINE LEARNING FOR MATERIALS SCIENCE
IPutuAdiPratama
1z0-997-20-oci-professional-incomplete.pdf
1z0-997-20-oci-professional-incomplete.pdf
MohamedHusseinEid
ActiVis: Visual Exploration of Industry-Scale Deep Neural Network Models
ActiVis: Visual Exploration of Industry-Scale Deep Neural Network Models
Minsuk Kahng
HDinsight Workshop - Prerequisite Activity
HDinsight Workshop - Prerequisite Activity
Idan Tohami
Presentation5
Presentation5
Natasha Bains
Workshop - The Little Pattern That Could.pdf
Workshop - The Little Pattern That Could.pdf
TobiasGoeschel
Evolving Your Distributed Cache In A Continuous Delivery World: Tyler Vangorder
Evolving Your Distributed Cache In A Continuous Delivery World: Tyler Vangorder
Redis Labs
Testability for developers – Fighting a mess by making it testable
Testability for developers – Fighting a mess by making it testable
Alexander Tarlinder
Jump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design Pattern
Nishith Shukla
Jump Start To Ooad And Design Patterns
Jump Start To Ooad And Design Patterns
Lalit Kale
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12
Enkitec
SF Big Analytics talk: NVIDIA FLARE: Federated Learning Application Runtime E...
SF Big Analytics talk: NVIDIA FLARE: Federated Learning Application Runtime E...
Chester Chen
Rifartek Robot Training Course - How to use ClientRobot
Rifartek Robot Training Course - How to use ClientRobot
Tsai Tsung-Yi
Ibm urban code_deploy_v6_lab-workbook
Ibm urban code_deploy_v6_lab-workbook
BalipalliGayathri
Similaire à 6.2 Move Creation Knowledge to Factory - Refactoring to Patterns
(20)
Testing the Enterprise layers, with Arquillian
Testing the Enterprise layers, with Arquillian
The path to cdi 2.0
The path to cdi 2.0
Factory Pattern
Factory Pattern
OSGi: Don't let me be Misunderstood
OSGi: Don't let me be Misunderstood
Js tacktalk team dev js testing performance
Js tacktalk team dev js testing performance
GR8Conf 2009: Industrial Strength Groovy by Paul King
GR8Conf 2009: Industrial Strength Groovy by Paul King
INTRODUCTION TO MACHINE LEARNING FOR MATERIALS SCIENCE
INTRODUCTION TO MACHINE LEARNING FOR MATERIALS SCIENCE
1z0-997-20-oci-professional-incomplete.pdf
1z0-997-20-oci-professional-incomplete.pdf
ActiVis: Visual Exploration of Industry-Scale Deep Neural Network Models
ActiVis: Visual Exploration of Industry-Scale Deep Neural Network Models
HDinsight Workshop - Prerequisite Activity
HDinsight Workshop - Prerequisite Activity
Presentation5
Presentation5
Workshop - The Little Pattern That Could.pdf
Workshop - The Little Pattern That Could.pdf
Evolving Your Distributed Cache In A Continuous Delivery World: Tyler Vangorder
Evolving Your Distributed Cache In A Continuous Delivery World: Tyler Vangorder
Testability for developers – Fighting a mess by making it testable
Testability for developers – Fighting a mess by making it testable
Jump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design Pattern
Jump Start To Ooad And Design Patterns
Jump Start To Ooad And Design Patterns
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12
SF Big Analytics talk: NVIDIA FLARE: Federated Learning Application Runtime E...
SF Big Analytics talk: NVIDIA FLARE: Federated Learning Application Runtime E...
Rifartek Robot Training Course - How to use ClientRobot
Rifartek Robot Training Course - How to use ClientRobot
Ibm urban code_deploy_v6_lab-workbook
Ibm urban code_deploy_v6_lab-workbook
Plus de Li-Wei Yao
SSL Certificate and Code Signing
SSL Certificate and Code Signing
Li-Wei Yao
From NAT to NAT Traversal
From NAT to NAT Traversal
Li-Wei Yao
Docker Usage
Docker Usage
Li-Wei Yao
6.1 Replace Constructors with Creation Methods - Refactoring to Patterns
6.1 Replace Constructors with Creation Methods - Refactoring to Patterns
Li-Wei Yao
Qlync RD 第三屆讀書會候選清單
Qlync RD 第三屆讀書會候選清單
Li-Wei Yao
自動測試 - 測試對象的識別/封裝
自動測試 - 測試對象的識別/封裝
Li-Wei Yao
Design Pattern - Iterator and Composite Patterns
Design Pattern - Iterator and Composite Patterns
Li-Wei Yao
Design Pattern - Factory Pattern
Design Pattern - Factory Pattern
Li-Wei Yao
Plus de Li-Wei Yao
(8)
SSL Certificate and Code Signing
SSL Certificate and Code Signing
From NAT to NAT Traversal
From NAT to NAT Traversal
Docker Usage
Docker Usage
6.1 Replace Constructors with Creation Methods - Refactoring to Patterns
6.1 Replace Constructors with Creation Methods - Refactoring to Patterns
Qlync RD 第三屆讀書會候選清單
Qlync RD 第三屆讀書會候選清單
自動測試 - 測試對象的識別/封裝
自動測試 - 測試對象的識別/封裝
Design Pattern - Iterator and Composite Patterns
Design Pattern - Iterator and Composite Patterns
Design Pattern - Factory Pattern
Design Pattern - Factory Pattern
Dernier
EY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
Neo4j
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
OnePlan Solutions
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
Frank van der Linden
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
Evangelist Apps https://twitter.com/EvangelistSW/
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Christina Lin
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
harshavardhanraghave
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
Wave PLM
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
aagamshah0812
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
kalichargn70th171
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
stazi3110
Asset Management Software - Infographic
Asset Management Software - Infographic
Hr365.us smith
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
MyIntelliSource, Inc.
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
OPEN KNOWLEDGE GmbH
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
joe51371421
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio, Inc.
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
kalichargn70th171
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
soniya singh
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
BradBedford3
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
kaushalgiri8080
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽❤️🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽❤️🧑🏻 89...
gurkirankumar98700
Dernier
(20)
EY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Asset Management Software - Infographic
Asset Management Software - Infographic
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽❤️🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽❤️🧑🏻 89...
6.2 Move Creation Knowledge to Factory - Refactoring to Patterns
1.
6.2. Move Creation
Knowledge to Factory 6. Creation (6.2) YAO, LI-WEI 2014/12/04 Qlync Inc., RD Reading 1
2.
⽤用以具現(Instantiate) class的各種資料和程式碼 蔓延(sprawl)於許多classes
將創建知識(Creation Knowledges)搬 移至單個Factory class中 2
3.
Creation Sprawl (Solution
Sprawl) 3
4.
What is Factory?
Simple Factory Factory Method Abstract Factory http://corey.quickshiftconsulting.com/blog/first-post http://blog.csdn.net/dragonwuboy/article/details/16839509 4
5.
Simple Factory Creation
logic in factory, hard to add new product 5
6.
Factory Method Interfaced
factory method, OCP (Open Closed Principle), client decide product 6
7.
Abstract Factory Create
a family of related objects, use factory method 7
8.
⽤用以具現(Instantiate) class的各種資料和程式 碼蔓延於許多classes
將創建知識(Creation Knowledges)搬 移至單個Factory class中 8
9.
Pros ana Cons
(+) 可以統合創建邏輯(creation logic)和具現/組 態偏好(instantiation/configuration preferences)。︒ (+) 將客⼾戶端和創建邏輯(creation logic)解除耦合 (decouple)。︒ (-) 此法比直接具現(direct instantiation; 亦即直接 創建)更令設計複雜⼀一些。︒ 9
10.
Mechanics 1. 令instantiator經由Creation
Method具現product 2. 建⽴立即將成為Factory的新class 3. 將Creation Method移至Factory, 設為nonstatic 4. 令instantiator改⽽而具現Factory, 呼叫Factory取得class實體 5. 將具現任務中所需的資料及函式盡可能移至Factory 10
11.
Example… and Discussion…
http://www.informit.com/articles/article.aspx?p=1398606&seqNum=2 11