Possible Duplicate:
When should I add a new tpl.php file, and when should I implement a theme function?
To theme a form: There are two ways.
using function theme_themename_form($form)
Assigning to a variable in preprocess and printing it in the template files.
My question is:
Why two ways?
Which way is best for which case ?
That is for which type of cases we should go for function theme and for which cases we should go for template files.
What is all time best way?