Solution Assign a responsibility so that coupling remains low.Problem  translation - Solution Assign a responsibility so that coupling remains low.Problem  Indonesian how to say

Solution Assign a responsibility so

Solution Assign a responsibility so that coupling remains low.
Problem How to support low dependency, low change impact, and increased reuse?
Coupling is a measure of how strongly one element is connected to, has knowledge of, or relies on other elements. An element with low (or weak) coupling is
not dependent on too many other elements; "too many" is context-dependent,
but will be examined. These elements include classes, subsystems, systems, and
so on.
A class with high (or strong) coupling relies on many other classes. Such classes
may be undesirable; some suffer from the following problems:
ï Changes in related classes force local changes.
ï Harder to understand in isolation.
ï Harder to reuse because its use requires the additional presence of the
classes on which it is dependent.
Example Consider the following partial class diagram from a NextGen case study

Assume we have a need to create a Payment instance and associate it with the
Sale. What class should be responsible for this? Since a Register "records" a Payment in the real-world domain, the Creator pattern suggests Register as a candidate for creating the Payment. The Register instance could then send an
addPayment message to the Sale, passing along the new Payment as a parameter.
A possible partial interaction diagram reflecting this is shown in Figure 16.9

This assignment of responsibilities couples the Register class to knowledge of
the Payment class.

UML notation: Note that the Payment instance is explicitly named p so that in
message 2 it can be referenced as a parameter.
An alternative solution to creating the Payment and associating it with the Sale is
shown in Figure 16.10.

Figure 16.10 Sale creates Payment.
Which design, based on assignment of responsibilities, supports Low Coupling?
In both cases we will assume the Sale must eventually be coupled to knowledge of
a Payment. Design 1, in which the Register creates the Payment, adds coupling of
Register to Payment, while Design 2, in which the Sale does the creation of a
Payment, does not increase the coupling. Purely from the point of view of coupling,
Design Two is preferable because overall lower coupling is maintained. This an
example where two patterns-Low Coupling and Creator-may suggest different
solutions

Discussion Low Coupling is a principle to keep in mind during all design decisions; it is an
underlying goal to continually consider. It is an evaluative principle that a
designer applies while evaluating all design decisions.
In object-oriented languages such as C++, Java, and C#, common forms of coupling
from TypeX to TypeY include:
ï TypeX has an attribute (data member or instance variable) that refers to a
TypeY instance, or TypeY itself.
ï A TypeX object calls on services of a TypeY object.
ï TypeX has a method that references an instance of TypeY, or TypeY itself, by
any means. These typically include a parameter or local variable of type
TypeY, or the object returned from a message being an instance of TypeY.
ï TypeX is a direct or indirect subclass of TypeY.
ï TypeY is an interface, and TypeX implements that interface.
Low Coupling encourages assigning a responsibility so that its placement does
not increase the coupling to such a level that it leads to the negative results that
high coupling can produce.
Low Coupling supports the design of classes that are more independent, which
reduces the impact of change. It can't be considered in isolation from other patterns such as Expert and High Cohesion, but rather needs to be included as one of
several design principles that influence a choice in assigning a responsibility.
A subclass is strongly coupled to its superclass. The decision to derive from a
superclass needs to be carefully considered since it is such a strong form of coupling. For example, suppose that objects needto be stored persistently in a relational or object database. In this case it is a relatively common design to create an
abstract superclass called PersistentObject from which other classes derive. The
disadvantage of this subclassing is that it highly couples domain objects to a
particular technical service and mixes different architectural concerns,
whereas the advantage is automatic inheritance of persistence behavior.
There is no absolute measure of when coupling is too high. What is important is
that a developer can gauge the current degree of coupling, and assess if increasing
it will lead to problems. In general, classes that are inherently very generic in
nature, and with a high probability for reuse, should have especially low
coupling.
The extreme case of Low Coupling is when there is no coupling between classes.
This is not desirable because a central metaphor of object technology is a system of
connected objects that communicate via messages. If Low Coupling is taken to
excess, it yields a poor design because it leads to a few incohesive, bloated, and
complex active objects that do all the work, with many very passive zero-coupled
objects that act as simple data repositories. Some moderate degree of coupling
between classes is normal and necessary to create an object-oriented system in
which tasks are fulfilled by a collaboration between connected objects.
High coupling to stable elements and to pervasive elements is seldom a problem.
For example, a Java J2EE application can safely couple itself to the Java libraries
(java.util, and so on), because they are stable and widespread.





