Hi Prabath,
I have noticed that we use the Hungarian notation in certain places [1] and
not in certain places. Shall we stick to a single practice as much as
possible? For example, the code I appointed out earlier could be written
like below -
File schemaConfig = new
File(DeviceManagementConfigTests.TEST_CONFIG_SCHEMA_LOCATION);
SchemaFactory factory =
SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
Also, it looks like Sun/Oracle doesn't practice the Hungarian notation
either [2]. I looked at some of our own code [3][4] and found out that we
don't follow the Hungarian notation.
As for those who don't know what the Hungarian notation is - it's where one
name the object with the type of the object itself (this is rarely useful
in Strong Typed languages).
[1] -
https://github.com/wso2/carbon-device-mgt/blame/master/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/DeviceManagementConfigTests.java#L53
[2] -
http://stackoverflow.com/questions/10345344/naming-convention-for-objects-in-java
[3] -
https://github.com/wso2/carbon-mediation/blob/master/components/mediators/smooks/org.wso2.carbon.mediator.smooks/src/main/java/org/wso2/carbon/mediator/transform/Output.java
[4] -
https://github.com/wso2/carbon4-kernel/blob/master/core/org.wso2.carbon.authenticator.proxy/src/main/java/org/wso2/carbon/authenticator/proxy/AuthenticationAdminClient.java#L120
Cheers~
--
Dulitha Wijewantha (Chan)
Software Engineer - Mobile Development
WSO2 Inc
Lean.Enterprise.Middleware
* ~Email [email protected] <[email protected]>*
* ~Mobile +94712112165*
* ~Website dulitha.me <http://dulitha.me>*
* ~Twitter @dulitharw <https://twitter.com/dulitharw>*
*~Github @dulichan <https://github.com/dulichan>*
*~SO @chan <http://stackoverflow.com/users/813471/chan>*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev