What is the formal specification of event sourcing (ES)? - domain-driven-design

There are a lot of resources out there that address a couple aspects of ES, but most of them are pros/cons list or example snippets. Terms, such as projection, apply, replay are also used (mostly) without explanations or in slightly different contexts.
The best sample implementation with corresponding documentation and extra resources is the CQRS Journey from Microsoft, and one can learn from it a lot, but it is not authoritative.
The closest to an informal spec I could find is Leif Battermann's concise summary, but his entire site has been down for a couple weeks now.
It may be that such comprehensive guideline does not exist, because it is a concept that became popular, people picked it up, started using it as they saw fit and no one will ever agree on the details anymore.
UPDATE (2/16/2018 11:03)
I missed Greg Young's (who coined the term CQRS) Event Centric: Finding Simplicity in Complex Systems book somehow. Would this be a publication to ES as Eric Evans' book is to Domain-Driven Design?

The closest thing to what you are looking for is probably Martin Fowler's 2005 essay; Martin's description predates Young's introduction of DDDD/CQRS by a few years.
Would this be a publication to ES as Eric Evans' book is to Domain-Driven Design?
No; among other things, Evans actually wrote the blue book. Event Centric has not been written (as of October 2017).

Related

New Design Patterns

is there any new design patterns available other than the patterns covered by GoF book and Head First Design Patterns? Have any one of you used your own design patterns in your projects? Please let me know. if possible give some UML Diagrams. Thanks in advance.
Have you come across the concept of Anti-Patterns yet? I came across these in the book "AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis" - which I feel is a great read (note: this is a personal recommendation). This book reviews commonly identified mistakes in software projects and then attempts to provide a resolution, quite often using a GoF pattern. Interestingly many of the anti-patterns seem to originate in a design pattern being incorrectly applied.
Some of the very best books in my never-ending quest to learn patterns:
Gang of Four
Patterns of Enterprise Application Architecture
Pattern-Oriented Software Architecture I
Pattern-Oriented Software Architecture II
Pattern Languages of Program Design 1-5
AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis
The Pattern Almanac
The "sequel" to the GoF book is Pattern Hatching by John Vlissides. It does not publish really new patterns, but variations of some included in the original GoF book. Its great value is rather in that it shows the thought and design process involved in applying the patterns.
Although this is not an answer to your question in the strict sense, there are also lots of other kinds of patterns relevant to our field:
Analysis
Architectural
Reengineering
I'm quite sure there were Design Patterns before GoF was written that ended up not covered in GoF. And there have been many created since.
It was from the start just a catalog of some of the most common patterns, and was never exhaustive, nor did it claim to be.

How should I start DDD?

What is the best way to start Domain Driven Design?
What are the recommended resources?
EDIT:
I mean, I'd like to know how to start learning DDD (the same way as to start TDD by reading K. Beck).
There's a really big book available on domain driven design, which was brilliantly abridged and made available as a free download here:
http://www.infoq.com/minibooks/domain-driven-design-quickly
To start "doing" domain driven design, you just need to follow the points in this book. Share a language with the business, create objects that represent something that the business would recognise and so on.
It is more difficult to get in full swing on large existing applications (but not impossible) but if you are writing something new, that's a great opportunity to go at it 100%.
The definitive book on DDD is Domain-Driven Design: Tackling Complexity in the Heart of Software
However its a book that takes some gestation that is best backed up with practice and observing how experienced DDD'ers think.
The site http://domaindrivendesign.org/ has some excellent resources including example projects. I also find it useful to trawl the various open source code repositories such as GitHub, Codeplex and SourceForge for projects that use DDD
Good luck on your DDD journey, its a long road without a turn!
My personal advice is to forget the "DDD Quickly" book and go straight to the "Domain-Driven Design: Tackling Complexity in the Heart of Software" book from Eric Evans. I'd also suggest not to read the book in the original order, but to read the intro and then move to the Strategic Design section, and only then go back to the first part of the book. You'll discover that there's more to DDD than a collection of patterns.
However, after the book has been published there's been some evolution in the DDD community (have a look to this video as a refresher). A new pattern Domain Event has been published, and many alternative supporting architectures have been discussed: CQRS and Event Sourcing above all.

Why isn't IDEF popular while UML is?

I've found out about IDEF just yesterday and wondered immediately why it's not more popular than UML. Judging from documents, IDEF is at least as suitable for software modeling as UML is, but is mature and stable for about 30 years now, as opposed to UML.
Is this one more case of "popular vs. powerful" like all the discussions about "$language vs. Lisp"?
UML is promoted by IBM who bought Rational Rose the Founders Company
UML is specifically an object-oriented modelling approach, whereas IDEF is more of a an all round modelling approach which supports both business-driven and data-driven approaches. The two can be complimentary. See blog post - http://enablealignment.blogspot.com/2010/01/modelling-its-all-about-communication.html
Why isn't lisp popular? It's more technologically advanced than any language? Really, IDEF isn't popular because it isn't. COBOL was popular because it was. It was good about as much as lisp was bad. Or IDEF.
Popularity is a social circumstance. As a programmer, I thus suppose I have no authority whatsoever to judge what should be popular.
Tool support or rather lack thereof.
What does an architect today do as the first thing when he wants to create an architecture? He selects a tool.
UML published by OMG with all tool vendors on their side. IDEF0 published by NIST with... well, none on their side.
I really like DEFO0. Cant find a tool that properly support it though. I will use UML.
Marketing, meaning money invested.
None of these answers quite hit the mark. IDEF was initially funded by – and created for – the military (mostly USAF), and that is where almost all of its use is.
Furthermore, while the military is one huge customer, it is but one, whereas UML is widely accepted everywhere else. When people hear about IDEF and how it's largely a "military thing" vs UML, which is more of a common overall standard, they naturally gravitate to UML, regardless of which one actually better suits their needs.

How to introduce Domain Driven Design to co-programmers?

Tomorrow i need to show small presentation about DDD approach.
It should contain 2 main points:
"What is Domain Driven Design?"
"How can we use it?"
I would be glad if i could see some ideas how to 'implement' first point of my 'presentation interface'.
Asking because I'm not making presentations everyday and i`m little bit confused.
Somewhat hard to understand whether your problem is a lack of DDD knowledge, or just how to present it.
"What is Domain Driven Design" - grab a good overview from http://www.infoq.com/minibooks/domain-driven-design-quickly
"How can we use it". You can't really just "use it". You must identify the parts of it that makes sense for your business.
You can take advantage of the big focus on understanding and modeling the business, and creating a common language in speech, code and documentation.
You can use ideas related to software architecture, like using repositories, entities and value objects.
You can take note of the principles for good design and code quality, like intention-revealing interfaces, side-effect-free functions, etc.
You can try to pass on knowledge of refactoring, and strategies relating to larger systems.
Some are low hanging fruit in concept understanding, others are hard to impose without personal interest.
Amis,
Is to translate the current slide to your needs (its in portuguese-brazil) -> Slide
Explain that DDD isnt a tech or methodology, but is more like an approach that gather various concepts, techniques and principles with focus on domain logic.
Explain about ubiquitous language, Layered architecture, Domain Patterns, and diffs about current approach and ddd approach, later on enlighten then with the benefits of using DDD over the current methods and add a conclusion on your presentation..
Hopes it helped ya.
This mind map sorted my mind.

What is the single most influential book every programmer should read? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
If you could go back in time and tell yourself to read a specific book at the beginning of your career as a developer, which book would it be?
I expect this list to be varied and to cover a wide range of things.
To search: Use the search box in the upper-right corner. To search the answers of the current question, use inquestion:this. For example:
inquestion:this "Code Complete"
Code Complete (2nd edition) by Steve McConnell
The Pragmatic Programmer
Structure and Interpretation of Computer Programs
The C Programming Language by Kernighan and Ritchie
Introduction to Algorithms by Cormen, Leiserson, Rivest & Stein
Design Patterns by the Gang of Four
Refactoring: Improving the Design of Existing Code
The Mythical Man Month
The Art of Computer Programming by Donald Knuth
Compilers: Principles, Techniques and Tools by Alfred V. Aho, Ravi Sethi and Jeffrey D. Ullman
Gödel, Escher, Bach by Douglas Hofstadter
Clean Code: A Handbook of Agile Software Craftsmanship by Robert C. Martin
Effective C++
More Effective C++
CODE by Charles Petzold
Programming Pearls by Jon Bentley
Working Effectively with Legacy Code by Michael C. Feathers
Peopleware by Demarco and Lister
Coders at Work by Peter Seibel
Surely You're Joking, Mr. Feynman!
Effective Java 2nd edition
Patterns of Enterprise Application Architecture by Martin Fowler
The Little Schemer
The Seasoned Schemer
Why's (Poignant) Guide to Ruby
The Inmates Are Running The Asylum: Why High Tech Products Drive Us Crazy and How to Restore the Sanity
The Art of Unix Programming
Test-Driven Development: By Example by Kent Beck
Practices of an Agile Developer
Don't Make Me Think
Agile Software Development, Principles, Patterns, and Practices by Robert C. Martin
Domain Driven Designs by Eric Evans
The Design of Everyday Things by Donald Norman
Modern C++ Design by Andrei Alexandrescu
Best Software Writing I by Joel Spolsky
The Practice of Programming by Kernighan and Pike
Pragmatic Thinking and Learning: Refactor Your Wetware by Andy Hunt
Software Estimation: Demystifying the Black Art by Steve McConnel
The Passionate Programmer (My Job Went To India) by Chad Fowler
Hackers: Heroes of the Computer Revolution
Algorithms + Data Structures = Programs
Writing Solid Code
JavaScript - The Good Parts
Getting Real by 37 Signals
Foundations of Programming by Karl Seguin
Computer Graphics: Principles and Practice in C (2nd Edition)
Thinking in Java by Bruce Eckel
The Elements of Computing Systems
Refactoring to Patterns by Joshua Kerievsky
Modern Operating Systems by Andrew S. Tanenbaum
The Annotated Turing
Things That Make Us Smart by Donald Norman
The Timeless Way of Building by Christopher Alexander
The Deadline: A Novel About Project Management by Tom DeMarco
The C++ Programming Language (3rd edition) by Stroustrup
Patterns of Enterprise Application Architecture
Computer Systems - A Programmer's Perspective
Agile Principles, Patterns, and Practices in C# by Robert C. Martin
Growing Object-Oriented Software, Guided by Tests
Framework Design Guidelines by Brad Abrams
Object Thinking by Dr. David West
Advanced Programming in the UNIX Environment by W. Richard Stevens
Hackers and Painters: Big Ideas from the Computer Age
The Soul of a New Machine by Tracy Kidder
CLR via C# by Jeffrey Richter
The Timeless Way of Building by Christopher Alexander
Design Patterns in C# by Steve Metsker
Alice in Wonderland by Lewis Carol
Zen and the Art of Motorcycle Maintenance by Robert M. Pirsig
About Face - The Essentials of Interaction Design
Here Comes Everybody: The Power of Organizing Without Organizations by Clay Shirky
The Tao of Programming
Computational Beauty of Nature
Writing Solid Code by Steve Maguire
Philip and Alex's Guide to Web Publishing
Object-Oriented Analysis and Design with Applications by Grady Booch
Effective Java by Joshua Bloch
Computability by N. J. Cutland
Masterminds of Programming
The Tao Te Ching
The Productive Programmer
The Art of Deception by Kevin Mitnick
The Career Programmer: Guerilla Tactics for an Imperfect World by Christopher Duncan
Paradigms of Artificial Intelligence Programming: Case studies in Common Lisp
Masters of Doom
Pragmatic Unit Testing in C# with NUnit by Andy Hunt and Dave Thomas with Matt Hargett
How To Solve It by George Polya
The Alchemist by Paulo Coelho
Smalltalk-80: The Language and its Implementation
Writing Secure Code (2nd Edition) by Michael Howard
Introduction to Functional Programming by Philip Wadler and Richard Bird
No Bugs! by David Thielen
Rework by Jason Freid and DHH
JUnit in Action
K&R
#Juan: I know Juan, I know - but there are some things that can only be learned by actually getting down to the task at hand. Speaking in abstract ideals all day simply makes you into an academic. It's in the application of the abstract that we truly grok the reason for their existence. :P
#Keith: Great mention of "The Inmates are Running the Asylum" by Alan Cooper - an eye opener for certain, any developer that has worked with me since I read that book has heard me mention the ideas it espouses. +1
Discrete Mathematics For Computer Scientists http://ecx.images-amazon.com/images/I/51HCJ5R42KL._SL500_BO2,204,203,200_AA219_PIsitb-sticker-dp-arrow,TopRight,-24,-23_SH20_OU02_.jpg
Discrete Mathematics For Computer Scientists by J.K. Truss.
While this doesn't teach you programming, it teaches you fundamental mathematics that every programmer should know. You may remember this stuff from university, but really, doing predicate logic will improve you programming skills, you need to learn Set Theory if you want to program using collections.
There really is a lot of interesting information in here that can get you thinking about problems in different ways. It's handy to have, just to pick up once in a while to learn something new.
Systemantics: How Systems Work and Especially How They Fail. Get it used cheap. But you might not get the humor until you've worked on a few failed projects.
The beauty of the book is the copyright year.
Probably the most profound takeaway "law" presented in the book:
The Fundamental Failure-Mode Theorem (F.F.T.): Complex systems usually operate in failure mode.
The idea being that there are failing parts in any given piece of software that are masked by failures in other parts or by validations in other parts. See a real-world example at the Therac-25 radiation machine, whose software flaws were masked by hardware failsafes. When the hardware failsafes were removed, the software race condition that had gone undetected all those years resulted in the machine killing 3 people.
One of my personal favorites is Hacker's Delight, because it was as much fun to read as it was educational.
I hope the second edition will be released soon!
Concepts, Techniques, and Models of Computer Programming.
alt text http://ecx.images-amazon.com/images/I/51YZ50ZR13L._SL500_AA240_.jpg
Extreme Programming Explained: Embrace Change by Kent Beck. While I don't advocate a hardcore XP-or-the-highway take on software development, I wish I had been introduced to the principles in this book much earlier in my career. Unit testing, refactoring, simplicity, continuous integration, cost/time/quality/scope - these changed the way I looked at development. Before Agile, it was all about the debugger and fear of change requests. After Agile, those demons did not loom as large.
Types and Programming Languages by Benjamin C Pierce for a thorough understanding of the underpinnings of programming languages.
alt text http://ecx.images-amazon.com/images/I/51E0Ojkz8iL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU01_.jpg
Database System Concepts is one of the best books you can read on understanding good database design principles.
The practice of programming. By Brian W. Kernighan, Rob Pike.
The style shown here is excellent - the code just speaks for itself, and the whole book follows the KISS principle. Personally not my languages of choice, but still influential to me.
Programming from the ground up. It's free on the internet. This book taught me AT&T asm. It is very easy to read.
Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp by Peter Norvig
I started reading it because I wanted to learn Common Lisp. When I was halfway, I realized this was the greatest book about programming I had read so far.
Definitively Software Craftsmanship
alt text http://ecx.images-amazon.com/images/I/5186JKTDVWL._SL500_AA240_.jpg
This book explains a lot of things about software engineering, system development. It's also extremly useful to understand the difference between different kind of product developement: web VS shrinkwrap VS IBM framework. What people had in mind when they conceived waterfall model? Read this and all we'll become clear (hopefully)
#Peter Coulton -- you don't read Knuth, you study it.
For me, and my work... Purely Functional Data Structures is great for thinking and developing with functional languages in mind.
"The World is Flat" by Thomas Friedman.
Excellence in programming demands an investment of mental energy and a dedication to continued learning comparable to the professions of medicine or law. It pays a fraction of what those professions pay, much less the wages paid to the mathematically savvy who head into the finance sector. And wages for constructing code are eroding because it's a profession that is relatively easy for the intelligent and self-disciplined in most economies to enter.
Programming has already eroded to the point of paying less than, say, plumbing. Plumbing can't be "offshored." You don't need to pay $2395 to attend the Professional Plumber's Conference every other year for the privilege of receiving an entirely new set of plumbing technologies that will take you a year to learn.
If you live in North America or Europe, are young, and are smart, programming is not a rational career choice. Businesses that involve programming, absolutely. Study business, know enough about programming to refine your BS detector: brilliant. But dedicating the lion's share of your mental energy to the mastery of libraries, data structures, and algorithms? That only makes sense if programming is something more to you than an economic choice.
If you love programming and for that reason intend to make it your career, then it behooves you to develop a cold-eyed understanding of the forces that are, and will continue, to make it a harder and harder profession in which to make a living. "The World is Flat" won't teach you what to name your variables, but it will immerse you for 6 or 8 hours in economic realities that have already arrived. If you can read it, and not get scared, then go out and buy "Code Complete."
This last year I took a number of classes. I read
The Innovator's Dilemma (disruptive tech)
The Mythical Man Month (managing software)
Crossing the Chasm (startup)
Database Management Systems, The COW Book
Programming C#, The OSTRICH Book
Beginning iPhone Developmen, The GRAPEFRUIT Book
Each book was amazing but the Innovator's Dilemma by Clayton Christensen (1997!!!) is really a fantastic book, and it got me really thinking about the modern software world. The challenge addressed is disruptive technology, and how disk drive companies and non-technical companies are always disrupted by new, game changing technology. It gives one a new perspective when thinking about Google, probably the biggest 'web' company. Why do they have their hands in EVERYTHING? It's because they don't want to have their position disrupted by something new. The preview on google is plenty to get the idea. Read it!
hackers, by Steven Levy.
The personality and way of life must come first. Everything else can be learned.
The Practice of Programming
and
How to solve it by computer
alt text http://img.infibeam.com/img/7101e0ee/496b1/05/629/P-M-B-9788131705629.jpg?hei=200&wid=160&op_sharpen=1
The Python language was very influential to me, I wish I would have read these book years ago. The beauty and simplicity of the Python language really affected how I wrote code in other languages.
The New Turing Omnibus http://ecx.images-amazon.com/images/I/51HlYd-%2BRwL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU01_.jpg
Really good book. Has a high-level taste of the most important areas of computer science. Yes, CS != programming, but this is still useful to every programmer.
Object Oriented Analysis and Design with Applications by Brady Booch
The Mythical Man-Month by Fred Brooks
http://en.wikipedia.org/wiki/The_Mythical_Man-Month
I think that "The Art of Unix Programming" is an excellent book, by an excellent hacker/brilliant mind as Eric S. Raymond, who tries to make us understand a few principles of software design (simplicity mainly). This book is a must for every programming who is about to start a project under Unix platform.
While I agree that many of the books above are must-reads (Pragmatic Programmer, Mythical Man-Month, Art of Computer Programming, and SICP come to mind immediately), I'd like to go in a slightly different direction and recommend A Discipline of Programming by Edsger Dijkstra. Even though it's 32 years old, the emphasis on "design for verifiability" is highly relevant (even if "verifiability" means "proof" instead "unit tests").
Code Craft by Pete Goodliffe is a good read!
Code Craft http://ecx.images-amazon.com/images/I/51WZ9AEC3GL._SL500_BO2,204,203,200_PIsitb-dp-500-arrow,TopRight,45,-64_OU01_AA240_SH20_.jpg
Martin Fowler's Refactoring: Improving the Design of Existing Code has already been listed. But I will detail why it has impacted me.
The essence of the whole book is about structuring code so that it is simpler to read and understand by humans. It teaches me strongly that the code that I write is meant for my colleagues and successors to consume and possibly learn something good out of it. It inspires me to consciously program in a manner that leaves people praising my name, and not cursing me to damnation for all eternity.
alt text http://ecx.images-amazon.com/images/I/61dECNkdnTL._SL500_AA240_.jpg
C++ How to Program It is good for beginner.This is excellent book that full complete with 1500 pages.
Here's an excellent book that is not as widely applauded, but is full of deep insight: Agile Software Development: The Cooperative Game, by Alistair Cockburn.
What's so special about it? Well, clearly everyone has heard the term "Agile", and it seems most are believers these days. Whether you believe or not, though, there are some deep principles behind why the Agile movement exists. This book uncovers and articulates these principles in a precise, scientific way. Some of the principles are (btw, these are my words, not Alistair's):
The hardest thing about team software development is getting everyone's brains to have the same understanding. We are building huge, elaborate, complex systems which are invisible in the tangible world. The better you are at getting more peoples' brains to share deeper understanding, the more effective your team will be at software development. This is the underlying reason that pair programming makes sense. Most people dismiss it (and I did too initially), but with this principle in mind I highly recommend that you give it another shot. You wind up with TWO people who deeply understand the subsystem you just built ... there aren't many other ways to get such a deep information transfer so quickly. It is like a Vulcan mind meld.
You don't always need words to communicate deep understanding quickly. And a corollary: too many words, and you exceed the listener/reader's capacity, meaning the understanding transfer you're attempting does not happen. Consider that children learn how to speak language by being "immersed" and "absorbing". Not just language either ... he gives the example of some kids playing with trains on the floor. Along comes another kid who has never even SEEN a train before ... but by watching the other kids, he picks up the gist of the game and plays right along. This happens all the time between humans. This along with the corollary about too many words helps you see how misguided it was in the old "waterfall" days to try to write 700 page detailed requirements specifications.
There is so much more in there too. I'll shut up now, but I HIGHLY recommend this book!
Masters of doom. As far as motivation and love for your profession go: it won't get any better than what's been described in this book, truthfully inspiring story!

Resources