Return-Path: Delivered-To: apmail-incubator-abdera-dev-archive@locus.apache.org Received: (qmail 97704 invoked from network); 28 Sep 2006 15:38:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Sep 2006 15:38:32 -0000 Received: (qmail 7417 invoked by uid 500); 28 Sep 2006 15:38:32 -0000 Delivered-To: apmail-incubator-abdera-dev-archive@incubator.apache.org Received: (qmail 7394 invoked by uid 500); 28 Sep 2006 15:38:32 -0000 Mailing-List: contact abdera-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: abdera-dev@incubator.apache.org Delivered-To: mailing list abdera-dev@incubator.apache.org Received: (qmail 7377 invoked by uid 99); 28 Sep 2006 15:38:32 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Sep 2006 08:38:31 -0700 Authentication-Results: idunn.apache.osuosl.org header.from=harris.r.boyce.iii@gmail.com; domainkeys=good X-ASF-Spam-Status: No, hits=0.5 required=5.0 tests=DNS_FROM_RFC_ABUSE DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 Received: from [64.233.182.190] ([64.233.182.190:59737] helo=nf-out-0910.google.com) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id EC/C4-17533-67CEB154 for ; Thu, 28 Sep 2006 08:38:31 -0700 Received: by nf-out-0910.google.com with SMTP id c29so722159nfb for ; Thu, 28 Sep 2006 08:38:28 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=L3dMOAfvqjnJkNuX+a+otAV2/qCzPxfpDCcFACBkHYO6EC0v8qDIfeqkeoiNoyICL7lR0hQz1AjTYeBuAKykODdmhA2ZEIZ7oz7qTAp41wZDh8w23NwAzzr9I3AFCSA/WwlG9oEJcIBzwmXMQ7/O3rN05s6AZB8mE93pAXybxp8= Received: by 10.48.254.1 with SMTP id b1mr270415nfi; Thu, 28 Sep 2006 08:38:27 -0700 (PDT) Received: by 10.49.80.15 with HTTP; Thu, 28 Sep 2006 08:38:27 -0700 (PDT) Message-ID: <77474ff30609280838n77effebbh2d4f7a7923578b47@mail.gmail.com> Date: Thu, 28 Sep 2006 11:38:27 -0400 From: "Harris Boyce III" To: abdera-dev@incubator.apache.org Subject: Re: Coding/Language Standards In-Reply-To: <7edfeeef0609280828i52ea570bud7d75622b1e13184@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <77474ff30609280725o42b1919coe672b575cfaed7c4@mail.gmail.com> <7edfeeef0609280729v42cdf83en57f0ad21c5a6ff65@mail.gmail.com> <77474ff30609280818v5e606bf3k8c9b05248cf24693@mail.gmail.com> <7edfeeef0609280828i52ea570bud7d75622b1e13184@mail.gmail.com> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Right and I think this is where the rub lies. I've been "brought-up" that, unless the data is read-only, you just generally implement read/write properties so I can easily implement it as: List Entries { get; } But even with that, nothing prevents the user accessing the feed from calling theFeed.Entries.Add(someEntry); Now, the implementation could return a read-only List and then any modifying operations would generate exceptions. But...why would I do that? Does that make any sense? I'm hoping that this doesn't seem like an immature conversation, but it's one that I struggle with when I study Java. Why wouldn't I just use those conveience methods to modify the list if and when I need to do so? Thanks again for the discussion! I'm learning lots! H On 9/28/06, Garrett Rooney wrote: > On 9/28/06, Harris Boyce III wrote: > > Garrett - > > > > Yeah, shoulda done that to begin with, sorry...OK, from package > > org.apache.abdera.model, interface Feed defines these methods: > > > > List getEntries(); > > void addEntry(Entry entry); > > ... > > Entry getEntry(String id); > > > > In .NET, I could define these as properties like this: > > > > List Entries { > > get; > > set; > > } > > > > And then, normally, I would use the methods exposed by List to > > perform operations on the Entries (add, remove, etc.). Now, granted, > > I would have to implement a method to retrieve the entry by ID just as > > done above. But I guess my question may be centered around the > > encapsulation standards across the languages? Maybe? > > > > Does that clarify any? If not, let me know. > > Well, you'd definately want the getter for the entries, but setting an > entire list of entries is kind of weird IMO... Perhaps other people > have optinions. > > -garrett >