the startup agency - a case study on cfpb
Post on 05-Dec-2014
13.032 Views
Preview:
DESCRIPTION
TRANSCRIPT
CFPB: The federal government’s newest startupGreg Boone, Dave Kennedy, Dan Munz
WordPress in Government
JUNE 13, 2013
Today’s agenda
A little background
WordPress at CFPB
Behavior-driven WordPress development
View-source, the WordPress way!
2
A little background
4
“It is impossible to buy a toaster that has a one-in-five chance of bursting into flames and burning down your house. But it is possible to refinance an existing home with a mortgage that has the same one-in-five chance of putting the family out on the street–and the mortgage won’t even carry a disclosure of that fact to the homeowner.”
Unsafe at Any RateSummer 2007
JULY 2010
JULY 2011
JULY 2012
consumerfinance.gov
Launched in February 2011 (5 months ahead of
schedule)
The Bureau’s (only!) owned digital property
Consumers are our core audience
About 900K unique pageviews/month
9
WP @ CFPB
Our stack
11
Standard content types
Good CM interface Distributed editorial
workflow
Custom app development
Highly interactive or database-driven
Infrequent content updates
CMS vs. Framework?
12
More peopledoing
fewer things
Fewer people doing
more things
In other words
13
What we’ve learned
WP is not (natively) a web application
framework
Some core capabilities are still maturing
Easy to do things right; even easier to do things
wrong
Understand how Security thinks about OSS
14
Big hairy questions
Consistently structuring complex taxonomies
and data relationships
Pushing reusable code blocks into modules or
plugins
Making templating platform-agnostic
15
That’s how we’re thinking about WordPress…
…but how are we using it?
16
17OMG DAN SHUT UP
Behavior-driven
WordPress
developmentor: “How a little Python can go a long way for PHP”
The plugin
We needed an easier way to register:
Post types with default settings
Taxonomies with custom entry boxes
Meta boxes
Capabilities
We were doing it all in the theme; we transitioned
to a plugin with a UI.
19
How to know it’ll work
Two choices:
1. Manual entry of each post type, then manual
entry of one term for each taxonomy
2. Automated behavior testing!
20
Enter behave
Simple, scenario based tests…
Scenario: Get more
information about us
Given I visit the
homepage
When I click the "About
us" link
Then I should be
directed to /about/
Optionally, add an and
condition after a when or then
21
…organized into simple features!
Feature: Transparency in
the Bureau
As a member of the public
I want to learn more
about this organization
So that I can understand
their work better
And a real browser
(Chrome) to perform them!
[DEMO]
22
Okay, so you can teach a computer to log in…
23
What about a real test?
1. Log in
2. Go to the Custom Post Type page
3. Create three post types
4. Deactivate all three
5. Re-activate all three
Total execution time: 33 seconds (with about half of that going to wp-login)
Benefits of testing
24
1. You know your plugin works
2. You can spot bugs on the fly
3. Programming toward specific behaviors
4. It's way faster than doing it all by hand
5. Eventually, you write better code.
6. You always know if the feature works or not
Still learning…
25
It'd be nice to not have to log in _every_ time
Writing the steps can be tricky (but it's python, so not too tricky)
view-source
the WordPress way!
We all start somewhere
27
But as we go, we learn
28
Building, building, building…
29
Embrace the WordPress community
They’re the source for solving your problems and giving you inspiration to solve theirs…
Automattic’s Github WordPress.org Forums Themeshaper.com WordPress.org Plugin Directory Also, blogs!
30
How is the CFPB “viewing source”?
Hello Underscores! Forked; becoming our new base!
WordPress goodness baked in. Miminimalistic; easily extendable. Solid framework and conventions
31
How is the CFPB “viewing source”?
Talking it out with P2 A trial run for managing our internal workgroups.
Turns out blogs are great for conversations!
A child theme allows us to brand it and extend it.
32
How is the CFPB “viewing source”?
Going more modular Embracing <?php get_template_part() ?>
We were already doing this, but where can we do it more?
Find a best practice and ask how are we doing that?
33
top related