It’s always beneficial when you venture out in the open source community for designing some module or api which could be reused apart from yourself by the rest of the community to, learn some designing guidelines to make it a fully flexible, and backward compatible api. I always wanted to know how interface based design worked, the way Sun Microsystems implement their api’s and Netbeans.org provides some nice fundamentals for doing so.
It is better to use methods (usually getters and setters) to access fields than to expose them directly. The first reason is that a call to a method can do a lot of additional things, but in contrast an access to a field can only read or write the value. When using getters one can for example do lazy initialization, synchronize the access or compose the value using some computation algorithm. Setters on the other hand allow checks for correctness of assigned value or notification of listeners when the change happens.