0

Clean SAPUI5

A Style Guide for Developers, SAP PRESS: englisch

Bertolozi, Daniel/Buchholz, Arnaud/Haeuptle, Klaus et al
Erschienen am 02.12.2022, 1. Auflage 2022
79,95 €
(inkl. MwSt.)

Lieferbar innerhalb 1 - 2 Wochen

In den Warenkorb
Bibliografische Daten
ISBN/EAN: 9781493222285
Sprache: Englisch
Umfang: 530 S.
Format (T/L/B): 3.6 x 26.1 x 18.5 cm
Einband: gebundenes Buch

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, youll 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

Produktsicherheitsverordnung

Hersteller:
Rheinwerk Publishing, Inc.
info@rheinwerk-publishing.com
2 Heritage Drive, Suite 305
US 2171 Quincy
Importeur:
Rheinwerk Verlag GmbH
Rheinwerk Verlag GmbH
service@rheinwerk-verlag.de
Rheinwerkallee 4
DE 53227 Bonn

Autorenportrait

Daniel Bertolozi is a software developer at SAP, with more than 5 years of experience focused on SAP Fiori development. He has worked on several projects implementing SAPUI5 applications (in JavaScript and TypeScript) applying best practices for code quality, and he is actively engaged in disseminating agile software engineering practices around SAP. Daniel's approach to software development follows Robert C. Martin's phrase: "The only way to go fast, is to go well". If quality decreases, speed eventually will too, and that's what we want to avoid.

Inhalt

... Who This Book Is For ... 17 ... How This Book Is Organized ... 18 ... Acknowledgments ... 20 ... Conclusion ... 22 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.1 ... JavaScript ES6+ Features ... 32 2.2 ... TypeScript ... 106 2.3 ... Summary ... 117 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.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.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.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.1 ... Variables ... 275 7.2 ... Literals ... 279 7.3 ... Summary ... 297 8.1 ... Conditionals ... 299 8.2 ... Loops ... 303 8.3 ... Conditional Complexity ... 306 8.4 ... Summary ... 313 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.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.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.1 ... Linting ... 399 12.2 ... Code Metrics ... 417 12.3 ... Summary ... 437 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.1 ... TypeScript ... 471 14.2 ... Web Components ... 485 14.3 ... Fundamental Library ... 494 14.4 ... Summary ... 498 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

Weitere Artikel aus der Kategorie "Informatik, EDV/Programmiersprachen"

Alle Artikel anzeigen