Diese Sichtbarkeitsregel ist der größte Müll für größere Projekt. Toter Code, falscher Zugriff etc. , das bekommt man alles "Gratis" dadurch. Anstatt sich mal damit auseinanderzusetzen wird dem einfach Blind gefolgt.

Public = Interface
Private = Implementation
Protected = Vererbungszeug

Am 25.01.2013 16:37, schrieb Arsenij Solovjev:
2013/1/25 Christian Dohnert <donu...@gmail.com <mailto:donu...@gmail.com>>

    This is due to the coding guidelines. These guidlines state that
    you should make something private if and only if it yields some
    kind of "magic" and shouldn't be touched. Like a "Here be
    dragons"-sign.

Then the same question applies to the coding guidelines.
The issue with private is clear, though.
I'm trying to understand the rationale behind using protected everywhere
(instead of package).

    Am 25.01.2013 15:47 schrieb "Arsenij Solovjev" <xeper...@gmail.com
    <mailto:xeper...@gmail.com>>:

        Hello Saros-developers,

        Taking a look at the code again after a while this doesn't
        seem intuitive:

        For testing purposes non-public members of classes are
        declared protected,
        as I understand this enables members that would otherwise be
        private, to
        be visible to the test.

        Why is it then necessary to make these members visible to the
        subclasses
        of the class?
        AFAIK, a derived class should not need to access the data of
        it's base class,
        this weakens data hiding, and makes derived classes dependent
        on implementation.


        Cheers,
        Arsenij


        
------------------------------------------------------------------------------
        Master Visual Studio, SharePoint, SQL, ASP.NET
        <http://ASP.NET>, C# 2012, HTML5, CSS,
        MVC, Windows 8 Apps, JavaScript and much more. Keep your
        skills current
        with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
        MVPs and experts. ON SALE this month only -- learn more at:
        http://p.sf.net/sfu/learnnow-d2d
        _______________________________________________
        DPP-Devel mailing list
        DPP-Devel@lists.sourceforge.net
        <mailto:DPP-Devel@lists.sourceforge.net>
        https://lists.sourceforge.net/lists/listinfo/dpp-devel




------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d


_______________________________________________
DPP-Devel mailing list
DPP-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dpp-devel

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
DPP-Devel mailing list
DPP-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dpp-devel

Reply via email to