From dev-return-21968-apmail-ignite-dev-archive=ignite.apache.org@ignite.apache.org Wed May 24 17:02:55 2017 Return-Path: X-Original-To: apmail-ignite-dev-archive@minotaur.apache.org Delivered-To: apmail-ignite-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0491F19285 for ; Wed, 24 May 2017 17:02:55 +0000 (UTC) Received: (qmail 70490 invoked by uid 500); 24 May 2017 17:02:54 -0000 Delivered-To: apmail-ignite-dev-archive@ignite.apache.org Received: (qmail 70439 invoked by uid 500); 24 May 2017 17:02:54 -0000 Mailing-List: contact dev-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list dev@ignite.apache.org Received: (qmail 70427 invoked by uid 99); 24 May 2017 17:02:54 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 May 2017 17:02:54 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 0A8F31AF90A for ; Wed, 24 May 2017 17:02:54 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.401 X-Spam-Level: X-Spam-Status: No, score=-0.401 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id ZYpxhS8SSu93 for ; Wed, 24 May 2017 17:02:51 +0000 (UTC) Received: from mail-oi0-f43.google.com (mail-oi0-f43.google.com [209.85.218.43]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 1F3A55FC57 for ; Wed, 24 May 2017 17:02:51 +0000 (UTC) Received: by mail-oi0-f43.google.com with SMTP id h4so249608326oib.3 for ; Wed, 24 May 2017 10:02:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=YzjsiSw85FfqJdFMTpkDqWqmVbk3j1mVeE9w0kLs6ew=; b=exTSAk7IUEViCKApSN1aEhw3cnwnR8Auag4BDpOyiiuEICIsxEiDy6UD00akAfhJp4 AUiI7mnzpv6UeVbYNv0E3Xjq4a4xVsfSvoyxD0oAaGSzX0ZLCZThEEtfBP4StADY4Gw5 sMqNQBNtim8JcMvfU4zydfWqGSiCJ9/6RfTp36aq1TCrRocz0sRQGxI3DAnzjEiQiI0H Qfx4N7H+c7fg3alIr70CnzYQaI8q7NrgSLmWw+7smRYhED0XIb7Uu7cc2qd0FPQLUdzF gh8Zf1WPSBsb0oxbu8ZkgijNlRsCqgP4wjCwt1+muOo2SqUvprdvXA2XfiaoL9qQLsYr FqqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=YzjsiSw85FfqJdFMTpkDqWqmVbk3j1mVeE9w0kLs6ew=; b=SU8+tg3S6tg3fLyFax0AF5KqE6jCE0/nMIE4DWx8b1Vt6D+rvEiSfv1ZnCZ7igfuIQ TUe6r3mKLIph9VSmjhrv7Bqxo9Vh62Qik4wGyMeHm6/NvyGxoeOLzSX5D6OP828Q84NK klLYjezaHmjXiBKwKIO8smAnMMHSrBRm4Z3VflQ4OPlwyeauq5ftYyWC9KpSaDuIJKeH IPQX4jKn39VAEgVxHl2xAJoOO92MDIDfsGQukExuZOE/3qpSefwpGWtIKGRhSRctlqUH Xn3cQnYea0cSVwCkYhm7zQTPJLx2mCukhi+KrbvMRdljBTQisdzuwWTWdhCzJr682Rgg m49g== X-Gm-Message-State: AODbwcCojQFrwz/hVAFyU+dCb3aaEi+jgeie56M4jNBP2scYZKIiYStx M6jU3WMiYrwZkNkaoK6fN5tDSQ5VmA== X-Received: by 10.202.105.75 with SMTP id e72mr15900380oic.180.1495645363585; Wed, 24 May 2017 10:02:43 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dmitry Pavlov Date: Wed, 24 May 2017 17:02:33 +0000 Message-ID: Subject: Re: Minimize amount of inner classes, predicates, tuples, etc To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary="001a11408d629b46ee0550481214" --001a11408d629b46ee0550481214 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Vladimir, Do you have any idea how this rules may be automatically controlled by, for example, code inspections and/or TeamCity? I do beleive if rule is controlled by some automatic way (not only by argreement) it has a chance to become true practice in real life. If this excellent idea remains only agreement on dev list, it may be forgotten in the future. Sincerely, Dmitriy Pavlov =D0=B2=D1=82, 16 =D0=BC=D0=B0=D1=8F 2017 =D0=B3. =D0=B2 13:01, Vladimir Oze= rov : > Igniters, > > Ignite is known to be complex product. Partially this complexity comes fr= om > ... complex problems we are trying to resolve. But partially it comes fro= m > how we write our code. I noticed several anti-patterns which makes our co= de > hard to manage: > > 1) Inner classes (both static and non-static) > 2) Usage of generic tuples > 3) Usage of many classes from our "lang"package - closures, predicates, > etc.. > > When combined these anti-patterns makes our classes huge, leaky in terms = of > abstractions, hard to follow and refactor. I would like to propose to > restrict usages of these constructs as much as possible in non-test code. > Classes should be top-level by default, unless "inner" semantics are > absolutely necessary or saves a lot of code. Tuples and closures should b= e > replaced with concrete classes, specific to your case. > > Thoughts? > > Vladimir. > --001a11408d629b46ee0550481214--