Difference between revisions of "Talk:ResourceSuggestTextBox control"

From Catglobe Wiki
Jump to: navigation, search
(New page: === ''Thuan'': Do you want it to actually be used? or this is just an example?=== :=> '''Chinh''':It is for demonstration purpose only. It aims at demonstrating the use of ASP.NET AJAX for...)
 
Line 1: Line 1:
 
=== ''Thuan'': Do you want it to actually be used? or this is just an example?===
 
=== ''Thuan'': Do you want it to actually be used? or this is just an example?===
 +
<font color="blue">
 
:=> '''Chinh''':It is for demonstration purpose only. It aims at demonstrating the use of ASP.NET AJAX for developing an AJAX-enabled control that can be put inside an Infragistic as an editor
 
:=> '''Chinh''':It is for demonstration purpose only. It aims at demonstrating the use of ASP.NET AJAX for developing an AJAX-enabled control that can be put inside an Infragistic as an editor
 +
</font>
  
  
 
=== ''Thomas'': Exciting! Personally I am not so happy about the web-service approach, is there a reason for not using AjaxPro instead to keep all related BL in one place? That is what I have against web-services, it was also the motivation behind ServerMethods that everything should be available in one place, so the poor developer could easily find it, alas it is but no more difficult than to search for the web service, however this is my thinking, any comments on that? ===
 
=== ''Thomas'': Exciting! Personally I am not so happy about the web-service approach, is there a reason for not using AjaxPro instead to keep all related BL in one place? That is what I have against web-services, it was also the motivation behind ServerMethods that everything should be available in one place, so the poor developer could easily find it, alas it is but no more difficult than to search for the web service, however this is my thinking, any comments on that? ===
 +
<font color="blue">
 
:=> '''Chinh''': sure we can do the same without using web-service as a.Chương has proposed a solution for that. But, it requires some more effort
 
:=> '''Chinh''': sure we can do the same without using web-service as a.Chương has proposed a solution for that. But, it requires some more effort
 +
</font>
  
  
Line 13: Line 17:
 
# ResourceSuggestTextBox is a custom control and it can be inherited. Therefore, using this.GetType().... for registering scripts is not recommended
 
# ResourceSuggestTextBox is a custom control and it can be inherited. Therefore, using this.GetType().... for registering scripts is not recommended
 
Finally, I learned some new interesting things from this
 
Finally, I learned some new interesting things from this
 +
<font color="blue">
 
:=> '''Chinh''':  
 
:=> '''Chinh''':  
 
:*I think we can overcome the performance issue by limiting the number of returned records. In the implementation, the returned records are always less than 10 and the performance is quite good. If that is not enough, I think we can implement some special db-access (direcly talk to the db) that by pass some overhead of current DBAccess.
 
:*I think we can overcome the performance issue by limiting the number of returned records. In the implementation, the returned records are always less than 10 and the performance is quite good. If that is not enough, I think we can implement some special db-access (direcly talk to the db) that by pass some overhead of current DBAccess.
 
:*Moreover, IMO, the control is a good candidate for replacing some features of adding to favorites. For example: whenever I have to fill in a User textbox, it should suggest all the possible users instead of only the ones in my favorites.
 
:*Moreover, IMO, the control is a good candidate for replacing some features of adding to favorites. For example: whenever I have to fill in a User textbox, it should suggest all the possible users instead of only the ones in my favorites.
 +
</font>
  
<font color="blue">
 
 
::=> '''Thuan''':
 
::=> '''Thuan''':
 
::# We need one server call + 1 database access whenever we type in a character.
 
::# We need one server call + 1 database access whenever we type in a character.
Line 23: Line 28:
 
::# Querying the Resource table only means we cannot filter out deleted resources. Querying the Common_Resource view is too slow. Alternatively, we need to write N queries. Since the involved fields are common, we can execute them once.
 
::# Querying the Resource table only means we cannot filter out deleted resources. Querying the Common_Resource view is too slow. Alternatively, we need to write N queries. Since the involved fields are common, we can execute them once.
 
::# There is no access check!
 
::# There is no access check!
 +
 +
<font color="blue">
 +
:::=> '''Chinh''':
 +
:::Here comes the interesting part of the suggest plugin. In fact, after each key pressed, only after a timeout period when the client actually do a web-request. So if user is typing too fast, only the last word will be sent back for requesting a search. This is a nice thinking, because to me, when user is searching for something, they start typing really fast and then stop at the term that they expect it to be searched for
 +
:::Moreover, there is a cache for the suggest (not study enough about this cache) but it seems to that the already searched term will not do a search request to server. For example: when you press back-space for deleting some letters.
 
</font>
 
</font>
  
 +
<font color="blue">
 
:''1. I think that jQuery.suggest is a great library which can be used to implement the intellisense feature for CGScript Editor :-P''
 
:''1. I think that jQuery.suggest is a great library which can be used to implement the intellisense feature for CGScript Editor :-P''
 
:=> I have no idea
 
:=> I have no idea
Line 31: Line 42:
 
:''3. ResourceSuggestTextBox is a custom control and it can be inherited. Therefore, using this.GetType().... for registering scripts is not recommended''
 
:''3. ResourceSuggestTextBox is a custom control and it can be inherited. Therefore, using this.GetType().... for registering scripts is not recommended''
 
:=> I’m not really sure about this
 
:=> I’m not really sure about this
 +
</font>
  
<font color="blue">
 
 
::=> '''Thuan''':
 
::=> '''Thuan''':
 
::FYI: http://blogs.ipona.com/james/archive/2006/10/03/6710.aspx
 
::FYI: http://blogs.ipona.com/james/archive/2006/10/03/6710.aspx
Line 38: Line 49:
 
::string assembly = this.GetType().Assembly.FullName;
 
::string assembly = this.GetType().Assembly.FullName;
 
::will be fullname of the CatGlobeWeb assembly.
 
::will be fullname of the CatGlobeWeb assembly.
</font>
 

Revision as of 06:52, 16 January 2009

Thuan: Do you want it to actually be used? or this is just an example?

=> Chinh:It is for demonstration purpose only. It aims at demonstrating the use of ASP.NET AJAX for developing an AJAX-enabled control that can be put inside an Infragistic as an editor


Thomas: Exciting! Personally I am not so happy about the web-service approach, is there a reason for not using AjaxPro instead to keep all related BL in one place? That is what I have against web-services, it was also the motivation behind ServerMethods that everything should be available in one place, so the poor developer could easily find it, alas it is but no more difficult than to search for the web service, however this is my thinking, any comments on that?

=> Chinh: sure we can do the same without using web-service as a.Chương has proposed a solution for that. But, it requires some more effort


Thuan: Long time ago Phuc requested for such a feature but we rejected it because of performance issues. That's why I should ask you before writing comments  :-P

Besides that:

  1. I think that jQuery.suggest is a great library which can be used to implement the intellisense feature for CGScript Editor :-P
  2. Can we implement the IScriptControl explicitly so that we can "partly hide" the GetScriptDescriptors and GetScriptReferences methods?
  3. ResourceSuggestTextBox is a custom control and it can be inherited. Therefore, using this.GetType().... for registering scripts is not recommended

Finally, I learned some new interesting things from this

=> Chinh:
  • I think we can overcome the performance issue by limiting the number of returned records. In the implementation, the returned records are always less than 10 and the performance is quite good. If that is not enough, I think we can implement some special db-access (direcly talk to the db) that by pass some overhead of current DBAccess.
  • Moreover, IMO, the control is a good candidate for replacing some features of adding to favorites. For example: whenever I have to fill in a User textbox, it should suggest all the possible users instead of only the ones in my favorites.

=> Thuan:
  1. We need one server call + 1 database access whenever we type in a character.
  2. It is only fast if we search for resources using StartWith or Exact.
  3. Querying the Resource table only means we cannot filter out deleted resources. Querying the Common_Resource view is too slow. Alternatively, we need to write N queries. Since the involved fields are common, we can execute them once.
  4. There is no access check!

=> Chinh:
Here comes the interesting part of the suggest plugin. In fact, after each key pressed, only after a timeout period when the client actually do a web-request. So if user is typing too fast, only the last word will be sent back for requesting a search. This is a nice thinking, because to me, when user is searching for something, they start typing really fast and then stop at the term that they expect it to be searched for
Moreover, there is a cache for the suggest (not study enough about this cache) but it seems to that the already searched term will not do a search request to server. For example: when you press back-space for deleting some letters.

1. I think that jQuery.suggest is a great library which can be used to implement the intellisense feature for CGScript Editor :-P
=> I have no idea
2. Can we implement the IScriptControl explicitly so that we can "partly hide" the GetScriptDescriptors and GetScriptReferences methods?
=> IMO, the interface is simple enough. But it is your choice of optimizing it
3. ResourceSuggestTextBox is a custom control and it can be inherited. Therefore, using this.GetType().... for registering scripts is not recommended
=> I’m not really sure about this

=> Thuan:
FYI: http://blogs.ipona.com/james/archive/2006/10/03/6710.aspx
An example: given that the NewControl inherits from ResourceSuggestTextBox but is it put in the CatGlobeWeb assembly, then:
string assembly = this.GetType().Assembly.FullName;
will be fullname of the CatGlobeWeb assembly.