##What are Service Objects?
Service objects contain business logic with an interface that is easy to test.
View > Controller > Model, but sometimes need other data, i.e. from an API
├── app
#Checkbox Field
<div class="field">
<%= f.label "Mechanics in Game:" %><br />
<%= f.collection_check_boxes :mechanic_ids, @mechanics.all, :id, :name do |m| %>
<div class="collection-check-box">
<%= m.check_box %>
<%= m.label %>
</div>
##Bookmarklets
#####What is it?
#####What can it be used for?:
```bash | |
'rails new APPNAME --database=postgresql’ | |
*heroku doesn’t use sqlite3, which is default in new rails apps | |
***SQLite just stores the database to a file in your db/ folder, which is why it's incompatible with Heroku.*** | |
**Redo blog app using postgresql DB | |
**Then try deploying to heroku | |
How to deploy app to heroku |
Types of Languages | |
Interpreted/Dynamic: Python, Ruby | |
Compiled: C, C++, Java | |
Scripting: ECMA | |
Markup: HTML, Markdown | |
What is a scripting language? | |
-A scripting or script language is a programming language that supports scripts, programs written for a special run-time environment that automate the execution of tasks that could alternatively be executed one-by-one by a human operator.[1] Scripting languages are often interpreted (rather than compiled). | |
JavaScript is an interpreted language, not a compiled language. A program such as C++ or Java needs to be compiled before it is run. The source code is passed through a program called a compiler, which translates it into bytecode that the machine understands and can execute. |
#About d3.js
#First Step ✮ Either use a gem - this one is most popular iblue/d3-rails
-You might get a json v1.8.1 error
-Delete the Gemfile.lock
###Big Questions for search optimization
How many queries? Can get (and parse) full lyrics? Can store/serialize lyrics? How to store once acquired? Restricted list Possible queries and benchmarks from existing APIs
Crawler Search and ranking already done when you do a search. To make search so fast, the search layer just returns the next 10 results from a list starting at position 1.
#Sentiment Analysis Options
####Alchemy
####Google Prediction API Developer Guide: https://cloud.google.com/prediction/docs/developer-guide#designrecommendations
##Built-in Rails/Gems
[0] Rails guide to caching in rails - read this first http://guides.rubyonrails.org/caching_with_rails.html
Heroku Guide to Caching Strategies for Rails - read this second https://devcenter.heroku.com/articles/caching-strategies
[1] Countercache in ActiveAssocation