Introduction
The motivation for this book comes from observation within my own career trajectory that university level coding practices significantly differ from that expected from software engineers at company. "Productionizing" a codebase is to incorporate best practices covering various architecture and implementation concerns within the codebase, such that it makes the code easier to read and understand, easier to maintain, easier to enhance to accommodate future business requirements, and easier to seek contribution from other team members. However, I haven't found books that cover this topic, or maybe I am just unaware of them. Many code-tutoring websites also don't cover such practices and mainly focus on the development of code-writing skills. I feel that StackOverflow does provides many discussions that help with "productionizing" the code, but those aren't collected at single location for easy reference.
What is covered
With "Productionizing Backend Development", I want to emphasize on language-agnostic coding practices that makes the code easier to read and understand, easier to maintain, easier to enhance to accommodate future business requirements, and easier to seek contribution from other team members. This idea also plays well with the Agile methodology of software development. An emphasis is put on writing code that makes it easy to transfer code ownership, enabling other team members to understand, contribute, maintain and ultimately, take ownership of a codebase initially written by someone else. In addition to above, it is also emphasized to foster coding practices that bring in other goodies like modularity, reusability, testability and documentation in the codebase. Just to mention again, the suggestion in this book are kept language agnostic.
One line summary
To capture the essence of this book in one-line, When in doubt, SOLID it out! Meaning: when developing a web-application, if you ever feel confused on how to proceed, look to "SOLID" principles for guidance on how to proceed. Most of the patterns and practices for writing a great software application falls down to understanding and applying these principles. The topic is further discussed in the corresponding section within the architecture glossary.
Limitations
This book does not intend to become or support a platform where reasoned discussions are stifled. I acknowledge that the content in the book are based on a subjective opinions from myself. I've tried my best to provide reason(s) that justify the corresponding opinion. Whenever possible, I have added external references to support my viewpoint; However, I want to point out that the references used are links from any website that I can find, and so it is not a strong reference. Whenever possible, alternatives opinions are identified, but not exhaustively, and it is reasoned why a suggested opinion is better than alternative opinions. All being said, the truth still holds that the content in the book are based on subjective opinions from myself and it may not always hold. For example, it may be necessary to develop some code very quickly so that it can be put in production, and the patterns around customer interaction with the product can be identified, which is then used to identify the paths for future development of the product. To achieve speed in code development, it may be preferable to temporarily hold-back on implementing the practices suggested in this book, and instead incur technical debt, which can be fixed at a later time. Finally, I want to acknowledge that the concept of a "good architecture" itself changes with time, available infrastructure and community support. Hopefully, this book can provide words of advice and remain useful for a long term before it becomes obsolete. However, it must never be seen as a dictum, setting a standard that is aspired to without having any contextual understanding for doing so. For example, this book doesn't intend to rationalize breaking away from your team's coding practices. It is instead intended to identify topics that can be used to start a discussion within the team with a goal to generate a consensus around evolving the coding practices. Blindly adhering to text of this book is discouraged because having "A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines" (Reference: Self-Reliance), and this book does not intend to become or support a platform where reasoned discussions are stifled.
Just to mention it explicitly, the book doesn't cover how to write basic codes. It is assumed that the reader has experience in server-side development in some coding language. There are many good tutorials available to learn Python and Django, or Java and Spring. For Python, one may use Python docs, W3Schools, learnpython.org. For Django, one may use DjangoProject, Mozilla. For Java, Oracle, W3Schools can be used. For Spring, spring.io, baeldung.com can be used.
As mentioned above, the suggestion in this book are kept language agnostic. So, it doesn't go into language/framework specific code implementation to architecture points discussed in this book. Even for the sugestions covered in the book, they assume a use of REST API for communication with backend. Server-side rendering (like JSP, Django templates) are not covered. REST APIs have become extremely prevelant and cover almost every scenario that one can face. If working with Java/Spring, Spring Boot can be used for development of REST services (Note that Spring-Initializr is a really helpful tool for starting with Spring Boot). If working with Python/Django, Django-Rest-Framework can be used for development of REST services.
Other references
- If you want to brush up on data structures, then this Wikipedia article has a good list of data structures.
- If you language of choice is Java, at least complete "Effective Java" by "Joshua Bloch" before starting this book (Amazon) because that will be so much more better use of your time.
- If you would prefer to get a broad understanding of software engineering before delving into the specifics of backend development as covered in this book, then I suggest going over the Software Engineering wiki book.
Using personal notes
Whenever reading any e-book, I've always felt that the ability to add and share my own thoughts is missing; A feature provided by hardcopies of a book wherein notes can be added in page margins. So, in this book, a framework has been added enabling readers to add their own personal notes. The readers are highly encouraged to add their notes, save it for futue use, and also share their notes with others (be careful when accepting notes from others, see below and disclaimer). A note corresponding to a paragraph can be created by clicking on "Add note" button and adding the note text in the empty box that shows up after the button is pressed. By exitting the box, the new/modified note text is automatically saved. If the text in a note box is clered, then the note will get deleted. Multiple notes can be added for an particular paragraph and they'll get sorted by time when the note was created.
- WORDS OF CAUTION:
- If applying someone else's notes, realize that you may be vulnerable to XSS attacks. Use caution and your judgement.
- Your personal notes are not saved on any other server, and are only present on your computer. It is suggested to periodically save a copy of the notes, else you may lose the changes. The loss may happen sooner than latter if you are working on incognito mode. So, please consider saving your work before clearing out browser or closing all incognito tabs.
Upload notes
Click the button below to select a note file from which to read and upload the notes. The newly uploaded notes will merge with the existing notes.
Download notes
Click the button below to download notes as a json file. The downloaded note file name starts with prefix "prodBackendDev" to identify that the notes belong to this book. It will also have a numeric timestamp to help identify the time when it was downloaded. Hopefully, this helps in identifying the correct file to be uploaded at a later time.
Clear all notes
Click the button below to clear all notes. This action cannot be undone and you will need to upload a notes file again to access notes. If you have unsaved changes, it is suggested to save a copy before clearing all notes. You may want to use this option if, say, you have completed the book, or don't want to proceed with it ..and you want to clear all locally stored data corresponding to this book.
Acknowledgment
The work contained herein are derived using both internal and external conversations over the course of my career, while working through multiple challenges. I don't want to undermine my own efforts and contribution, and more than that, I don't want to undermine the contributions of many wonderful people with whom I've had the chance to interact either directly or indirectly (via free content on the web). I am extremely thankful for all the contributions from which I've learnt a lot. If I am able to convey important information, it is only because I stand on the shoulders of giants; if not, then that's my own folly!
Disclaimer
Disclaimers for Kunj Prasad's webpage
Kunj Prasad ("Author") is providing the website ("Site") as a service. The information, advice, links and/or any other materials ("Content") made available through the Site are for informational purposes only and are not a substitute for professional legal advice or consultation. Use of and access to the Site or any Content on the Site, or any of the e-mail, website, social media or other like links contained within the Site, do not create any contractual relationship between any parties. Content made available through the Site does not represent endorsements or recommendations by the Author. Any opinions expressed are the opinions of the Author and does not necessarily reflect the views and opinions of any associated companies. Content may not be complete, correct, or up to date, and some Content may have been obtained or provided without proper citation or review. Although the Content may include links providing direct access to other Internet resources, the Author is not responsible for the accuracy, information content and security risk associated with these sites. All users of the Site relinquish any or all claims against the party providing the Content and any other users, that may arise from reliance on any information obtained from the Site. The Author is not responsible for, and expressly disclaims all liability for, damages of any kind arising out of use, reference to, or reliance on any information contained within this website.
The site allows users to upload notes files. All users of the Site relinquish any or all claims against the party providing the Content for any damage that may arise from using the notes feature.
Consent
By using this website, you hereby consent to this disclaimer and agree to its terms.
Update
Should there be an update, amend or any changes to this document, those changes will be prominently posted here.