index

A

AddBookItemController class 19

addMember mutation 84

aggregateField function 216

allErrors options 159

association 7

Atom class 167

AtomicReference generic class 168

atoms 163

state management with 172174

thread-safe cache with 170172

thread-safe counter with 165170

Author class 5, 337338

AuthorData class 347

AuthorDataWithFullName class 347

Author entities 4647

Author.myName(author, format) function 290

authorNameDispatch function 291

authorNames function 59, 63

Author objects 7, 11

Author.prolificityLevel helper function 291

authorsById index 4647, 55, 268

automatic generation of data model diagrams 260262

automatic generation of schema-based unit tests 262269

B

BookAttributes class 377

Book class 5, 7, 11, 5152

Book entities 4647

bookInfo function 60, 63

BookInfo record 58, 60

bookInfo schema 151, 155

BookInSearchResults class 52

BookItem class 5, 1112, 51

BookItemQuery class 19

BookItemResult class 19

bookItems member 52

BookLending class 5, 10, 12

Book records 4951, 60, 77

booksByIsbn index 4647, 55, 77

boundaries of systems 143

C

Catalog.authorNames function 115, 121

Catalog.bookInfo function 114, 121

Catalog class 5, 7, 1011

catalogData map 116117

Catalog entity 4647

Catalog index 47

Catalog module 35, 39, 6263

Catalog record 54, 62

Catalog.searchBooksByTitle function 318

class inheritance 8

class members, generic access to 373380

automatic JSON serialization of objects 378380

nested class members 376378

non-nested class members 373376

code modules 3136

collections, reducing 9798

CombinedBook class 231

commit function 88, 173

commit phase 72, 93

compareAndSet() method 168

complexity 13, 27, 164, 198, 341

composition 7

concurrency control 9192, 163

complexity of locks 164165

implementation of reconciliation algorithm 106108

optimistic concurrency control 9293

reconciliation between concurrent mutations 9497

reducing collections 9798

state management with atoms 172174

structural difference 99106

thread-safe cache with atoms 170172

thread-safe counter with atoms 165170

containsKey() method 185

convertJDBCResultSetToListOfMaps function 204

countByBoolField utility function 304

createAuthorObject function 340

createUserObject function 338

current system state 95

D

database operations

data manipulation

advanced 211218

simple 207211

fetching data from database 198204

storing data in the database 204206

data-driven programming 385386

data entities 2931, 38

dataFilePath function 323

data manipulation 4344

best tools for 301305

manipulating data with generic functions 5457

manipulating nested data 299301

representing records as maps 4854

data model diagrams, automatic generation of 260262

data models, designing 4448

data-oriented design 385386

data-oriented programming. See DOP

data safety 8283

data validation 141

advanced 257258

data validation failures 158161

function argument validation 248255

return value validation 255257

data validation failures 158161

DBBook class 231

debugging

determinism 312314

external data sources 329330

reproducibility with any data 318321

reproducibility with numbers and strings 314318

unit tests 321329

deepFreeze() function 177

design phase, OOP 45

determinism 312314

displayAuthorInfo function 357

displayFullName function 358359

displayProlificity function 358359

DOP (data-oriented programming) 2627, 386

concurrency control

advanced 163

basic 91109

data-driven programming vs. 386

data manipulation 4370

data-oriented design vs. 386

data validation 141

definition 386

easy to understand 3638

flexibility 3842

history of 381383

1958: Lisp 381

1981: Values and objects 382

2000: Ideal hash trees 383

2006: Out of the Tar Pit 383

2007: Clojure 383

2009: Immutability for all 383

parts of 2729

code modules 3136

data entities 2931

state management 7190

unit tests 110

DOP (data-oriented programming) principles

data is immutable 351355

as best practice 384385

benefits of 352354

cost for 354

illustration of 351352

represent data with generic data structures 345350

as best practice 384

benefits of 346347

cost for 347350

illustration of 345346

separate code from data 335344

as best practice 384

benefits of 337343

cost for 343344

illustration of 335337

separate data schema from data representation 355363

as best practice 385

benefits of 357361

cost for 361362

illustration of 355356

DSLs (domain specific languages) 386

DynamicAccess class 366, 369

dynamic data type 56, 349

dynamic getters 380

dynamic keyword 289

dynamic type 349

dysGreet multimethod 286288

E

enum 146

equals() method 373

errorsText function 159, 356

external data sources, debugging 329330

F

feature fields 67

fetchResponseBody function 230

fields array 160

fields property 145

FP (functional programming) 13, 28, 59, 75, 336337, 381

fullName function 338339, 343, 348

function arguments, validation of 248255

G

generic functions, manipulating data with 5457

getAsString() method 369, 376

getBookLendings function 39

getBookLendings method 34

getIn function 188

Getter class 372

greetDispatch dispatch function 278

greetDog method 280

greet function 275

greetLang multimethod 282, 284

greet method 273, 279

greet multimethod 280

H

HAMT (Hash Array Mapped Trie) 383

handle method 19

hashCode() method 373374

Hash map 96

heterogeneous maps 49, 252

homogeneous maps 49, 252

I

IAnimal interface 273

Immutable.fromJS() function 186

immutable functions 76

Immutable.set() map 187

Immutable.setIn() map 187

Immutable.stringify() function 192

implementation phase, OOP 12

indexes 46

inheritance 7

innovation 384

isLibrarian function 39

isSuperMember function 40

items property 145

J

Java, persistent data structures and 184186

JavaScript, persistent data structures and 186188

java.util.concurrent.atomic package 168

JDBC (Java database connectivity) 202

joinArrays function 237

JSON.parse function 122

JSON schema 143149

automatic serialization of objects 378380

schema composition 154157

schema flexibility and strictness 149153

JSON.stringify() function 53, 192

K

keyList 206

L

late binding 203

lendingRatio function 303

lent variable 303

Librarian::blockMember method 8

Librarian class 5, 10 – 11, 22

Librarian entity 342

Librarian record type 68

librariansByEmail index 65

librariansByEmail map 66

librarians hash maps 79

Librarian user type 65

Library.addMember function 79, 127

Library class 5, 910, 33, 126

libraryData.catalog data object 40

libraryData map 187

libraryData.userManagement data object 40

Library hash map 78

Library module 3336, 39, 6263

Library object 7, 10

Library record 62

Library root class 9

LISP (LISt Processing) 381

List static factory method 51

Lodash functions

at 205206, 388

concat 388

every 389

filter 188, 201, 389

find 389

flatMap 300301

flatten 388

forEach 389

get 5557, 61, 166, 173, 185, 188, 352, 366, 376, 388

groupBy 389

has 388

intersection 105, 388

isArray 389

isEmpty 389

isEqual 111, 188, 389

isObject 389

keyBy 236237, 389

map 59, 188189, 389

merge 388

nth 388

omit 388

pick 346

reduce 188, 389

set 7576, 80, 185, 388

set method 166, 173, 352

size 185, 389

sortBy 389

sum 388

union 193, 388

uniq 388

update 297, 305

values 388

M

many-to-many association relation 8

maps

dynamic getters for string maps 364367

accessing nested map fields 366367

accessing non-nested map fields 365366

representing client requests as 225227

representing records as 4854

representing server responses as 227231

typed getters for 370372

accessing nested map fields 371372

accessing non-nested map fields 370371

updating values in 296299

value getters for 367370

accessing nested map fields 368370

accessing non-nested map fields 367368

Map static factory method 51

Map<String, Object> type 349

Member class 5, 1011, 15

MemberCode entity 15

MemberData entity 15

Member objects 7, 10

Member record type 68

membersByEmail index 65

Member user type 65

multimethod library 278280, 289

multimethods

integrating in production systems 289293

with dynamic dispatch 286289

with multiple dispatch 281286

with single dispatch 277281

multipleBookInfo function 235

multiple dispatch 285

mutations 71

calculation phase of 72, 93

commit phase of 8385

definition 72

reconciliation between concurrent 9497

unit tests for 126133

writing with persistent data structures 191192

mutexes 163

Mutex object 165

N

nested data

accessing nested map fields

with dynamic getters 366367

with typed getters 371372

with value getters 368370

manipulating 299301

nested class members 376378

NoMethodError exception 280

O

object, meaning of term 382

object data type 144

Object.freeze() function 177

Object type 349, 365, 367

OOP (object-oriented programming) 34, 334, 381

project example 412

design phase 45

implementation phase 12

UML class diagram 612

separating code from data 335336

sources of complexity 1324

complex class hierarchies 2024

many relations between classes 1416

not trivial data serialization 1820

unpredictable code behavior 1618

OpenLibraryBook class 231

optimistic concurrency control strategy 92

Optional class 359

P

persistent data structures

efficiency of 178183

libraries for 184188

Java 184186

JavaScript 186188

need for 175178

serialization and deserialization 192

structural diff 193195

writing mutations with 191192

writing queries with 188189

polymorphism 273277

positional collection 46

previous states, restoring 8689

previousSystemData references 87

previous system state 95

Q

queries

unit tests for 121125

writing with persistent data structures 188189

R

reconciliation algorithm 106108

record, definition 48

record type 385

reflection 374, 380

RegExp constructor 328

renameResultKeys function 209

REPL (Read Eval Print Loop) 313

reproducibility

with any data 318321

with numbers and strings 314318

return values, validation of 255257

S

schema-based unit tests, automatic generation of 262269

schema composition 154157

schema flexibility and strictness 149153

searchBooksByTitle function 60, 6263

search method 19

SearchQuery object 19

SearchResult object 19

search results, calculating 5864

simplicity 13, 341, 343

state management 7172

commit phase of mutations 8385

data safety 8283

ensuring system state integrity 8586

multiple versions of system data 7274

restoring previous states 8689

structural sharing 7481

with atoms 172174

statically-typed languages, data access in

dynamic getters for string maps 364367

accessing nested map fields 366367

accessing non-nested map fields 365366

generic access to class members 373380

automatic JSON serialization of objects 378380

nested class members 376378

non-nested class members 373376

typed getters for maps 370372

accessing nested map fields 371372

accessing non-nested map fields 370371

value getters for maps 367370

accessing nested map fields 368370

accessing non-nested map fields 367368

strict mode, JavaScript 177

string maps 44

structural difference 99106, 193195

structural sharing 72, 7481

SuperMembersByEmail index 66

swap method 166, 172173

switch statements 276

System.addMember function 127

System class 8485, 126

SystemConsistency class 106108

SystemData class 108, 172173

SystemState class 8486, 88, 127

SystemState.commit function 127

SystemState.commit method 85

SystemState.get function 127

system state integrity, ensuring 8586

SystemState object 132133

T

toJS() method 187

toJSON() method 192

toString() method 373

toUpperCase string method 365

tree of function calls 113115

Typed getters Approach 380

TypeError exception 177

U

UML class diagrams 612

unit tests 110

automatic generation of 262269

debugging 321329

for data manipulation code 112121

tree of function calls 113115

for mutations 126133

for queries 121125

simplicity of data-oriented test cases 110112

unit tests for data manipulation 112121

UnSupportedOperationException exception 179, 185

unwind function 307

unwind operator 305309

updating values in maps eloquently 296299

usage relations 8

User class 5, 1011, 20, 24, 338

UserManagement.addMember function 127

UserManagement class 67, 126

UserManagement hash map 78

UserManagement.isLibrarian function 66

UserManagement module 35, 3940, 67

UserManagement record 6566

User record type 68

uuid third-party library 322

UUID (universal unique identifier) 322

V

validate function 147, 158, 356

value getters 380

valueSeq method 189

VIPMember class 22

VIPMembersByEmail index 66

W

web services

internals of 222224

passing information forward 231234

representing client requests as maps 225227

representing server responses as maps 227231

search result enrichment 234243

while loop 170

word boundaries regular expression 327

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.183.150