Welcome to Sign in | Help

Re: proceduri stocate in SQL Server 2005

  •  07-02-2008, 9:13 AM

    Re: proceduri stocate in SQL Server 2005

    Gherry:
    aflorin27:
    De cealalta parte a baricadei sunt cei care nu folosesc deloc proceduri stocate. Eu as fi pentru asa ceva.

    ...
    personal nu mi se pare ok sa scriu cod SQL in clase
    ...

    Personal nu vad nici o problema in "a scrie" cod SQL in clase atât timp cât acele clase NU sunt clase tip obiecte de gestiune (en. business objects sau domain classes sau domain objects) mai precis atât timp cât (în principiu Zip it!) este respectat principiul GRASP (şablonul de proiectare) "Coeziune ridicată" (en. high cohesion).

    Applying UML and patterns, Larman Craig:
    "
    Solution   Assign a responsibility so that cohesion remains high.

    Problem   How to keep complexity manageable?
    In terms of object design, cohesion (or more specifically, functional cohesion) is
    a measure of how strongly related and focused the responsibilities of an element
    are. An element with highly related responsibilities, and which does not do a
    tremendous amount of work, has high cohesion. These elements include classes,
    subsystems, and so on.

    A class with low cohesion does many unrelated things, or does too much work.
    Such classes are undesirable; they suffer from the following problems:
    • • hard to comprehend
    • • hard to reuse
    • • hard to maintain
    • • delicate; constantly effected by change
    Low cohesion classes often represent a very "large grain" of abstraction, or have
    taken on responsibilities that should have been delegated to other objects.
    "
    În concluzie, pentru asigurarea persistenţei (dpmdv) sunt necesare cel puţin două nivele de abstractizare: business layer (clase tip business objects) şi data layer (clase de persistenţă).

View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems