Difference between revisions of "Talk:ResourceSuggestTextBox control"

From Catglobe Wiki
Jump to: navigation, search
(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)
Line 11: Line 11:
  
  
=== ''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 ===
+
=== ''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:
+
 
# I think that jQuery.suggest is a great library which can be used to implement the intellisense feature for CGScript Editor :-P
+
Besides that:  
# Can we implement the IScriptControl explicitly so that we can "partly hide" the GetScriptDescriptors and GetScriptReferences methods?
+
 
# ResourceSuggestTextBox is a custom control and it can be inherited. Therefore, using this.GetType().... for registering scripts is not recommended
+
#I think that jQuery.suggest is a great library which can be used to implement the intellisense feature for CGScript Editor :-P  
Finally, I learned some new interesting things from this
+
#Can we implement the IScriptControl explicitly so that we can "partly hide" the GetScriptDescriptors and GetScriptReferences methods?  
<font color="blue">
+
#ResourceSuggestTextBox is a custom control and it can be inherited. Therefore, using this.GetType().... for registering scripts is not recommended
:=> '''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.
+
Finally, I learned some new interesting things from this <font color="#0000ff"></font>
 +
 
 +
:=&gt; '''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.
 
:*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>
 
  
::=> '''Thuan''':
 
::# We need one server call + 1 database access whenever we type in a character.
 
::# It is only fast if we search for resources using StartWith or Exact.
 
::# 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!
 
  
<font color="green">
 
:::=> '''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 color="blue">
+
::=&gt; '''Thuan''':
:''1. I think that jQuery.suggest is a great library which can be used to implement the intellisense feature for CGScript Editor :-P''
+
::#We need one server call + 1 database access whenever we type in a character.
:=> I have no idea
+
::#It is only fast if we search for resources using StartWith or Exact.
:''2. Can we implement the IScriptControl explicitly so that we can "partly hide" the GetScriptDescriptors and GetScriptReferences methods?''
+
::#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.
:=> IMO, the interface is simple enough. But it is your choice of optimizing it
+
::#There is no access check!
:''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
+
<font color="#008000"></font>
</font>
+
 
 +
::=&gt; '''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.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #800000">=&gt; Thuan: wow, thank you for information about the client side cache.</span>
 +
 
 +
 
 +
 
 +
<font color="#0000ff"></font>
 +
 
 +
:''1. I think that jQuery.suggest is a great library which can be used to implement the intellisense feature for CGScript Editor&nbsp;:-P''  
 +
:=&gt; I have no idea  
 +
:''2. Can we implement the IScriptControl explicitly so that we can "partly hide" the GetScriptDescriptors and GetScriptReferences methods?''  
 +
:=&gt; 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''  
 +
:=&gt; I’m not really sure about this
 +
 
 +
 
  
::=> '''Thuan''':
+
::=&gt; '''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  
::An example: given that the NewControl inherits from ResourceSuggestTextBox but is it put in the CatGlobeWeb assembly, then:
+
::An example: given that the NewControl inherits from ResourceSuggestTextBox but is it put in the CatGlobeWeb assembly, then:  
::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.

Revision as of 07:39, 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.     => Thuan: wow, thank you for information about the client side cache.


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.