Hi, When I looked over SMWPageSchemas which is right now part of SMW core, I failed to understand as to why it has to be deployed with SMW core.
I do not know the exact circumstances on how PageSchemas operates but the current design requires SMW core to deploy SMWPageSchemas for some reason. Normally when you deploy a class requiring it to derive from a different class that resides in another extension (SMWPageSchemas extends PSExtensionHandler ) it is because you expect that the concrete implementation is specific to the environment that implements this class, nevertheless when I tried to figure out which part of SMWPageSchemas is so specific that it has to be deployed with SMW core I failed. As for the reason why I failed, I could not see a clear dependency that would require SMWPageSchemas to be implemented by SMW core meaning no specific object injection occurs from SMW core into SMWPageSchemas that would allow to draw a conclusion about an inherent (or even necessary) dependency that can only be resolved by deploying it with SMW core. Other issue while browsing through SMWPageSchemas are: * All methods are declared static which makes it a less likely candidate to be testable * Mixing string manipulation using raw '<p>' , or XML::, Html:: which can potentially create issues with escaping * Each method relies on GLOBALS such as global $wgUser; global $wgContLang; etc. It would be nice to have some sort of resolution on how to deal with this class. In case it is decided that this class should remain in SMW core, a proper unit test should be provided (by PageSchemas) in order to minimize any vulnerability and exposure due to object references such as (PageSchemas::getValueFromObject etc.). PS: This is not about eliminating PageSchemas from SMW but rather to ensure that dependencies (and so its implementation) does reside within an appropriate context without exposing other objects to unnecessary risk. Cheers ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ Semediawiki-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
