SlideShare a Scribd company logo
Rails, Postgres,
Angular, and Bootstrap
The Power Stack
@davetron5000
Journey through the
“stack”
Full Stack is important
“Jack of all trades,
master of none…
…oftentimes better
than master of one”
UI
Rails, Postgres, Angular, and Bootstrap: The Power Stack
Rails, Postgres, Angular, and Bootstrap: The Power Stack
Learn about design
Rails, Postgres, Angular, and Bootstrap: The Power Stack
MY AMAZING
APP!
MY AMAZING
APP!
Text
Modular Type Scale
Subhead 1
Subhead 2
Subhead 3
Body Text
Captions & Secondary Text
About Us
The place for all your needs
We’ve got everything you
could ever want and then
some. It’s just that simple to
be as awesome as we are,
and it shows.
You can’t find this much great
stuff anywhere else, so what
are you waiting for? Sign up
Sign Up
Log In
Help
Rails, Postgres, Angular, and Bootstrap: The Power Stack
Rails, Postgres, Angular, and Bootstrap: The Power Stack
<div class="row">
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
</div>
<div class="row">
<div class="col-md-8">.col-md-8</div>
<div class="col-md-4">.col-md-4</div>
</div>
<form class="form-horizontal">
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">Email</label>
<div class="col-sm-10">
<input type="email" class="form-control" id="inputEmail3" placeholder="Email">
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-2 control-label">Password</label>
<div class="col-sm-10">
<input type="password" class="form-control" id="inputPassword3" placeholder="Password">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="checkbox">
<label>
<input type="checkbox"> Remember me
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default">Sign in</button>
</div>
</div>
</form>
<form>
<label for="inputEmail3" class="col-sm-2 control-label">Email</label>
<input type="email" class="form-control" id="inputEmail3" placeholder="Email">
<label for="inputPassword3" class="col-sm-2 control-label">Password</label>
<input type="password" class="form-control" id="inputPassword3" placeholder="Password">
<label>
<input type="checkbox"> Remember me
</label>
<button type="submit" class="btn btn-default">Sign in</button>
</form>
<button type=“button” class=“btn btn-default”>Default</button>
<button type=“button” class=“btn btn-primary”>Primary</button>
<button type=“button” class=“btn btn-primary btn-lg”>Large</button>
<button type=“button” class=“btn btn-primary btn-xs”>XS</button>
Default
Default
Default
Default
<div class=“alert alert-success”>…</div>
alert-info
alert-warning
alert-danger
Panel
Icons
Sub-panel
Well
Disabled
Badge
Interaction
JavaScript & jQuery
You shouldn’t think about
locating DOM elements and
firing or responding to events
<div class=“dialog js-dismissable”>
<h1>OK?</h1>
<nav>
<button data-dismiss=“yes”>Close</button>
<button data-ok>OK</button>
</nav>
</div>
$(“.js-dimissable”).find(“[data-ok]”).click(function() {
// ...
});
Components &
Behavior
<dialog>
<title>OK?</title>
<dismiss>Close</dismiss>
<confirm>OK</confirm>
</dialog>
dialog.on_confirm(function() {
// ...
});
Rails, Postgres, Angular, and Bootstrap: The Power Stack
Some
Documentation
Kinda
Works
No
Support
Yeah, there’s probably some
code comments, and it’s
entirely possible I used great
variable names. Functions
and objects should be
consistent, but probably
aren’t. I think there was a
demo page somewhere,
maybe?
It still doesn’t handle that
weird case on IE 8, and I
never tested what happens if
you use two containers in the
same DOM subtree, but CSS
polyfills mostly work for major
browsers. No, there’s no test
suite.
I’m moving onto a project
using Node, Elixir, Redis,
Mongo, and Kubernetes, so
the best thing to do is hang
out on the Slack channel. I
live in New Orleans, but work
Amsterdam hours, so I’m not
always around.
JS
Rails, Postgres, Angular, and Bootstrap: The Power Stack
<aside class=“modal-dialog”>
<h1>{{ title }}</h1>
<p ng-if=“message”>
{{ message }}
</p>
<button ng-click=“dismiss()”>Close</button>
<button ng-click=“ok(‘ok’)”>OK</button>
<button ng-click=“ok(‘maybe’)”>Maybe</button>
</aside>
“DialogController”,
function($scope, $dialog, opts) {
$scope.title = opts.title;
$scope.message = opts.message;
$scope.ok = function(data) {
if (data == ‘ok’) {
$dialog.confirm();
}
else {
$dialog.confirm(withData: data)
}
}
$scope.dismiss = function() {
$dialog.cancel();
}
User = $resource(“/users/:id”);
$scope.user = User.get(id: $routeParams.id);
<article>
<h1>{{ user.name }}</h1>
<h2>{{ user.email }}</h2>
<ul ng-repeat=“login in user.recentLogins”>
<li>
<strong>{{ login.date }}</strong> -
{{ login.ipAddress }}
</li>
</ul>
</article>
angular.module(‘controllers’).controller(
“DialogController”,
function($scope, $dialog, opts) {
$scope.title = opts.title;
$scope.message = opts.message;
$scope.ok = function(data) {
if (data == ‘ok’) {
$dialog.confirm();
}
else {
$dialog.confirm(withData: data)
}
}
$scope.dismiss = function() {
$dialog.cancel();
}
});
“customConfirmation”,
function() {
return {
confirm: function($dialog,data) {
if (data == ‘ok’) $dialog.confirm();
else $dialog.confirm(withData: data);
}
}
}
);
angular.module(‘controllers’).controller(
“DialogController”,
function($scope, $dialog, opts, customConfirmation) {
$scope.title = opts.title;
$scope.message = opts.message;
$scope.ok = customConfirmation.confirm;
$scope.dismiss = function() {
$dialog.cancel();
}
Angular is Popular
The “Back End”
Middleware
Parse HTTP
Extract params, headers,
cookies, etc
Route to code
Read result
Generate response, cookies,
headers, etc.
Database Access
Package Assets
Run Tests
Schema Management
Configuration & Deployment
Parse HTTP
Extract params, headers,
cookies, etc
Route to code
Read result
Generate response, cookies,
headers, etc.
Database Access
Package Assets
Run Tests
Schema Management
Configuration & Deployment
Plumbing
Your Code
Don’t make decisions
Rails, Postgres, Angular, and Bootstrap: The Power Stack
Rails, Postgres, Angular, and Bootstrap: The Power Stack
Rails, Postgres, Angular, and Bootstrap: The Power Stack
Data
Durability
Integrity
Speed
Modeling
SQL RDBMS
First: Learn SQL. You
won’t regret it.
Rails, Postgres, Angular, and Bootstrap: The Power Stack
ALTER TABLE
users
ADD CONSTRAINT
valid_emails
CHECK (
( guest = true AND
email ! ‘[A-Za-z0-9._%-]+@example.com’)
OR
( guest = false AND
email ~ ‘[A-Za-z0-9._%-]+@example.com’)
)
CREATE INDEX
users_name_index
ON
users (lower(name))
SELECT * FROM users
WHERE lower(name) = ‘bob’;
UPDATE users
SET config = ‘auto_save => true,
color => default’::hstore;
CREATE INDEX user_config
ON users USING GIN(config);
ALTER TABLE
users
ADD COLUMN
config HSTORE;
SELECT * FROM users
WHERE config @> ‘auto_save => true’;
ALTER TABLE
users
ADD COLUMN
roles text[];
UPDATE users
SET roles = ‘{staff,admin}’;
CREATE INDEX user_roles
ON users USING GIN(roles);
SELECT * FROM users
WHERE roles @> ‘{admin}’;
ALTER TABLE
transactions
ADD COLUMN
braintree_response JSONB;
UPDATE transactions
SET braintree_response = ‘{
“processor_response”: “decline”,
“processor_code”: 1234,
“details”: {
“charge_type”: “authorization”,
“amount”: 12.45,
“zip”: “20002”
}
CREATE INDEX txn_responses
ON transactions
USING GIN(braintree_response);
SELECT * FROM
transactions
WHERE
roles @>
‘{“processor_response”: “decline”}’::jsonb;
SQL Knowledge + Postgres
== Powerful data layer
Putting it all Together
Be Honest about
Weaknesses
Bootstrap
• JS-based components require jQuery
• Angular-UI-Bootstrap
Angular
• Protractor (end-to-end testing) totally disconnected
from Rails/back-end
• Use Capybara/PhantomJS for E2E testing
Rails
• Strange view/front-end/JS/AJAX design
• Avoid
• Disable turbolinks
• Asset Pipeline oddities
• Learn to use it—it’s actually powerful
Rails
• Database Migrations “DSL”
• You are not making a database-agnostic app
• Use execute
• Use SQL-based schema
config.active_record.schema_format = :sql
Rails
• ActiveRecord
• Examine queries in the log—look for
optimizations
• Let SQL shine
• Don’t fear .where() or
ActiveRecord::Base.connection.exec_query()
Postgres
• Stored Procedures
• Triggers
• Avoid putting business logic here
You don’t have to use
every feature
These are powerful
tools
The reduce the decisions
you have to make to only
what’s important.
If you are making decisions
not related to your product…
…consider Bootstrap,
Angular, Rails, or Postgres
Ad

Recommended

Week 4 - jQuery + Ajax
Week 4 - jQuery + Ajax
baygross
 
jQuery from the very beginning
jQuery from the very beginning
Anis Ahmad
 
jQuery PPT
jQuery PPT
Dominic Arrojado
 
Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...
Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...
Nagios
 
jQuery in 15 minutes
jQuery in 15 minutes
Simon Willison
 
Handlebars
Handlebars
Sivasankaran Murugaiyan
 
JavaScript and jQuery Basics
JavaScript and jQuery Basics
Kaloyan Kosev
 
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Ayes Chinmay
 
jQuery Best Practice
jQuery Best Practice
chandrashekher786
 
Hacking Your Way To Better Security - php[tek] 2016
Hacking Your Way To Better Security - php[tek] 2016
Colin O'Dell
 
JQuery introduction
JQuery introduction
NexThoughts Technologies
 
jQuery
jQuery
Mohammed Arif
 
jQuery
jQuery
Mostafa Bayomi
 
Javascript
Javascript
orestJump
 
22 j query1
22 j query1
Fajar Baskoro
 
AngulrJS Overview
AngulrJS Overview
Eyal Vardi
 
Learning jQuery in 30 minutes
Learning jQuery in 30 minutes
Simon Willison
 
jQuery
jQuery
Dileep Mishra
 
Scalable vector ember
Scalable vector ember
Matthew Beale
 
jQuery Anti-Patterns for Performance & Compression
jQuery Anti-Patterns for Performance & Compression
Paul Irish
 
Devoxx 2014-webComponents
Devoxx 2014-webComponents
Cyril Balit
 
Javascript1
Javascript1
anas Mohtaseb
 
Web 6 | JavaScript DOM
Web 6 | JavaScript DOM
Mohammad Imam Hossain
 
Introduction to jQuery
Introduction to jQuery
manugoel2003
 
jQuery Presentation
jQuery Presentation
Rod Johnson
 
jQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a Tree
adamlogic
 
Hacking Your Way To Better Security - DrupalCon Baltimore 2017
Hacking Your Way To Better Security - DrupalCon Baltimore 2017
Colin O'Dell
 
Jquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript Basics
EPAM Systems
 
Heroku Waza 2013 Lessons Learned
Heroku Waza 2013 Lessons Learned
Simon Bagreev
 
CICONF 2012 - Don't Make Me Read Your Mind
CICONF 2012 - Don't Make Me Read Your Mind
ciconf
 

More Related Content

What's hot (20)

jQuery Best Practice
jQuery Best Practice
chandrashekher786
 
Hacking Your Way To Better Security - php[tek] 2016
Hacking Your Way To Better Security - php[tek] 2016
Colin O'Dell
 
JQuery introduction
JQuery introduction
NexThoughts Technologies
 
jQuery
jQuery
Mohammed Arif
 
jQuery
jQuery
Mostafa Bayomi
 
Javascript
Javascript
orestJump
 
22 j query1
22 j query1
Fajar Baskoro
 
AngulrJS Overview
AngulrJS Overview
Eyal Vardi
 
Learning jQuery in 30 minutes
Learning jQuery in 30 minutes
Simon Willison
 
jQuery
jQuery
Dileep Mishra
 
Scalable vector ember
Scalable vector ember
Matthew Beale
 
jQuery Anti-Patterns for Performance & Compression
jQuery Anti-Patterns for Performance & Compression
Paul Irish
 
Devoxx 2014-webComponents
Devoxx 2014-webComponents
Cyril Balit
 
Javascript1
Javascript1
anas Mohtaseb
 
Web 6 | JavaScript DOM
Web 6 | JavaScript DOM
Mohammad Imam Hossain
 
Introduction to jQuery
Introduction to jQuery
manugoel2003
 
jQuery Presentation
jQuery Presentation
Rod Johnson
 
jQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a Tree
adamlogic
 
Hacking Your Way To Better Security - DrupalCon Baltimore 2017
Hacking Your Way To Better Security - DrupalCon Baltimore 2017
Colin O'Dell
 
Jquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript Basics
EPAM Systems
 
Hacking Your Way To Better Security - php[tek] 2016
Hacking Your Way To Better Security - php[tek] 2016
Colin O'Dell
 
AngulrJS Overview
AngulrJS Overview
Eyal Vardi
 
Learning jQuery in 30 minutes
Learning jQuery in 30 minutes
Simon Willison
 
Scalable vector ember
Scalable vector ember
Matthew Beale
 
jQuery Anti-Patterns for Performance & Compression
jQuery Anti-Patterns for Performance & Compression
Paul Irish
 
Devoxx 2014-webComponents
Devoxx 2014-webComponents
Cyril Balit
 
Introduction to jQuery
Introduction to jQuery
manugoel2003
 
jQuery Presentation
jQuery Presentation
Rod Johnson
 
jQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a Tree
adamlogic
 
Hacking Your Way To Better Security - DrupalCon Baltimore 2017
Hacking Your Way To Better Security - DrupalCon Baltimore 2017
Colin O'Dell
 
Jquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript Basics
EPAM Systems
 

Similar to Rails, Postgres, Angular, and Bootstrap: The Power Stack (20)

Heroku Waza 2013 Lessons Learned
Heroku Waza 2013 Lessons Learned
Simon Bagreev
 
CICONF 2012 - Don't Make Me Read Your Mind
CICONF 2012 - Don't Make Me Read Your Mind
ciconf
 
Yii blog-1.1.9
Yii blog-1.1.9
Netechsrl
 
Solid in practice
Solid in practice
Jessica Mauerhan
 
ITB2019 10 in 50: Ten Coldbox Modules You Should be Using in Every App - Jon ...
ITB2019 10 in 50: Ten Coldbox Modules You Should be Using in Every App - Jon ...
Ortus Solutions, Corp
 
From University to Real Life
From University to Real Life
Jose Galarza
 
SOLID in Practice
SOLID in Practice
Jessica Mauerhan
 
Do your test
Do your test
Yura Tolstik
 
www.webre24h.com - [O`reilly] javascript cookbook - [powers]
www.webre24h.com - [O`reilly] javascript cookbook - [powers]
webre24h
 
Scaling
Scaling
Òscar Vilaplana
 
User Login in PHP with Session & MySQL.pdf
User Login in PHP with Session & MySQL.pdf
Be Problem Solver
 
Database Trends for Modern Applications: Why the Database You Choose Matters
Database Trends for Modern Applications: Why the Database You Choose Matters
MongoDB
 
PHP_Course_Final.pptx
PHP_Course_Final.pptx
MehedihasanMehediIT
 
resume
resume
Brent Ransom
 
Building scalable products with WordPress - WordCamp London 2018
Building scalable products with WordPress - WordCamp London 2018
Elliot Taylor
 
深入淺出RoR
深入淺出RoR
Eric Lee
 
Angular
Angular
gsrawat
 
Why ruby on rails
Why ruby on rails
Boris Dinkevich
 
[2015/2016] Local data storage for web-based mobile apps
[2015/2016] Local data storage for web-based mobile apps
Ivano Malavolta
 
Road to Rails
Road to Rails
paoloperrotta
 
Heroku Waza 2013 Lessons Learned
Heroku Waza 2013 Lessons Learned
Simon Bagreev
 
CICONF 2012 - Don't Make Me Read Your Mind
CICONF 2012 - Don't Make Me Read Your Mind
ciconf
 
Yii blog-1.1.9
Yii blog-1.1.9
Netechsrl
 
ITB2019 10 in 50: Ten Coldbox Modules You Should be Using in Every App - Jon ...
ITB2019 10 in 50: Ten Coldbox Modules You Should be Using in Every App - Jon ...
Ortus Solutions, Corp
 
From University to Real Life
From University to Real Life
Jose Galarza
 
www.webre24h.com - [O`reilly] javascript cookbook - [powers]
www.webre24h.com - [O`reilly] javascript cookbook - [powers]
webre24h
 
User Login in PHP with Session & MySQL.pdf
User Login in PHP with Session & MySQL.pdf
Be Problem Solver
 
Database Trends for Modern Applications: Why the Database You Choose Matters
Database Trends for Modern Applications: Why the Database You Choose Matters
MongoDB
 
Building scalable products with WordPress - WordCamp London 2018
Building scalable products with WordPress - WordCamp London 2018
Elliot Taylor
 
深入淺出RoR
深入淺出RoR
Eric Lee
 
[2015/2016] Local data storage for web-based mobile apps
[2015/2016] Local data storage for web-based mobile apps
Ivano Malavolta
 
Ad

Recently uploaded (20)

SAP PM Module Level-IV Training Complete.ppt
SAP PM Module Level-IV Training Complete.ppt
MuhammadShaheryar36
 
NVIDIA Artificial Intelligence Ecosystem and Workflows
NVIDIA Artificial Intelligence Ecosystem and Workflows
SandeepKS52
 
Sysinfo OST to PST Converter Infographic
Sysinfo OST to PST Converter Infographic
SysInfo Tools
 
Advanced Token Development - Decentralized Innovation
Advanced Token Development - Decentralized Innovation
arohisinghas720
 
Best MLM Compensation Plans for Network Marketing Success in 2025
Best MLM Compensation Plans for Network Marketing Success in 2025
LETSCMS Pvt. Ltd.
 
Porting Qt 5 QML Modules to Qt 6 Webinar
Porting Qt 5 QML Modules to Qt 6 Webinar
ICS
 
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
Hassan Abid
 
Folding Cheat Sheet # 9 - List Unfolding 𝑢𝑛𝑓𝑜𝑙𝑑 as the Computational Dual of ...
Folding Cheat Sheet # 9 - List Unfolding 𝑢𝑛𝑓𝑜𝑙𝑑 as the Computational Dual of ...
Philip Schwarz
 
GDG Douglas - Google AI Agents: Your Next Intern?
GDG Douglas - Google AI Agents: Your Next Intern?
felipeceotto
 
Key Challenges in Troubleshooting Customer On-Premise Applications
Key Challenges in Troubleshooting Customer On-Premise Applications
Tier1 app
 
A Guide to Telemedicine Software Development.pdf
A Guide to Telemedicine Software Development.pdf
Olivero Bozzelli
 
Streamlining CI/CD with FME Flow: A Practical Guide
Streamlining CI/CD with FME Flow: A Practical Guide
Safe Software
 
Who will create the languages of the future?
Who will create the languages of the future?
Jordi Cabot
 
Open Source Software Development Methods
Open Source Software Development Methods
VICTOR MAESTRE RAMIREZ
 
Async-ronizing Success at Wix - Patterns for Seamless Microservices - Devoxx ...
Async-ronizing Success at Wix - Patterns for Seamless Microservices - Devoxx ...
Natan Silnitsky
 
Step by step guide to install Flutter and Dart
Step by step guide to install Flutter and Dart
S Pranav (Deepu)
 
ElectraSuite_Prsentation(online voting system).pptx
ElectraSuite_Prsentation(online voting system).pptx
mrsinankhan01
 
Y - Recursion The Hard Way GopherCon EU 2025
Y - Recursion The Hard Way GopherCon EU 2025
Eleanor McHugh
 
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
WSO2
 
Download Adobe Illustrator Crack free for Windows 2025?
Download Adobe Illustrator Crack free for Windows 2025?
grete1122g
 
SAP PM Module Level-IV Training Complete.ppt
SAP PM Module Level-IV Training Complete.ppt
MuhammadShaheryar36
 
NVIDIA Artificial Intelligence Ecosystem and Workflows
NVIDIA Artificial Intelligence Ecosystem and Workflows
SandeepKS52
 
Sysinfo OST to PST Converter Infographic
Sysinfo OST to PST Converter Infographic
SysInfo Tools
 
Advanced Token Development - Decentralized Innovation
Advanced Token Development - Decentralized Innovation
arohisinghas720
 
Best MLM Compensation Plans for Network Marketing Success in 2025
Best MLM Compensation Plans for Network Marketing Success in 2025
LETSCMS Pvt. Ltd.
 
Porting Qt 5 QML Modules to Qt 6 Webinar
Porting Qt 5 QML Modules to Qt 6 Webinar
ICS
 
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
Hassan Abid
 
Folding Cheat Sheet # 9 - List Unfolding 𝑢𝑛𝑓𝑜𝑙𝑑 as the Computational Dual of ...
Folding Cheat Sheet # 9 - List Unfolding 𝑢𝑛𝑓𝑜𝑙𝑑 as the Computational Dual of ...
Philip Schwarz
 
GDG Douglas - Google AI Agents: Your Next Intern?
GDG Douglas - Google AI Agents: Your Next Intern?
felipeceotto
 
Key Challenges in Troubleshooting Customer On-Premise Applications
Key Challenges in Troubleshooting Customer On-Premise Applications
Tier1 app
 
A Guide to Telemedicine Software Development.pdf
A Guide to Telemedicine Software Development.pdf
Olivero Bozzelli
 
Streamlining CI/CD with FME Flow: A Practical Guide
Streamlining CI/CD with FME Flow: A Practical Guide
Safe Software
 
Who will create the languages of the future?
Who will create the languages of the future?
Jordi Cabot
 
Open Source Software Development Methods
Open Source Software Development Methods
VICTOR MAESTRE RAMIREZ
 
Async-ronizing Success at Wix - Patterns for Seamless Microservices - Devoxx ...
Async-ronizing Success at Wix - Patterns for Seamless Microservices - Devoxx ...
Natan Silnitsky
 
Step by step guide to install Flutter and Dart
Step by step guide to install Flutter and Dart
S Pranav (Deepu)
 
ElectraSuite_Prsentation(online voting system).pptx
ElectraSuite_Prsentation(online voting system).pptx
mrsinankhan01
 
Y - Recursion The Hard Way GopherCon EU 2025
Y - Recursion The Hard Way GopherCon EU 2025
Eleanor McHugh
 
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
WSO2
 
Download Adobe Illustrator Crack free for Windows 2025?
Download Adobe Illustrator Crack free for Windows 2025?
grete1122g
 
Ad

Rails, Postgres, Angular, and Bootstrap: The Power Stack

Editor's Notes

  • #2: • thanks for coming • this is a powerful stack • can solve many common problems
  • #3: • stop along the way • outline common problems when working in that part • see how these technologies solve those problems
  • #4: • important to understand why this is important • we are at a full stack conference
  • #5: • I like the more rare, complete version • with an holistic view, you can solve problems end-to-end • little friction between what you want to deliver and what you can deliver • work with specialists if you need them
  • #6: • this is what your users think of as “the app” • how should it look? • how should it work?
  • #7: • We aren’t creating products differentiated on HCI • We aren’t creating a product that innovates on HCI
  • #8: • solving people’s problems • helping someone be more successful at their job • can’t build the former without a lot of the latter
  • #9: • a little goes a long way • with a few hours reading, you will be leveled up
  • #10: • Grid based design foundation of print and web design
  • #11: • Everything on a page should be aligned to a grid
  • #12: • when it’s aligned, your design is cohesive, polished, and professional
  • #13: • The grid reduces choices to just a few that will work great. • you can apply the same logic to font sizes • you just need six or seven fonts
  • #14: • The grid reduces choices to just a few that will work great. • you can apply the same logic to font sizes • you just need six or seven fonts
  • #15: • the page comes together • you can direct the user with just font size
  • #17: • when forms and complex components are needed, use padding/margins that work with the grid and type scale
  • #18: • There are many many CSS frameworks • Bootstrap is full-featured, easy to use, easy to understand, and hard to mess up
  • #19: • It has a grid and modular type scale •
  • #20: • Your forms won’t look terrible
  • #21: • Many other components that you need for common tasks
  • #24: • web apps aren’t static • simplest ones need dialogs, showing/hiding things, async loading
  • #25: • This means JavaScript • JS and JQ are very low level
  • #27: • Your code should be at the component and behavior level of abstraction
  • #28: • You want your logic tested without clicking around in a browser • You don’t want your view littered with data elements and js classes
  • #29: • You can achieve this in JS or jQuery • but you end up making your own degenerate framework • that is undocumented and no one can use
  • #30: • you shouldn’t build a framework while you are building features • you should use the hard work of others • Angular can do all of these things
  • #31: • it’s clear what the intent is here, and how this will behave
  • #32: • Aside from the boilerplate, this is simple code • it’s not wrapped up in the framework • it’s easily testable • it just uses simple javascript objects.
  • #33: • uses promises so you have no callback hell
  • #34: • you have a clear way to extract and abstract code • there’s nothing really fancy or magical about it
  • #35: • you have a clear way to extract and abstract code • there’s nothing really fancy or magical about it
  • #36: • don’t undervalue this • lots of resources, help, documentation • you won’t find systemic issues in popular frameworks
  • #37: • the UI has to talk to some sort of back-end • this is where business logic goes
  • #38: • such a businessy lame term, but it’s on point • middleware does a lot
  • #39: • receive HTTP requests • parse them • call some code • figure out a response • service assets • talk to the database • run tests • etc etc. This is a LOT
  • #40: • Your first problem in middleware land is you don’t want to write plumbing • you don’t want to spend time debating how to route URLs • you can’t afford to discuss database management or param parsing
  • #41: • your business problems are necessarily complex • the way you solve them should not be MORE complex
  • #42: • you want a framework that makes the right decisions for you • you want to work in an expressive high-level language • so all you think about is your problem and how to structure the code
  • #43: • Rails is the gold standard • Convention-based, makes all decisions for you • No Rails team ever debates how to package assets, route URLs, parse the query string, connect to the database, run tests, or manage the schema
  • #44: • Ruby is a wonderful language • Highly expressive; simple code • Abstraction is straightforward • If all you know is JavaScript, C#, or Java, you owe it to yourself to try Rails
  • #45: • Like most middleware, Rails wants to be everything. We’ll get to that • part of being a full stack developer is getting the best out of your tools
  • #46: • data is the heart of every business • you could survive the loss of code, but not of data
  • #47: When you ask it to write, it writes
  • #48: • what you put in comes out exactly • you can ensure consistency and correctness
  • #49: • you want access to be optimized for your use-cases
  • #50: • You want powerful tools to describe what is and isn’t correct and valid data.
  • #51: • SQL might have the longest period of relevance of any technology • The relational model has stood the test of time • It can seem archaic
  • #52: • If you aren’t comfortable with SQL datbases, level up
  • #53: • Postgres excels at these things • it’s free and open-source • it has noSQL-like features that few other SQL databases have
  • #54: • Few RDBMS’ have check constraints like this. This prevents rogue agents, buggy code, or bad judgement from putting bad data into your database
  • #55: • Powerful indexing features. More than just indexing on a field, you can do indexes on transformed data as well as partial indexes
  • #56: • Powerful, indexable data types to model your data without making a ton of extra tables
  • #57: • Powerful, indexable data types to model your data without making a ton of extra tables
  • #58: • You can even use Postgres as a document data store by putting JSON in it. The JSON can be indexed.
  • #59: • You can even use Postgres as a document data store by putting JSON in it. The JSON can be indexed.