Martin Fowler

article thumbnail

Testing server calls in generated HTML

Martin Fowler

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.

Testing 196
article thumbnail

Testing the behavior of generated HTML

Martin Fowler

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?

Testing 188
Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

article thumbnail

Prefetching in Single-Page Applications

Martin Fowler

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.

article thumbnail

Parameterizing HTML template tests

Martin Fowler

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.

Testing 192
article thumbnail

Code Splitting in Single-Page Applications

Martin Fowler

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.

article thumbnail

A short note on how I use and render footnotes

Martin Fowler

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.

148
148
article thumbnail

Testing the contents of generated HTML

Martin Fowler

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.

Testing 188