Cover image for Spring Python 1.1.
Spring Python 1.1.
Title:
Spring Python 1.1.
Author:
Turnquist, Greg L.
ISBN:
9781849510677
Personal Author:
Physical Description:
1 online resource (278 pages)
Contents:
Spring Python 1.1 -- Table of Contents -- Spring Python 1.1 -- Credits -- About the Author -- About the Reviewers -- Preface -- What this book covers -- What you need for this book -- Who this book is for -- Conventions -- Reader feedback -- Customer support -- Errata -- Piracy -- Questions -- 1. Getting Started with Spring Python -- Spring Python for Python developers -- Exploring Spring Python's non-invasive nature -- Adding in some useful templates -- Spring Python for Java developers -- Extending Spring Python -- Installing Spring Python -- Setting up an environment for Spring Python -- Installing from a pre-built binary download -- Installing from source -- Spring Python community -- Summary -- 2. The Heart of Spring Python-Inversion of Control -- Swapping production code with test doubles -- More about Inversion of Control -- Adding Inversion of Control to our application -- Dependency Injection a.k.a. the Hollywood principle -- Adding Inversion of Control to our test -- Container versus Context -- Lazy objects -- Scoped objects -- Property driven objects -- Post processor objects -- Context aware objects -- Debate about IoC in dynamic languages -- Migrating a Spring Java application to Python -- Summary -- 3. Adding Services to APIs -- AOP from 10,000 feet -- Crosscutting versus hierarchical -- Crosscutting elements -- Weaving crosscutting behavior -- Adding caching to Spring Python objects -- Applying many advisors to a service -- Performance cost of AOP -- AOP is a paradigm, not a library -- Distinct features of Spring Python's AOP module -- The risks of AOP -- AOP is part of the Spring triangle -- Testing our aspects -- Decoupling the service from the advice -- Testing our service -- Confirming that our service is correctly woven into the API -- Summary -- 4. Easily Writing SQL Queries with Spring Python -- The classic SQL issue.

Parameterizing the code -- Replacing multiple lines of query code with one line of Spring Python -- The Spring triangle-Portable Service Abstractions -- Using DatabaseTemplate to retrieve objects -- Mapping queries by convention over configuration -- Mapping queries into dictionaries -- DatabaseTemplate and ORMs -- Solutions provided by DatabaseTemplate -- How DatabaseTemplate and ORMs can work together -- Testing our data access layer with mocks -- How much testing is enough? -- Summary -- 5. Adding Integrity to your Data Access with Transactions -- Classic transaction issues -- Creating a banking application -- Transactions and their properties -- Getting transactions right is hard -- Simplify by using @transactional -- More about TransactionTemplate -- The Spring Triangle-Portable Service Abstractions -- Programmatic transactions -- Configuring with the IoC container -- Configuring without the IoC container -- @transactional versus programmatic -- Making new functions play nice with existing transactions -- How Spring Python lets us define a transaction's ACID properties -- Applying transactions to non-transactional code -- Testing your transactions -- Summary -- 6. Securing your Application with Spring Python -- Problems with coding security by hand -- Building web applications ignoring security -- Looking at our web application from 10,000 feet -- Handling new security requirements -- Authentication confirms "who you are" -- Authorization confirms "what you can do" -- Time to add security to our application -- Accessing security data from within the app -- Testing application security -- Configuring SQL-based security -- Configuring LDAP-based security -- Using multiple security providers is easy -- Migrating from an old security solution to a new one -- Supporting multiple user communities -- Providing redundant security access.

Coding our own security extension -- Coding a custom authentication provider -- Some of the challenges with Spring Python Security -- Summary -- 7. Scaling your Application Across Nodes with Spring Python's Remoting -- Introduction to Pyro (Python Remote Objects) -- Converting a simple application into a distributed one on the same machine -- Fetching the service from an IoC container -- Creating a client to call the service -- Making our application distributed without changing the client -- Is our example contrived? -- Spring Python is non-invasive -- Scaling our application -- Converting the single-node backend into multiple instances -- Creating a round-robin dispatcher -- Adjusting client configuration without client code knowing its talking to multiple node backend -- Summary -- 8. Case Study I-Integrating Spring Python with your Web Application -- Requirements for a good bank -- Building a skeleton web application -- Securing the application -- Building some basic customer functions -- Coding more features -- Updating the main page with more features -- Refining the ability to open an account -- Adding the ability to close an account -- Adding the ability to withdraw money -- Adding the ability to deposit money -- Adding the ability to transfer money -- Showing account history -- Issues with customer features -- Securing Alice's accounts -- Adding overdraft protection to withdrawals -- Making transfers transactional -- Remotely accessing logs -- Creating audit logs -- Summary -- 9. Creating Skeleton Apps with Coily -- Plugin approach of Coily -- Key functions of coily -- Required parts of a plugin -- Creating a skeleton CherryPy app -- Summary -- 10. Case Study II-Integrating Spring Python with your Java Application -- Building a flight reservation system -- Building a web app the fastest way -- Looking up existing flights.

Moving from sample Python data to real Java data -- Issues with wrapping Java code -- Summary -- Index.
Abstract:
The book is an introduction to Spring Python. It starts with simple practical applications, moving on to more advanced applications with two advanced case studies at the end of the book. It is packed with screenshots, examples, and ready-to-use code making it very suitable for a beginner while also showing tactics and concepts suitable for the most experienced developers. Each chapter starts with a simple problem to solve, and then dives into how Spring Python provides the solution with step-by-step code samples. Along the way, screenshots and diagrams are used to show critical parts of the solution. The case studies start off with a handful of use cases, and then proceed step-by-step to incrementally develop features. Some use cases are left to the reader to implement as an exercise. Key problems discovered along the way are exposed and then solved, giving the reader the chance to solve them, or to read the author's solutions. This book is for Python developers who want to take their applications to the next level, by adding/using parts that scale their application up, without adding unnecessary complexity. It is also helpful for Java developers who want to mix in some Python to speed up their coding effort.
Local Note:
Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2017. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries.
Electronic Access:
Click to View
Holds: Copies: