I'm new to web development and I've started working on a project in my company that uses DJANGO. I feel it flexible to start my development straight first from the templates. I think it will be easier if I visualize things first. So my question: Is it okay to start with a template rather than starting with models first? Will I stumble on to any sort of confusions if I go by this method of development?
2 Answers
Starting with the user experience and how that works is actually a good way to start off.
It ensures that what you build is fit for purpose and that you end up building what needs to be built and not things you think you will need.
See User Centered Design on Wikipedia.
-
Thanks :) So what is your opinion in MVC development? Should I start with templates first?– SmithCommented Jun 27, 2014 at 10:33
-
1@Smith - start with whatever you are comfortable with. I don't really have strong opinions one way or another.– OdedCommented Jun 27, 2014 at 10:36
-
Thank you... I guess I'll start with Boilerplate and polish the front end first :)– SmithCommented Jun 27, 2014 at 10:39
There is no right answer. You will probably be going back and forth between models and templates before you settle on something which works.
You should start of with use-cases or usage scenarios which include the view templates. As you write those, you will expose some system concepts, many of which will become your core models. Once you see what is possible with your models, you may realize that you have more use-cases which can take advantage of the models. Or you may discover that your models have complex relationships which will lead you to refactoring the models. And that could lead you to more use-cases. And so on...Eventually, you'll run out of use-cases, and your model will be just right, assuming that you have normalized them.
When you do your use-cases, you have to expose a minimal subset of models to your users. Make sure that you understand which models are exposed and which ones are not exposed.