4 ms·
>>In an MPA, we can simply pass models to views and render attributes we need. This isn't the case in an SPA. We need to define data formats and implement seria
by lucaluca1453 8y ago
>>In an MPA, we can simply pass models to views and render attributes we need. This isn't the case in an SPA. We need to define data formats and implement serialization.
>Not really sure what that's about either. JSON exists, and I'm pretty sure nobody is inventing serialization formats in SPAs.
I think the author means serialization of models into JSON for your API, which is non-trivial in frameworks like Django - you have to pick which model fields to use, how to represent foreign keys, etc. In Django you can just pass that model object into a HTML template processor (view) in a MPA.
- yogthos 8y agoThat's a problem with Django though, and not an inherent problem in SPAs.