✓ Schweizer Online-Shop
Clean SAPUI5
Erhältlich:Nicht auf LagerBuch (Hardcover): Fachbuch

Clean SAPUI5

A Style Guide for Developers

von Klaus Haeuptle, Rodrigo Jordão, Christian Lehmann

Unsere Artikel-Nr.
QWW79EP

Beschreibung

SAPUI5 code needs to be easy to read and easy to update. Clean up your code with this guide from the experts. Learn how to leverage JavaScript features to write better SAPUI5 code. Then walk through detailed code examples and explanations for using modules, classes, functions, names, variables, literals, comments, code metrics, and more. Get the best practices you need for formatting, testing, implementation, and beyond. In this book, you’ll learn about: a. Key Concepts Understand the foundation of SAPUI5: JavaScript. Explore key JavaScript ES6 features such as arrow functions, spread syntax, and more. Then walk through different types of SAPUI5 projects, from library projects to freestyle applications. b. Best Practices Learn the rules for clean code. Dive into best practices for decoupling modules, structuring functions, declaring variables and literals, using control flow statements and loops, handling errors, performing automated tests, and more. c. Practical ExamplesPut theory into practice. Use detailed code examples for each concept to help you differentiate between clean and messy SAPUI5 code. Highlights include: 1) JavaScript 2) Modules and classes 3) Functions 4) Naming 5) Variables and literals 6) Control flow 7) Formatting8) Error handling 9) Comments10) Static code checks 11) Testing12) Implementation.

Spezifikationen

SpracheEnglisch
AutorKlaus Haeuptle, Rodrigo Jordão, Christian Lehmann, Daniel Bertolozi, Arnaud Buchholz, Narendran Natarajan Vaithianathan
KollektionSAP PRESS Englisch
Auflage1
Erscheinungsjahr2022
ErscheinungslandDeutschland
FormatBuch (Hardcover)
Anzahl Seiten530

Inhaltsverzeichnis

... Preface ... 17

... Who This Book Is For ... 17

... How This Book Is Organized ... 18

... Acknowledgments ... 20

... Conclusion ... 22

1 ... Introduction ... 23

1.1 ... What Is Clean SAPUI5? ... 23

1.2 ... How to Get Started with Clean SAPUI5 ... 26

1.3 ... How to Handle Legacy Code ... 27

1.4 ... How to Check Code Automatically ... 29

1.5 ... How Does Clean SAPUI5 Relate to Other Guides? ... 29

1.6 ... Summary ... 30

2 ... JavaScript and SAPUI5 ... 31

2.1 ... JavaScript ES6+ Features ... 32

2.2 ... TypeScript ... 106

2.3 ... Summary ... 117

3 ... Project Structure ... 119

3.1 ... Components in SAPUI5 ... 119

3.2 ... Important Artifacts ... 122

3.3 ... Freestyle Applications ... 129

3.4 ... SAP Fiori Elements ... 132

3.5 ... Library Projects ... 139

3.6 ... Model-View-Controller Assets ... 142

3.7 ... Summary ... 144

4 ... Modules and Classes ... 147

4.1 ... Controller Inflation ... 148

4.2 ... Module Lifecycle ... 179

4.3 ... Reusability and Testability ... 187

4.4 ... Service Modules versus Class Modules ... 197

4.5 ... Summary ... 204

5 ... Functions ... 205

5.1 ... Function Definition ... 205

5.2 ... The Function Object ... 206

5.3 ... Instance Methods ... 208

5.4 ... Event Handlers and Callbacks ... 211

5.5 ... Callback Execution Context ... 211

5.6 ... Getters and Setters ... 213

5.7 ... Anonymous Functions ... 215

5.8 ... Function Parameters ... 217

5.9 ... Promises ... 230

5.10 ... Generators ... 236

5.11 ... Function Body ... 237

5.12 ... Invoking Functions ... 245

5.13 ... Closures ... 247

5.14 ... Summary ... 248

6 ... Naming ... 249

6.1 ... Descriptive Names ... 249

6.2 ... Domain Terms ... 251

6.3 ... Design Patterns ... 252

6.4 ... Consistency ... 253

6.5 ... Shortening Names ... 254

6.6 ... Noise Words ... 255

6.7 ... Casing ... 255

6.8 ... Classes and Enums ... 257

6.9 ... Functions and Methods ... 258

6.10 ... Variables and Parameters ... 260

6.11 ... Private Members ... 265

6.12 ... Namespaces ... 267

6.13 ... Control IDs ... 268

6.14 ... Hungarian Notation ... 270

6.15 ... Alternative Rules ... 271

6.16 ... Summary ... 273

7 ... Variables and Literals ... 275

7.1 ... Variables ... 275

7.2 ... Literals ... 279

7.3 ... Summary ... 297

8 ... Control Flow ... 299

8.1 ... Conditionals ... 299

8.2 ... Loops ... 303

8.3 ... Conditional Complexity ... 306

8.4 ... Summary ... 313

9 ... Error Handling ... 315

9.1 ... throw and try/catch Statements ... 315

9.2 ... Using Error Objects ... 317

9.3 ... Error Handling Using Messages ... 318

9.4 ... Error Handling Using Controls ... 320

9.5 ... Error Handling Best Practices ... 323

9.6 ... Summary ... 327

10 ... Formatting ... 329

10.1 ... Motivation ... 329

10.2 ... Vertical versus Horizontal Formatting ... 330

10.3 ... Indentation ... 339

10.4 ... XML Views ... 341

10.5 ... Additional Considerations ... 347

10.6 ... Formatting for TypeScript in SAPUI5 ... 351

10.7 ... Building and Maintaining a Code Style Guide ... 361

10.8 ... Formatting Tools ... 363

10.9 ... Summary ... 368

11 ... Comments ... 369

11.1 ... Express Yourself in Code ... 369

11.2 ... The Good: Comment Placement and Usage ... 371

11.3 ... The Bad: Comments to Avoid or Refactor ... 381

11.4 ... The Ugly: Special Comments ... 391

11.5 ... Summary ... 394

12 ... Static Code Checks and Code Metrics ... 397

12.1 ... Linting ... 399

12.2 ... Code Metrics ... 417

12.3 ... Summary ... 437

13 ... Testing ... 439

13.1 ... Principles ... 440

13.2 ... Code under Test ... 451

13.3 ... Injection ... 453

13.4 ... Test Methods and Journeys ... 458

13.5 ... Test Data ... 461

13.6 ... Assertions ... 464

13.7 ... Summary ... 470

14 ... TypeScript and Related Technologies ... 471

14.1 ... TypeScript ... 471

14.2 ... Web Components ... 485

14.3 ... Fundamental Library ... 494

14.4 ... Summary ... 498

15 ... Implementing Clean SAPUI5 ... 499

15.1 ... A Common Understanding among Team Members ... 499

15.2 ... Collective Code Ownership ... 500

15.3 ... Clean Code Developer Initiative ... 501

15.4 ... Tackling the Broken Window Effect ... 503

15.5 ... Code Review and Learning ... 506

15.6 ... Clean Code Advisors ... 509

15.7 ... Learning Techniques ... 510

15.8 ... Continuous Learning in Cross-Functional Teams ... 514

15.9 ... Summary ... 516

... The Authors ... 517

... Index ... 519

Bewertungen

Produkt bewerten

Für dieses Produkt liegt noch keine Bewertung vor. Wenn Sie es gekauft haben, teilen Sie gerne Ihre Erfahrung.

Zahlungsarten

payment-einzahlungsscheinpayment-twintpayment-mastercardpayment-visapost-finance-paypayment-apple-paypayment-google-paysamsung-pay

Rechnung (Einzahlungsschein mit QR-Code), Twint, Kreditkarte, PostFinance, Apple, Google oder Samsung Pay.

Versand

Kostenlos: Schweiz & Liechtenstein

Rückgabe

Kein Rückgaberecht

Bei diesem Produkt hat entweder der Hersteller/Verlag das Rückgaberecht ausgeschlossen oder eine Rückgabe ist aufgrund des Vertriebssystems nicht möglich.