You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Robert Zeigler (JIRA)" <ji...@apache.org> on 2009/10/27 18:04:59 UTC
[jira] Closed: (TAP5-909) Against PRIVATE modifier on fields
[ https://issues.apache.org/jira/browse/TAP5-909?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Zeigler closed TAP5-909.
-------------------------------
Resolution: Won't Fix
> Against PRIVATE modifier on fields
> ----------------------------------
>
> Key: TAP5-909
> URL: https://issues.apache.org/jira/browse/TAP5-909
> Project: Tapestry 5
> Issue Type: Wish
> Components: tapestry-core
> Affects Versions: 5.0.18
> Reporter: Aleksandar Nikolov
> Assignee: Robert Zeigler
>
> In Tapestry classes every instance variable MUST be declared private!?!
> Why this requirements exists?
> I agree that it is a good practice to hide and encapsulate the data, but in some cases, especially in extending classes (including your own), this becomes a problem. In subclasses these variables can be accessed ONLY through getter/setters. This is like giving pocket-money to your son using bank account...
> I will give you an example: Imagine you want to access a variable declared in superclass like this:
> @Property
> private User user;
> Must create getter and setter which @Property already does in background!
> I think that this requirement makes difficult using OO techniques like inheritance and should be removed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.