Dec 27, 2012, 4:31 PM
[CLOSED] X.msg.alert: Server side vs Client side
Hi all,
I'm wonder about the performance when using the Ext.net alert message, in server side and client side.
Please find below the two methods that I use:
Method1: Client Side Alert
Thanks and Best Regards.
I'm wonder about the performance when using the Ext.net alert message, in server side and client side.
Please find below the two methods that I use:
Method1: Client Side Alert
function SaveChanges() {
var message;
App.direct.UpdateDepartment({ success: function (result) {
if (result) message = "message 1";
else message = "message 2";
Ext.net.Notification.show({
iconCls: 'icon-accept',
title: 'Title',
html: message
});
}
});
}
[DirectMethod]
public bool UpdateDepartment()
{
bool result = false;
try
{
//some code here
result = true;
}
catch (Exception ex)
{
// some code here
}
return result;
}
Method2: Serve Side Alert [DirectMethod]
public void UpdateDepartment()
{
try
{
//some code here
X.Msg.Alert("title", "message 1");
}
catch (Exception ex)
{
// some code here
X.Msg.Alert("title", "message 2");
}
}
Which one do you suggest to use?Thanks and Best Regards.
Last edited by Daniil; Dec 28, 2012 at 10:33 AM.
Reason: [CLOSED]