ProgrammingPro #76: Python 3.13 RC 3, Django’s MVT Architecture, and PostgreSQL 17 Performance Enhancements
Welcome to this week’s edition of ProgrammingPro!
In today’s Expert Insight, we bring you an excerpt from the recently published book, Django 5 for the Impatient - Second Edition, which introduces Django's MVT architecture, briefly outlining how Models, Views, and Templates work together to build a scalable web application.
News Highlights: Python 3.13.0 RC 3 introduces features like free-threaded mode and JIT; PostgreSQL 17 enhances performance, storage, and JSON support; OpenAI reveals Realtime API, prompt caching, and AI updates; and MongoDB 8.0 boosts read throughput, time series handling, and sharding efficiency.
My top 5 picks from today’s learning resources:
Comparative Study of Java Native, Platform, and Virtual Threads🧵
Planning, Automation and Monorepo: How Monzo Does Code Migrations across 2800 Microservices🚀
021 - the tortoise and the hare - building faster with low level programming🐢🐇
But there’s more, so dive right in.
Stay Awesome!
Divya Anne Selvaraj
Editor-in-Chief
PS: The October survey is now live. Do take the opportunity to leave us your feedback, request a learning resource, and earn your one Packt credit for this month.

Use code LASTCHANCE40 at checkout
🗞️News and Analysis🔎
Python 3.13.0 release candidate 3 released: It includes new features like a free-threaded build mode, an improved interpreter, experimental JIT, and typing enhancements. The final release is now scheduled for October 7, 2024.
JRuby 10 due to arrive in early-2025: The Ruby implementation for the JVM, is set to release in early 2025 and will support Ruby 3.4.0, Rails 7.1+, and require Java 17 or 21 to leverage modern JVM features.
Java News Roundup: Proposed Schedule for JDK 24, SecurityManager Disabled, Commonhaus Foundation: Also covers JEP 475 (G1 garbage collector changes), updates in Spring Framework, and more.
PostgreSQL 17 adds performance gains, storage optimizations and more: The version also introduces expanded JSON support, including SQL/JSON standards for data manipulation.
OpenAI announces Realtime API, prompt caching, and more at DevDay: Vision fine-tuning, model distillation, and the company's recent $6.6 billion funding round were also discussed.
MongoDB 8.0 offers significant performance improvements to read throughput, bulk writes, and more: It also offers improved handling of time series data, more efficient sharding, and control over query performance.
The SQLite team is preparing an efficient remote replication tool: The tool uses ssh for secure data transfer, optimizes bandwidth by only transmitting changed data pages, and targets scenarios needing read-heavy access.
🎓Tutorials and Learning Resources💡
Python
Python 3.13: Cool New Features for You to Try: Releasing finally on October 7th, Python 3.13 introduces several improvements, including an enhanced REPL, clearer error messages, and progress on removing the GIL.
For more Python resources, go to PythonPro
C# and .NET
Which .NET ORM - Dapper or Entity Framework?: Helps you decide when to choose Dapper or EF based on project size, database requirements, and adaptability.
🎓Tutorial | Embracing DRY Principle to Streamline Test Automation: Contrasts tests with and without DRY, demonstrating how reusable utility functions and base classes enhance code efficiency and readability.
🎓Tutorial | Dotnet Source Generators in 2024 Part 1 - Getting Started: Introduces .NET source generators, focusing on their purpose, types, and usage, particularly for code generation and reducing boilerplate in C# projects.
C and C++
Lesser known tricks, quirks and features of C: Covers topics ranging from advanced array manipulation and memory usage to uncommon syntactic constructs and obscure type qualifiers.
It is never too late to write your own C/C++ command-line utilities: Discusses how a custom C++ command-line utility greatly outperformed a Python script in querying JSON files, improving performance tenfold.
std::initializer_list in C++ 2/2 - Caveats and Improvements: Explores the issues and limitations of
std::initializer_list
in C++, and suggests alternatives like variadic factory functions to reduce copies and improve efficiency.
Java
🎓Tutorial | How to use generics in your Java programs: Demonstrates generics with collections, type safety benefits, examples of generic classes, and discusses raw types versus generics.
Class File API - Not Your Everyday Java API: Introduces the Class-File API, a modern Java library for bytecode manipulation, aimed primarily at framework, tooling, and advanced Java developers.
Comparative Study of Java Native, Platform and Virtual Threads: Highlights how virtual threads introduced by Project Loom improve performance and resource management.
JavaScript and TypeScript
A guide to destructuring in JavaScript: covers binding patterns, default values, rest properties, and the spread operator for working with complex data structures.
Strict mode: Outlines how to invoke strict mode, its restrictions on syntax and behavior, and the advantages over "sloppy mode."
📖Open Access Book | The Concise TypeScript Book: Provides a clear and comprehensive overview of TypeScript, covering its type system, advanced features, and latest language updates.
Go
Some Go web dev notes: Discusses recent learnings from developing a website in Go, covering improved routing in Go 1.22, SQL query handling using
sqlc
, performance tips for SQLite, and memory management enhancements.CPU Throttling for containerized Go applications explained: Covers Kubernetes CPU limits, Go's concurrency model, how CPU quotas are enforced, and strategies to mitigate throttling, including configuring GOMAXPROCS.
Rust
Code Generation in Rust vs C++26: Explores Rust’s
derive
procedural macro for code generation and how the upcoming C++26 reflection feature, with introspection and annotation capabilities, offers an equally powerful approach.Should you use Rust in LLM based tools for performance?: Discusses why Rust was chosen for building Swiftide, a text-processing toolchain, and its performance compared to Python's Langchain.
Swift
URLSession in Swift: The Essential Guide [with Examples]: Explains the use of URLSession for network requests, handling protocols like HTTP and FTP, and parsing JSON data.
Using the #expect macro for Swift Testing: Discusses the #expect macro in Swift Testing, Apple's new framework for writing tests which replaces various XCTest assertions, simplifying debugging.
PHP
Laravel 11.26 Released: The version introduces features like graceful stopping of process pools, using Enums for rate limiting, an Artisan command to create job middleware, and enhanced factory annotations for model factories.
SQL
Troubleshooting SQL queries with omni_id: Discusses how by creating new types for primary keys (e.g., user_id, product_id), omni_id helps identify issues, such as incorrect column comparisons, and enhances query accuracy.
Ruby
Building a Vector Database in Ruby Using Hash and PStore: Shows how to build a vector database for semantic search and provides an overview of generating embeddings with OpenAI's API, and calculating cosine similarity.
Kotlin
Pushing the Boundaries of Compose Multiplatform with AGSL Shaders: Covers the anatomy of shaders, their use in Kotlin Multiplatform, and demonstrates applying effects like vignetting in the Photo-FX app.
🌟Best Practices and Advice🚀
How to Minimize Latency and Cost in Distributed Systems: Discusses optimizing distributed systems to reduce data transfer costs and latency through zone-aware routing.
Planning, Automation and Monorepo: How Monzo Does Code Migrations across 2800 Microservices: Discusses how Monzo efficiently migrates services without downtime, enabling gradual rollouts and quick rollbacks.
021 - the tortoise and the hare - building faster with low level programming: Argues that while initially slower, low-level programming offers full control and fewer trade-offs, potentially leading to more optimal results.
Five Common Misconceptions About Event-Driven Architecture (EDA): Debunks 5 common misconceptions about EDA, highlighting its distinct characteristics, differences from related concepts, and benefits.
🧠Expert Insight📚
Here’s an excerpt from “Chapter 1: Installing Python and Django, and Introducing the Movies Store Application” in the book, Django 5 for the Impatient - Second Edition by Daniel Correa and Greg Lim, published in September 2024.
Introducing the Django MVT architecture
There are various methodologies and approaches to design and code web applications. One approach involves consolidating all code into a single file to
construct the entire web application. However, finding errors within such a file, often comprising thousands of lines of code, can be incredibly challenging. Alternatively, other strategies distribute code across different files and directories. Additionally, some approaches segment an application into multiple smaller applications dispersed across several servers, although managing the distribution of these servers presents its own set of challenges.
Organizing your code effectively presents challenges. This is why developers and computer scientists have created software architectural patterns. Software architectural patterns offer structural frameworks or layouts to address common software design issues. By leveraging these patterns, start-ups and inexperienced developers can avoid reinventing solutions for every new project. Various architectural patterns exist, including Model-View-Controller (MVC), Model-View-Template (MVT), layers, service-oriented, and microservices. Each pattern comes with its own set of pros and cons. Many frameworks, such as Django, adhere to specific patterns in constructing their applications.
In the case of Django, Django is based on the MVT pattern. This pattern is similar to MVC but with some differences in the responsibilities of each component:
Models: The model represents the data structure. In Django, models are Python classes that define the structure of the data and how it interacts with the database. Models handle tasks such as querying a database, performing CRUD (Create, Read, Update, Delete) operations, and enforcing data validation. In the case of the Movies Store app, Movie, Review, Order and the other classes from our class diagram will be coded as Django models.
Views: Views in Django are responsible for processing user requests and returning appropriate responses. Views typically receive HTTP requests from clients, fetch data from the database using models, and render templates to generate HTML responses. In Django, views are Python functions or classes that accept HTTP requests and return HTTP responses. In the case of the Movies Store app, we will create views and functions to handle the movies, accounts, and cart, among others.
Templates: Templates are used to generate HTML dynamically. They contain the application’s user interface and define how data from the views should be displayed to the users. In the case of the Movies Store app, we will create a template to allow users to log in, a template to list movies, and a template to display the shopping cart, among others.
The MVT pattern offers several benefits such as enhanced code separation, facilitated collaboration among multiple team members, simplified error identification, increased code reusability, and improved maintainability. Figure 1.11 illustrates the software architecture of the Movies Store, which we will develop throughout this book. While it may seem overwhelming now, you will understand the intricacies of this architecture by the book’s conclusion. We will delve deeper into the architecture in the final chapters.
Figure 1.11 – The Movies Store software architecture diagram
Let’s briefly analyze this architecture:
Positioned on the left are the clients, which are the users of our application, who use browsers on mobile or desktop devices. These clients establish connections with the application via the Hypertext Transfer Protocol (HTTP), providing users with a means to interact with our web application.
On the right side, we have the server, which hosts our application code.
All client interactions first pass for a project-level URL file called
urls.py
. This file is located in the main project folder calledmoviesstore/
. URLs will be explored in Chapter 2. This project folder also contains atemplates/
folder in which we will design a reusable base template. Base templates will be explored in Chapter 3.The project-level URL file passes the interaction to an app-level URL file. For this project, we will design and implement four Django apps – home, movies, cart, and accounts. Django apps will be explored in Chapter 2.
Each app-level URL file passes the interaction to a
views.py
file. Views will be explored in Chapter 2.Views communicate with models, if required, and pass information to the templates, which are finally delivered to the clients as HTML, CSS, and JS code. Templates will be explored in Chapter 2, and models will be explored in Chapter 5.
Django 5 for the Impatient - Second Edition was published in September 2024. Packt library subscribers can continue reading the entire book for free or you can buy the book here!
Get the eBook for $27.99 $18.99
Get the Print book for $34.99 $23.99
🛠️Useful Tools⚒️
iceoryx2 v0.4.0: An IPC library for fast inter-process communication with decentralized architecture, modularity, and advanced QoS.
dust-core: An Apache-licensed Java library for creating efficient, scalable actor-based systems using lightweight threading.
Quadratic: A modern spreadsheet merging JavaScript, Python, SQL, and formulas for dynamic data analysis, API integration, and visualizations.
That’s all for today.
We have an entire range of newsletters with focused content for tech pros. Subscribe to the ones you find the most useful here.
If your company is interested in reaching an audience of developers, software engineers, and tech decision makers, you may want to advertise with us.