designpatterns   7919

« earlier    

Airport Baggage Claims, Selective Consumers, and RabbitMQ Anti-Patterns - DerickBailey.com
On designs based on conditionally reject a message after having received it, by abusing NACK. Of course, RabbitMQ routing should be used to ensure this never happens.
RabbitMQ  messageBrokering  designPatterns  antiPatterns  blogEntries 
17 days ago by MaxBarraclough
Functional options for friendly APIs | Dave Cheney
The key difference from the previous example, and in fact all the examples so far, is customisation of the Server is performed not with configuration parameters stored in a structure, but with functions which operate on the Server value itself. As before, the variadic nature of the function’s signature gives us the compact behaviour for the default case. When configuration is required, I pass to NewServer functions which operate on the Server value as an argument. The timeout function simply changes the timeout field of any *Server value passed to it. The tls function is a little more complicated. It takes a *Server value and wraps the original listener value inside a tls.Listener, thereby transforming it into a secure listener.
api  golang  programming  options  configuration  designpatterns 
18 days ago by dlkinney
Self-referential functions and the design of options
I've been trying on and off to find a nice way to deal with setting options in a Go package I am writing. Options on a type, that is. The package is intricate and there will probably end up being dozens of options. There are many ways to do this kind of thing, but I wanted one that felt nice to use, didn't require too much API (or at least not too much for the user to absorb), and could grow as needed without bloat. I've tried most of the obvious ways: option structs, lots of methods, variant constructors, and more, and found them all unsatisfactory. After a bunch of trial versions over the past year or so, and a lot of conversations with other Gophers making suggestions, I've finally found one I like. You might like it too. Or you might not, but either way it does show an interesting use of self-referential functions.
api  golang  programming  options  configuration  designpatterns 
18 days ago by dlkinney

« earlier    

related tags

2018  a11y  accessibility  algorithms  antipatterns  api  architecture  assets  aws  bestpractices  blogentries  book  books  business  by:addyosmani  by:jeremykeith  by:robinrendle  c++  caching  cheatsheet  civicdesign  cloud  codearchitecture  codepen  codesmell  collectionsonline  components  composition  configuration  course  craftsmanship  creational  crystal-lang  css  dart  demo  design-patterns  design  designprinciples  designsystem  designsystems  designthinking  desingpattern  development  devops  discussion  doc  documentation  education  error  example  examples  exceptions  factory  finite-state-machine  fsm  functional  gallery  gamesdev  github  glam  gof  golang  gophercon  guide  inspiration  interface  ios  java  javascript  js  jvm  lambda  learning  library  list  messagebrokering  microservices  modal  modularcontent  mvc  nil  nullobject  nypl  onlinecollections  oop  options  overview  pattern  patternlibrary  patterns  php  presentation  process  programming  progressiveenhancement  python  rabbitmq  react  reactive  reactiveprogramming  reactjs  refactoring  reference  research  resource  resources  ruby  rubyonrails  rules  sandbox  scala  scratch  serverless  simplified  slides  software  softwareengineering  solid  speaking  specification-pattern  stackoverflow  stampit  styleguide  swift  swiftlang  tdd  teamwork  testing  thinking  tips  tool  tools  tutorials  ui  ux  validation  videos  vue  vuejs  webdesign  webdev  webdevelopment 

Copy this bookmark:



description:


tags: