views:

188

answers:

4

I could easily be wrong, but when I see databind I think of code that is quick to develop and inflexible and often ugly, e.g, embedding <% %> tags in html.

O

A: 

Yes, Virginia, you are correct. Databinding does suck.

Velika
A: 

You shouldn't combine <% %> tags with databinding. Databinding done right removes the need for those bee-stings.

Joel Coehoorn
+2  A: 

Data binding sucks. Embedded <% %> tags suck. But they are different things (except that they both suck).

le dorfier
+3  A: 

Declarative databinding is useful in straight-forward cases, and in demos of course.

It is a fantastic idea, but for most non-trivial uses you'll likely find yourself fighting the declarative databinding more than working with it. At the least, you'll end up assigning your datasources such in code as often as not, though column definitions and such in some of the list controls using the declarative databinding properties is common in both cases.

Generally, use declarative databinding when it helps, but as soon as you start fighting with it go ahead and switch to a code-driven design and save yourself the pain.

Stephen M. Redd
I generally believe that if one takes a good approach up-font in designing, that you don't need to undo things to switch over to big boy code.
Velika
Sure, you can do up-front design all the way down to the member's implementation details. That works too. When you are doing that though... then I suggest this instead: if you find yourself struggling to design it with declarative databinding in mind, then go ahead and switch to a code-driven design instead.
Stephen M. Redd
@Redd is right that databinding is great for straight-forward cases and you should switch when you start fighting with it. The problem is that problems start start off being trivial often become slightly non-trivial as soon as a request for change comes in. In my experience, every time someone on my team has used databinding it's ended up being a mistake. Without exception. And switching usually means rewriting most of the code from scratch. So we're left with code that does less than we'd wish or we have to invest the same time we would have if we had avoided it in the first place.
Andrew
It sounds like you are confirming my impression that it's best to avoid database binding right off the bat unless you don't mind undoing your previous work.
Velika
Ya, I think we're all on the same page here guys :P
Stephen M. Redd