|Subject:||Re: If we call it Tapestry 4.0, not 3.x, Maybe we would do much|
|Date:||Fri, 22 Apr 2005 17:35:53 +0200|
Konstantin Iignatyev wrote:
The best approach to the field is in Delphi (Object Pascal)property hasChildren boolean ; read ifThereAreAny; [write setHasChildrenAndNotifyWorld; ]so we start with a public field and if necessity arises the field might be redeclared as property and made read-only or writable (if write function is declared). Advantages:- no ugly getters and setters for 99% of use cases;- freedom to use most appropriate function names like updateXXX of hasXXX;- conversion from field to property does not affect rest of code at all;
True, but remember that you would also need a different syntax for interfaces. Which is something that Delphi lacked.
property hasChildren boolean; read; [write;]Otherwise you still have to make the getter and setter methods like you had to do in Delphi.
BTW I use 'I' for interfaces often too, because besides using the -able kind of interfaces, I also use them just to design parts of my application without having to think about the implementation. In that case I would have to keep postfixing my classes with Impl when I implement the interfaces. So I prefer IExample for the interface and Example for the class, instead of Example and ExampleImpl. As a developer I often find it very useful to know if I am dealing with an interface or class.
Oh and curly braces have to go on the next line of course ;) I like balance. --------------------------------------------------------------------- To unsubscribe, e-mail: tapestry-user-unsubscribe@xxxxxxxxxxxxxxxxxx For additional commands, e-mail: tapestry-user-help@xxxxxxxxxxxxxxxxxx
|<Prev in Thread]||Current Thread||[Next in Thread>|
|Previous by Date:||RE: Using components dynamically, Hensley, Richard|
|Next by Date:||Re: If we call it Tapestry 4.0, not 3.x, Maybe we would do much, Jamie|
|Previous by Thread:||Re: If we call it Tapestry 4.0, not 3.x, Maybe we would do much, Konstantin Iignatyev|
|Next by Thread:||Re: If we call it Tapestry 4.0, not 3.x, Maybe we would do much, Jamie|
|Indexes:||[Date] [Thread] [Top] [All Lists]|