2010 04-24-cerealize

847 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
847
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
4
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

2010 04-24-cerealize

  1. 1. Serialize out of the Cerealize Box a drop-in replacement for ActiveRecord's serialize cblue.tw
  2. 2. class Cat < ActiveRecord::Base serialize :can, Hash end cblue.tw
  3. 3. Cat.create(:can => {:food => ‘fish’, :mood => ‘dish’}) cblue.tw
  4. 4. YAML is a human friendly data serialization cblue.tw
  5. 5. YAML is not a machine friendly data serialization cblue.tw
  6. 6. YAML SLOW for machine cblue.tw
  7. 7. to the rescue cblue.tw
  8. 8. class Cat < ActiveRecord::Base serialize :can, Hash end cblue.tw
  9. 9. class Cat < ActiveRecord::Base include Cerealize serialize :can, Hash end cblue.tw
  10. 10. class Cat < ActiveRecord::Base include Cerealize cerealize :can, Hash end cblue.tw
  11. 11. cblue.tw
  12. 12. SAVED!! cblue.tw
  13. 13. YAML Marshal Encoding JSON cblue.tw
  14. 14. AUTO detection YAML Encoding Marshal JSON cblue.tw
  15. 15. AUTO detection YAML Encoding Marshal JSON conversion cblue.tw AUTO
  16. 16. class Cat < ActiveRecord::Base include Cerealize cerealize :can, Hash, :encoding => :marshal end cblue.tw
  17. 17. class Cat < ActiveRecord::Base include Cerealize cerealize :can, Hash, :encoding => :yaml end cblue.tw
  18. 18. class Cat < ActiveRecord::Base include Cerealize cerealize :can, Hash, :encoding => :json #future end cblue.tw
  19. 19. Try it Today! gem install cerealize cblue.tw
  20. 20. Try it Today! script/plugin install git://github.com/cardinalblue/cerealize.git cblue.tw
  21. 21. Contribution WANTED!! http://github.com/cardinalblue/cerealize cblue.tw

×