Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Building blockchain projects
Prusty N., Packt Publishing, Birmingham, UK, 2017. 404 pp. Type: Book (978-1-787122-14-7)
Date Reviewed: May 28 2019

Readers will get a first look at how to access the Ethereum blockchain and working code, as well as how to “do” something with this technology. Unlike Bitcoin, the preceding cryptocurrency, Ethereum can execute arbitrary programs on its blockchain, that is, so-called smart contracts.

Focusing purely on JavaScript as the language for accessing Ethereum nodes (here, “node” refers to the actual software that implements Ethereum’s consensus mechanism and its associated ledger of transactions), readers will find a well-written, inductive (that is, example-based) approach to interfacing with Ethereum’s capabilities, including smart contracts.

Chapter 1 immediately jumps into a well-crafted exposé of decentralized applications (the famous DApps or ÐApps) and how they differentiate from distributed applications.

Chapters 2 and 3 cover Ethereum fundamentals, such as accounts, transactions, wallets, and smart contracts. A considerable portion is reserved for the Geth Ethereum node software, which is used in later JavaScript examples. Unfortunately, chapter 3’s almost 30 pages on Solidity--the most important language for actually writing smart contracts executing on Ethereum--is insufficient, that is, it does not allow readers to really do something useful with the language. Despite examples, the chapter restricts itself to an overview of the language’s many features, without the required level of detail to actually be able to write smart contracts. For instance, the event mechanism is not explained at all, and a smart contract’s application binary interface (ABI) (of critical importance when trying to access a contract from outside the chain) is casually defined as “providing various kinds of information about the contract other than implementation [sic].”

The book’s examples use web3.js, a JavaScript library exposing suitable JavaScript application programming interfaces (APIs) for actually communicating with the Geth Ethereum node. Chapter 4 explains only a subset of its functions, in the form of a collection of small JavaScript examples. Readers are also introduced to the major application paradigm that this book and many blockchain applications employ: a server-like backend (here, JavaScript code running on node.js) communicates with the blockchain, and a web-based frontend (HTML plus JavaScript) accepts human user input, sends the appropriate commands to the backend, waits for any results, and finally displays them in the form of a web page. The chapter ends with a first (admittedly small but working) standalone Ethereum application connecting to a (tiny) smart contract.

Chapters 5 and 6 teach readers how to build a wallet service (for sending and receiving Ether) and how to deploy smart contracts (that is, how to put them on the Ethereum blockchain for later execution), respectively.

Chapter 7 explains how to build a betting DApp that allows end users to bet on which team is winning a current soccer match. This is highly interesting, not only because it is decidedly more complex than the preceding examples, but also because this DApp needs to access information sources external to the blockchain, namely an Internet uniform resource locator (URL) providing live scores. As of today, Ethereum (and many other blockchains) do not possess a standardized and secure way to do this; therefore, the examples use Oraclize, a company that provides a smart contract and a proprietary interface to the web for some fee.

In chapter 8, readers can become more acquainted with the complexities of the full software development life cycle (SDLC) for blockchain projects. The author uses the Truffle development environment, highlighting not only how to actually set everything up, but also how to do unit testing and deployment (package) management. True enterprise developers will miss a discussion of the different environments (development, testing, preproduction, and production).

The final chapter 9 covers the important topic of permissioned blockchains, which restrict access and also implement different (faster, less power-consuming) consensus algorithms. The author explains how to set up this private blockchain using the parity client with the Aura consensus mechanism. However, no smart contracts or applications are included.

Readers can safely ignore the five pages of index, which is missing most of the really sought-after entries.

The book provides many JavaScript, Hypertext Markup Language (HTML), and Solidity code examples. Regrettably, the text explanations that follow do not provide any references or anchors (other than mentioning function calls or so on) to the actual code they are referring to. This made it hard and cumbersome for me to relate the explanations to the relevant piece of code. On the other hand, the author always shows a sample web page output, which makes it very easy to compare one’s own implementation to the correct outcome.

Admittedly, not all the details of the code (neither in the JavaScript nor the Solidity programs) are explained. People who need to first understand the overall structure before going any deeper will have difficulties with this code-based style. Instead, in true agile development spirit, this book provides working code; from there, readers can further explore (and deepen) their understanding.

If you want a hands-on, example-based, bottom-up approach to learning about the web3 JavaScript library (as opposed to a top-down and deductive one), then you should definitely have a look at this book. Note that prior JavaScript knowledge really is an almost unavoidable prerequisite--the examples and programming patterns cannot be easily generalized to other programming languages.

More reviews about this item: Amazon, Goodreads

Reviewer:  Christoph F. Strnadl Review #: CR146581 (1908-0301)
Bookmark and Share
  Reviewer Selected
Featured Reviewer
 
 
Distributed Databases (H.2.4 ... )
 
 
Distributed Applications (C.2.4 ... )
 
 
Distributed Systems (H.3.4 ... )
 
Would you recommend this review?
yes
no
Other reviews under "Distributed Databases": Date
Federated database systems for managing distributed, heterogeneous, and autonomous databases
Sheth A., Larson J. ACM Computing Surveys 22(3): 183-236, 2001. Type: Article
Jul 1 1991
Asserting the optimality of serial SJRPs in processing simple queries in chain networks
Gursel G., Scheuermann P. Information Processing Letters 19(5): 255-260, 1984. Type: Article
Sep 1 1985
Nested transactions: an approach to reliable distributed computing
Moss J., Massachusetts Institute of Technology, Cambridge, MA, 1985. Type: Book (9780262132008)
Mar 1 1986
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy