Is reflection being used in client server interaction ?

Hi

Thanks for this is a great framework.

Currently, I am evaluting smartclient, checking the samples provided in the trial download, I have the following questions for the server side:

  • Is reflection being used for e.g. custom-ds sample ? (exclude the call DataTools.setProperties which is just to populate the SupplyItemStore)
  • How does the server transform to and from POJO in DSRequest and DSReponse ?
  • If it uses reflection, is there any way to avoid the use of reflection in the server ?

The reason is if I were to handle many POJOs under heavy load in the server, wouldn’t it be slow ?

Kind Regards
Andy

Yes, reflection is used in that sample and is used whenever POJOs are being transformed to data to be sent back to the browser, or whenever validated data sent from the browser is bring applied to the properties of a POJO. But no, it’s not a performance issue, and the same approach is also used by eg Hibernate and iBatis.

However, SmartGWT also has an option to not use reflection at all (SQLDataSource) which is also the recommended approach (for other reasons: flexibility, simplicity, power). SQLDataSource is also generally faster than Hibernate or iBatis, but not primarily because of the lack of reflection.

For more information, start with the QuickStart Guide. Be sure to also read the chapters of the SmartGWT QuickStart Guide on the SmartGWT Server Framework. These apply to SmartClient as well and will soon appear in the SmartClient QuickStart Guide.