Slice the rhubarb into chunks about 5cm long. Place in a pan with the sugar, orange zest and half of the orange juice. Bring up to a simmer and cook, stirring occasionally, for about 10 minutes until the rhubarb is soft.
Stir the rest of the orange juice into the cornflour to make a smooth paste and add to the pan. Simmer for a couple more minutes then remove from the heat and leave to cool completely.
Mix together the flour, almonds, sugar, salt and orange zest in a large bowl. Add the butter and rub in with your fingertips until it resembles fine breadcrumbs.
Stir in the egg yolks then gradually add enough orange juice so that the pastry comes together into a ball.
Divide the pastry into two pieces, one a little bit larger than the other, and shape into discs. Wrap in clingfilm and refrigerate for about an hour until firm.
Whisk together the butter, sugar and orange zest until smooth then whisk in the eggs one at a time, mixing well after each addition. Stir in the ground almonds and flour then add a couple of drops each of almond and orange extract (to taste).
Roll out the larger piece of pastry thinly (about 2mm thick) on a lightly floured surface, into a large rectangle and use to line a 20x30cm tart or swiss roll tin. Press the pastry right into the corners and leave about a cm overhanging, adding any scraps to the other ball of pastry.
Spread the frangipane evenly over the base of the pie and top with the rhubarb compote, making sure that they are both level.
Roll out the remaining pastry thinly and cut into thick and thin strips, some the same length as the pie and some the same width. I used three 3cm wide and three 1cm wide strips to go length-ways and four of each to go crosswise. Re-roll any pastry scraps to cut more strips as needed.
Lay the length-ways strips across the pie, alternating between thick and thin. From the centre of the pie, fold back every other wide pastry strip and neighbouring thin strip. Lay down one wide pastry strip and one thin strip in the opposite direction, then fold the pastry back over the top.
Repeat this over the other half of the pie, going in the opposite direction.
Use some of the reserved egg white to glue the lattice strips to the base of the pie then trim the edges with a sharp knife. Place the pie in the freezer for 20 minutes while you heat the oven to 200C/400F/gas mark 6 and place a baking tray into the oven to heat up.
Brush the top of the pie with egg white and sprinkle with demarera sugar. Place the tin on the hot baking tray (helps prevent a soggy bottom) and bake for 60-80 minutes until golden brown and bubbling. You will probably need to cover the top of the pie with tin foil partway through baking to prevent the top from catching before it is cooked in the middle.
Allow the pie to cool in the tin for half an hour before carefully turning it out and serving warm with ice cream or custard.