10 ms·
> I design my application around YUI widgets and then have to think about how it will degrade. That is what you should start trying to avoid. Do it the other w
by zepolen 18y ago
> I design my application around YUI widgets and then have to think about how it will degrade.
That is what you should start trying to avoid. Do it the other way around:
- Start with a url that outputs the correct table according to params.
- Return the correct data type, eg. json/html from the same url using your method of choice (url extension/Accept header)
- When you want a javascript enhancement to, eg. convert the table to a live spreadsheet that flushes changes after you change a cell via ajax just do it. Make the fields editable (or replace them with input boxes, whatever you fancy) and hook their 'onchange' event.
This is why I don't like things like YUI datatable, or very full stack frameworks in general, I prefer to have a small useful library that gives me the tools so I can do exactly what I want with albeit a little effort, but mostly very simple.
Far more flexible than creating a datagrid with 4 lines of framework code but hitting a roadblock the moment something different needs to be done.
- jwr 18y agoOk, so your answer to my question would be: it is better to design for graceful degradation (progressive enhancement), because one keeps more options open for the future, rather than buying into one complex framework. Thanks -- I don't necessarily agree, but it is a good answer and a valid point of view.