0/5000
From: -
To: -
Results (Indonesian) 1: [Copy]
Copied!
Solution Assign a responsibility so that coupling remains low.Problem How to support low dependency, low change impact, and increased reuse?Coupling is a measure of how strongly one element is connected to, has knowledge of, or relies on other elements. An element with low (or weak) coupling is not dependent on too many other elements; "too many" is context-dependent, but will be examined. These elements include classes, subsystems, systems, and so on.A class with high (or strong) coupling relies on many other classes. Such classes may be undesirable; some suffer from the following problems:ï Changes in related classes force local changes. ï Harder to understand in isolation. ï Harder to reuse because its use requires the additional presence of the classes on which it is dependent. Example Consider the following partial class diagram from a NextGen case studyAssume we have a need to create a Payment instance and associate it with the Sale. What class should be responsible for this? Since a Register "records" a Payment in the real-world domain, the Creator pattern suggests Register as a candidate for creating the Payment. The Register instance could then send an addPayment message to the Sale, passing along the new Payment as a parameter. A possible partial interaction diagram reflecting this is shown in Figure 16.9This assignment of responsibilities couples the Register class to knowledge of the Payment class.UML notation: Note that the Payment instance is explicitly named p so that in message 2 it can be referenced as a parameter.An alternative solution to creating the Payment and associating it with the Sale is shown in Figure 16.10.Figure 16.10 Sale creates Payment.Which design, based on assignment of responsibilities, supports Low Coupling? In both cases we will assume the Sale must eventually be coupled to knowledge of a Payment. Design 1, in which the Register creates the Payment, adds coupling of Register to Payment, while Design 2, in which the Sale does the creation of a Payment, does not increase the coupling. Purely from the point of view of coupling, Design Two is preferable because overall lower coupling is maintained. This an example where two patterns-Low Coupling and Creator-may suggest different solutionsDiscussion Low Coupling is a principle to keep in mind during all design decisions; it is an underlying goal to continually consider. It is an evaluative principle that a designer applies while evaluating all design decisions.In object-oriented languages such as C++, Java, and C#, common forms of coupling from TypeX to TypeY include:ï TypeX has an attribute (data member or instance variable) that refers to a TypeY instance, or TypeY itself. ï A TypeX object calls on services of a TypeY object. ï TypeX has a method that references an instance of TypeY, or TypeY itself, by any means. These typically include a parameter or local variable of type TypeY, or the object returned from a message being an instance of TypeY.ï TypeX is a direct or indirect subclass of TypeY.ï TypeY is an interface, and TypeX implements that interface.Low Coupling encourages assigning a responsibility so that its placement does not increase the coupling to such a level that it leads to the negative results that high coupling can produce.Low Coupling supports the design of classes that are more independent, which reduces the impact of change. It can't be considered in isolation from other patterns such as Expert and High Cohesion, but rather needs to be included as one of several design principles that influence a choice in assigning a responsibility.A subclass is strongly coupled to its superclass. The decision to derive from a superclass needs to be carefully considered since it is such a strong form of coupling. For example, suppose that objects needto be stored persistently in a relational or object database. In this case it is a relatively common design to create an abstract superclass called PersistentObject from which other classes derive. The disadvantage of this subclassing is that it highly couples domain objects to a particular technical service and mixes different architectural concerns, whereas the advantage is automatic inheritance of persistence behavior.There is no absolute measure of when coupling is too high. What is important is that a developer can gauge the current degree of coupling, and assess if increasing it will lead to problems. In general, classes that are inherently very generic in nature, and with a high probability for reuse, should have especially low coupling.The extreme case of Low Coupling is when there is no coupling between classes. This is not desirable because a central metaphor of object technology is a system of connected objects that communicate via messages. If Low Coupling is taken to excess, it yields a poor design because it leads to a few incohesive, bloated, and complex active objects that do all the work, with many very passive zero-coupled objects that act as simple data repositories. Some moderate degree of coupling between classes is normal and necessary to create an object-oriented system in which tasks are fulfilled by a collaboration between connected objects.High coupling to stable elements and to pervasive elements is seldom a problem. For example, a Java J2EE application can safely couple itself to the Java libraries (java.util, and so on), because they are stable and widespread.
Being translated, please wait..
Results (Indonesian) 2:[Copy]
Copied!
Solusi Menetapkan tanggung jawab sehingga kopling yang masih rendah.
Masalah Bagaimana untuk mendukung ketergantungan rendah, dampak perubahan rendah, dan peningkatan penggunaan kembali?
Coupling adalah ukuran dari seberapa kuat satu elemen terhubung ke, memiliki pengetahuan, atau bergantung pada unsur-unsur lain. Sebuah elemen dengan kopling rendah (atau lemah) adalah
tidak tergantung pada terlalu banyak elemen lain; "terlalu banyak" tergantung konteks,
tetapi akan diperiksa. Unsur-unsur ini meliputi kelas, subsistem, sistem, dan
sebagainya.
Sebuah kelas dengan tinggi (atau kuat) kopling bergantung pada banyak kelas-kelas lain. Kelas tersebut
mungkin tidak diinginkan; beberapa menderita masalah berikut:
ï Perubahan kelas terkait memaksa perubahan lokal.
Saya Sulit untuk memahami dalam isolasi.
Saya Sulit untuk menggunakan kembali karena penggunaannya membutuhkan kehadiran tambahan dari
kelas atas yang tergantung.
Contoh Pertimbangkan mengikuti diagram kelas parsial dari studi kasus NextGen Anggaplah kita memiliki kebutuhan untuk membuat sebuah instance Pembayaran dan mengasosiasikannya dengan Sale. Apa kelas harus bertanggung jawab untuk ini? Karena Register "catatan" Pembayaran dalam domain dunia nyata, pola Pencipta menunjukkan Pendaftaran sebagai calon menciptakan Pembayaran tersebut. Register contoh kemudian bisa mengirim pesan addPayment ke Sale, melewati sepanjang Pembayaran baru sebagai parameter. Kemungkinan diagram interaksi parsial mencerminkan ini ditunjukkan dalam Gambar 16.9 ini tugas tanggung jawab pasangan Register kelas untuk pengetahuan kelas Pembayaran. UML notasi: Perhatikan bahwa contoh Pembayaran secara eksplisit bernama p sehingga dalam pesan 2 dapat dirujuk sebagai parameter. Sebuah solusi alternatif untuk menciptakan Pembayaran dan mengaitkannya dengan Sale yang ditunjukkan pada Gambar 16,10. Gambar 16.10 Sale menciptakan Pembayaran. Yang desain, berdasarkan penugasan dari tanggung jawab, mendukung Coupling Rendah? Dalam kedua kasus kita akan menganggap Jual akhirnya harus digabungkan ke pengetahuan Pembayaran. Desain 1, di mana Register menciptakan Pembayaran, menambahkan kopling Daftar untuk Pembayaran, sementara desain 2, di mana Sale melakukan penciptaan Pembayaran, tidak meningkatkan kopling. Murni dari sudut pandang kopling, Desain Dua adalah lebih karena kopling keseluruhan yang lebih rendah dipertahankan. Ini sebuah contoh di mana Coupling dua pola-rendah dan Pencipta-mungkin menyarankan berbeda solusi Diskusi Low Coupling merupakan prinsip yang perlu diingat selama semua keputusan desain; itu adalah tujuan yang mendasari untuk terus dipertimbangkan. Ini adalah prinsip evaluatif bahwa desainer berlaku saat mengevaluasi semua keputusan desain. Dalam bahasa berorientasi objek seperti C ++, Java, dan C #, bentuk umum dari kopling dari TypeX ke TypeY meliputi: ï TypeX memiliki atribut (anggota data atau variabel contoh ) yang mengacu pada contoh TypeY, atau TypeY sendiri. Saya Sebuah objek TypeX panggilan pada layanan dari objek TypeY. ï TypeX memiliki metode yang merujuk contoh TypeY, atau TypeY sendiri, dengan cara apapun. Ini biasanya mencakup parameter atau variabel lokal tipe TypeY, atau objek kembali dari pesan menjadi sebuah contoh dari TypeY. Ï TypeX adalah subclass langsung atau tidak langsung dari TypeY. Ï TypeY adalah antarmuka, dan TypeX mengimplementasikan antarmuka. Coupling Rendah mendorong menugaskan tanggung jawab sehingga penempatannya tidak tidak meningkatkan kopling ke tingkat sedemikian rupa sehingga mengarah ke hasil negatif yang coupling tinggi dapat menghasilkan. Coupling Rendah mendukung desain kelas yang lebih independen, yang mengurangi dampak perubahan. Hal ini tidak dapat dianggap terpisah dari pola lain seperti Ahli dan tinggi Kohesi, melainkan perlu dimasukkan sebagai salah satu dari beberapa prinsip desain yang mempengaruhi pilihan dalam menentukan tanggung jawab. Sebuah subclass sangat digabungkan ke superclass-nya. Keputusan untuk menurunkan dari superclass perlu dipertimbangkan karena itu adalah suatu bentuk kuat dari kopling. Misalnya, bahwa benda-benda needto disimpan terus-menerus dalam database relasional atau objek. Dalam hal ini adalah desain yang relatif umum untuk membuat superclass abstrak yang disebut PersistentObject yang kelas-kelas lain berasal. The Kerugian dari subclassing ini adalah bahwa hal itu sangat pasangan domain objek ke layanan teknis tertentu dan bercampur kekhawatiran arsitektur yang berbeda, sedangkan keuntungan adalah warisan otomatis perilaku kegigihan. Tidak ada ukuran mutlak ketika kopling terlalu tinggi. Yang penting adalah bahwa pengembang dapat mengukur tingkat saat kopling, dan menilai apakah peningkatan itu akan menyebabkan masalah. Secara umum, kelas yang secara inheren sangat generik di alam, dan dengan probabilitas tinggi untuk digunakan kembali, harus memiliki terutama rendah kopling. Kasus ekstrim Low Coupling adalah ketika tidak ada coupling antara kelas. Hal ini tidak diinginkan karena metafora pusat teknologi objek adalah sistem benda terhubung yang berkomunikasi melalui pesan. Jika Rendah Coupling diambil untuk kelebihan, itu menghasilkan desain miskin karena itu mengarah ke beberapa incohesive, kembung, dan kompleks objek aktif yang melakukan semua pekerjaan, dengan banyak sangat pasif zero-ditambah objek yang bertindak repositori data sederhana. Beberapa tingkat coupling antara kelas adalah normal dan diperlukan untuk membuat sebuah sistem berorientasi objek di mana tugas-tugas yang dipenuhi oleh sebuah kolaborasi antara objek yang terhubung. Coupling Tinggi ke elemen stabil dan elemen meresap jarang masalah. Misalnya, J2EE Java aplikasi dapat dengan aman pasangan sendiri ke perpustakaan Java (java.util, dan sebagainya), karena mereka stabil dan luas.






































































