Cook pasta as instructed on the package and preheat the oven to 200°C.
Cook the tomatoes in boiling water for a few seconds to easily peel off the skin (or you can use canned tomatoes).
Pour olive oil into a large pan, brown the garlic, and add the peeled tomatoes and salt. Cook for 5 minutes, add basil (enough to really taste it), and then cook for 15 more minutes at low heat. Keep an eye on the sauce and stir regularly while the tomatoes slowly dissolve.
Mix the pasta and the sauce in a casserole. Coat the mix with mozzarella (can be grated but preferably cut into medium chunks). Then, cover everything with grated pecorino or parmesan.
Put the casserole in the oven and gratinate for 10 minutes. Let cool down and serve.