Its completely arbitrary, with one caveat: Have the application planned out first (ie models, functionality, variables to be passed to templates, what you want displayed on the page), otherwise you'll be re-doing work making yourself work inefficiently. A lot of people like jumping headfirst into coding at the start of a new idea/task, but if you plan it all out from the beginning, you'll beat these people consistently for any project thats decently sized.
And by the way, I'm assuming in my post you're talking about web applications since you didn't specify.
$.02