Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Refactoring RIA Unleashed 2011

936 views

Published on

A presentation I gave on Refactoring for the RIA Unleashed conference in 2011 up in Boston.

Video References:

Winston Wolfe - I Solve Problems form Pulp Fiction
http://www.youtube.com/watch?v=DO0d7dpA-K8

And the ready scene from The Last Samurai:

http://www.youtube.com/watch?v=QE3yMEfpk6E

Published in: Technology, Education
  • DOWNLOAD FULL. BOOKS INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Refactoring RIA Unleashed 2011

  1. 1. Refactoring Jesse Warden
  2. 2. Who?
  3. 3. Who?• Jesse Warden
  4. 4. Who?• Jesse Warden• Web App Solution
  5. 5. Who?• Jesse Warden• Web App Solution• Flex, Java, and BlazeDS Consulting
  6. 6. What?
  7. 7. What?• Basic Refactoring
  8. 8. What?• Basic Refactoring• Priority Pyramid
  9. 9. What?• Basic Refactoring• Priority Pyramid• Stories
  10. 10. What?• Basic Refactoring• Priority Pyramid• Stories• Leadership
  11. 11. Why?
  12. 12. Why?• Coding is more fun
  13. 13. Why?• Coding is more fun• People like working with you
  14. 14. Why?• Coding is more fun• People like working with you• Grow in your career
  15. 15. Why?• Coding is more fun• People like working with you• Grow in your career• Better Software
  16. 16. No seriously...
  17. 17. No seriously...• I loathe it
  18. 18. No seriously...• I loathe it• People have said articles helped them
  19. 19. No seriously...• I loathe it• People have said articles helped them• Mentor Leadership / Stewardship
  20. 20. Basics
  21. 21. Basics• Exceptions
  22. 22. Basics• Exceptions• Architecture
  23. 23. Basics• Exceptions• Architecture• Refactoring Paths
  24. 24. Exceptions
  25. 25. Exceptions• Synchronous: 100%
  26. 26. Exceptions• Synchronous: 100%• Asynchronous: 99%
  27. 27. Exceptions• Synchronous: 100%• Asynchronous: 99%• Null Pointers
  28. 28. Synchronous
  29. 29. Synchronous• throw new Error(“b00m”);
  30. 30. Synchronous• throw new Error(“b00m”);• try/catch
  31. 31. Synchronous• throw new Error(“b00m”);• try/catch• “Road to hell is paved with good intentions.”
  32. 32. Asynchronous
  33. 33. Asynchronous• dispatchEvent(new ErrorEvent(“b00m”));
  34. 34. Asynchronous• dispatchEvent(new ErrorEvent(“b00m”));• addEventListener(“b00m”, onHandle);
  35. 35. Asynchronous• dispatchEvent(new ErrorEvent(“b00m”));• addEventListener(“b00m”, onHandle);• Same as before, don’t swallow.
  36. 36. Uncaught
  37. 37. Uncaught• loaderInfo.uncaughtErrorEvents
  38. 38. Uncaught• loaderInfo.uncaughtErrorEvents• won’t always get a stack trace
  39. 39. Uncatchable
  40. 40. Uncatchable• Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed.
  41. 41. Null Pointers
  42. 42. Null Pointers• Sir Charles Antony Richard Hoare
  43. 43. Null Pointers• Sir Charles Antony Richard Hoare• British Computer Scientist
  44. 44. Null Pointers• Sir Charles Antony Richard Hoare• British Computer Scientist• "I call it my billion-dollar mistake"
  45. 45. Null Pointers• Sir Charles Antony Richard Hoare• British Computer Scientist• "I call it my billion-dollar mistake"• Programmer Enemy #1
  46. 46. Null Pointers
  47. 47. Null Pointers• Loose Typing
  48. 48. Null Pointers• Loose Typing• External Data
  49. 49. ExternalInterface
  50. 50. ExternalInterface• Marshall Exceptions
  51. 51. ExternalInterface• Marshall Exceptions• set to true
  52. 52. Exceptions
  53. 53. Exceptions• Crashes
  54. 54. Exceptions• Crashes• Unexpected/Unrelated Errors
  55. 55. Exceptions• Crashes• Unexpected/Unrelated Errors• Breed Insecurity
  56. 56. Exceptions• Crashes• Unexpected/Unrelated Errors• Breed Insecurity• Cause Fire Drills
  57. 57. Exceptions
  58. 58. Exceptions• Best Defense is a Good Offense
  59. 59. Exceptions• Best Defense is a Good Offense• Broken Windows
  60. 60. Fighting Back
  61. 61. Fighting Back• try/catch
  62. 62. Fighting Back• try/catch• log the catch
  63. 63. Fighting Back• try/catch• log the catch• log uncaughtErrors
  64. 64. Fighting Back• try/catch• log the catch• log uncaughtErrors• Code Review
  65. 65. Loose Typing
  66. 66. Loose Typing• Object
  67. 67. Loose Typing• Object• Dictionary
  68. 68. Loose Typing• Object• Dictionary•*
  69. 69. Loose Typing• Object• Dictionary•*• Dynamic
  70. 70. Loose Typing• Object• Dictionary•*• Dynamic• Interfaces
  71. 71. Object
  72. 72. Object• Protoyping
  73. 73. Object• Protoyping• JSON
  74. 74. Object• Protoyping• JSON• Teaching
  75. 75. Object• Protoyping• JSON• Teaching• delete slots
  76. 76. Object Solution
  77. 77. Object Solution• Don’t Use Object
  78. 78. Object Solution• Don’t Use Object• Ensure casts aren’t null
  79. 79. Object Solution• Don’t Use Object• Ensure casts aren’t null• Same for Dynamic & Interface
  80. 80. Dictionary
  81. 81. Dictionary• Easier lookups vs. ByteArray
  82. 82. Dictionary• Easier lookups vs. ByteArray• Strict Equality on Keys
  83. 83. Dictionary Solution
  84. 84. Dictionary Solution• Wrap
  85. 85. Star
  86. 86. Star•*
  87. 87. Star Solution
  88. 88. Star Solution• Don’t Use It
  89. 89. Star Solution• Don’t Use It• Log It
  90. 90. Star Solution• Don’t Use It• Log It• Ensure Consumers Guard
  91. 91. External Data
  92. 92. External Data• Factories
  93. 93. External Data• Factories• Value Object / Data Transfer Object
  94. 94. External Data• Factories• Value Object / Data Transfer Object• Parsing
  95. 95. Parsing
  96. 96. Parsing• Poison Entire System
  97. 97. Parsing• Poison Entire System• When in doubt, return null
  98. 98. Parsing• Poison Entire System• When in doubt, return null• Proactive: throw meaningful error
  99. 99. Parsing• Poison Entire System• When in doubt, return null• Proactive: throw meaningful error• Uber Proactive: Unit Test
  100. 100. Parsing
  101. 101. Parsing• Holy S$*(%&: Null Pattern
  102. 102. Architecture
  103. 103. Architecture• Encapsulation
  104. 104. Architecture• Encapsulation• Testability
  105. 105. Encapsulation
  106. 106. Encapsulation• Black Box
  107. 107. Encapsulation• Black Box• Manages its own internal state
  108. 108. Bad Encapsulation
  109. 109. Bad Encapsulation• Global Variables / Singletons
  110. 110. Bad Encapsulation• Global Variables / Singletons• No Accessors/API for Data Models
  111. 111. Bad Encapsulation• Global Variables / Singletons• No Accessors/API for Data Models• No API so you dig
  112. 112. Testability
  113. 113. Testability• Easy to test
  114. 114. Testability• Easy to test• not welded together
  115. 115. Testability• Easy to test• not welded together• not spaghetti code
  116. 116. Services
  117. 117. Services• Service Inside the Proxy
  118. 118. Services• Service Inside the Proxy• Not a service, just a loader
  119. 119. Services• Service Inside the Proxy• Not a service, just a loader• No centralized error reporting
  120. 120. Service Solutions
  121. 121. Service Solutions• Create a base class
  122. 122. Service Solutions• Create a base class• log all errors
  123. 123. Service Solutions• Create a base class• log all errors• create an integration suite
  124. 124. Big Ole’ Commands
  125. 125. Big Ole’ Commands• switch
  126. 126. Refactoring Paths
  127. 127. Refactoring Paths• What do you build now?
  128. 128. Refactoring Paths• What do you build now?• What do you change to later?
  129. 129. Refactoring Paths• What do you build now?• What do you change to later?• When?
  130. 130. Refactoring Paths• What do you build now?• What do you change to later?• When?• Not Architecting
  131. 131. Refactoring Path
  132. 132. Refactoring PathAbility to code now, satisfy non-programmersfor trust earning, with assurance you haven’tcoded yourself into a corner.
  133. 133. Marriage
  134. 134. MarriageCompromise
  135. 135. Good Book
  136. 136. It’s Ok. It’ll Be Ok.
  137. 137. It’s Ok. It’ll Be Ok.• Lose some battles...
  138. 138. It’s Ok. It’ll Be Ok.• Lose some battles...• ...as long as you win the war.
  139. 139. Detractors
  140. 140. Detractors• Don’t have their Poetic License
  141. 141. Detractors• Don’t have their Poetic License• Fear
  142. 142. Detractors• Don’t have their Poetic License• Fear• Understand the Rules & Ramifications
  143. 143. Detractors
  144. 144. Detractors• Ivory Zealots
  145. 145. Detractors• Ivory Zealots• Scars
  146. 146. Detractors• Ivory Zealots• Scars• Don’t Believe in their Refactoring Ability
  147. 147. Detractors• Ivory Zealots• Scars• Don’t Believe in their Refactoring Ability• or Yours
  148. 148. Refactoring Paths
  149. 149. Refactoring Paths• Refactoring is Temporal
  150. 150. Refactoring Paths• Refactoring is Temporal• Architecture is not
  151. 151. Refactoring Paths• Refactoring is Temporal• Architecture is not• Architecture is Plan
  152. 152. Refactoring Paths• Refactoring is Temporal• Architecture is not• Architecture is Plan• Refactoring is a Strategy
  153. 153. Refactoring Path
  154. 154. Refactoring Path• Know the rule(s) ur breaking
  155. 155. Refactoring Path• Know the rule(s) ur breaking• do it
  156. 156. Refactoring Path• Know the rule(s) ur breaking• do it• document what needs to change
  157. 157. Refactoring Path• Know the rule(s) ur breaking• do it• document what needs to change• when you have time, fix it
  158. 158. Refactoring Paths
  159. 159. Refactoring Paths• Use a *
  160. 160. Refactoring Paths• Use a *• Cast It
  161. 161. Refactoring Paths
  162. 162. Refactoring Paths• Make an Object
  163. 163. Refactoring Paths• Make an Object• Make a ValueObject
  164. 164. Refactoring Path
  165. 165. Refactoring Path• Event with public var data:*;
  166. 166. Refactoring Path
  167. 167. Refactoring Path• Scouting
  168. 168. Refactoring Path• Scouting• Bear Bait
  169. 169. Refactoring Path• Scouting• Bear Bait• Intentional Parsing Throws
  170. 170. Refactoring Path• Scouting• Bear Bait• Intentional Parsing Throws• Intentional Grenades
  171. 171. Refactoring Path
  172. 172. Refactoring Path• if if if if if if
  173. 173. Refactoring Path• if if if if if if• then then then then
  174. 174. Refactoring Path• if if if if if if• then then then then• badger badger badger badger
  175. 175. Refactoring Path• if if if if if if• then then then then• badger badger badger badger• make a switch
  176. 176. Refactoring Path• if if if if if if• then then then then• badger badger badger badger• make a switch• make functions
  177. 177. Refactoring Paths
  178. 178. Refactoring Paths• <s:Component> vs Item Renderer
  179. 179. Refactoring Paths• <s:Component> vs Item Renderer• Passive
  180. 180. Priority Pyramid
  181. 181. Priority Pyramid1. Report
  182. 182. Priority Pyramid1. Report2. Understanding
  183. 183. Priority Pyramid1. Report2. Understanding3. Trust
  184. 184. Priority Pyramid1. Report2. Understanding3. Trust4. Lead
  185. 185. Priority Pyramid
  186. 186. Priority Pyramid5. Build
  187. 187. Priority Pyramid5. Build6. Explosions
  188. 188. Priority Pyramid5. Build6. Explosions7. Diagnostics
  189. 189. Priority Pyramid5. Build6. Explosions7. Diagnostics8. Architecture
  190. 190. Priority Pyramid5. Build6. Explosions7. Diagnostics8. Architecture9. Workflow
  191. 191. Pyramid: Report
  192. 192. Pyramid: Report• Who is my boss?
  193. 193. Pyramid: Report• Who is my boss?• What will make you happy when I leave?
  194. 194. Pyramid: Understanding
  195. 195. Pyramid: Understanding• Listen
  196. 196. Pyramid: Understanding• Listen• What’s the True Goal?
  197. 197. Pyramid: Understanding• Listen• What’s the True Goal?• What are the problems?
  198. 198. Pyramid: Understanding• Listen• What’s the True Goal?• What are the problems?• What are the challenges?
  199. 199. Pyramid: Understanding
  200. 200. Pyramid: Understanding• Explore & Document
  201. 201. Pyramid: Understanding• Explore & Document • Learn Data Model
  202. 202. Pyramid: Understanding• Explore & Document • Learn Data Model • Learn Framework
  203. 203. Pyramid: Understanding• Explore & Document • Learn Data Model • Learn Framework • Understanding the Story
  204. 204. Pyramid: Understanding
  205. 205. Pyramid: Understanding • Looking for Red Flags
  206. 206. Pyramid: Understanding • Looking for Red Flags • Looking for Mines
  207. 207. Pyramid: Understanding • Looking for Red Flags • Looking for Mines • Looking for Validation
  208. 208. Pyramid: Understanding
  209. 209. Pyramid: Understanding • Dissect People
  210. 210. Pyramid: Understanding • Dissect People • What makes them tick?
  211. 211. Pyramid: Understanding • Dissect People • What makes them tick? • Who listens to who?
  212. 212. Pyramid: Trust
  213. 213. Pyramid: Trust• Make Friends
  214. 214. Pyramid: Trust• Make Friends• Provide Immediate Value
  215. 215. Pyramid: Trust
  216. 216. Pyramid: Trust• Check in code into source control 1st week
  217. 217. Pyramid: Trust• Check in code into source control 1st week• fix a problem
  218. 218. Pyramid: Trust• Check in code into source control 1st week• fix a problem• Only get 1 change at 1st impression
  219. 219. Pyramid: Trust• Check in code into source control 1st week• fix a problem• Only get 1 change at 1st impression• Under Promise, Over Deliver
  220. 220. Pyramid: Trust
  221. 221. Pyramid: Trust• Stop Fire Drills
  222. 222. Pyramid: Trust• Stop Fire Drills• Empower Through Diagnostic Tools
  223. 223. Pyramid: Trust• Stop Fire Drills• Empower Through Diagnostic Tools• Easy to use, visible logger
  224. 224. Pyramid: Trust• Stop Fire Drills• Empower Through Diagnostic Tools• Easy to use, visible logger• Easy to use, visible environment info
  225. 225. Pyramid: Trust
  226. 226. Pyramid: Trust• Update on Direction
  227. 227. Pyramid: Trust• Update on Direction• Provide Transparency
  228. 228. Pyramid: Trust• Update on Direction• Provide Transparency• What, why, and when
  229. 229. Pyramid: Trust• Update on Direction• Provide Transparency• What, why, and when• Plan A, Plan B
  230. 230. Pyramid: Lead
  231. 231. Pyramid: Lead• Be Positive
  232. 232. Pyramid: Lead• Be Positive• Short Term Goals
  233. 233. Pyramid: Lead• Be Positive• Short Term Goals• Long Term Goals
  234. 234. Pyramid: Lead
  235. 235. Pyramid: Lead• Plan
  236. 236. Pyramid: Lead• Plan• 1 thing at a time
  237. 237. Pyramid: Lead• Plan• 1 thing at a time• Assess Problems
  238. 238. Pyramid: Lead• Plan• 1 thing at a time• Assess Problems• Document
  239. 239. Pyramid: Lead
  240. 240. Pyramid: Lead• Re-prioritize as needed
  241. 241. Pyramid: Lead
  242. 242. Pyramid: Lead• Delegate
  243. 243. Pyramid: Lead• Delegate• Help
  244. 244. Pyramid: Lead• Delegate• Help• Divide & Conquer
  245. 245. Pyramid: Lead• Delegate• Help• Divide & Conquer• Short Term Branches: 3 days
  246. 246. Experiences
  247. 247. Hearts & Minds
  248. 248. Fight Only to Win
  249. 249. People on Pedestals
  250. 250. Idle Hands
  251. 251. Winston Wolfe [show video] [dissect]
  252. 252. Conclusions
  253. 253. Conclusions• Exceptions: Catch & Log
  254. 254. Conclusions• Exceptions: Catch & Log• Refactoring: Remember The Paths
  255. 255. Conclusions• Exceptions: Catch & Log• Refactoring: Remember The Paths• Listen, Build Trust, and Lead
  256. 256. Thank You! Questions?
  257. 257. Thank You! Questions? Jesse Warden
  258. 258. Thank You! Questions? Jesse Warden webappsolution.com
  259. 259. Thank You! Questions? Jesse Warden webappsolution.com jessewarden.com
  260. 260. Thank You! Questions? Jesse Warden webappsolution.com jessewarden.com @jesterxl

×