If it isn't already obvious from my previous posts, I've been spending a lot of time on the client side of things with JavaScript and the Dojo toolkit.
I had a chance last weekend to show off a little bit of Dojo and once I got past the lightweight technique for bootstrapping it from the server, my demonstration suddenly got a lot less glamorous.
I think part of it got lost amidst what resembled gruelling swing form code. I was lucky in that I already had some completed forms to show off, so it was possible to show the kind of experiences you can deliver when you use a good client-side framework.
There was however a takeaway for me which after a lot of thinking, I think I've managed to figure out...
I've worked with forms in Symfony 1.4 extensively and have become quite adept at bending them to whatever need may arise. I've played with the form library in Symfony 2.0 and am also familiar with what Rails has to offer.
Anyone who has spent time working with the forms of their server framework has probably puzzled over the best approach to a number of problems. Each time, spending most of the time making sure that all the gears line up.
Why not take that time and spend it instead on making better forms featuring a superior UX and decoupled, unobtrusive architecture?
Where things start going wrong is when you become reliant on generating your forms and then depending on progressive enhancement to make it pop. The issue being that you've lost control of your implementation:
After all, the internet is always getting better - do you really want to have to worry about whether your server framework supports every new technology that comes around?
I had a chance last weekend to show off a little bit of Dojo and once I got past the lightweight technique for bootstrapping it from the server, my demonstration suddenly got a lot less glamorous.
I think part of it got lost amidst what resembled gruelling swing form code. I was lucky in that I already had some completed forms to show off, so it was possible to show the kind of experiences you can deliver when you use a good client-side framework.
There was however a takeaway for me which after a lot of thinking, I think I've managed to figure out...
It's Holding you Back!
Your server side form library is killing your UX, coupling your model to the view and tying down your options client-side.I've worked with forms in Symfony 1.4 extensively and have become quite adept at bending them to whatever need may arise. I've played with the form library in Symfony 2.0 and am also familiar with what Rails has to offer.
Anyone who has spent time working with the forms of their server framework has probably puzzled over the best approach to a number of problems. Each time, spending most of the time making sure that all the gears line up.
Why not take that time and spend it instead on making better forms featuring a superior UX and decoupled, unobtrusive architecture?
It's not all bad
Server side form libraries do offer useful features in the way of data binding and validation. These are abstractions that I think any framework should focus on perfecting as they help ensure that you're committing good data.Where things start going wrong is when you become reliant on generating your forms and then depending on progressive enhancement to make it pop. The issue being that you've lost control of your implementation:
- Your markup is decided for you unless you pour hours into writing a renderer.
- The form will likely have to be included as part of a full page render.
- Your front end is now fully coupled with the server.
After all, the internet is always getting better - do you really want to have to worry about whether your server framework supports every new technology that comes around?
My Original Problem
People who like using server side form libraries tend to turn their nose up at something like Dojo because it's alluring to be able to write a model and have everything thereafter generated. The problem however is that this architecture has everything pointing the wrong way.
Generating forms server side can also have implications when it comes time to iterate after getting your first round of client feedback. How many times have you had a client look at a form and want it to be more? If you've ever designed a form beyond a simple RFI, you know full well that there is going to be extra work!
Solution
This is an opinion that I've been slowly working my way towards, but I'm more and more convinced that time spent on server side forms can be - for a comparable investment of time - put to better use creating exclusively client side forms with the likes of Dojo, GWT or YUI.
As someone who has spent time mastering Symfony 1.4's forms inside & out, I think it's entirely conceivable that you can get better results doing things this way. Factor in the time spent wiring together (and troubleshooting/maintaining!) progressive enhancements, and I'm sure you'll at the very least break even.
Comments
Post a Comment