Being translated, please wait..
 
Other languages
The translation tool support: Afrikaans, Albanian, Amharic, Arabic, Armenian, Azerbaijani, Basque, Belarusian, Bengali, Bosnian, Bulgarian, Catalan, Cebuano, Chichewa, Chinese, Chinese Traditional, Corsican, Croatian, Czech, Danish, Detect language, Dutch, English, Esperanto, Estonian, Filipino, Finnish, French, Frisian, Galician, Georgian, German, Greek, Gujarati, Haitian Creole, Hausa, Hawaiian, Hebrew, Hindi, Hmong, Hungarian, Icelandic, Igbo, Indonesian, Irish, Italian, Japanese, Javanese, Kannada, Kazakh, Khmer, Kinyarwanda, Klingon, Korean, Kurdish (Kurmanji), Kyrgyz, Lao, Latin, Latvian, Lithuanian, Luxembourgish, Macedonian, Malagasy, Malay, Malayalam, Maltese, Maori, Marathi, Mongolian, Myanmar (Burmese), Nepali, Norwegian, Odia (Oriya), Pashto, Persian, Polish, Portuguese, Punjabi, Romanian, Russian, Samoan, Scots Gaelic, Serbian, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenian, Somali, Spanish, Sundanese, Swahili, Swedish, Tajik, Tamil, Tatar, Telugu, Thai, Turkish, Turkmen, Ukrainian, Urdu, Uyghur, Uzbek, Vietnamese, Welsh, Xhosa, Yiddish, Yoruba, Zulu, Language translation.

Copyright ©2024 I Love Translation. All reserved.

E-mail: