jQuerify model

May 17, 2011 at 8:57 AM


i`ve been reading the code and trying to understand how this UI works, and i´ve reach some conclusions that i want to discuss. Probably most of them are not correct due to my knowledge or perhaps the model UI is not finished.

The first of them is related to the creation of the page. One the server the view is created with full html code and then later on the client is rendered again with the jquery template so perhaps there is redundant "work" done and also a more complex way to keep the code updated. ¿should the html of the view removed and try to keep the _templates* as the only sorce page code?. and if yes should be implemented an error model to try to reload the _template in case of error?.

The second, _layout page is "complete" i mean all the templates, scripts and so on are loaded here so imagine of you applied this model to more big applications, this is as is or could be sliced in some way?

I have read a discussion about to extend the pages to be included in this model, create the widget, template and so on, could you please provide some link or doc about how to do it taking in mind previuos ideas?


Perhaps templates can be loaded by ajax calls when needed and included on the page.

perhaps could be created a "master widget" with all information session info, status and so on and use this as the "communications manager" for loading scripts and templates and other resources and then try to keep smaller the pages on a more bigger applications.


Thanks for all.


May 17, 2011 at 10:40 AM

I think the reason behind that the html is fully declared in the page is because for the non javascript functionality versions. If you haven't got javascript enabled it will not use any scripts and it will present you with the postback model. If you want to use only javascript then offcourse you dont need the fully specified html in the markup and you are save with templates in some cases :)

Also i think for big applications this project is good also. With big user based applications you need to worry about the communications with the backend. When the client asks his first request the server just gives him all the needed widgets / scripts. From there the client only needs to call some save actions which needs server interaction. The rest is handled by the client browsers javascript engine, because of the single page nature. When you use ajax calls to load the templates you do another roundtrip to the server i think this is not always a good thing todo in large applications. But those are just my 2 cents. When you're application is large and the user don't want every functionality, you can save some request sizes when you exlude content by role for example :)