Code that is easy to understand and maintain is considered “clean.” When someone is working with code, it should be clear as to what it does and how it works.
Clean code provides developers the ability to extend the code and fix bugs since it’s built to withstand changes that won’t break existing functionality. The concepts used to write clean code allow developers to create better programs, which can be extended to any programming language. One of the fundamental values of clean SAPUI5 is readability.
The idea of readable code is that it can be understood easily and quickly.
There are languages that don’t necessarily offer the opportunity to write understandable code that can be comprehended quickly, since they’re limited to lower levels of detail functionality– this is not the case with SAPUI5. However, to take advantage of its capabilities, developers still need to learn how to write detailed code that is easy to understand.
For example, a statement like t = 42 is difficult for a reader to understand. It would be a time-consuming process for them to figure out that “t” stands for timeout, and that the number “42” is the duration in seconds. There needs to be more detail here to provide some context for the reader. To make this statement cleaner, the equivalent would read TimeoutInSeconds = DEFAULT_TIMEOUT.
While the detail in code is a huge factor of readability, it’s important to be mindful of how concise it is. If developers are looking at a copious amount of convoluted detail, it’s challenging to see the big picture and it’ll take up a lot of time to essentially de-code the code. Since people are reading code far more often than they’re writing it – whether rereading your own code during the debugging process, extending it with new features, or reading other developers’ code in reviews, support tickets, or when connecting new components – it’s vital to invest time into writing precise and simplified code so the reading portion can be more efficient and productive.
In addition to saving time, readable code is easier to verify, which means it’s harder to misinterpret. Code reviewers can spend less time on figuring out what the code means and its functionality, and more time on other important aspects. Clean code can also be debugged quicker than “dirty” code, and the fact that it’s clean means there are fewer bugs to deal with.
About the Clean SAPUI5 Book
Ready to write cleaner code? We’ve published our Clean SAPUI5 style guide to help developers get started with building their skills to create better programs.
You’ll explore the motivation for a number of significant technologies incorporated in the SAPUI5 ecosystem. Close out the book with a discussion on challenges and approaches to establishing clean SAPUI5 practices.
Who Is This Book For?
About the Author
Arnaud Buchholz is a development expert at SAP, with a focus on designing, developing, and enhancing SAPUI5 applications. He has more than 20 years of experience in software development.
Klaus Haeuptle is a lead architect, servant leader, coach, and community lead. During his career at SAP, he has worked as a developer and architect on several products based on various technologies. Additionally, he facilitates communities across SAP with the intention of sharing knowledge and improving practices, tools, technologies, and culture. He has influenced many improvements on testability for ABAP, SAP HANA, SAPUI5, and other technologies.
Rodrigo Jordão is a development architect at SAP currently working on supply chain management and related solutions. He has spent his SAP career working on various SAP products, from industry-specific solutions like intellectual property management to foundational products like sales and distribution. Prior to joining SAP, he worked as a web developer with Perl and Java and as a consultant with Microsoft technologies.
Christian Lehmann is a development architect working in the SAP S/4HANA quality area. During his 16 years at SAP, he has worked on the design, implementation, and test automation of SAP-based products, including applications based on SAPUI5. He is a contributor to the SAP ASE community for ABAP and SAPUI5 topics, and enjoys experiencing new approaches for automated software testing.
Narendran N V is a senior developer, trainer, and security expert at SAP. Currently, he is part of a team that is focused on building advanced available-to-promise (ATP), which is an integral part of order fulfillment in SAP S/4HANA. Previously, he was part of the FXperience (Bangalore) team, which accelerates SAP Fiori adoption within SAP S/4HANA. Narendran believes that “knowledge is like a garden; if it is not cultivated, it cannot be harvested," so he makes time to coach teams on topics like agile software engineering, SAPUI5 and SAP Fiori elements, and recently, the ABAP RESTful application programming model. Prior to SAP, he worked with IBM as a consultant, contributing to custom development in the areas of travel & expense and finance.
How to Purchase
If you’re interested in purchasing Clean SAPUI5: A Style Guide for Developers, follow this link and choose the format that works best for you: e-book, print edition, or bundle (both e-book and print).
If you want to continue learning about SAPUI5, or if you want information on other upcoming books or special offers, make sure to sign up for our topic newsletters or our weekly blog recap.