Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have spent some time studying Django and I've done some applications. But I really don't know what is the best approach while developing an application, I mean, there are several options: Make all the models, then all the urls, the views and then make all the templates. Other people recommend using an agile approach, take a use case and go all the way until it's totally functional, and of course there might be other possible recommendations. Personally I feel really attracted by the agile approach, but I don't really know because for example every single model I append to my database would imply to create a new one.

To sum up, what is the best approach one should take when developing and application in Django, taking into account all the consequences that it carries?

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

Agile only, unless you're working for NASA :-)

It's either you or your customer/employer who has ideas about what IT should be. I've never seen people who're absolutely about what they're expecting to get. On the other hand, I do know a lot of people who have new ideas every day. So, in my opinion, the waterfall model only works for NASA and I've never seen it being used in programming.

share|improve this answer
    
Ok, agile. Now the problem I face is that when I'm working with an agile approach, for example with the models, I have to erase my database and redoit again. Is there any tools that automates this process for me? or should I write all my models first? or should I do this, erase and create? –  Andrés Apr 25 '12 at 12:39
    
That's totally normal. You may either write your update scripts manually, so that DB schema gets changed instead of being recreated (that's, to be honest, tough thing), or you may just implement a procedure that populates your DB with some data to play with (while you're not on production). So, whenever you drop and recreate your DB, you may just trigger that proc and get a non-empty DB. For sure, this won't work when you're updating something that's is on prod. –  loki2302 Apr 25 '12 at 13:36
    
Ok I'll go with this, Thank you! –  Andrés Apr 25 '12 at 17:14
    
@Andrés and loki2302: There's a number of ways to update the database in a simple and reliable way. They're called migrations. We use South for our project. –  Izkata Jul 24 '12 at 18:41
    
Migrations are only simple and reliable when changes are primitive. –  loki2302 Jul 24 '12 at 19:45
add comment

well, in my opinion, since you are choosing django you are already reinforcing a beautiful MTV design. things would be quite different if you use java frameworks or even start from scratch.

agile is definitely recommended, but I would also like to remind you that: pre-mature optimization is the root of evil.

as long as your code is functioning and as long as you put refactoring in mind. you are already doing a good design.

share|improve this answer
    
Ok, agile. Now the problem I face is that when I'm working with an agile approach, for example with the models, I have to erase my database and redoit again. Is there any tools that automates this process for me? or should I write all my models first? or should I do this, erase and create? –  Andrés Apr 25 '12 at 12:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.