• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Rupy2012 ArangoDB Workshop Part2
 

Rupy2012 ArangoDB Workshop Part2

on

  • 1,582 views

 

Statistics

Views

Total Views
1,582
Views on SlideShare
1,556
Embed Views
26

Actions

Likes
0
Downloads
18
Comments
0

2 Embeds 26

https://twitter.com 17
http://eventifier.co 9

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Rupy2012 ArangoDB Workshop Part2 Rupy2012 ArangoDB Workshop Part2 Presentation Transcript

    • ArangoDB & Ashikawa Workshop Part 2: Ashikawa by Frank Celler and Lucas Dohmen
    • Ashikawa• Ruby Gems for ArangoDB• Ashikawa::Core• Ashikawa::AR• DataMapper 2?
    • Ashikawa::Core• Low Level Driver for ArangoDB• Abstracts the REST interface of ArangoDB• Basis for the other gems gem install ashikawa-core
    • Ashikawa::AR• Implements the Active Record pattern• Integrates with Rails• Used on happy-geoco.de Rails Rumble Project gem install ashikawa-ar
    • Data Mapper 2• Not yet• Implements the Data Mapper pattern• Will support various data sources• If you want to know more, go to Piotr Solnica‘s talk this weekend :(• We will work on the support of ArangoDB
    • Ok, let‘s go
    • Ashikawa::Core
    • ArangoDB started? ;)
    • gem install ashikawa-core
    • require "ashikawa-core"db = Ashikawa::Core::Database.new "127.0.0.1:8529"my_collection = db["stuff"]my_collection << { name: "Test", something: "cool"}p my_collection.all.first.to_hash
    • What can you do?• Access ArangoDB at a low level• More on rubydoc.info • Just search for ashikawa-core
    • Ashikawa::AR
    • Setup a new Rails Apprails new --skip-active-record Add ashikawa-ar, ~> 0.1.2 to you gemfile
    • Configure your DBYourApplicationName::Application.configure do # ... # ArangoDB configuration Ashikawa::AR.setup :default, "127.0.0.1:8529"endConfiguration via database.yml already planned ;)
    • class MyFineModel include Ashikawa::AR::Model attribute :name attribute :my_attribute attribute :my_string, String end # Somewhere else... model = MyFineModel.by_example name: "Johnny"rails g ashikawa:model NAME attribute attribute2:String
    • What can you do?• Define attributes via virtus• Validate attributes via aequitas• Find: all, by_example, find_by_aql…• Delete, reload, save, update_attributes…• More on rubydoc.info • Just search for ashikawa-ar
    • Contact @moonbeamlabs @arangodb triAGENS/ashikawa-core triAGENS/ashikawa-ar lucas@arangodb.org ashikawa@googlegroups.com…or just find us this weekend :)