Skip to main content
Erschienen in:
Buchtitelbild

2014 | OriginalPaper | Buchkapitel

1. Introduction

verfasst von : Jiri Soukup, Raj Lokanath, Martin Soukup

Erschienen in: Serialization and Persistent Objects

Verlag: Springer Berlin Heidelberg

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

We start with the definition of persistent objects and, as an example, we show how they relate to data structures, class libraries, allocation and UML class diagrams. Everything revolves around pointers or references, depending on which language you use. After this, we discuss the flaws of serializations built into different languages.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Fußnoten
1
Transparently implemented as a member of class Book: Publisher *publisher.
 
2
On the 4th line of main(), note the different order of the parameters compared to the usual containers where you would have lib->books.add(bk); Reflecting the importance of the data structures which we place at the same visibility level as classes, our notation starts with the ID of the data structure.
 
3
We had an opportunity to review a recognized business management system with a million lines of C++ code, which was impossible to maintain. Serialization and deserialization functions represented one-third of the entire code.
 
4
Depending on which language you use.
 
5
Accepting STL as a standard without making a provision for persistency was a mistake. In 1993, persistency was a known concept, and early versions of Code Farms DOL library and of what is now called ObjectStore © PSE Pro for C++ were commercially available.
 
6
When working on Chap. 7 we explored the possibility of making the Objective-C Foundation classes persistent. For a person not familiar with the library it would be an extremely difficult task. It is a big and complex library, pointers are often disguised through typedef, and all allocation calls should be located, analyzed and possibly replaced.
 
7
This applies even to Java which claims to be “pointerless” but really isn’t, because its references are only more intelligent pointers. In Java, this means no references are explicitly used as members of application classes.
 
8
This may be considered a heresy, but this book takes a non-orthodox view on many subjects.
 
9
As with most listings in the book, the full source is available under directory bk, in this case as bk/chap1/list1_2.cpp.
 
11
In other words, only pointers from the heap must be converted, not pointers from the stack.
 
12
Since the mid-1980s, Mikael Palczewski convinced Jiri about this (he had a hard time), Jiri is using rings and not NULL-ending lists.
 
13
You will have to wait until Chap. 2 to see how this really works.
 
14
This is only a hypothetical implementation. The listing is on the website, but it would not run without converting it to a specific collection library.
Because the collection library does not have bi-directional associations, adding Course crs to Lecturer lect requires two steps:
courses.add(lect,crs);
crs->taughtBy=lect;
Leaving them like that would be error prone; they should be encapsulated under a single function which we may call addCourseToLecturer(), but where would you place it and other similar functions? It would spread the association to even more places.
 
15
Boost library is an extension of the STL library, and will soon become the C++ standard. It supports graphs and has tuplets which are the heart of many-to-many associations, but the interface is less elegant and less user friendly than the intrusive implementation; there is also a performance hit both in speed and required space. This will be discussed in Chap. 3.
 
16
In those days computers were much slower than today.
 
17
With the permission of the authors, most of this chapter is based on examples from Cornell & Horstmann (2011), pp 39–51.
 
18
For full running example, see bk\chap1\javaSerialization\readme.txt.
 
19
Look at custom coded linked list of Books in bk/chap1/javaSerialization/stackOverflow1, where build.bat compiles it, and run.bat runs it. In order to run it for 2000 books, type: run 2000.
 
20
If you want to experiment with this example, go to bk/chap1/javaSerialization/stackOverflow2, where build.bat compiles it, and run.bat runs it. In order to run it for 2000 books, type: run 2000.
 
21
We had to re-type the original in order to make it readable here.
 
22
For the description of these codes, look at pp 39–59, Vol. II of Cornell & Horstmann (2011).
 
24
Full code which also generates Figs. 1.10 and 1.11 is in bk/chap1/CSharpSerialization/SerializeToBin/Program.cs bk/chap1/CSharpSerialization/SerializeToXml/Program.cs.
 
25
For more information on .NET Remoting, see MSDN.
 
26
For experimental results, see the benchmark in Chap. 8.
 
28
See (Core Data 2013).
 
29
All this for two simple objects is ridiculous. The file has about five times as many lines as XML files produced by C# serializer.
 
31
Code in bk/chap1/boostSerialize also has options for other styles of archiving.
 
Metadaten
Titel
Introduction
verfasst von
Jiri Soukup
Raj Lokanath
Martin Soukup
Copyright-Jahr
2014
Verlag
Springer Berlin Heidelberg
DOI
https://doi.org/10.1007/978-3-642-39323-5_1

Premium Partner