Effective Java



Download 2,19 Mb.
Pdf ko'rish
bet312/341
Sana11.07.2022
Hajmi2,19 Mb.
#776765
1   ...   308   309   310   311   312   313   314   315   ...   341
Bog'liq
Effective Java



CHAPTER 12
SERIALIZATION
348
Using the default serialized form when an object’s physical representa-
tion differs substantially from its logical data content has four disadvantages:

It permanently ties the exported API to the current internal representa-
tion.
In the above example, the private 
StringList.Entry
class becomes part
of the public API. If the representation is changed in a future release, the
StringList
class will still need to accept the linked list representation on input
and generate it on output. The class will never be rid of all the code dealing
with linked list entries, even if it doesn’t use them anymore.

It can consume excessive space.
In the above example, the serialized form
unnecessarily represents each entry in the linked list and all the links. These
entries and links are mere implementation details, not worthy of inclusion in
the serialized form. Because the serialized form is excessively large, writing it
to disk or sending it across the network will be excessively slow.

It can consume excessive time.
The serialization logic has no knowledge of
the topology of the object graph, so it must go through an expensive graph
traversal. In the example above, it would be sufficient simply to follow the
next
references.


Download 2,19 Mb.

Do'stlaringiz bilan baham:
1   ...   308   309   310   311   312   313   314   315   ...   341




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish