Begin by preheating your oven to 350 degrees F (175 degrees C). Prepare two 7-inch cake pans by greasing them and lining with parchment paper.
In a mixing bowl, sift the self-rising flour to remove any lumps. To this, add the white sugar, margarine, and ½ teaspoon of vanilla extract. Crack the eggs into the bowl. Using a wooden spoon or an electric mixer, beat the mixture until it achieves a pale and fluffy texture, which should take about 3 minutes. Evenly distribute the batter between the prepared cake pans, leveling the surface with the back of a spoon.
Place the pans in the preheated oven and bake until the tops are golden brown and a toothpick inserted into the center of each cake comes out clean. This should take about 30 to 40 minutes. After baking, allow the cakes to cool in their pans for 5 minutes before inverting them onto a wire rack to cool completely, which should take approximately 20 minutes.
While the cakes are cooling, prepare the frosting. Into a clean bowl, sift the confectioners' sugar to ensure it's free of lumps. Add the butter and the remaining ½ teaspoon of vanilla extract. Beat with an electric mixer until the frosting is light and fluffy.
To assemble the cake, spread your choice of jam—either strawberry or raspberry—over the top of one of the cake layers. Follow this with a generous layer of the prepared frosting. Carefully place the second cake layer on top, pressing down slightly to secure it.
Enjoy this delightfully layered cake as a perfect treat for any occasion. Its sweet jam filling complemented by the light, fluffy frosting makes for a truly delectable dessert.