Permalink
Browse files

date

  • Loading branch information...
yegor256 committed Jan 14, 2018
1 parent 4438ffb commit 5bb233a2830fe3e9ea9fe8aa2b4e278e5c48643d
Showing with 8 additions and 7 deletions.
  1. +7 −6 _drafts/_serlialize.md
  2. +1 −1 static/talks.md
View
@@ -17,13 +17,13 @@ jb_picture:
caption:
---
Do you know how serialization and deserialization work in Java? I bet you
don't. Even if you do, let's go through it once again and see the "beauty"
Do you know how [Java Object Serialization](https://docs.oracle.com/javase/8/docs/technotes/guides/serialization/index.html)
works? I bet you don't. Even if you do, let's go through it once again and see the "beauty"
of it. I have to say, before we start, that this is the worst piece of design
you can find in JDK, in my opinion. Nothing can beat it in its ugliness.
Even those recently introduced
[private interface methods]({% pst 2017/oct/2017-10-03-java9 %}) are not
as terrible as this serialization API.
[private interface methods]({% pst 2017/oct/2017-10-03-java9 %})
are not as terrible as this Serialization API.
<!--more-->
@@ -38,12 +38,13 @@ class Point {
}
{% endhighlight %}
It's not a DTO? Yes, it is. It just doesn't have [getters and setters]({% pst 2014/sep/2014-09-16-getters-and-setters-are-evil %}),
It's not a DTO? Yes, it is. It just doesn't
have [getters and setters]({% pst 2014/sep/2014-09-16-getters-and-setters-are-evil %}),
but the purpose of this "class" is nothing but to transfer data.
Now, we want to _save_ it to the disc. Then, we will shut down the JVM,
but the object of class `Point` will remain in the file. We will start
the JVM and will _restore_ it. How can we do that? We need to serialize
it first and then deserialize back.
First
We will need `ObjectOutputStream`, which knows
View
@@ -112,7 +112,7 @@ Kiev, Ukraine<br/>
Keynote about something...<br/>
[DevExperience 2018](http://devexperience.ro/)<br/>
Iasi, Romania<br/>
20 April 2018
23 April 2018
<!--
<div class="talk-event"/>

0 comments on commit 5bb233a

Please sign in to comment.