Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.
Sign up to join this communityAnybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
I'm a Master Student in Computing Science and currently investigating the Bitcoin source code on the Software Patterns that are used. Part of the assignment is to ask the community to guide us.
I would like to ask you if you know any Software Pattern in the source code. In order to give you a view of our scope, below is a list of Patterns covered (Design Patterns and Architectural Patterns).
Thanks in advance,
Patrick
Object Oriented Design Patterns:
- Factory Pattern
- Adapter Pattern
- Composite Pattern
- Facade Pattern
- Proxy Pattern
- Observer Pattern
Architectural Patterns:
- Layered Decomposition Pattern
- Pipes And Filters Pattern
- Data Repository Pattern
- Model View Controller Pattern
- Client Server Pattern
- Peer to Peer Pattern
- Publish Subscribe Pattern
- Broker Pattern
- Message Queue Pattern
i don't think you can find many Object Oriented Design Patterns in the btc-source-code. but there is one example i know:
the blockchain itself is like a composite pattern:
you have a general type called Block
. two types inherits Block
: MinedBlock
inherits from Block
and GenesisBlock
inherits from Block
. A MinedBlock
has one attribute of the type Block
called PreviousBlock
.
(here you can also find the singleton pattern: you need exactly one GenesisBlock
-object.)
You can get bonuses upto $100 FREE BONUS when you:
💰 Install these recommended apps:
💲 SocialGood - 100% Crypto Back on Everyday Shopping
💲 xPortal - The DeFi For The Next Billion
💲 CryptoTab Browser - Lightweight, fast, and ready to mine!
💰 Register on these recommended exchanges:
🟡 Binance🟡 Bitfinex🟡 Bitmart🟡 Bittrex🟡 Bitget
🟡 CoinEx🟡 Crypto.com🟡 Gate.io🟡 Huobi🟡 Kucoin.
Comments