Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D8F644D07 for ; Tue, 17 May 2011 23:02:09 +0000 (UTC) Received: (qmail 85361 invoked by uid 500); 17 May 2011 23:02:09 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 85278 invoked by uid 500); 17 May 2011 23:02:09 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 85270 invoked by uid 99); 17 May 2011 23:02:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 May 2011 23:02:09 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of maurizio.cucchiara@gmail.com designates 74.125.83.171 as permitted sender) Received: from [74.125.83.171] (HELO mail-pv0-f171.google.com) (74.125.83.171) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 May 2011 23:02:02 +0000 Received: by pva4 with SMTP id 4so484406pva.30 for ; Tue, 17 May 2011 16:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=qfkEj88MhpA7Y2NEI0ikYzLJnNG2UwRPnyXg1Prt2To=; b=X/rh9Ecy1+Zva54xF+XrtWjC+IeOjdaWu8dESBWJ+LHFWkucW2X09UxXdX81o/XK7u 2+dpxmqzZSb70FWKp8Ls2EpKW0psU+2vd5B3v4ksF76q22KwQ3U1w7qxWY9yCAMGHtZy 4UO0epE7oMFOayyjhQFZMDO47k+OgubHpDVuc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Up8VUM5vKV8kGvdBtXbwdDs/cM/4qRkSLrIr/fpTwreZcpVi6Gyg8ir+eSl4KHu+hR H6foYGmCnQayClInKb8CABhxiJi08mcjtRqJ2fzcCB4MbZ9ZncdYElYSNWFwxjQLbd5p s85oI3i/Xs070Xubuwoq0V3gFq359LhK6XOA0= MIME-Version: 1.0 Received: by 10.142.171.15 with SMTP id t15mr676571wfe.442.1305673301613; Tue, 17 May 2011 16:01:41 -0700 (PDT) Received: by 10.142.44.2 with HTTP; Tue, 17 May 2011 16:01:41 -0700 (PDT) Date: Wed, 18 May 2011 01:01:41 +0200 Message-ID: Subject: [OGNL] God Class From: Maurizio Cucchiara To: Commons Developers List Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org if there is something I hate in programming is the god class [1]. OGNL seems to embrace god object's cause pretty well. ---------------------------------------------------------------------------------------------------------------------- find -size +30k -name "*.java"| xargs -i sh -c "wc -l {}" | sort -n 771 ./src/main/java/org/apache/commons/ognl/Ognl.java 1139 ./src/main/java/org/apache/commons/ognl/OgnlOps.java 1858 ./src/main/java/org/apache/commons/ognl/OgnlParserTokenManager.java 3038 ./src/main/java/org/apache/commons/ognl/OgnlRuntime.java 4845 ./src/main/java/org/apache/commons/ognl/OgnlParser.java ---------------------------------------------------------------------------------------------------------------------- 5000 lines of code... we should consider to rename to Bible.java Jokes apart, it's very difficult to handle a class like this, if you change something it's highly probable to broke the whole logic. I think that everybody is afraid of manage a such big class. We could maintain the API backward compatibility even trying to improve this aspect. What do you think? [1] http://en.wikipedia.org/wiki/God_object -- Maurizio Cucchiara --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org