Review what you have learnt in the section and see what will be coming up in the next section.
This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4493-server-side-swift-with-vapor/lessons/25
Review what you have learnt in the section and see what will be coming up in the next section.
Really struggling to see the value of using swift for a user visible site. For an API it seems pretty useful, but Leaf feels like massive overhead for any type of real webpage. You still need a ton of javascript to actually control the page, and have to create tons of helper structs to get the data to the page in a format thatβs useful to display to the user.
@gargoyle there are two camps of thought on this. Some people think that you should just do a React or VueJS site and interact directly with an API.
Others (myself included) think Leaf definitely has a place. Whatever templating language (and backend language) you choose, you need to pass it the data. Even if you are calling an API that returns JSON, you probably still need to manipulate and model the data in Javascript. The value in Leaf is also being able to test your code as well. For instance, my entire site/blog is all Leaf: