PDA

View Full Version : Best Practices for Ext.NET: version 2 vs. version 1.3



MacGarnicle
Mar 23, 2012, 11:32 PM
Hello,

I've spent quite some time navigating through the forums looking how to best code a UI of a relatively large CRM-type application. For Ext.NET 1.3, I decided it would be rather difficult to use user controls, so I opted for the server control modular design route, as illustrated in this example:

http://examples1.ext.net/#/Combination_Samples/Applications/Feed_Viewer/

In version 2 of Ext.NET, I've noticed that the same example has changed quite a bit Instead of being server control based, it is now user control based with the help of <ext:UserControlLoader>

http://examples2.ext.net/#/Combination_Samples/Applications/Feed_Viewer/

Correct me if I'm wrong, but I believe a UserControlLoader was not available in 1.3. The questions I have:


What do you believe is the best practice for modularizing complex UIs? (I've mentioned 2 possibilities above, if you have other ideas, please share! )
For Ext.NET 2.0, are there any performance implications by going to user controls from server controls?


Any help will be greatly appreciated. Thanks!

Daniil
Mar 27, 2012, 3:28 PM
Hi,



Correct me if I?m wrong, but I believe ?UserControlLoader? was not available in 1.3.


You are right, it appears in Ext.NET v2 to provide more comfortable mechanism to load user controls.


What do you believe is the best practice for modularizing complex UIs? (I?ve mentioned 2 possibilities above, if you have other ideas, please share! )


You can use any from these two as you wish. We don't think there is a noticeable difference in the performance aspect between these two options. So, you can choose this one that more comfortable for you.

Another option might be creating the widgets directly via JavaScript. Certainly, it's not always possible.

Also, MasterPage might be helpful.

In some scenario iframes might be useful as well.

You may be interested in the following threads:
http://forums.ext.net/showthread.php?13726
http://forums.ext.net/showthread.php?15712
http://forums.ext.net/showthread.php?15699
http://forums.ext.net/showthread.php?17187&p=73904&viewfull=1#post73904
http://forums.ext.net/showthread.php?17984


For Ext.NET 2.0, are there any performance implications by going to user controls from server controls?


No. Just user controls are more clear/understandable for an example than C# code of server controls. Therefore we have switched to user controls.

MacGarnicle
Mar 27, 2012, 7:20 PM
No. Just user controls are more clear/understandable for an example than C# code of server controls. Therefore we have switched to user controls.

Thank you for your response.

So, if it's more clear and understandable, and has similar performance, why not use user controls all the time? :)

I know in some cases server controls are more useful, but that's mainly to change default behavior (or add your own)...

Daniil
Mar 27, 2012, 7:23 PM
Well, I think server controls are more flexible. And yes, it allows to extend the existing classes with some functionality.