<commit_before><commit_msg>RDD - Readme Driven Development<commit_after># WARNING: Still under heavy maintenance ;) In fact I just started today!

# BulkDataSource - An ActionScript Framework to integrate with Ruby on Rails

A Flex/ActionScript Framework to integrate with Ruby on Rails using the 'bulk_api' gem

## Installing:

### Rails app:

Add this line to Gemfile and run bundle install:
```ruby
gem 'bulk_api'
```

To set up Bulk API in your Rails app:
```
	rails generate bulk:install
```

### Flex App

Copy the build_data_source.swc to the lib folder of you application.

## Usage

First create a dynamic class that maps to a resource:
```javascript
	public dynamic class Post extends BulkResource {
		
	}
	
	public dynamic class Comment extends BulkResource {
		
	}
```

Find all posts with comments:
```javascript
    var posts:BulkArrayCollection = BulkResource.findAll(Post, {'include':'comments'})
```

Create one post:
```javascript
	var post:Post = new Post()
	post.body = "Simple way to interact with Rails"
	post.comments = new BulkArrayCollection
	var comment:Comment = new Comment({content:'Using RDD - Readme Driven Development'})
	post.comments.addItem(comment)
	BulkResource.save(post)
```

### Mananged Service

```javascript
     BulkDataSource.autoCommit = true;
	// Now any changes is queue and regularly sent to the server.
```

###  Empty Objects

Objects can be querying when needed

```javascript
	BulkResource.find(Post,1, {empty:'comments'}) 
	// returns Post with comments collection without attributes, just the ids
	// Object can be loaded incrementally as needed.
```

### Server Side Validations


### Uniqueing 

Memory map instance by class type and object id to ensure uniqueness in memory.

### RoadMap

1. Serialize/Deserialize
2. CRUD rest requests
3. ... let's take it one step at a time.

### Community

Want to help? Contact <NAME> <EMAIL>

Enjoy!
<NAME>

{'fraction_non_alphanumeric': 0.09616395165528113, 'fraction_numerical': 0.0021019442984760903, 'mean_word_length': 4.348314606741573, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '713151', 'n_tokens_mistral': 584, 'n_tokens_neox': 542, 'n_words': 226}