توضیحاتی در مورد کتاب :
خلاصه
توسعهدهندگان حرفهای از مزایای فراوان نوشتن کد برنامهای که تمیز، منظم، و نگهداری آسان است، میدانند. با یادگیری و پیروی از الگوهای ثابت و بهترین شیوه ها، می توانید کد و حرفه خود را به سطح جدیدی ببرید.
با
Practices of Python Pro، می آموزید که با استفاده از زبان برنامه نویسی فوق العاده محبوب، پایتون، نرم افزاری در سطح حرفه ای، تمیز و با قابلیت نگهداری آسان در مقیاس طراحی کنید. نمونههای سادهای را خواهید یافت که از کدهای شبه و پایتون برای معرفی بهترین شیوههای توسعه نرمافزار استفاده میکنند، همراه با دهها تکنیک فوری مفید که به شما کمک میکنند مانند یک حرفهای کدنویسی کنید.
خرید کتاب چاپی شامل یک کتاب الکترونیکی رایگان در قالبهای PDF، Kindle و ePub از انتشارات منینگ است.
درباره فناوری
کد با کیفیت حرفه ای بیش از اجرای بدون اشکال انجام می دهد. تمیز، خوانا و نگهداری آسان است. برای ارتقاء از یک کدگذار توانمند پایتون به یک توسعه دهنده حرفه ای، باید استانداردهای صنعتی برای سبک کدنویسی، طراحی اپلیکیشن و فرآیند توسعه را یاد بگیرید. اینجاست که این کتاب ضروری است.
درباره کتاب
Practices of the Python Pro به شما می آموزد که نرم افزاری با کیفیت حرفه ای طراحی و بنویسید که قابل درک، قابل نگهداری و توسعه باشد. Dane Hillard یک حرفه ای پایتون است که به ده ها توسعه دهنده کمک کرده است تا این مرحله را انجام دهند و او می داند که چه چیزی لازم است. با مثالها و تمرینهای مفید، او به شما یاد میدهد که چه زمانی، چرا، و چگونه کد خود را مدولار کنید، چگونه کیفیت را با کاهش پیچیدگی بهبود بخشید، و موارد دیگر. این اصول اصلی را بپذیرید و خواندن، نگهداری و استفاده مجدد کد شما و دیگران آسان تر خواهد شد.
داخل چیست
- سازماندهی پروژه های بزرگ پایتون
- دستیابی به سطوح مناسب انتزاع
- نوشتن کد پاک و قابل استفاده مجدد وراثت و ترکیب
- ملاحظات آزمایش و عملکرد
درباره خواننده
برای خوانندگانی که با اصول پایتون یا زبان دیگر OO آشنا هستند.
درباره نویسنده
دان هیلارد بیشتر عمر حرفه ای توسعه خود را با استفاده از پایتون برای ساخت برنامه های کاربردی وب گذرانده است.
فهرست مطالب:
بخش 1 چرا همه چیز مهم است
1 ¦ تصویر بزرگتر
قسمت 2 مبانی طراحی
2 ¦ تفکیک نگرانی ها
3 ¦ انتزاع و کپسوله سازی
4 ¦ طراحی برای کارایی بالا
5 ¦ نرم افزار خود را تست کنید
قسمت 3 میخکوب کردن سیستم های بزرگ
6 ¦ تفکیک نگرانی ها در عمل
7 ¦ توسعه پذیری و انعطاف پذیری
8 ¦ قواعد (و استثنائات) ارث
9 ¦ سبک نگه داشتن چیزها
10 ¦ دستیابی به کوپلینگ شل
قسمت 4 بعدی چیست؟
11 ¦ رو به جلو و بالا
فهرست مطالب :
front cover
title
copyright
brief contents
contents
Preface
Acknowledgments
About this book
Who should read this book
How this book is organized: A roadmap
About the code
liveBook discussion forum
Other online resources
About the author
About the cover illustration
Part 1: Getting started with blockchain programming
Chapter 1: Blockchain basics
1.1 From Bitcoin to blockchain
1.2 What is a blockchain?
1.3 Blockchain programming
1.3.1 Decentralized infrastructure
1.3.2 Distributed ledger technology
1.3.3 Disintermediation protocol
1.3.4 Trust enabler
1.4 Motivating scenarios
1.4.1 Automatic and consistent data collection
1.4.2 Timely information sharing
1.4.3 Verifiable compliance
1.4.4 Auditable actions for provenance
1.4.5 Guidance for governance
1.4.6 Attribution of actions
1.4.7 Pandemic management
1.5 Retrospective
1.6 Summary
Chapter 2: Smart contracts
2.1 The concept of a smart contract
2.1.1 Bitcoin transactions versus smart contract transactions
2.1.2 What does a smart contract do?
2.2 Design of a smart contract
2.2.1 A use case diagram for the counter
2.2.2 Data assets, peer participants, roles, rules, and transactions
2.2.3 From class diagram to contract diagram
2.3 Development of a smart contract code
2.3.1 Solidity language
2.3.2 Smart contract code for Counter
2.4 Deploying and testing the smart contract
2.4.1 The Remix IDE
2.4.2 Deployment and testing
2.4.3 Key takeaways
2.5 What makes a blockchain contract smart?
2.6 Decentralized airline system use case
2.6.1 ASK definition
2.6.2 Sequence of operations
2.7 Airlines smart contract
2.7.1 Peer participants, data assets, roles, rules, and transactions
2.7.2 Airlines smart contract code
2.7.3 ASK smart contract deployment and testing
2.8 Smart contract design considerations
2.9 Best practices
2.10 Summary
Chapter 3: Techniques for trust and integrity
3.1 Essentials of trust and integrity
3.1.1 Trust
3.1.2 Integrity
3.2 Digital democracy problem
3.2.1 Designing a solution
3.2.2 Use case diagram
3.2.3 Incremental development of code
3.2.4 Users, assets, and transactions
3.2.5 Finite state machine diagram
3.2.6 Trust intermediation
3.2.7 Defining and using modifiers
3.2.8 Contract diagram including modifiers
3.2.9 Putting it all together
3.3 Testing
3.3.1 Positive tests
3.3.2 Negative tests
3.4 Using modifiers, require(), and revert()
3.5 Assert() declarations
3.6 Best practices
3.7 Retrospective
3.8 Summary
Chapter 4: From smart contracts to Dapps
4.1 Dapp development using Truffle
4.1.1 The development process
4.1.2 Installing Truffle
4.1.3 Building the Dapp stack
4.2 Install Ganache test chain
4.3 Develop the smart contract
4.3.1 Create a project folder
4.3.2 Add smart contract and compile
4.3.3 Configure blockchain network
4.3.4 Deploy the smart contract
4.4 Develop and configure the web application
4.4.1 Develop ballot-app
4.4.2 Launch the ballot-app
4.4.3 Install MetaMask wallet
4.4.4 Interact with Ballot-Dapp
4.4.5 Connect web client to smart contract
4.5 Retrospective
4.6 Best practices
4.7 Summary
Part 2: Techniques for end-to-end Dapp development
Chapter 5: Security and privacy
5.1 Cryptography basics
5.1.1 Symmetric key cryptography
5.1.2 Asymmetric key cryptography
5.2 The relevance of public-key cryptography to blockchain
5.2.1 Generating Ethereum addresses
5.2.2 Transaction signing
5.2.3 Deploying smart contracts on Ropsten
5.2.4 Using the private key in mnemonic form
5.2.5 Populating a blockchain wallet
5.2.6 Deploying and transacting on Ropsten
5.3 Hashing basics
5.3.1 Digital signing of documents
5.3.2 Hashed data on distributed ledger
5.3.3 Hashes in Ethereum block header
5.3.4 Solidity hashing functions
5.4 Application of hashing
5.4.1 Blind auction design
5.4.2 Blind auction smart contract
5.4.3 Privacy and security aspects
5.4.4 Testing the BlindAuction contract
5.4.5 Test plan
5.5 Retrospective
5.6 Best practices
5.7 Summary
Chapter 6: On-chain and off-chain data
6.1 On-chain data
6.2 Blind auction use case
6.2.1 On-chain event data
6.2.2 Blind auction with events
6.2.3 Testing with the web UI
6.2.4 Accessing on-chain data using the web3 API
6.3 Off-chain data: External data sources
6.4 ASK airline system
6.4.1 ASK concept
6.4.2 Airlines smart contract
6.4.3 ASK on-chain data
6.4.4 ASK off-chain data
6.4.5 ASK Dapp development process
6.4.6 ASK web user interface
6.4.7 Putting it all together
6.4.8 Interacting with ASK Dapp
6.5 Retrospective
6.6 Best practices
6.7 Summary
Chapter 7: Web3 and a channel Dapp
7.1 Web3 API
7.1.1 Web3 in Dapp stack
7.1.2 Web3 packages
7.2 The channel concept
7.3 Micropayment channel
7.4 Micropayment channel use case
7.4.1 Traditional banking solution
7.4.2 Users and roles
7.4.3 On-chain and off-chain operations
7.4.4 MPC smart contract (MPC-contract)
7.4.5 MPC application development (MPC-app)
7.4.6 MPC sequence diagram
7.4.7 Demonstration of MPC execution
7.4.8 Accessing the web3 provider
7.4.9 Extensions of MPC
7.4.10 The relevance of the micropayment channel
7.4.11 Other web3 packages of interest
7.5 Retrospective
7.6 Best practices
7.7 Summary
Chapter 8: Going public with Infura
8.1 Nodes and networks
8.2 Infura blockchain infrastructure
8.3 Going public with Infura
8.3.1 Blockchain node as a service
8.4 End-to-end process for public deployment
8.4.1 Account generation and management
8.4.2 Choosing a network and importing accounts
8.4.3 Collecting ether from faucets
8.4.4 Creating blockchain nodes on Infura
8.4.5 Installing HDWalletProvider
8.4.6 Configuring and deploying the smart contract
8.4.7 Configuring and deploying the web application
8.5 Deploying BlindAuction-Dapp on Infura
8.5.1 Setting up the blind auction environment
8.5.2 Decentralized participants
8.5.3 Configure and deploy the beneficiary account
8.5.4 Configure and deploy bidders
8.5.5 Interact with deployed blind auction Dapp
8.6 Deploying MPC-Dapp on Infura
8.6.1 Setting up the MPC environment
8.6.2 Configure and deploy the organizer
8.6.3 Configure and deploy the worker
8.7 Retrospective
8.8 Best practices
8.9 Summary
Part 3: A roadmap and the road ahead
Chapter 9: Tokenization of assets
9.1 Ethereum standards
9.1.1 Ethereum improvement proposal
9.1.2 ERC20 token standard
9.1.3 Fungible and non-fungible tokens
9.2 RES4: Non-fungible real estate token
9.2.1 Use case diagram
9.2.2 Contract diagram
9.2.3 RES4 ERC721-compliant token
9.2.4 RES4 Dapp
9.2.5 Interaction with RES4 Dapp
9.3 Retrospective
9.4 Best practices
9.5 Summary
Chapter 10: Testing smart contracts
10.1 Importance of testing smart contracts
10.1.1 Types of testing
10.1.2 Language choice for test programs
10.2 Testing counter smart contract
10.2.1 Writing counter test script
10.2.2 Positive and negative tests
10.2.3 Running the test script
10.3 Testing ballot smart contract
10.3.1 Writing the ballot test script
10.3.2 Executing the ballot test script
10.3.3 Describe() and it() test functions
10.4 Recap writing of test script
10.5 The blind auction test script
10.5.1 Analysis of describe() and it() code
10.5.2 Executing the blind auction test script
10.5.3 Full auction run
10.6 Retrospective
10.7 Best practices
10.8 Summary
Chapter 11: A roadmap to Dapp development
11.1 Motivating scenario: Educational credentialing
11.2 The roadmap
11.3 Problem description
11.3.1 Context for the DCC application
11.3.2 Design choices
11.4 Analysis and design
11.4.1 Operation flow and finite state machine
11.4.2 Contract diagram
11.5 Developing the smart contract
11.5.1 Data structures
11.5.2 Events
11.5.3 Modifiers
11.5.4 Functions
11.6 Local deployment
11.7 Automated testing using truffle
11.8 Developing the web application
11.8.1 UI design
11.8.2 Coding the app.js
11.9 Testing the DCC-Dapp
11.10 Public deployment
11.10.1 Deployment on Ropsten-Infura
11.10.2 Create web-client for distribution
11.11 Retrospective
11.12 Best practices
11.13 Summary
Chapter 12: Blockchain: The road ahead
12.1 Decentralized identity
12.2 Self-managed identity
12.3 Consensus and integrity
12.3.1 Proof of work
12.3.2 Proof of stake
12.3.3 Byzantine fault-tolerant consensus
12.4 Scalability
12.5 Scalability solutions
12.5.1 Side channel
12.5.2 Block size
12.5.3 Network speed
12.6 Privacy
12.7 Public, private, and permissioned networks
12.8 Confidentiality
12.8.1 Open information
12.8.2 A solution
12.9 Security
12.10 Securing it with cryptocurrency
12.11 Accessing off-chain data (Oracles)
12.12 From foundations to practical systems
12.13 Looking ahead
12.14 Best practices
12.15 Retrospective
12.16 Summary
appendix A: UML blockchain design models
A.1 Problem analysis and design
A.2 Behavioral diagrams
A.2.1 Use case diagrams
A.2.2 Finite state machine diagrams
A.3 Structural diagrams
A.3.1 Class diagrams
A.3.2 Classes and relationships
A.4 Interaction diagrams
appendix B: Design principles
index
Numerics
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
R
S
T
U
V
W
X
back cover
توضیحاتی در مورد کتاب به زبان اصلی :
Summary
Professional developers know the many benefits of writing application code that’s clean, well-organized, and easy to maintain. By learning and following established patterns and best practices, you can take your code and your career to a new level.
With
Practices of the Python Pro, you’ll learn to design professional-level, clean, easily maintainable software at scale using the incredibly popular programming language, Python. You’ll find easy-to-grok examples that use pseudocode and Python to introduce software development best practices, along with dozens of instantly useful techniques that will help you code like a pro.
Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.
About the technology
Professional-quality code does more than just run without bugs. It’s clean, readable, and easy to maintain. To step up from a capable Python coder to a professional developer, you need to learn industry standards for coding style, application design, and development process. That’s where this book is indispensable.
About the book
Practices of the Python Pro teaches you to design and write professional-quality software that’s understandable, maintainable, and extensible. Dane Hillard is a Python pro who has helped many dozens of developers make this step, and he knows what it takes. With helpful examples and exercises, he teaches you when, why, and how to modularize your code, how to improve quality by reducing complexity, and much more. Embrace these core principles, and your code will become easier for you and others to read, maintain, and reuse.
What's inside
- Organizing large Python projects
- Achieving the right levels of abstraction
- Writing clean, reusable code Inheritance and composition
- Considerations for testing and performance
About the reader
For readers familiar with the basics of Python, or another OO language.
About the author
Dane Hillard has spent the majority of his development career using Python to build web applications.
Table of Contents:
PART 1 WHY IT ALL MATTERS
1 ¦ The bigger picture
PART 2 FOUNDATIONS OF DESIGN
2 ¦ Separation of concerns
3 ¦ Abstraction and encapsulation
4 ¦ Designing for high performance
5 ¦ Testing your software
PART 3 NAILING DOWN LARGE SYSTEMS
6 ¦ Separation of concerns in practice
7 ¦ Extensibility and flexibility
8 ¦ The rules (and exceptions) of inheritance
9 ¦ Keeping things lightweight
10 ¦ Achieving loose coupling
PART 4 WHAT’S NEXT?
11 ¦ Onward and upward