From mime4j-dev-return-1246-apmail-james-mime4j-dev-archive=james.apache.org@james.apache.org Tue Jan 18 16:47:00 2011 Return-Path: Delivered-To: apmail-james-mime4j-dev-archive@minotaur.apache.org Received: (qmail 4061 invoked from network); 18 Jan 2011 16:47:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Jan 2011 16:47:00 -0000 Received: (qmail 19055 invoked by uid 500); 18 Jan 2011 16:47:00 -0000 Delivered-To: apmail-james-mime4j-dev-archive@james.apache.org Received: (qmail 18999 invoked by uid 500); 18 Jan 2011 16:46:58 -0000 Mailing-List: contact mime4j-dev-help@james.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mime4j-dev@james.apache.org Delivered-To: mailing list mime4j-dev@james.apache.org Received: (qmail 18991 invoked by uid 99); 18 Jan 2011 16:46:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jan 2011 16:46:57 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of io@bago.org designates 209.85.216.177 as permitted sender) Received: from [209.85.216.177] (HELO mail-qy0-f177.google.com) (209.85.216.177) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jan 2011 16:46:50 +0000 Received: by qyk27 with SMTP id 27so6791396qyk.1 for ; Tue, 18 Jan 2011 08:46:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.67.72 with SMTP id q8mr5270613qai.222.1295369187943; Tue, 18 Jan 2011 08:46:27 -0800 (PST) Received: by 10.220.176.135 with HTTP; Tue, 18 Jan 2011 08:46:27 -0800 (PST) X-Originating-IP: [78.134.14.200] In-Reply-To: <1295282617.2126.61.camel@ubuntu> References: <4D2C0AEE.5070700@virtualpostman.co.za> <1294749756.3394.48.camel@ubuntu> <1294753533.3394.79.camel@ubuntu> <1294759001.3394.104.camel@ubuntu> <1294776829.1849.8.camel@ubuntu> <1295282617.2126.61.camel@ubuntu> Date: Tue, 18 Jan 2011 17:46:27 +0100 Message-ID: Subject: Re: dom / message refactoring; was Re: 0.6.2 or 0.7 any time soon? From: Stefano Bagnara To: mime4j-dev Content-Type: text/plain; charset=ISO-8859-1 Il 17 gennaio 2011 17.43.37 UTC+1, Oleg Kalnichevski ha scritto: > Stefano et al > > Please review another round of API changes on the refactoring branch. > Here is the gist of most important changes > > * Most of the object model implementation logic moved from 'dom' to > 'message'. 'dom' consists mostly of pure interfaces now that do not > impose particular internal structures, a particular implementation or a > particular inheritance hierarchy. I think we loose an opportunity to keep backward compatibility in future when we want to add methods to the 4 classes you transformed in interfaces and I don't see advantages in turn, but, on the other side I think we should feel free to break backward compatibility even in future versions so this is not a big drawback and I can live with the change (just hoping this won't be a blocker in future). > * All dom element copy / parse logic moved from individual classes to a > utility class currently called MimeBuilder (I would prefer this class to > be called MessageBuilder but this name is already taken) Maybe we should expose some of the MimeBuilder methods via the MessageBuilder "public" factory: the bigger limit of the current DOM api is that it doesn't expose methods to create a structured Message from scratch (it let you set a new Body but it doesn't give a way to create a Body). So the MimeBuilder methods could already be moved to MessageBuilderImpl. BTW I'm just loud thinking, just go ahead with your plan :-) > Please let me know if you can live with these changes and whether it is > ok to merge them down to trunk. ok. Stefano