Setting up the data model
Now that we have our login functionality set up for us, we can start building our data model straight away. So, why do we build our data model first, instead of building our pages first and adding our data model later, you might ask yourself? Both are valid ways of doing it, but if you’re building a more complex application, you want to get your data model right from the start. That’s why I prefer to create my initial data model first, so I have everything ready from the start. In the data model you also have the option to directly configure all your settings, such as required or default value which you don’t have when you’re quickly adding your properties from the page builder. You can always do that later, of course, but I find the risk of forgetting something and creating a bug in your application is too high. So that’s why, in this book, we always start with the data model first: it’s a preference, not mandatory...