08448380779 Call Girls In Friends Colony Women Seeking Men
Code reuse and sharing across multiple sites (Flash talk)
1. May 2013 — WordPress.com VIP Intensive Workshop
Code reuse and sharing across
multiple sites
Gabriel Koen, PMC
2. What this talk is about
✤ PMC operates
✤ 5 public web sites on WordPress.com VIP
✤ 9 or so public web sites hosted elsewhere
✤ 4 private APIs, 2 using WordPress, 2 not
✤ So how does all our code work together?
3. What about sites or apps that
aren’t onVIP?
✤ Forget about it.
✤ Each one is a unique snowflake.
✤ Single-purpose that other APIs don’t fulfill, or is a mostly static site.
✤ They don’t use shared code.
✤ Done.
4. Logic tree
More than ~2 functions?
theme
plugin
functions.php
Used more than once?
global
plugin
refactor
Wait — when I built
this I wasn’t thinking it
would be used
anywhere else.
Always think one step ahead.
Not two.
I don’t
know what I
want to be...
5. Site vs Global
✤ It’s an ideal, it doesn’t always work
✤ Previously, we copy and pasted a lot
✤ We’re not perfect
✤ Code duplication is not always bad
✤ Sometimes sites do similar things, but differently