Ian Bicking: the old part of his blog

Re: On form libraries

I'm really a fan of treating form libraries as sets of macros. There are higher level macros (perhaps a macro that can output an entire label and field) and lower level macros (just a checkbox, or just the code to output an error). By treating the system this way, the user can get super custom if he needs to (by using the low level macros or even straight HTML), or he can whip stuff out really quickly (by using the high level macros). Need something different? Add more macros based on the lower level macros.

I've used this approach before at multiple companies in developing the common look-and-feel library that is used by several applications. It's a simple idea, but it works out well.

By the way, I too tend to keep form generation separate of form validation. I'm not tied to that idea, but it's worked out well for me in the past.

Comment on On form libraries
by Shannon -jj Behrens