Showing posts with label migrations. Show all posts
Showing posts with label migrations. Show all posts

Wednesday, 5 February 2014

WDI Progress Update - Production, Bootstrap, CSV migrations

Challenges:
  • App exploded when tried to install bootstrap, used Heroku clone to recover
  • Searching databases and filtering selections
  • Resolved absolute file paths not being recognised when uploading to Heroku. Fixed data migration files and relocated CSV files to the root directory. Compiled successfully with this code:
require 'fileutils'require 'csv' 
class AddIdeaData < ActiveRecord::Migration
  def up
filepath = Rails.root.join("ideas.csv")
# locate the csv file in your /public folder if File.exist?(filepath) CSV.foreach(filepath)do |col| Idea.create(:name => col[0].to_s, :description => col[1].to_s, :author => col[6].to_s, :url => col[7].to_s, :country => col[8].to_s) end else  raise "No file exists with name: #{filepath}" end  end
  def down   Idea.all.destroy # only with team permission  end
end

                                                Progress @ General Assembly (GA):
                                                • Rails (Authentication vs Authorisation, Static page controller, Custom controller methods using routing collections and members, Hidden form fields)
                                                • Production (Heroku)
                                                • Gems (Sanitise for customising Devise Authentication, Rails_12factor for production and images on Heroku)
                                                • Agile (Daily Scrum meetings)
                                                • Bootstrap themes


                                                Contributions to Developer Community 
                                                • Exciting ideas and concepts explored with the The Slippery Gypseas!
                                                • Sydney Tech Startup Meetup on 6th Feb

                                                Curious:
                                                • Cancan (Authorisation)

                                                Monday, 3 February 2014

                                                WDI Progress Update - Agile Tools, Wireframes, Migration Change Control Diligence, Alumni

                                                Progress @ General Assembly (GA):
                                                • Agile Dev Intro (Agile vs Waterfall, Manifesto, Test Driven Dev (TDD), Behaviour Driven Dev (BDD), Scrum Sprint Cycles and Ya Ain't Gonna Need It YAGNI / MVP Priorities, Ship early ship often, Estimation Points Sys. & Timeframes, Break-down Tasks, Team Velocity Forecasting Sprints, Burn-down Charts, Timeboxing Spikes, Daily Brief Stand-p Meeting Agenda Protocols, Project Normal Workflows, Planning & Design Stage, Site Structure, Use-cases, Wire-frames, Non-standard CRUD requirements, Development Stage) 
                                                • PivotalTracker - Agile Project Management tool using Scrum
                                                • Balsamiq Mockup - Wire-frames
                                                • Rails (Devise Authentication, Importance of Ongoing Migration Due Diligence to Teams and Traceability)
                                                • Presentation by Tiffany McHugh of GA's Studio Service:
                                                  • Job readiness, Partner connections, Alumni network, Teaching opportunities, Sharing, etc

                                                Wednesday, 29 January 2014

                                                WDI Progress Update - Scaffold Migration in Rails

                                                Challenges:

                                                1. Homework!!! (et al)
                                                Progress @ General Assembly (GA)
                                                • Rails (Data Retention of Up/Down Migration, Verbose 'Say' Benchmarking, Rake specific versions, Multiple rollbacks, Rails Environment (Dev, Test, Production), Scaffold migration generation, Convention over Configuration, Rendering (View Actions, Arbitrary Files, Layout Overrides, Authorisations, Layout Scope Control, Absolute and Relative Paths), Refactoring block manipulation with Shared Partials and Collections, Flash Alerts and Notices, Rails Tooltips

                                                WDI Progress Update - Manual Migrations in Rails

                                                Progress @ General Assembly (GA)
                                                • Rails Key Definitions (based on personally reviewing unfamiliar keywords contained in all main Rails version 4.0.2 files/folders including Gemfile, and the Initialiser and Public folders that are generated after running 'new blog_app --database=postgresql', and summarising their definitions briefly in my own words and listing them in alphabetical order after a quick Google search, for fast-track Rails learning purposes). Accuracy in the definitions is not guaranteed (feedback welcomed!)
                                                  • ActiveRecord Database - Postgresql
                                                  • Action Mailer - emails from app using mailer classes/views
                                                  • Action Model - non-database (db) functionality of ActiveRecord plus validations in tableless models
                                                  • Action Pack - handles Controller and View layers in Rails
                                                  • Active Support - toolkit of Rails classes that are usable in Ruby environment
                                                  • Arel - simplifies SQL queries (it is an SQL AST manager)
                                                  • Atomic - accessor class for values and methods to control block updates (optionally with exceptions)
                                                  • BacktraceCleaner - includes filters and silencers to remove noisy lines of code and included in Initialisers directory
                                                  • bcrypt - password hashing algorithm
                                                  • builder - simplifies creating structured data in XML
                                                  • Capistrano - deploys Rails app to production server from Git 
                                                  • CoffeeScript - JS Coffee (assets/views)
                                                  • Deprecated - software features that should be avoided (as typically superceded) but remain for backward compatibility to allow developers to adjust to new standard
                                                  • Error 404 / 422 / 500 - web page not exist / change rejected (validation) / internal server error, - located in the Public folder 
                                                  • Erubis - template system of Embedded Ruby in text documents (i.e. HTML)
                                                  • ExecJS - enables JS code from Ruby
                                                  • hike - Ruby library for finding files in a set of paths
                                                  • i18n - internationalisation support that collects locale data
                                                  • Inflections - set of singularisation and pluralisation rules for Ruby/Rails apps, located in Initialisers folder
                                                  • jBuilder template engine Domain Specific Language (DSL) for generating JSON response (API builder) 
                                                  • jQuery - JS library
                                                  • JSON - Javascript Object Notation (JSON) is a lightweight data interchange format 
                                                  • MiniTest - Ruby testing framework/facilities supporting TDD, BDD, mocking, and benchmarking (compared to RSpec which is a testing DSL)
                                                  • MultiJSON - common interface to multiple JSON libraries
                                                  • Parameters wrapper - wraps JSON files with Action Controller, located in Initialisers folder
                                                  • Polyglot - library that allows Ruby module to register a loader for file extension types and augments 'require' to find and load matching files
                                                  • Rack - modular and adaptable Ruby web server interface that wraps HTTP requests/responses across middleware in a single method call 
                                                  • Railtie - major components of Rails (i.e. Action Mailer, Action Controller, Action View, Action Record)
                                                  • robots - web crawlers/spiders (indexers), located in the Public folder
                                                  • Sass - Systactically Awesome Style Sheets (Sass) is a CSS3 extension (with nested rules, variables, mixins, selector inheritance, etc)
                                                  • SCSS - Sassy CSS (SCSS) is a CSS3 extension syntax based on and implemented with JS, with dynamic behaviour (i.e. variables, mixins, operations, functions) on either server or client-side
                                                  • SDoc - Ruby on Rails (ROR) API documentation
                                                  • Secret Token - verifies integrity of signed cookies, located in Initialisers folder
                                                  • sprockets - Rack-based asset packaging system that concatenates and serves JS, CoffeeScript, CSS, LESS, Sass, and SCSS languages
                                                  • TheRubyRacer - JS (call and manipulate from Ruby)
                                                  • Thor - scripting framework that replaces Rake, Sake, Rubigen (command line option parsing in Ruby)
                                                  • threadSafe - Rails app development with Ruby requests (controller, SQL, render, response) and optimal Ruby environment methods allowing switching threads (i.e. CPU in use, or CPU waiting idle) with sharing of states stored and locks, using one environment hash per request 
                                                  • tilt - generic interface to create multiple Ruby templates with file, line, and options specified
                                                  • Treetop - Ruby parsing and interpretation DSL based on Parsing Expression Grammars (PEGs) and analysing syntax. It defines methods on trees that it constructs automatically (Syntax-Oriented Programming)
                                                  • Turbolinks - JS & CSS (is faster, as when its compiling, it replaces only the body/head between page changes, and does not recompile JS/CSS, memory management recommended)
                                                  • TZinfo - Ruby Timezone library (i.e. with daylight savings, etc)
                                                  • Uglifier - Javascript (JS) asset compressor
                                                  • Unicorn - HTTP web server for Rack apps
                                                  • YAML - Yet Another Markup Language (YAML) format
                                                • Rails (CRUD app setup, Controllers, Rake Routes, Database Migrations, Partials, Semantic URLs with Nested Routes)
                                                Events: