View Full Version : View / Template - the difference?

8 Feb 2007, 8:07 PM
Hey guys,

I am starting to expand my EXT use from simple dialogs and message boxes, to more advanced stuff.

I am now studying Views and Templates, but I am having a hard time seeing the difference. I have studied Jack's image chooser example quite a bit. Also, I have been in the docs, and unless I am wrong, don't they both do the same thing essentially?

I would like to get a fundamental understanding of the two.

A view uses a template, but a template does not need a view?

Is a view just a "wrapper" for a template, which we can add event listeners and such to?

Thanks. As always, appreciate your help.


8 Feb 2007, 8:44 PM
A View is generally used to build a quick template-based display of datamodel, rather than building a more complex grid. I thnk there's a blog post that illustrates doing this with JSON data.

Templates can be used for any repetitious html creation, not necessarily tied to a datamodel.

9 Feb 2007, 8:16 AM
Thanks, Tim. I am playing with some examples now.

Ps. put on a new signature. i have been getting emails and PM's with questions way out of my league. This should clear up my javascript programming level. lol