Originally posted by PNS Subramanian:
This is a question on frameworks - not sure if this is the correct forum though.
All the frameworks use some sort of introspection to obtain the required class at runtime, be it Spring, Velocity or others. Isnt introspection a costly process in itself using Reflection internally? From a point of view of performance won't it be better to write code ourselves instead - agreed that this would consume time - but can't we ensure better performance this way?
Spring, uhhm , the wiring i guess happens during start up. So that s'd be fine. They heavily use dynamic proxies though to provide middleware services (ie if yuo employ them which, i guess anybody who uses spring ,would)
But they also mention that time taken for method invocation through dyna proxies is likely to be a very small percentage of the overall time to execute business logic (db writes, reads etc).So that s'd be ok again and frankly writing something like Spring and improve upon it would be a huge effort
.
In , velocity i guess you store the objects you want to access in a template, in the velocity context, which looks like a map?
This is what i remeber abt velocity.
In most projects i worked on, other than those that employ entity beans
DB is usually the place where you would spend time tuning because that is where you usually get maximum benefit.You migh cache certain stuff based on the business logic /rules.