On Fri, Oct 23, 2015 at 11:23 PM, Sameera Jayasoma <[email protected]> wrote:
> > > On Thu, Oct 22, 2015 at 11:44 PM, Afkham Azeez <[email protected]> wrote: > >> >> >> On Thu, Oct 22, 2015 at 6:13 PM, Manuri Amaya Perera <[email protected]> >> wrote: >> >>> >>> >>> 1. >>> >>> Why the name CarbonTransport? we can use just Transport. the full >>> name is org.wso2.carbon.transport.CarbonTransport and it already has >>> "carbon" >>> >>> >> Just because the package has Carbon it doesn't mean you shouldn't use it >> in any of the classes. The code becomes unreadable when those libraries are >> used elsewhere when you do that. Good examples are, HazelcastInstance not >> Instance, AxisConfiguration not Configuration, AkkaControlMessage not >> ControlMessage. I can give you enough of examples. So CarbonTransport is >> the proper name to use and improves the code readability. I am -1 to >> renaming this to Transport. >> > > This is just a name. If you thinks CarbonTransport is better then +1 :) > > It is not just a name. You have to put in some thought before you name your classes, methods, attributes, config elements etc. In this case, *public class NettyTransport implements CarbonTransport*, is much more readable & clear than, *public class NettyTransport implements Transport* People don't look at the complete import list when they read code. In the first instance, the code reads as, this class is named NettyTransport, which is a CarbonTransport. In the 2nd instance, the code reads as, this class is named NettyTransport, which is a Transport. In the first instance, there is not ambiguity.
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
