• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Effective Java 3rd Ed: Question about Serialization chapter

 
Greenhorn
Posts: 17
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Josh,

Thank you very much for such a great book, I've read the 2nd edition of the book and I really learned a lot from it, so I plan to purchase the 3rd Edition soon.
My question is about the Serialization chapter, is it anything different from the 2nd edition's ? Because I don't see a lot of benefits learning the nitty gritty of Java's built-in serialization mechanism, correct me if I'm wrong! While I don't see that to be used a lot, almost everyone uses JSON now days.
So in the 3rd edition, what have you included in the Serialization chapter, still the Java's built-in mechanism ? or JSON/XML serialization and similar ?

Thanks in advance
 
Sheriff
Posts: 22800
131
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The serialization items are still there, but if I recall correctly most of them claim to use serialization only if you have to. There are no specific items on any alternatives, but that's probably mostly because there is no out-of-the-box support for that in JSE. You need a third party library like Jackson or Gson, and I think the book rightfully doesn't make a choice for us.
 
Ranch Foreman
Posts: 239
2
jQuery Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The third edition suggests protobuf and JSON instead of serialization, as serialization has big security issues.

I'm interested in protobuf references for dummies if there are any, Josh's book has this link https://developers.google.com/protocol-buffers/  to a  google development site and that's pretty much it?

I'm an amateur developer, and am prototyping a multi server web app, where I have different VMs to communicate with each other, and I gather serialisation is not the done thing anymore in this context.

Any further resources on protobuf would be appreciated.

Cheers

Marten
 
Author and "Sun God"
Posts: 185
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Marten Kay took the words right out of my mouth. The Serialization chapter now starts with an item warning you away from serialization, and suggesting JSON and protobuf as alternatives. It does not provide details on JSON and protobuf, as the book is too long as it stands. Because some of us still have to use Java serialization, I did bring the rest of the chapter up to date, but I hope far fewer people have to use this material than had to use the analogous items in the previous editions.

In (partial) answer to Marten's query, the Google tutorial on protobufs (https://developers.google.com/protocol-buffers/docs/tutorials) is said to be pretty good. Here's the Java protobuf tutorial: https://developers.google.com/protocol-buffers/docs/javatutorial.
 
Hug your destiny! And hug this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic