About the Author
Gennadiy Zlobin works as Lead Software Engineer and Technical Leader in the Russian music service, Zvooq.ru. His current employer is Zvooq Ltd. He has been using Python as the primary language for more than 4 years, enjoying its elegance and power every day. His professional interests include high-load software architectures, good engineering practices, Android OS, and natural language processing.
Previously, he worked for the company that had the first search engine in Russia, called Rambler. He was engaged in airline tickets' meta search service and Rambler's index page.
I would like to thank my wife, Jane, for her patience and support. I really appreciate it.
I am also grateful to my parents, Galina and Vitaliy for believing in me. I love all of you.
About the Reviewers
David Corne is a professional Software Engineer based in Birmingham, UK. He works for an engineering company that makes CAD/CAM software. The application he is working on is written in C++ with a C# view layer in order to use WPF.
However, he has a keen interest in Python. He has made many varied applications in Python. These range from a real-time updating editor for Markdown, to a utility for dice rolling, and PDF reading.
Kamilla Holanda Crozara is in her last year of college and is studying Software Engineering and works at National Institute of Standards and Technology as a Guest Researcher. She started to learn Python around two years ago, and it's her favorite language although she has some experience with C, Java, and Perl languages. She's a Linux user and has a special interest in contributing towards open source projects.
Sakis Kasampalis is based in the Netherlands, where he currently works as a Software Engineer for a location-based content B2B provider. When he is not writing C++ and Rails code for a living, Sakis enjoys playing with his mbed microcontroller and studying about programming, software engineering, and operating systems.
He is not dogmatic about particular programming languages and tools; his principle is that the right tool should be used for the right job. One of his favorite tools is Python because he finds it very productive.
Among his FOSS activities is maintaining a GitHub repository related to implementing design patterns in Python, which is available at https://github.com/faif/python-patterns.
www.PacktPub.com
Support files, eBooks, discount offers and more
You might want to visit www.PacktPub.com for support files and downloads related to your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at > for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.
Why Subscribe?
- Fully searchable across every book published by Packt
- Copy and paste, print and bookmark content
- On demand and accessible via web browser
Free Access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.
Preface
Python is a great programming language, elegant and concise, and at the same time, very powerful. It has all the essential object-oriented features and can be used to implement design patterns. A design pattern is a general reusable solution to a commonly occurring problem within a given context. In everyday work, a programmer faces issues that have been solved so many times in the past by other developers that they have evolved common patterns to solve them.
The design pattern is not a concrete step to solve a problem, such as an algorithm; it is rather a practice or a description of how to solve a problem that can be used in different situations and implemented in different languages.
The design pattern accelerates the development process, providing a proven practice to solve some type of problem. It is often more preferable than using an unproven one because invisible problems often occur during the implementation, and the solving of unforeseen problems slows down the development dramatically.
Besides that, it's a tool of communication between programmers. It's much easier to say, "We use here the observer design pattern" rather than describing what the code actually does.
Studying design patterns is a good next step on the road to becoming a great developer, and this book is a good jumpstart.
What this book covers
, Model-View-Controller , describes what the model, view, and controller are, how to use them together, and ends with the implementation of a very simple URL shortening service.
, Creating Only One Object with the Singleton Pattern