Heat oven to 180C/fan 160C/gas 4. Butter and line a rectangular baking tin (approx 27cm x 20cm) with parchment paper. Peel, core and thinly slice the apples then squeeze the lemon juice over. Set to one side.
Place the butter, caster sugar, eggs, vanilla, flour and baking powder into a large bowl and mix well until smooth. Spread half the mixture into the prepared tin. Arrange half the apples over the top of the mixture, then repeat the layers. Sprinkle over the demerara sugar. 3 Bake for 45-50 mins until golden and springy to the touch. Leave to cool for 10 mins, then turn out of tin and remove paper. Cut into bars or squares.