Testing server calls in generated HTML
Martin Fowler
JUNE 5, 2024
Matteo Vaccari completes his article on testing template-generated HTML, by looking at how to use TDD with pages that make calls to the server.
This site uses cookies to improve your experience. By viewing our content, you are accepting the use of cookies. To help us insure we adhere to various privacy regulations, please select your country/region of residence. If you do not select a country we will assume you are from the United States. View our privacy policy and terms of use.
Martin Fowler
JUNE 5, 2024
Matteo Vaccari completes his article on testing template-generated HTML, by looking at how to use TDD with pages that make calls to the server.
Martin Fowler
MAY 30, 2024
In the story so far, Matteo Vaccari has shown how to test the behaviour of the HTML templates, by checking the structure of the generated HTML. That's good, but what if we want to test the behavior of the HTML itself, plus any CSS and JavaScript it may use?
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Martin Fowler
MAY 29, 2024
Juntao Qiu's completes his set of data fetching patterns for single-page applications. Prefetching involves fetching data before it's called for in the application flow. Although this can mean data is fetched unnecessarily, it reduces latency should the data be needed.
Martin Fowler
MAY 29, 2024
Testing templates for generating HTML leads to tests that are very similar. Matteo Vaccari wisely likes to separate the common elements of tests from those that vary. He continues his article to show how he does this by parameterizing the tests. The resulting tests are easier to write, and more importantly, faster to understand and modify.
Martin Fowler
MAY 23, 2024
Single-Page Applications often require a lot of code to be downloaded to the browser, which can delay a page's initial appearance. Juntao Qiu's next pattern, Code Splitting , describes how this code can be divided up, so that modules are only loaded if they are going to be needed, and the dangers of doing so.
Martin Fowler
MAY 22, 2024
Last week I added a small feature to this website, changing the way it renders footnotes. That prompted me to write this quick note about how I use footnotes, and how that influences the best way to render them.
Martin Fowler
MAY 22, 2024
Matteo Vaccari continues his testing of template-generated HTML by describing tests for the contents of that HTML. He shows how to gradually build up the template, using Test-Driven Development in Go and Java.
Martin Fowler
APRIL 10, 2024
Alessio Ferri and Tom Coggrave complete their article about introducing seams into mainframe systems by looking how we can use data replication.
Martin Fowler
APRIL 4, 2024
Alessio Ferri and Tom Coggrave move on to analyzing the internal seams of the application by treating the database as a coarse-grained seam. They describe how they introduced seams into the database readers and writers.
Martin Fowler
APRIL 4, 2024
Mainframe processing is often organized into pipelines of batch processes consuming and creating data files. Alessio Ferri and Tom Coggrave show a couple of ways they found to introduce seams into these pipelines , so that processing could be replaced by steps in a replacement platform.
Martin Fowler
MARCH 28, 2024
As the enmuskification of Twitter continues, I’ve increasingly heard that more people are using LinkedIn to keep up with new professional material. So, a couple of weeks ago, I set up my LinkedIn account , so people can follow me on that platform. I’ve always avoided LinkedIn - I’ve found the whole vibe of connections rather off-putting. I get too much spam from people wanting to connect as it is.
Martin Fowler
MARCH 27, 2024
John Kordyback, a treasured colleague and friend, died last week, aged 64.
Martin Fowler
MARCH 27, 2024
Alessio Ferri and Tom Coggrave start detailing the seams they explored with two areas of external interfaces. Batch input of files are copied to new implementations while comparing the output of the processing pipelines. API access points can be covered with a proxy and traffic gradually directed to the new implementation.
Martin Fowler
MARCH 26, 2024
Mainframe systems continue to run much of the world's computing workload, but it's often difficult to add new features to support growing business needs. Furthermore the architectural challenges that make them slow to enhance also make them hard to replace. To reduce the risk involved, we use an incremental approach to legacy displacement, gradually replacing legacy capabilities with implementations in modern technology.
Martin Fowler
MARCH 19, 2024
Abi Noda and Tim Cochran complete their article on qualitative metrics by outlining how to capture them effectively. They discuss the mental steps that people go through as they respond to a survey and provide a template to get started when assessing developer experience. A final section looks at how qualitative and quantitative work together: often by starting with qualitative metrics to establish baselines and determine where to focus, followed with quantitative metrics to drill deeper into sp
Martin Fowler
MARCH 15, 2024
From time to time people ask me for a copy of the code I used in the opening chapter of Refactoring , so they can follow along themselves. I had Reasons for not providing this code, specifically laziness. Fortunately Emily Bache is more dedicated, and she has set up a github repository - the Theatrical Players Refactoring Kata - with the code, and enough tests to make it reasonable to do the refactoring.
Martin Fowler
MARCH 13, 2024
Abi Noda and Tim Cochran continue their discussion on using qualitative metrics to assess the productivity of development teams. In this installment they classify qualitative metrics into attitudinal and behavioral metrics. We also see that qualitative metrics allow you to measure things that are otherwise unmeasurable, provide missing visibility, and supply necessary context for quantitative data.
Martin Fowler
MARCH 12, 2024
Measuring developer productivity is a difficult challenge. Conventional metrics focused on development cycle time and throughput are limited, and there aren't obvious answers for where else to turn. Qualitative metrics offer a powerful way to measure and understand developer productivity using data derived from developers themselves. Abi Noda and Tim Cochran begin their discussion by explaining what a qualitative metric is and why we shouldn't reject them for being subjective or unreliable.
Martin Fowler
MARCH 5, 2024
When we gradually replace a legacy system, we have plenty of cases where the legacy system and its replacement need to interact. Since these legacy systems are often difficult, and costly, to change, we need a mechanism that can integrate elements of the replacement while minimizing the impact to the legacy system. Ian Cartwright, Rob Horn, and James Lewis explain how we can use Event Interception on state-changing events, allowing us to forward them to the replacement.
Martin Fowler
FEBRUARY 27, 2024
Improvements in communications technology have led an increasing number of teams that work in a Remote-First style, a trend that was boosted by the forced isolation of Covid-19 pandemic. But a team that operates remotely still benefits from face-to-face gatherings, and should do them every few months. Remote-first teams have everyone in a separate location, communicating entirely by email, chat, video and other communication tools.
Martin Fowler
FEBRUARY 13, 2024
LLM engineering involves much more than just prompt design or prompt engineering. Here David Tan and Jessie Wang reflect on how regular engineering practices such as testing and refactoring helped them deliver a prototype LLM application rapidly and reliably.
Martin Fowler
JANUARY 25, 2024
I’ve been using Emacs for many years, using it for any writing for my website, writing my books, and most of my programming. (Exceptions have been IntellJ IDEA for Java and RStudio for R.) As such I’ve been happy to see a lot of activity in the last few years to improve Emacs’s capabilities, making it feel rather less than a evolutionary dead end. One of the biggest improvements to my Emacs experience is using regexs for completion lists.
Martin Fowler
JANUARY 24, 2024
Tim and Premand begin their discussion of how to get out of the difficulties of onboarding by explaining how to create a path to effectiveness for new hires. Such a path outlines the needs of employee and how the onboarding process should fulfill them.
Martin Fowler
JANUARY 23, 2024
The last year has been a hard one for the technology industry, which faced its greatest waves of cutbacks and layoffs since the dotcom crash at the beginning of the century. As 2024 begins, we're seeing the early signs of a turn-around, which hopefully means technology organizations will soon be thinking of hiring again. Should such happy days return, firms will again run into the common problem of taking too long for new hires to become effective.
Martin Fowler
JANUARY 18, 2024
At the turn of the century, I was lucky to involved in several projects that developed the practice of Continuous Integration. I wrote up our lessons from this work in article on my website, where it continues to be a oft-referenced resource for this important practice. Late last year a colleague contacted me to say that the article, now nearly twenty years old, was still useful, but was showing its age.
Martin Fowler
JANUARY 4, 2024
When working with a legacy system it is valuable to identify and create seams: places where we can alter the behavior of the system without editing source code. Once we've found a seam, we can use it to break dependencies to simplify testing, insert probes to gain observability, and redirect program flow to new modules as part of legacy displacement.
Martin Fowler
JANUARY 2, 2024
Another year, another time to pick six favorite musical discoveries. 2023 includes ambient bluegrass, Afro-Andean funk, Northumbrian smallpipes, dancing kora, and Ukrainian folk jazz.
Martin Fowler
DECEMBER 12, 2023
Throughout my career, people have compared software development to “traditional” engineering, usually in a way to scold software developers for not doing a proper job. As someone who got his degree in Electronic Engineering, this resonated with me early in my career. But this way of thinking is flawed because most people have the wrong impression of how engineering works in practice.
Martin Fowler
DECEMBER 11, 2023
Test-Driven Development (TDD) is a technique for building software that guides software development by writing tests. It was developed by Kent Beck in the late 1990's as part of Extreme Programming. In essence we follow three simple steps repeatedly: Write a test for the next bit of functionality you want to add. Write the functional code until the test passes.
Martin Fowler
NOVEMBER 28, 2023
Over the last year, lots of developers have incorporated LLM coding assistants into their work, finding them a useful tool. But one of the problems of these tools is that they are unreliable, often coming up with poor or outright wrong-headed suggestions.
Martin Fowler
NOVEMBER 28, 2023
Over the last year, lots of developers have incorporated LLM coding assistants into their work, finding them a useful tool. But one of the problems of these tools is that they are unreliable, often coming up with poor or outright wrong-headed suggestions.
Martin Fowler
NOVEMBER 24, 2023
During the last four years, my colleague Unmesh Joshi been developing a collection of patterns to help us all better understand how modern distributed systems work. We've been publishing drafts of these patterns on this site. Now these have turned into a book, published by Addison-Wesley in my signature series. As such, we've now removed the work-in-progress drafts from this site, and have replaced them with a catalog of pattern summaries.
Martin Fowler
NOVEMBER 7, 2023
In the second (and final) part of his explanation of React Headless Components Juntao Qiu explores how a headless component allows us to create a visually different component that does the same base behavior, and how it encourages better factoring as we extend base behavior further.
Martin Fowler
NOVEMBER 2, 2023
It's now been a year since The Muskover, what does my use of social media look like now, both as a reader and a writer?
Martin Fowler
NOVEMBER 1, 2023
As React UI controls become more sophisticated, complex logic can get intertwined with the visual representation. This makes it hard to reason about the behavior of the component, hard to test it, and necessary to build similar components that need a different look. Juntao Qiu tackles this by using a Headless Component , which extracts all non-visual logic and state management, separating the brain of a component from its looks.
Martin Fowler
SEPTEMBER 19, 2023
How is code generation with GenAI different from more "traditional" code generators? The newest memo in Birgitta Böckeler's explorations of GenAI talks about abstraction levels in software engineering, and on which levels GenAI sits in the translation of our thoughts into zeros and ones.
Martin Fowler
AUGUST 15, 2023
Join Tim Cochran and Rickey Zachery on Thursday, September 7th 1-2pm EST for a webinar on Bottlenecks of Scaleups: Technology mistakes every growing startup makes. They researched Thoughtwork's portfolio to analyze why companies struggle to scale, spanning across Technology, People, and Product. Covering areas such as experimentation culture, overcomplicated architectures, onboarding, developer productivity, product and engineering collaboration, and cost efficiency.
Martin Fowler
AUGUST 14, 2023
We are saddened today to learn of the passing of Stefan Tilkov. We’ve met Stefan several times at workshops and conferences and always enjoyed his good company and insightful views. He advocated many of the things that we and our colleagues support - and as well as skillfully explaining these ideas, he also backed them up with concrete experience from his work.
Martin Fowler
AUGUST 10, 2023
In her 5th memo about exploring GenAI for software development, Birgitta Böckeler answers the frequently asked question if coding assistants are making the practice of Pair Programming obsolete. Spoiler alert: They don't.
Martin Fowler
AUGUST 10, 2023
Sarah Taraporewalla moves on to the remaining two strategic directions that are part of growing the business. Expanding into new customer segments can introduce new operational processes or channels. Inorganic growth (eg acquisitions and mergers) needs an understanding of the drivers of increased value and the long term expectation (eg merge or keep separate and divest) for the business unit.
Martin Fowler
AUGUST 10, 2023
When scaleups need to start working on cost efficiency, our experience is that they need to form a cost optimization team to work on the immediate steps that are needed. In this installment Sofia and Stefania describe how to understand the primary cost drivers, together with the levers to get them under control.
Martin Fowler
AUGUST 8, 2023
My colleague Sarah Taraporewalla describes an approach to building technology strategy that challenges the convention. It starts by identifying the overall strategic directions that the organization is considering, and using common aspects of these directions to indicate the investigations needed for the organization to understand the technology implications raised by that strategic change.
Martin Fowler
AUGUST 3, 2023
While coding assistants like Copilot can improve speed and flow, they can also disrupt it. Birgitta Böckeler looks at two ways in which they can get in the way : amplifying bad or outdated practices, and review fatigue.
Expert insights. Personalized for you.
Are you sure you want to cancel your subscriptions?
Let's personalize your content