Go design patterns :: learn idiomatic, efficient, clean and extensible Go design and concurrency patterns by using TDD /
Learn idiomatic, efficient, clean, and extensible Go design and concurrency patterns by using TDD About This Book A highly practical guide filled with numerous examples unleashing the power of design patterns with Go. Discover an introduction of the CSP concurrency model by explaining GoRoutines and...
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Elektronisch E-Book |
Sprache: | English |
Veröffentlicht: |
Birmingham, UK :
Packt Publishing,
[2017]
|
Schlagworte: | |
Online-Zugang: | Volltext |
Zusammenfassung: | Learn idiomatic, efficient, clean, and extensible Go design and concurrency patterns by using TDD About This Book A highly practical guide filled with numerous examples unleashing the power of design patterns with Go. Discover an introduction of the CSP concurrency model by explaining GoRoutines and channels. Get a full explanation, including comprehensive text and examples, of all known GoF design patterns in Go. Who This Book Is For The target audience is both beginner- and advanced-level developers in the Go programming language. No knowledge of design patterns is expected. What You Will Learn All basic syntax and tools needed to start coding in Go Encapsulate the creation of complex objects in an idiomatic way in Go Create unique instances that cannot be duplicated within a program Understand the importance of object encapsulation to provide clarity and maintainability Prepare cost-effective actions so that different parts of the program aren't affected by expensive tasks Deal with channels and GoRoutines within the Go context to build concurrent application in Go in an idiomatic way In Detail Go is a multi-paradigm programming language that has built-in facilities to create concurrent applications. Design patterns allow developers to efficiently address common problems faced during developing applications. Go Design Patterns will provide readers with a reference point to software design patterns and CSP concurrency design patterns to help them build applications in a more idiomatic, robust, and convenient way in Go. The book starts with a brief introduction to Go programming essentials and quickly moves on to explain the idea behind the creation of design patterns and how they appeared in the 90's as a common "language" between developers to solve common tasks in object-oriented programming languages. You will then learn how to apply the 23 Gang of Four (GoF) design patterns in Go and also learn about CSP concurrency patterns, the "killer feature" in Go that has helped Google develop software to maintain thousands of servers. With all of this the book will enable you to understand and apply design patterns in an idiomatic way that will produce concise, readable, and maintainable software. Style and approach This book will teach widely used design patterns and best practices with Go in a step-by-step manner. The code will have detailed examples, to allow programmers to apply design patterns in their day-to-day coding. |
Beschreibung: | 1 online resource (1 volume) : illustrations |
ISBN: | 9781786461902 1786461900 |
Internformat
MARC
LEADER | 00000cam a2200000 i 4500 | ||
---|---|---|---|
001 | ZDB-4-EBA-ocn976408022 | ||
003 | OCoLC | ||
005 | 20241004212047.0 | ||
006 | m o d | ||
007 | cr unu|||||||| | ||
008 | 170317s2017 enka o 000 0 eng d | ||
040 | |a UMI |b eng |e rda |e pn |c UMI |d YDX |d TEFOD |d OCLCF |d IDEBK |d STF |d TOH |d COO |d OCLCQ |d VT2 |d UOK |d CEF |d KSU |d OCLCQ |d DEBBG |d WYU |d N$T |d ZCU |d UAB |d AU@ |d OCLCO |d OCLCQ |d OCLCO |d OCLCQ |d DXU | ||
019 | |a 974559930 |a 974693705 |a 974748271 |a 974959653 |a 975021883 |a 1079834794 | ||
020 | |a 9781786461902 |q (electronic bk.) | ||
020 | |a 1786461900 |q (electronic bk.) | ||
020 | |z 9781786466204 | ||
020 | |z 1786466201 | ||
035 | |a (OCoLC)976408022 |z (OCoLC)974559930 |z (OCoLC)974693705 |z (OCoLC)974748271 |z (OCoLC)974959653 |z (OCoLC)975021883 |z (OCoLC)1079834794 | ||
037 | |a CL0500000840 |b Safari Books Online | ||
037 | |a 92333FFA-35D0-4C04-BE29-E375B6AEDD49 |b OverDrive, Inc. |n http://www.overdrive.com | ||
050 | 4 | |a QA76.73.G63 | |
072 | 7 | |a COM |x 051230 |2 bisacsh | |
082 | 7 | |a 005.133 |2 23 | |
049 | |a MAIN | ||
100 | 1 | |a Castro Contreras, Mario, |e author. | |
245 | 1 | 0 | |a Go design patterns : |b learn idiomatic, efficient, clean and extensible Go design and concurrency patterns by using TDD / |c Mario Castro Contreras. |
264 | 1 | |a Birmingham, UK : |b Packt Publishing, |c [2017] | |
264 | 4 | |c ©2017 | |
300 | |a 1 online resource (1 volume) : |b illustrations | ||
336 | |a text |b txt |2 rdacontent | ||
337 | |a computer |b c |2 rdamedia | ||
338 | |a online resource |b cr |2 rdacarrier | ||
588 | 0 | |a Online resource; title from cover (viewed March 17, 2017). | |
505 | 0 | |a Cover -- Copyright -- Credits -- About the Author -- About the Reviewer -- www.PacktPub.com -- Customer Feedback -- Table of Contents -- Preface -- Chapter 1: Ready... Steady... Go! -- A little bit of history -- Installing Go -- Linux -- Go Linux advanced installation -- Windows -- Mac OS X -- Setting the workspace -- Linux and Apple OS X -- Starting with Hello World -- Integrated Development Environment -- IDE -- Types -- Variables and constants -- Operators -- Flow control -- The if{u2026} else statement -- The switch statement -- The for{u2026}range statement -- Functions -- What does a function look like? -- What is an anonymous function? -- Closures -- Creating errors, handling errors and returning errors. -- Function with undetermined number of parameters -- Naming returned types -- Arrays, slices, and maps -- Arrays -- Zero-initialization -- Slices -- Maps -- Visibility -- Zero-initialization -- Pointers and structures -- What is a pointer? Why are they good? -- Structs -- Interfaces -- Interfaces -- signing a contract -- Testing and TDD -- The testing package -- What is TDD? -- Libraries -- The Go get tool -- Managing JSON data -- The encoding package -- Go tools -- The golint tool -- The gofmt tool -- The godoc tool -- The goimport tool -- Contributing to Go open source projects in GitHub -- Summary -- Chapter 2: Creational Patterns -Singleton, Builder, Factory, Prototype, and Abstract Factory Design Patterns -- Singleton design pattern -- having a unique instance of a type in the entire program -- Description -- Objectives -- Example -- a unique counter -- Requirements and acceptance criteria -- Writing unit tests first -- Implementation -- A few words about the Singleton design pattern -- Builder design pattern -- reusing an algorithm to create many implementations of an interface -- Description -- Objectives -- Example -- vehicle manufacturing. | |
505 | 8 | |a Requirements and acceptance criteria -- Unit test for the vehicle builder -- Implementation -- Wrapping up the Builder design pattern -- Factory method -- delegating the creation of different types of payments -- Description -- Objectives -- The example -- a factory of payment methods for a shop -- Acceptance criteria -- First unit test -- Implementation -- Upgrading the Debitcard method to a new platform -- What we learned about the Factory method -- Abstract Factory -- a factory of factories -- Description -- The objectives -- The vehicle factory example, again? -- Acceptance criteria -- Unit test -- Implementation -- A few lines about the Abstract Factory method -- Prototype design pattern -- Description -- Objective -- Example -- Acceptance criteria -- Unit test -- Implementation -- What we learned about the Prototype design pattern -- Summary -- Chapter 3: Structural Patterns -- Composite, Adapter, and Bridge Design Patterns -- Composite design pattern -- Description -- Objectives -- The swimmer and the fish -- Requirements and acceptance criteria -- Creating compositions -- Binary Tree compositions -- Composite pattern versus inheritance -- Final words on the Composite pattern -- Adapter design pattern -- Description -- Objectives -- Using an incompatible interface with an Adapter object -- Requirements and acceptance criteria -- Unit testing our Printer adapter -- Implementation -- Examples of the Adapter pattern in Go's source code -- What the Go source code tells us about the Adapter pattern -- Bridge design pattern -- Description -- Objectives -- Two printers and two ways of printing for each -- Requirements and acceptance criteria -- Unit testing the Bridge pattern -- Implementation -- Reuse everything with the Bridge pattern -- Summary -- Chapter 4: Structural Patterns -- Proxy, Facade, Decorator, and Flyweight Design Patterns. | |
505 | 8 | |a Proxy design pattern -- Description -- Objectives -- Example -- Acceptance criteria -- Unit test -- Implementation -- Proxying around actions -- Decorator design pattern -- Description -- Objectives -- Example -- Acceptance criteria -- Unit test -- Implementation -- A real-life example -- server middleware -- Starting with the common interface, http.Handler -- A few words about Go's structural typing -- Summarizing the Decorator design pattern -- Proxy versus Decorator -- Facade design pattern -- Description -- Objectives -- Example -- Acceptance criteria -- Unit test -- Implementation -- Library created with the Facade pattern -- Flyweight design pattern -- Description -- Objectives -- Example -- Acceptance criteria -- Basic structs and tests -- Implementation -- What's the difference between Singleton and Flyweight then? -- Summary -- Chapter 5: Behavioral Patterns -- Strategy, Chain of Responsibility, and Command Design Patterns -- Strategy design pattern -- Description -- Objectives -- Rendering images or text -- Acceptance criteria -- Implementation -- Solving small issues in our library -- Final words on the Strategy pattern -- Chain of responsibility design pattern -- Description -- Objectives -- A multi-logger chain -- Unit test -- Implementation -- What about a closure? -- Putting it together -- Command design pattern -- Description -- Objectives -- A simple queue -- Acceptance criteria -- Implementation -- More examples -- Chain of responsibility of commands -- Rounding-up the Command pattern up -- Summary -- Chapter 6: Behavioral Patterns -- Template, Memento, and Interpreter Design Patterns -- Template design pattern -- Description -- Objectives -- Example -- a simple algorithm with a deferred step -- Requirements and acceptance criteria -- Unit tests for the simple algorithm -- Implementing the Template pattern -- Anonymous functions. | |
505 | 8 | |a How to avoid modifications on the interface -- Looking for the Template pattern in Go's source code -- Summarizing the Template design pattern -- Memento design pattern -- Description -- Objectives -- A simple example with strings -- Requirements and acceptance criteria -- Unit test -- Implementing the Memento pattern -- Another example using the Command and Facade patterns -- Last words on the Memento pattern -- Interpreter design pattern -- Description -- Objectives -- Example -- a polish notation calculator -- Acceptance criteria for the calculator -- Unit test of some operations -- Implementation -- Complexity with the Interpreter design pattern -- Interpreter pattern again -- now using interfaces -- The power of the Interpreter pattern -- Summary -- Chapter 7: Behavioral Patterns -- Visitor, State, Mediator, and Observer Design Patterns -- Visitor design pattern -- Description -- Objectives -- A log appender -- Acceptance criteria -- Unit tests -- Implementation of Visitor pattern -- Another example -- Visitors to the rescue! -- State design pattern -- Description -- Objectives -- A small guess the number game -- Acceptance criteria -- Implementation of State pattern -- A state to win and a state to lose -- The game built using the State pattern -- Mediator design pattern -- Description -- Objectives -- A calculator -- Acceptance criteria -- Implementation -- Uncoupling two types with the Mediator -- Observer design pattern -- Description -- Objectives -- The notifier -- Acceptance criteria -- Unit tests -- Implementation -- Summary -- Chapter 8: Introduction to Gos Concurrency -- A little bit of history and theory -- Concurrency versus parallelism -- CSP versus actor-based concurrency -- Goroutines -- Our first Goroutine -- Anonymous functions launched as new Goroutines -- WaitGroups -- Callbacks -- Callback hell -- Mutexes. | |
505 | 8 | |a An example with mutexes -- concurrent counter -- Presenting the race detector -- Channels -- Our first channel -- Buffered channels -- Directional channels -- The select statement -- Ranging over channels too! -- Using it all -- concurrent singleton -- Unit test -- Implementation -- Summary -- Chapter 9: Concurrency Patterns -- Barrier, Future, and Pipeline Design Patterns -- Barrier concurrency pattern -- Description -- Objectives -- An HTTP GET aggregator -- Acceptance criteria -- Unit test -- integration -- Implementation -- Waiting for responses with the Barrier design pattern -- Future design pattern -- Description -- Objectives -- A simple asynchronous requester -- Acceptance criteria -- Unit tests -- Implementation -- Putting the Future together -- Pipeline design pattern -- Description -- Objectives -- A concurrent multi-operation -- Acceptance criteria -- Beginning with tests -- Implementation -- The list generator -- Raising numbers to the power of 2 -- Final reduce operation -- Launching the Pipeline pattern -- Final words on the Pipeline pattern -- Summary -- Chapter 10: Concurrency Patterns -- Workers Pool and Publish/Subscriber Design Patterns -- Workers pool -- Description -- Objectives -- A pool of pipelines -- Acceptance criteria -- Implementation -- The dispatcher -- The pipeline -- An app using the workers pool -- No tests? -- Wrapping up the Worker pool -- Concurrent Publish/Subscriber design pattern -- Description -- Objectives -- Example -- a concurrent notifier -- Acceptance criteria -- Unit test -- Testing subscriber -- Testing publisher -- Implementation -- Implementing the publisher -- Handling channels without race conditions -- A few words on the concurrent Observer pattern -- Summary -- Index. | |
520 | |a Learn idiomatic, efficient, clean, and extensible Go design and concurrency patterns by using TDD About This Book A highly practical guide filled with numerous examples unleashing the power of design patterns with Go. Discover an introduction of the CSP concurrency model by explaining GoRoutines and channels. Get a full explanation, including comprehensive text and examples, of all known GoF design patterns in Go. Who This Book Is For The target audience is both beginner- and advanced-level developers in the Go programming language. No knowledge of design patterns is expected. What You Will Learn All basic syntax and tools needed to start coding in Go Encapsulate the creation of complex objects in an idiomatic way in Go Create unique instances that cannot be duplicated within a program Understand the importance of object encapsulation to provide clarity and maintainability Prepare cost-effective actions so that different parts of the program aren't affected by expensive tasks Deal with channels and GoRoutines within the Go context to build concurrent application in Go in an idiomatic way In Detail Go is a multi-paradigm programming language that has built-in facilities to create concurrent applications. Design patterns allow developers to efficiently address common problems faced during developing applications. Go Design Patterns will provide readers with a reference point to software design patterns and CSP concurrency design patterns to help them build applications in a more idiomatic, robust, and convenient way in Go. The book starts with a brief introduction to Go programming essentials and quickly moves on to explain the idea behind the creation of design patterns and how they appeared in the 90's as a common "language" between developers to solve common tasks in object-oriented programming languages. You will then learn how to apply the 23 Gang of Four (GoF) design patterns in Go and also learn about CSP concurrency patterns, the "killer feature" in Go that has helped Google develop software to maintain thousands of servers. With all of this the book will enable you to understand and apply design patterns in an idiomatic way that will produce concise, readable, and maintainable software. Style and approach This book will teach widely used design patterns and best practices with Go in a step-by-step manner. The code will have detailed examples, to allow programmers to apply design patterns in their day-to-day coding. | ||
650 | 0 | |a Go (Computer program language) |0 http://id.loc.gov/authorities/subjects/sh2012000746 | |
650 | 0 | |a Computer software |x Development. |0 http://id.loc.gov/authorities/subjects/sh85029535 | |
650 | 6 | |a Go (Langage de programmation) | |
650 | 7 | |a COMPUTERS / Software Development & Engineering / General. |2 bisacsh | |
650 | 7 | |a Computer software |x Development |2 fast | |
650 | 7 | |a Go (Computer program language) |2 fast | |
655 | 7 | |a Handbooks and manuals |2 fast | |
776 | 0 | 8 | |i Print version: |a Contreras, Mario Castro. |t Go Design Patterns. |d Birmingham : Packt Publishing, ©2017 |
856 | 4 | 0 | |l FWS01 |p ZDB-4-EBA |q FWS_PDA_EBA |u https://search.ebscohost.com/login.aspx?direct=true&scope=site&db=nlebk&AN=1477566 |3 Volltext |
938 | |a ProQuest MyiLibrary Digital eBook Collection |b IDEB |n cis35309948 | ||
938 | |a YBP Library Services |b YANK |n 13522892 | ||
938 | |a EBSCOhost |b EBSC |n 1477566 | ||
994 | |a 92 |b GEBAY | ||
912 | |a ZDB-4-EBA | ||
049 | |a DE-863 |
Datensatz im Suchindex
DE-BY-FWS_katkey | ZDB-4-EBA-ocn976408022 |
---|---|
_version_ | 1816882382720991232 |
adam_text | |
any_adam_object | |
author | Castro Contreras, Mario |
author_facet | Castro Contreras, Mario |
author_role | aut |
author_sort | Castro Contreras, Mario |
author_variant | c m c cm cmc |
building | Verbundindex |
bvnumber | localFWS |
callnumber-first | Q - Science |
callnumber-label | QA76 |
callnumber-raw | QA76.73.G63 |
callnumber-search | QA76.73.G63 |
callnumber-sort | QA 276.73 G63 |
callnumber-subject | QA - Mathematics |
collection | ZDB-4-EBA |
contents | Cover -- Copyright -- Credits -- About the Author -- About the Reviewer -- www.PacktPub.com -- Customer Feedback -- Table of Contents -- Preface -- Chapter 1: Ready... Steady... Go! -- A little bit of history -- Installing Go -- Linux -- Go Linux advanced installation -- Windows -- Mac OS X -- Setting the workspace -- Linux and Apple OS X -- Starting with Hello World -- Integrated Development Environment -- IDE -- Types -- Variables and constants -- Operators -- Flow control -- The if{u2026} else statement -- The switch statement -- The for{u2026}range statement -- Functions -- What does a function look like? -- What is an anonymous function? -- Closures -- Creating errors, handling errors and returning errors. -- Function with undetermined number of parameters -- Naming returned types -- Arrays, slices, and maps -- Arrays -- Zero-initialization -- Slices -- Maps -- Visibility -- Zero-initialization -- Pointers and structures -- What is a pointer? Why are they good? -- Structs -- Interfaces -- Interfaces -- signing a contract -- Testing and TDD -- The testing package -- What is TDD? -- Libraries -- The Go get tool -- Managing JSON data -- The encoding package -- Go tools -- The golint tool -- The gofmt tool -- The godoc tool -- The goimport tool -- Contributing to Go open source projects in GitHub -- Summary -- Chapter 2: Creational Patterns -Singleton, Builder, Factory, Prototype, and Abstract Factory Design Patterns -- Singleton design pattern -- having a unique instance of a type in the entire program -- Description -- Objectives -- Example -- a unique counter -- Requirements and acceptance criteria -- Writing unit tests first -- Implementation -- A few words about the Singleton design pattern -- Builder design pattern -- reusing an algorithm to create many implementations of an interface -- Description -- Objectives -- Example -- vehicle manufacturing. Requirements and acceptance criteria -- Unit test for the vehicle builder -- Implementation -- Wrapping up the Builder design pattern -- Factory method -- delegating the creation of different types of payments -- Description -- Objectives -- The example -- a factory of payment methods for a shop -- Acceptance criteria -- First unit test -- Implementation -- Upgrading the Debitcard method to a new platform -- What we learned about the Factory method -- Abstract Factory -- a factory of factories -- Description -- The objectives -- The vehicle factory example, again? -- Acceptance criteria -- Unit test -- Implementation -- A few lines about the Abstract Factory method -- Prototype design pattern -- Description -- Objective -- Example -- Acceptance criteria -- Unit test -- Implementation -- What we learned about the Prototype design pattern -- Summary -- Chapter 3: Structural Patterns -- Composite, Adapter, and Bridge Design Patterns -- Composite design pattern -- Description -- Objectives -- The swimmer and the fish -- Requirements and acceptance criteria -- Creating compositions -- Binary Tree compositions -- Composite pattern versus inheritance -- Final words on the Composite pattern -- Adapter design pattern -- Description -- Objectives -- Using an incompatible interface with an Adapter object -- Requirements and acceptance criteria -- Unit testing our Printer adapter -- Implementation -- Examples of the Adapter pattern in Go's source code -- What the Go source code tells us about the Adapter pattern -- Bridge design pattern -- Description -- Objectives -- Two printers and two ways of printing for each -- Requirements and acceptance criteria -- Unit testing the Bridge pattern -- Implementation -- Reuse everything with the Bridge pattern -- Summary -- Chapter 4: Structural Patterns -- Proxy, Facade, Decorator, and Flyweight Design Patterns. Proxy design pattern -- Description -- Objectives -- Example -- Acceptance criteria -- Unit test -- Implementation -- Proxying around actions -- Decorator design pattern -- Description -- Objectives -- Example -- Acceptance criteria -- Unit test -- Implementation -- A real-life example -- server middleware -- Starting with the common interface, http.Handler -- A few words about Go's structural typing -- Summarizing the Decorator design pattern -- Proxy versus Decorator -- Facade design pattern -- Description -- Objectives -- Example -- Acceptance criteria -- Unit test -- Implementation -- Library created with the Facade pattern -- Flyweight design pattern -- Description -- Objectives -- Example -- Acceptance criteria -- Basic structs and tests -- Implementation -- What's the difference between Singleton and Flyweight then? -- Summary -- Chapter 5: Behavioral Patterns -- Strategy, Chain of Responsibility, and Command Design Patterns -- Strategy design pattern -- Description -- Objectives -- Rendering images or text -- Acceptance criteria -- Implementation -- Solving small issues in our library -- Final words on the Strategy pattern -- Chain of responsibility design pattern -- Description -- Objectives -- A multi-logger chain -- Unit test -- Implementation -- What about a closure? -- Putting it together -- Command design pattern -- Description -- Objectives -- A simple queue -- Acceptance criteria -- Implementation -- More examples -- Chain of responsibility of commands -- Rounding-up the Command pattern up -- Summary -- Chapter 6: Behavioral Patterns -- Template, Memento, and Interpreter Design Patterns -- Template design pattern -- Description -- Objectives -- Example -- a simple algorithm with a deferred step -- Requirements and acceptance criteria -- Unit tests for the simple algorithm -- Implementing the Template pattern -- Anonymous functions. How to avoid modifications on the interface -- Looking for the Template pattern in Go's source code -- Summarizing the Template design pattern -- Memento design pattern -- Description -- Objectives -- A simple example with strings -- Requirements and acceptance criteria -- Unit test -- Implementing the Memento pattern -- Another example using the Command and Facade patterns -- Last words on the Memento pattern -- Interpreter design pattern -- Description -- Objectives -- Example -- a polish notation calculator -- Acceptance criteria for the calculator -- Unit test of some operations -- Implementation -- Complexity with the Interpreter design pattern -- Interpreter pattern again -- now using interfaces -- The power of the Interpreter pattern -- Summary -- Chapter 7: Behavioral Patterns -- Visitor, State, Mediator, and Observer Design Patterns -- Visitor design pattern -- Description -- Objectives -- A log appender -- Acceptance criteria -- Unit tests -- Implementation of Visitor pattern -- Another example -- Visitors to the rescue! -- State design pattern -- Description -- Objectives -- A small guess the number game -- Acceptance criteria -- Implementation of State pattern -- A state to win and a state to lose -- The game built using the State pattern -- Mediator design pattern -- Description -- Objectives -- A calculator -- Acceptance criteria -- Implementation -- Uncoupling two types with the Mediator -- Observer design pattern -- Description -- Objectives -- The notifier -- Acceptance criteria -- Unit tests -- Implementation -- Summary -- Chapter 8: Introduction to Gos Concurrency -- A little bit of history and theory -- Concurrency versus parallelism -- CSP versus actor-based concurrency -- Goroutines -- Our first Goroutine -- Anonymous functions launched as new Goroutines -- WaitGroups -- Callbacks -- Callback hell -- Mutexes. An example with mutexes -- concurrent counter -- Presenting the race detector -- Channels -- Our first channel -- Buffered channels -- Directional channels -- The select statement -- Ranging over channels too! -- Using it all -- concurrent singleton -- Unit test -- Implementation -- Summary -- Chapter 9: Concurrency Patterns -- Barrier, Future, and Pipeline Design Patterns -- Barrier concurrency pattern -- Description -- Objectives -- An HTTP GET aggregator -- Acceptance criteria -- Unit test -- integration -- Implementation -- Waiting for responses with the Barrier design pattern -- Future design pattern -- Description -- Objectives -- A simple asynchronous requester -- Acceptance criteria -- Unit tests -- Implementation -- Putting the Future together -- Pipeline design pattern -- Description -- Objectives -- A concurrent multi-operation -- Acceptance criteria -- Beginning with tests -- Implementation -- The list generator -- Raising numbers to the power of 2 -- Final reduce operation -- Launching the Pipeline pattern -- Final words on the Pipeline pattern -- Summary -- Chapter 10: Concurrency Patterns -- Workers Pool and Publish/Subscriber Design Patterns -- Workers pool -- Description -- Objectives -- A pool of pipelines -- Acceptance criteria -- Implementation -- The dispatcher -- The pipeline -- An app using the workers pool -- No tests? -- Wrapping up the Worker pool -- Concurrent Publish/Subscriber design pattern -- Description -- Objectives -- Example -- a concurrent notifier -- Acceptance criteria -- Unit test -- Testing subscriber -- Testing publisher -- Implementation -- Implementing the publisher -- Handling channels without race conditions -- A few words on the concurrent Observer pattern -- Summary -- Index. |
ctrlnum | (OCoLC)976408022 |
dewey-full | 005.133 |
dewey-hundreds | 000 - Computer science, information, general works |
dewey-ones | 005 - Computer programming, programs, data, security |
dewey-raw | 005.133 |
dewey-search | 005.133 |
dewey-sort | 15.133 |
dewey-tens | 000 - Computer science, information, general works |
discipline | Informatik |
format | Electronic eBook |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>14290cam a2200589 i 4500</leader><controlfield tag="001">ZDB-4-EBA-ocn976408022</controlfield><controlfield tag="003">OCoLC</controlfield><controlfield tag="005">20241004212047.0</controlfield><controlfield tag="006">m o d </controlfield><controlfield tag="007">cr unu||||||||</controlfield><controlfield tag="008">170317s2017 enka o 000 0 eng d</controlfield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">UMI</subfield><subfield code="b">eng</subfield><subfield code="e">rda</subfield><subfield code="e">pn</subfield><subfield code="c">UMI</subfield><subfield code="d">YDX</subfield><subfield code="d">TEFOD</subfield><subfield code="d">OCLCF</subfield><subfield code="d">IDEBK</subfield><subfield code="d">STF</subfield><subfield code="d">TOH</subfield><subfield code="d">COO</subfield><subfield code="d">OCLCQ</subfield><subfield code="d">VT2</subfield><subfield code="d">UOK</subfield><subfield code="d">CEF</subfield><subfield code="d">KSU</subfield><subfield code="d">OCLCQ</subfield><subfield code="d">DEBBG</subfield><subfield code="d">WYU</subfield><subfield code="d">N$T</subfield><subfield code="d">ZCU</subfield><subfield code="d">UAB</subfield><subfield code="d">AU@</subfield><subfield code="d">OCLCO</subfield><subfield code="d">OCLCQ</subfield><subfield code="d">OCLCO</subfield><subfield code="d">OCLCQ</subfield><subfield code="d">DXU</subfield></datafield><datafield tag="019" ind1=" " ind2=" "><subfield code="a">974559930</subfield><subfield code="a">974693705</subfield><subfield code="a">974748271</subfield><subfield code="a">974959653</subfield><subfield code="a">975021883</subfield><subfield code="a">1079834794</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9781786461902</subfield><subfield code="q">(electronic bk.)</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">1786461900</subfield><subfield code="q">(electronic bk.)</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="z">9781786466204</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="z">1786466201</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)976408022</subfield><subfield code="z">(OCoLC)974559930</subfield><subfield code="z">(OCoLC)974693705</subfield><subfield code="z">(OCoLC)974748271</subfield><subfield code="z">(OCoLC)974959653</subfield><subfield code="z">(OCoLC)975021883</subfield><subfield code="z">(OCoLC)1079834794</subfield></datafield><datafield tag="037" ind1=" " ind2=" "><subfield code="a">CL0500000840</subfield><subfield code="b">Safari Books Online</subfield></datafield><datafield tag="037" ind1=" " ind2=" "><subfield code="a">92333FFA-35D0-4C04-BE29-E375B6AEDD49</subfield><subfield code="b">OverDrive, Inc.</subfield><subfield code="n">http://www.overdrive.com</subfield></datafield><datafield tag="050" ind1=" " ind2="4"><subfield code="a">QA76.73.G63</subfield></datafield><datafield tag="072" ind1=" " ind2="7"><subfield code="a">COM</subfield><subfield code="x">051230</subfield><subfield code="2">bisacsh</subfield></datafield><datafield tag="082" ind1="7" ind2=" "><subfield code="a">005.133</subfield><subfield code="2">23</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">MAIN</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Castro Contreras, Mario,</subfield><subfield code="e">author.</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Go design patterns :</subfield><subfield code="b">learn idiomatic, efficient, clean and extensible Go design and concurrency patterns by using TDD /</subfield><subfield code="c">Mario Castro Contreras.</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Birmingham, UK :</subfield><subfield code="b">Packt Publishing,</subfield><subfield code="c">[2017]</subfield></datafield><datafield tag="264" ind1=" " ind2="4"><subfield code="c">©2017</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">1 online resource (1 volume) :</subfield><subfield code="b">illustrations</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="a">text</subfield><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="a">computer</subfield><subfield code="b">c</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="a">online resource</subfield><subfield code="b">cr</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="588" ind1="0" ind2=" "><subfield code="a">Online resource; title from cover (viewed March 17, 2017).</subfield></datafield><datafield tag="505" ind1="0" ind2=" "><subfield code="a">Cover -- Copyright -- Credits -- About the Author -- About the Reviewer -- www.PacktPub.com -- Customer Feedback -- Table of Contents -- Preface -- Chapter 1: Ready... Steady... Go! -- A little bit of history -- Installing Go -- Linux -- Go Linux advanced installation -- Windows -- Mac OS X -- Setting the workspace -- Linux and Apple OS X -- Starting with Hello World -- Integrated Development Environment -- IDE -- Types -- Variables and constants -- Operators -- Flow control -- The if{u2026} else statement -- The switch statement -- The for{u2026}range statement -- Functions -- What does a function look like? -- What is an anonymous function? -- Closures -- Creating errors, handling errors and returning errors. -- Function with undetermined number of parameters -- Naming returned types -- Arrays, slices, and maps -- Arrays -- Zero-initialization -- Slices -- Maps -- Visibility -- Zero-initialization -- Pointers and structures -- What is a pointer? Why are they good? -- Structs -- Interfaces -- Interfaces -- signing a contract -- Testing and TDD -- The testing package -- What is TDD? -- Libraries -- The Go get tool -- Managing JSON data -- The encoding package -- Go tools -- The golint tool -- The gofmt tool -- The godoc tool -- The goimport tool -- Contributing to Go open source projects in GitHub -- Summary -- Chapter 2: Creational Patterns -Singleton, Builder, Factory, Prototype, and Abstract Factory Design Patterns -- Singleton design pattern -- having a unique instance of a type in the entire program -- Description -- Objectives -- Example -- a unique counter -- Requirements and acceptance criteria -- Writing unit tests first -- Implementation -- A few words about the Singleton design pattern -- Builder design pattern -- reusing an algorithm to create many implementations of an interface -- Description -- Objectives -- Example -- vehicle manufacturing.</subfield></datafield><datafield tag="505" ind1="8" ind2=" "><subfield code="a">Requirements and acceptance criteria -- Unit test for the vehicle builder -- Implementation -- Wrapping up the Builder design pattern -- Factory method -- delegating the creation of different types of payments -- Description -- Objectives -- The example -- a factory of payment methods for a shop -- Acceptance criteria -- First unit test -- Implementation -- Upgrading the Debitcard method to a new platform -- What we learned about the Factory method -- Abstract Factory -- a factory of factories -- Description -- The objectives -- The vehicle factory example, again? -- Acceptance criteria -- Unit test -- Implementation -- A few lines about the Abstract Factory method -- Prototype design pattern -- Description -- Objective -- Example -- Acceptance criteria -- Unit test -- Implementation -- What we learned about the Prototype design pattern -- Summary -- Chapter 3: Structural Patterns -- Composite, Adapter, and Bridge Design Patterns -- Composite design pattern -- Description -- Objectives -- The swimmer and the fish -- Requirements and acceptance criteria -- Creating compositions -- Binary Tree compositions -- Composite pattern versus inheritance -- Final words on the Composite pattern -- Adapter design pattern -- Description -- Objectives -- Using an incompatible interface with an Adapter object -- Requirements and acceptance criteria -- Unit testing our Printer adapter -- Implementation -- Examples of the Adapter pattern in Go's source code -- What the Go source code tells us about the Adapter pattern -- Bridge design pattern -- Description -- Objectives -- Two printers and two ways of printing for each -- Requirements and acceptance criteria -- Unit testing the Bridge pattern -- Implementation -- Reuse everything with the Bridge pattern -- Summary -- Chapter 4: Structural Patterns -- Proxy, Facade, Decorator, and Flyweight Design Patterns.</subfield></datafield><datafield tag="505" ind1="8" ind2=" "><subfield code="a">Proxy design pattern -- Description -- Objectives -- Example -- Acceptance criteria -- Unit test -- Implementation -- Proxying around actions -- Decorator design pattern -- Description -- Objectives -- Example -- Acceptance criteria -- Unit test -- Implementation -- A real-life example -- server middleware -- Starting with the common interface, http.Handler -- A few words about Go's structural typing -- Summarizing the Decorator design pattern -- Proxy versus Decorator -- Facade design pattern -- Description -- Objectives -- Example -- Acceptance criteria -- Unit test -- Implementation -- Library created with the Facade pattern -- Flyweight design pattern -- Description -- Objectives -- Example -- Acceptance criteria -- Basic structs and tests -- Implementation -- What's the difference between Singleton and Flyweight then? -- Summary -- Chapter 5: Behavioral Patterns -- Strategy, Chain of Responsibility, and Command Design Patterns -- Strategy design pattern -- Description -- Objectives -- Rendering images or text -- Acceptance criteria -- Implementation -- Solving small issues in our library -- Final words on the Strategy pattern -- Chain of responsibility design pattern -- Description -- Objectives -- A multi-logger chain -- Unit test -- Implementation -- What about a closure? -- Putting it together -- Command design pattern -- Description -- Objectives -- A simple queue -- Acceptance criteria -- Implementation -- More examples -- Chain of responsibility of commands -- Rounding-up the Command pattern up -- Summary -- Chapter 6: Behavioral Patterns -- Template, Memento, and Interpreter Design Patterns -- Template design pattern -- Description -- Objectives -- Example -- a simple algorithm with a deferred step -- Requirements and acceptance criteria -- Unit tests for the simple algorithm -- Implementing the Template pattern -- Anonymous functions.</subfield></datafield><datafield tag="505" ind1="8" ind2=" "><subfield code="a">How to avoid modifications on the interface -- Looking for the Template pattern in Go's source code -- Summarizing the Template design pattern -- Memento design pattern -- Description -- Objectives -- A simple example with strings -- Requirements and acceptance criteria -- Unit test -- Implementing the Memento pattern -- Another example using the Command and Facade patterns -- Last words on the Memento pattern -- Interpreter design pattern -- Description -- Objectives -- Example -- a polish notation calculator -- Acceptance criteria for the calculator -- Unit test of some operations -- Implementation -- Complexity with the Interpreter design pattern -- Interpreter pattern again -- now using interfaces -- The power of the Interpreter pattern -- Summary -- Chapter 7: Behavioral Patterns -- Visitor, State, Mediator, and Observer Design Patterns -- Visitor design pattern -- Description -- Objectives -- A log appender -- Acceptance criteria -- Unit tests -- Implementation of Visitor pattern -- Another example -- Visitors to the rescue! -- State design pattern -- Description -- Objectives -- A small guess the number game -- Acceptance criteria -- Implementation of State pattern -- A state to win and a state to lose -- The game built using the State pattern -- Mediator design pattern -- Description -- Objectives -- A calculator -- Acceptance criteria -- Implementation -- Uncoupling two types with the Mediator -- Observer design pattern -- Description -- Objectives -- The notifier -- Acceptance criteria -- Unit tests -- Implementation -- Summary -- Chapter 8: Introduction to Gos Concurrency -- A little bit of history and theory -- Concurrency versus parallelism -- CSP versus actor-based concurrency -- Goroutines -- Our first Goroutine -- Anonymous functions launched as new Goroutines -- WaitGroups -- Callbacks -- Callback hell -- Mutexes.</subfield></datafield><datafield tag="505" ind1="8" ind2=" "><subfield code="a">An example with mutexes -- concurrent counter -- Presenting the race detector -- Channels -- Our first channel -- Buffered channels -- Directional channels -- The select statement -- Ranging over channels too! -- Using it all -- concurrent singleton -- Unit test -- Implementation -- Summary -- Chapter 9: Concurrency Patterns -- Barrier, Future, and Pipeline Design Patterns -- Barrier concurrency pattern -- Description -- Objectives -- An HTTP GET aggregator -- Acceptance criteria -- Unit test -- integration -- Implementation -- Waiting for responses with the Barrier design pattern -- Future design pattern -- Description -- Objectives -- A simple asynchronous requester -- Acceptance criteria -- Unit tests -- Implementation -- Putting the Future together -- Pipeline design pattern -- Description -- Objectives -- A concurrent multi-operation -- Acceptance criteria -- Beginning with tests -- Implementation -- The list generator -- Raising numbers to the power of 2 -- Final reduce operation -- Launching the Pipeline pattern -- Final words on the Pipeline pattern -- Summary -- Chapter 10: Concurrency Patterns -- Workers Pool and Publish/Subscriber Design Patterns -- Workers pool -- Description -- Objectives -- A pool of pipelines -- Acceptance criteria -- Implementation -- The dispatcher -- The pipeline -- An app using the workers pool -- No tests? -- Wrapping up the Worker pool -- Concurrent Publish/Subscriber design pattern -- Description -- Objectives -- Example -- a concurrent notifier -- Acceptance criteria -- Unit test -- Testing subscriber -- Testing publisher -- Implementation -- Implementing the publisher -- Handling channels without race conditions -- A few words on the concurrent Observer pattern -- Summary -- Index.</subfield></datafield><datafield tag="520" ind1=" " ind2=" "><subfield code="a">Learn idiomatic, efficient, clean, and extensible Go design and concurrency patterns by using TDD About This Book A highly practical guide filled with numerous examples unleashing the power of design patterns with Go. Discover an introduction of the CSP concurrency model by explaining GoRoutines and channels. Get a full explanation, including comprehensive text and examples, of all known GoF design patterns in Go. Who This Book Is For The target audience is both beginner- and advanced-level developers in the Go programming language. No knowledge of design patterns is expected. What You Will Learn All basic syntax and tools needed to start coding in Go Encapsulate the creation of complex objects in an idiomatic way in Go Create unique instances that cannot be duplicated within a program Understand the importance of object encapsulation to provide clarity and maintainability Prepare cost-effective actions so that different parts of the program aren't affected by expensive tasks Deal with channels and GoRoutines within the Go context to build concurrent application in Go in an idiomatic way In Detail Go is a multi-paradigm programming language that has built-in facilities to create concurrent applications. Design patterns allow developers to efficiently address common problems faced during developing applications. Go Design Patterns will provide readers with a reference point to software design patterns and CSP concurrency design patterns to help them build applications in a more idiomatic, robust, and convenient way in Go. The book starts with a brief introduction to Go programming essentials and quickly moves on to explain the idea behind the creation of design patterns and how they appeared in the 90's as a common "language" between developers to solve common tasks in object-oriented programming languages. You will then learn how to apply the 23 Gang of Four (GoF) design patterns in Go and also learn about CSP concurrency patterns, the "killer feature" in Go that has helped Google develop software to maintain thousands of servers. With all of this the book will enable you to understand and apply design patterns in an idiomatic way that will produce concise, readable, and maintainable software. Style and approach This book will teach widely used design patterns and best practices with Go in a step-by-step manner. The code will have detailed examples, to allow programmers to apply design patterns in their day-to-day coding.</subfield></datafield><datafield tag="650" ind1=" " ind2="0"><subfield code="a">Go (Computer program language)</subfield><subfield code="0">http://id.loc.gov/authorities/subjects/sh2012000746</subfield></datafield><datafield tag="650" ind1=" " ind2="0"><subfield code="a">Computer software</subfield><subfield code="x">Development.</subfield><subfield code="0">http://id.loc.gov/authorities/subjects/sh85029535</subfield></datafield><datafield tag="650" ind1=" " ind2="6"><subfield code="a">Go (Langage de programmation)</subfield></datafield><datafield tag="650" ind1=" " ind2="7"><subfield code="a">COMPUTERS / Software Development & Engineering / General.</subfield><subfield code="2">bisacsh</subfield></datafield><datafield tag="650" ind1=" " ind2="7"><subfield code="a">Computer software</subfield><subfield code="x">Development</subfield><subfield code="2">fast</subfield></datafield><datafield tag="650" ind1=" " ind2="7"><subfield code="a">Go (Computer program language)</subfield><subfield code="2">fast</subfield></datafield><datafield tag="655" ind1=" " ind2="7"><subfield code="a">Handbooks and manuals</subfield><subfield code="2">fast</subfield></datafield><datafield tag="776" ind1="0" ind2="8"><subfield code="i">Print version:</subfield><subfield code="a">Contreras, Mario Castro.</subfield><subfield code="t">Go Design Patterns.</subfield><subfield code="d">Birmingham : Packt Publishing, ©2017</subfield></datafield><datafield tag="856" ind1="4" ind2="0"><subfield code="l">FWS01</subfield><subfield code="p">ZDB-4-EBA</subfield><subfield code="q">FWS_PDA_EBA</subfield><subfield code="u">https://search.ebscohost.com/login.aspx?direct=true&scope=site&db=nlebk&AN=1477566</subfield><subfield code="3">Volltext</subfield></datafield><datafield tag="938" ind1=" " ind2=" "><subfield code="a">ProQuest MyiLibrary Digital eBook Collection</subfield><subfield code="b">IDEB</subfield><subfield code="n">cis35309948</subfield></datafield><datafield tag="938" ind1=" " ind2=" "><subfield code="a">YBP Library Services</subfield><subfield code="b">YANK</subfield><subfield code="n">13522892</subfield></datafield><datafield tag="938" ind1=" " ind2=" "><subfield code="a">EBSCOhost</subfield><subfield code="b">EBSC</subfield><subfield code="n">1477566</subfield></datafield><datafield tag="994" ind1=" " ind2=" "><subfield code="a">92</subfield><subfield code="b">GEBAY</subfield></datafield><datafield tag="912" ind1=" " ind2=" "><subfield code="a">ZDB-4-EBA</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-863</subfield></datafield></record></collection> |
genre | Handbooks and manuals fast |
genre_facet | Handbooks and manuals |
id | ZDB-4-EBA-ocn976408022 |
illustrated | Illustrated |
indexdate | 2024-11-27T13:27:44Z |
institution | BVB |
isbn | 9781786461902 1786461900 |
language | English |
oclc_num | 976408022 |
open_access_boolean | |
owner | MAIN DE-863 DE-BY-FWS |
owner_facet | MAIN DE-863 DE-BY-FWS |
physical | 1 online resource (1 volume) : illustrations |
psigel | ZDB-4-EBA |
publishDate | 2017 |
publishDateSearch | 2017 |
publishDateSort | 2017 |
publisher | Packt Publishing, |
record_format | marc |
spelling | Castro Contreras, Mario, author. Go design patterns : learn idiomatic, efficient, clean and extensible Go design and concurrency patterns by using TDD / Mario Castro Contreras. Birmingham, UK : Packt Publishing, [2017] ©2017 1 online resource (1 volume) : illustrations text txt rdacontent computer c rdamedia online resource cr rdacarrier Online resource; title from cover (viewed March 17, 2017). Cover -- Copyright -- Credits -- About the Author -- About the Reviewer -- www.PacktPub.com -- Customer Feedback -- Table of Contents -- Preface -- Chapter 1: Ready... Steady... Go! -- A little bit of history -- Installing Go -- Linux -- Go Linux advanced installation -- Windows -- Mac OS X -- Setting the workspace -- Linux and Apple OS X -- Starting with Hello World -- Integrated Development Environment -- IDE -- Types -- Variables and constants -- Operators -- Flow control -- The if{u2026} else statement -- The switch statement -- The for{u2026}range statement -- Functions -- What does a function look like? -- What is an anonymous function? -- Closures -- Creating errors, handling errors and returning errors. -- Function with undetermined number of parameters -- Naming returned types -- Arrays, slices, and maps -- Arrays -- Zero-initialization -- Slices -- Maps -- Visibility -- Zero-initialization -- Pointers and structures -- What is a pointer? Why are they good? -- Structs -- Interfaces -- Interfaces -- signing a contract -- Testing and TDD -- The testing package -- What is TDD? -- Libraries -- The Go get tool -- Managing JSON data -- The encoding package -- Go tools -- The golint tool -- The gofmt tool -- The godoc tool -- The goimport tool -- Contributing to Go open source projects in GitHub -- Summary -- Chapter 2: Creational Patterns -Singleton, Builder, Factory, Prototype, and Abstract Factory Design Patterns -- Singleton design pattern -- having a unique instance of a type in the entire program -- Description -- Objectives -- Example -- a unique counter -- Requirements and acceptance criteria -- Writing unit tests first -- Implementation -- A few words about the Singleton design pattern -- Builder design pattern -- reusing an algorithm to create many implementations of an interface -- Description -- Objectives -- Example -- vehicle manufacturing. Requirements and acceptance criteria -- Unit test for the vehicle builder -- Implementation -- Wrapping up the Builder design pattern -- Factory method -- delegating the creation of different types of payments -- Description -- Objectives -- The example -- a factory of payment methods for a shop -- Acceptance criteria -- First unit test -- Implementation -- Upgrading the Debitcard method to a new platform -- What we learned about the Factory method -- Abstract Factory -- a factory of factories -- Description -- The objectives -- The vehicle factory example, again? -- Acceptance criteria -- Unit test -- Implementation -- A few lines about the Abstract Factory method -- Prototype design pattern -- Description -- Objective -- Example -- Acceptance criteria -- Unit test -- Implementation -- What we learned about the Prototype design pattern -- Summary -- Chapter 3: Structural Patterns -- Composite, Adapter, and Bridge Design Patterns -- Composite design pattern -- Description -- Objectives -- The swimmer and the fish -- Requirements and acceptance criteria -- Creating compositions -- Binary Tree compositions -- Composite pattern versus inheritance -- Final words on the Composite pattern -- Adapter design pattern -- Description -- Objectives -- Using an incompatible interface with an Adapter object -- Requirements and acceptance criteria -- Unit testing our Printer adapter -- Implementation -- Examples of the Adapter pattern in Go's source code -- What the Go source code tells us about the Adapter pattern -- Bridge design pattern -- Description -- Objectives -- Two printers and two ways of printing for each -- Requirements and acceptance criteria -- Unit testing the Bridge pattern -- Implementation -- Reuse everything with the Bridge pattern -- Summary -- Chapter 4: Structural Patterns -- Proxy, Facade, Decorator, and Flyweight Design Patterns. Proxy design pattern -- Description -- Objectives -- Example -- Acceptance criteria -- Unit test -- Implementation -- Proxying around actions -- Decorator design pattern -- Description -- Objectives -- Example -- Acceptance criteria -- Unit test -- Implementation -- A real-life example -- server middleware -- Starting with the common interface, http.Handler -- A few words about Go's structural typing -- Summarizing the Decorator design pattern -- Proxy versus Decorator -- Facade design pattern -- Description -- Objectives -- Example -- Acceptance criteria -- Unit test -- Implementation -- Library created with the Facade pattern -- Flyweight design pattern -- Description -- Objectives -- Example -- Acceptance criteria -- Basic structs and tests -- Implementation -- What's the difference between Singleton and Flyweight then? -- Summary -- Chapter 5: Behavioral Patterns -- Strategy, Chain of Responsibility, and Command Design Patterns -- Strategy design pattern -- Description -- Objectives -- Rendering images or text -- Acceptance criteria -- Implementation -- Solving small issues in our library -- Final words on the Strategy pattern -- Chain of responsibility design pattern -- Description -- Objectives -- A multi-logger chain -- Unit test -- Implementation -- What about a closure? -- Putting it together -- Command design pattern -- Description -- Objectives -- A simple queue -- Acceptance criteria -- Implementation -- More examples -- Chain of responsibility of commands -- Rounding-up the Command pattern up -- Summary -- Chapter 6: Behavioral Patterns -- Template, Memento, and Interpreter Design Patterns -- Template design pattern -- Description -- Objectives -- Example -- a simple algorithm with a deferred step -- Requirements and acceptance criteria -- Unit tests for the simple algorithm -- Implementing the Template pattern -- Anonymous functions. How to avoid modifications on the interface -- Looking for the Template pattern in Go's source code -- Summarizing the Template design pattern -- Memento design pattern -- Description -- Objectives -- A simple example with strings -- Requirements and acceptance criteria -- Unit test -- Implementing the Memento pattern -- Another example using the Command and Facade patterns -- Last words on the Memento pattern -- Interpreter design pattern -- Description -- Objectives -- Example -- a polish notation calculator -- Acceptance criteria for the calculator -- Unit test of some operations -- Implementation -- Complexity with the Interpreter design pattern -- Interpreter pattern again -- now using interfaces -- The power of the Interpreter pattern -- Summary -- Chapter 7: Behavioral Patterns -- Visitor, State, Mediator, and Observer Design Patterns -- Visitor design pattern -- Description -- Objectives -- A log appender -- Acceptance criteria -- Unit tests -- Implementation of Visitor pattern -- Another example -- Visitors to the rescue! -- State design pattern -- Description -- Objectives -- A small guess the number game -- Acceptance criteria -- Implementation of State pattern -- A state to win and a state to lose -- The game built using the State pattern -- Mediator design pattern -- Description -- Objectives -- A calculator -- Acceptance criteria -- Implementation -- Uncoupling two types with the Mediator -- Observer design pattern -- Description -- Objectives -- The notifier -- Acceptance criteria -- Unit tests -- Implementation -- Summary -- Chapter 8: Introduction to Gos Concurrency -- A little bit of history and theory -- Concurrency versus parallelism -- CSP versus actor-based concurrency -- Goroutines -- Our first Goroutine -- Anonymous functions launched as new Goroutines -- WaitGroups -- Callbacks -- Callback hell -- Mutexes. An example with mutexes -- concurrent counter -- Presenting the race detector -- Channels -- Our first channel -- Buffered channels -- Directional channels -- The select statement -- Ranging over channels too! -- Using it all -- concurrent singleton -- Unit test -- Implementation -- Summary -- Chapter 9: Concurrency Patterns -- Barrier, Future, and Pipeline Design Patterns -- Barrier concurrency pattern -- Description -- Objectives -- An HTTP GET aggregator -- Acceptance criteria -- Unit test -- integration -- Implementation -- Waiting for responses with the Barrier design pattern -- Future design pattern -- Description -- Objectives -- A simple asynchronous requester -- Acceptance criteria -- Unit tests -- Implementation -- Putting the Future together -- Pipeline design pattern -- Description -- Objectives -- A concurrent multi-operation -- Acceptance criteria -- Beginning with tests -- Implementation -- The list generator -- Raising numbers to the power of 2 -- Final reduce operation -- Launching the Pipeline pattern -- Final words on the Pipeline pattern -- Summary -- Chapter 10: Concurrency Patterns -- Workers Pool and Publish/Subscriber Design Patterns -- Workers pool -- Description -- Objectives -- A pool of pipelines -- Acceptance criteria -- Implementation -- The dispatcher -- The pipeline -- An app using the workers pool -- No tests? -- Wrapping up the Worker pool -- Concurrent Publish/Subscriber design pattern -- Description -- Objectives -- Example -- a concurrent notifier -- Acceptance criteria -- Unit test -- Testing subscriber -- Testing publisher -- Implementation -- Implementing the publisher -- Handling channels without race conditions -- A few words on the concurrent Observer pattern -- Summary -- Index. Learn idiomatic, efficient, clean, and extensible Go design and concurrency patterns by using TDD About This Book A highly practical guide filled with numerous examples unleashing the power of design patterns with Go. Discover an introduction of the CSP concurrency model by explaining GoRoutines and channels. Get a full explanation, including comprehensive text and examples, of all known GoF design patterns in Go. Who This Book Is For The target audience is both beginner- and advanced-level developers in the Go programming language. No knowledge of design patterns is expected. What You Will Learn All basic syntax and tools needed to start coding in Go Encapsulate the creation of complex objects in an idiomatic way in Go Create unique instances that cannot be duplicated within a program Understand the importance of object encapsulation to provide clarity and maintainability Prepare cost-effective actions so that different parts of the program aren't affected by expensive tasks Deal with channels and GoRoutines within the Go context to build concurrent application in Go in an idiomatic way In Detail Go is a multi-paradigm programming language that has built-in facilities to create concurrent applications. Design patterns allow developers to efficiently address common problems faced during developing applications. Go Design Patterns will provide readers with a reference point to software design patterns and CSP concurrency design patterns to help them build applications in a more idiomatic, robust, and convenient way in Go. The book starts with a brief introduction to Go programming essentials and quickly moves on to explain the idea behind the creation of design patterns and how they appeared in the 90's as a common "language" between developers to solve common tasks in object-oriented programming languages. You will then learn how to apply the 23 Gang of Four (GoF) design patterns in Go and also learn about CSP concurrency patterns, the "killer feature" in Go that has helped Google develop software to maintain thousands of servers. With all of this the book will enable you to understand and apply design patterns in an idiomatic way that will produce concise, readable, and maintainable software. Style and approach This book will teach widely used design patterns and best practices with Go in a step-by-step manner. The code will have detailed examples, to allow programmers to apply design patterns in their day-to-day coding. Go (Computer program language) http://id.loc.gov/authorities/subjects/sh2012000746 Computer software Development. http://id.loc.gov/authorities/subjects/sh85029535 Go (Langage de programmation) COMPUTERS / Software Development & Engineering / General. bisacsh Computer software Development fast Go (Computer program language) fast Handbooks and manuals fast Print version: Contreras, Mario Castro. Go Design Patterns. Birmingham : Packt Publishing, ©2017 FWS01 ZDB-4-EBA FWS_PDA_EBA https://search.ebscohost.com/login.aspx?direct=true&scope=site&db=nlebk&AN=1477566 Volltext |
spellingShingle | Castro Contreras, Mario Go design patterns : learn idiomatic, efficient, clean and extensible Go design and concurrency patterns by using TDD / Cover -- Copyright -- Credits -- About the Author -- About the Reviewer -- www.PacktPub.com -- Customer Feedback -- Table of Contents -- Preface -- Chapter 1: Ready... Steady... Go! -- A little bit of history -- Installing Go -- Linux -- Go Linux advanced installation -- Windows -- Mac OS X -- Setting the workspace -- Linux and Apple OS X -- Starting with Hello World -- Integrated Development Environment -- IDE -- Types -- Variables and constants -- Operators -- Flow control -- The if{u2026} else statement -- The switch statement -- The for{u2026}range statement -- Functions -- What does a function look like? -- What is an anonymous function? -- Closures -- Creating errors, handling errors and returning errors. -- Function with undetermined number of parameters -- Naming returned types -- Arrays, slices, and maps -- Arrays -- Zero-initialization -- Slices -- Maps -- Visibility -- Zero-initialization -- Pointers and structures -- What is a pointer? Why are they good? -- Structs -- Interfaces -- Interfaces -- signing a contract -- Testing and TDD -- The testing package -- What is TDD? -- Libraries -- The Go get tool -- Managing JSON data -- The encoding package -- Go tools -- The golint tool -- The gofmt tool -- The godoc tool -- The goimport tool -- Contributing to Go open source projects in GitHub -- Summary -- Chapter 2: Creational Patterns -Singleton, Builder, Factory, Prototype, and Abstract Factory Design Patterns -- Singleton design pattern -- having a unique instance of a type in the entire program -- Description -- Objectives -- Example -- a unique counter -- Requirements and acceptance criteria -- Writing unit tests first -- Implementation -- A few words about the Singleton design pattern -- Builder design pattern -- reusing an algorithm to create many implementations of an interface -- Description -- Objectives -- Example -- vehicle manufacturing. Requirements and acceptance criteria -- Unit test for the vehicle builder -- Implementation -- Wrapping up the Builder design pattern -- Factory method -- delegating the creation of different types of payments -- Description -- Objectives -- The example -- a factory of payment methods for a shop -- Acceptance criteria -- First unit test -- Implementation -- Upgrading the Debitcard method to a new platform -- What we learned about the Factory method -- Abstract Factory -- a factory of factories -- Description -- The objectives -- The vehicle factory example, again? -- Acceptance criteria -- Unit test -- Implementation -- A few lines about the Abstract Factory method -- Prototype design pattern -- Description -- Objective -- Example -- Acceptance criteria -- Unit test -- Implementation -- What we learned about the Prototype design pattern -- Summary -- Chapter 3: Structural Patterns -- Composite, Adapter, and Bridge Design Patterns -- Composite design pattern -- Description -- Objectives -- The swimmer and the fish -- Requirements and acceptance criteria -- Creating compositions -- Binary Tree compositions -- Composite pattern versus inheritance -- Final words on the Composite pattern -- Adapter design pattern -- Description -- Objectives -- Using an incompatible interface with an Adapter object -- Requirements and acceptance criteria -- Unit testing our Printer adapter -- Implementation -- Examples of the Adapter pattern in Go's source code -- What the Go source code tells us about the Adapter pattern -- Bridge design pattern -- Description -- Objectives -- Two printers and two ways of printing for each -- Requirements and acceptance criteria -- Unit testing the Bridge pattern -- Implementation -- Reuse everything with the Bridge pattern -- Summary -- Chapter 4: Structural Patterns -- Proxy, Facade, Decorator, and Flyweight Design Patterns. Proxy design pattern -- Description -- Objectives -- Example -- Acceptance criteria -- Unit test -- Implementation -- Proxying around actions -- Decorator design pattern -- Description -- Objectives -- Example -- Acceptance criteria -- Unit test -- Implementation -- A real-life example -- server middleware -- Starting with the common interface, http.Handler -- A few words about Go's structural typing -- Summarizing the Decorator design pattern -- Proxy versus Decorator -- Facade design pattern -- Description -- Objectives -- Example -- Acceptance criteria -- Unit test -- Implementation -- Library created with the Facade pattern -- Flyweight design pattern -- Description -- Objectives -- Example -- Acceptance criteria -- Basic structs and tests -- Implementation -- What's the difference between Singleton and Flyweight then? -- Summary -- Chapter 5: Behavioral Patterns -- Strategy, Chain of Responsibility, and Command Design Patterns -- Strategy design pattern -- Description -- Objectives -- Rendering images or text -- Acceptance criteria -- Implementation -- Solving small issues in our library -- Final words on the Strategy pattern -- Chain of responsibility design pattern -- Description -- Objectives -- A multi-logger chain -- Unit test -- Implementation -- What about a closure? -- Putting it together -- Command design pattern -- Description -- Objectives -- A simple queue -- Acceptance criteria -- Implementation -- More examples -- Chain of responsibility of commands -- Rounding-up the Command pattern up -- Summary -- Chapter 6: Behavioral Patterns -- Template, Memento, and Interpreter Design Patterns -- Template design pattern -- Description -- Objectives -- Example -- a simple algorithm with a deferred step -- Requirements and acceptance criteria -- Unit tests for the simple algorithm -- Implementing the Template pattern -- Anonymous functions. How to avoid modifications on the interface -- Looking for the Template pattern in Go's source code -- Summarizing the Template design pattern -- Memento design pattern -- Description -- Objectives -- A simple example with strings -- Requirements and acceptance criteria -- Unit test -- Implementing the Memento pattern -- Another example using the Command and Facade patterns -- Last words on the Memento pattern -- Interpreter design pattern -- Description -- Objectives -- Example -- a polish notation calculator -- Acceptance criteria for the calculator -- Unit test of some operations -- Implementation -- Complexity with the Interpreter design pattern -- Interpreter pattern again -- now using interfaces -- The power of the Interpreter pattern -- Summary -- Chapter 7: Behavioral Patterns -- Visitor, State, Mediator, and Observer Design Patterns -- Visitor design pattern -- Description -- Objectives -- A log appender -- Acceptance criteria -- Unit tests -- Implementation of Visitor pattern -- Another example -- Visitors to the rescue! -- State design pattern -- Description -- Objectives -- A small guess the number game -- Acceptance criteria -- Implementation of State pattern -- A state to win and a state to lose -- The game built using the State pattern -- Mediator design pattern -- Description -- Objectives -- A calculator -- Acceptance criteria -- Implementation -- Uncoupling two types with the Mediator -- Observer design pattern -- Description -- Objectives -- The notifier -- Acceptance criteria -- Unit tests -- Implementation -- Summary -- Chapter 8: Introduction to Gos Concurrency -- A little bit of history and theory -- Concurrency versus parallelism -- CSP versus actor-based concurrency -- Goroutines -- Our first Goroutine -- Anonymous functions launched as new Goroutines -- WaitGroups -- Callbacks -- Callback hell -- Mutexes. An example with mutexes -- concurrent counter -- Presenting the race detector -- Channels -- Our first channel -- Buffered channels -- Directional channels -- The select statement -- Ranging over channels too! -- Using it all -- concurrent singleton -- Unit test -- Implementation -- Summary -- Chapter 9: Concurrency Patterns -- Barrier, Future, and Pipeline Design Patterns -- Barrier concurrency pattern -- Description -- Objectives -- An HTTP GET aggregator -- Acceptance criteria -- Unit test -- integration -- Implementation -- Waiting for responses with the Barrier design pattern -- Future design pattern -- Description -- Objectives -- A simple asynchronous requester -- Acceptance criteria -- Unit tests -- Implementation -- Putting the Future together -- Pipeline design pattern -- Description -- Objectives -- A concurrent multi-operation -- Acceptance criteria -- Beginning with tests -- Implementation -- The list generator -- Raising numbers to the power of 2 -- Final reduce operation -- Launching the Pipeline pattern -- Final words on the Pipeline pattern -- Summary -- Chapter 10: Concurrency Patterns -- Workers Pool and Publish/Subscriber Design Patterns -- Workers pool -- Description -- Objectives -- A pool of pipelines -- Acceptance criteria -- Implementation -- The dispatcher -- The pipeline -- An app using the workers pool -- No tests? -- Wrapping up the Worker pool -- Concurrent Publish/Subscriber design pattern -- Description -- Objectives -- Example -- a concurrent notifier -- Acceptance criteria -- Unit test -- Testing subscriber -- Testing publisher -- Implementation -- Implementing the publisher -- Handling channels without race conditions -- A few words on the concurrent Observer pattern -- Summary -- Index. Go (Computer program language) http://id.loc.gov/authorities/subjects/sh2012000746 Computer software Development. http://id.loc.gov/authorities/subjects/sh85029535 Go (Langage de programmation) COMPUTERS / Software Development & Engineering / General. bisacsh Computer software Development fast Go (Computer program language) fast |
subject_GND | http://id.loc.gov/authorities/subjects/sh2012000746 http://id.loc.gov/authorities/subjects/sh85029535 |
title | Go design patterns : learn idiomatic, efficient, clean and extensible Go design and concurrency patterns by using TDD / |
title_auth | Go design patterns : learn idiomatic, efficient, clean and extensible Go design and concurrency patterns by using TDD / |
title_exact_search | Go design patterns : learn idiomatic, efficient, clean and extensible Go design and concurrency patterns by using TDD / |
title_full | Go design patterns : learn idiomatic, efficient, clean and extensible Go design and concurrency patterns by using TDD / Mario Castro Contreras. |
title_fullStr | Go design patterns : learn idiomatic, efficient, clean and extensible Go design and concurrency patterns by using TDD / Mario Castro Contreras. |
title_full_unstemmed | Go design patterns : learn idiomatic, efficient, clean and extensible Go design and concurrency patterns by using TDD / Mario Castro Contreras. |
title_short | Go design patterns : |
title_sort | go design patterns learn idiomatic efficient clean and extensible go design and concurrency patterns by using tdd |
title_sub | learn idiomatic, efficient, clean and extensible Go design and concurrency patterns by using TDD / |
topic | Go (Computer program language) http://id.loc.gov/authorities/subjects/sh2012000746 Computer software Development. http://id.loc.gov/authorities/subjects/sh85029535 Go (Langage de programmation) COMPUTERS / Software Development & Engineering / General. bisacsh Computer software Development fast Go (Computer program language) fast |
topic_facet | Go (Computer program language) Computer software Development. Go (Langage de programmation) COMPUTERS / Software Development & Engineering / General. Computer software Development Handbooks and manuals |
url | https://search.ebscohost.com/login.aspx?direct=true&scope=site&db=nlebk&AN=1477566 |
work_keys_str_mv | AT castrocontrerasmario godesignpatternslearnidiomaticefficientcleanandextensiblegodesignandconcurrencypatternsbyusingtdd |