|
| 1 | +--- |
| 2 | +# Metadata |
| 3 | +title: &title How my first frontend got an award |
| 4 | +author: Hamza Haiken |
| 5 | +header: *title |
| 6 | +footer: From Tableau to Svelte |
| 7 | + |
| 8 | +transition: wipe |
| 9 | + |
| 10 | +# Don't change |
| 11 | +marp: true |
| 12 | +theme: codestar |
| 13 | +paginate: true |
| 14 | +math: mathjax |
| 15 | +--- |
| 16 | + |
| 17 | +<div class="title"><div></div><div> |
| 18 | + |
| 19 | +# How my first frontend got an award |
| 20 | +*From Tableau to Svelte* |
| 21 | + |
| 22 | +</div></div> |
| 23 | + |
| 24 | +--- |
| 25 | + |
| 26 | +<center> |
| 27 | + |
| 28 | +Scan to follow along or keep the link for later: |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | +*Link to the slides* |
| 33 | + |
| 34 | +</center> |
| 35 | + |
| 36 | +--- |
| 37 | + |
| 38 | +## Who am I |
| 39 | + |
| 40 | +--- |
| 41 | + |
| 42 | +<!-- TODO: Avatar --> |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | +Who am is Hamza Haiken? |
| 47 | + |
| 48 | +- Codestar for 10 years |
| 49 | +- Professional backender, |
| 50 | + hobbyist everything else |
| 51 | +- [github.com/tenchi2xh](github.com/tenchi2xh) |
| 52 | + |
| 53 | +--- |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | +Assignment: |
| 58 | + |
| 59 | +- PortXChange (a Port of Rotterdam startup) |
| 60 | +- Maritime domain: scheduling, emissions, etc. |
| 61 | +- Codestar kickstarted the project, full-stack |
| 62 | +- I joined later for backend and infrastructure |
| 63 | + |
| 64 | +--- |
| 65 | + |
| 66 | +## initial setup |
| 67 | + |
| 68 | +--- |
| 69 | + |
| 70 | +What's EmissionInsider? |
| 71 | + |
| 72 | +- Calculates all shipping-related emissions within worldwide ports |
| 73 | +- Backend pushes calculations to a Postgres database |
| 74 | +- Enroll customer ports and deploy a Tableau dashboard as their “frontend” |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +And what's Tableau? |
| 79 | + |
| 80 | +- Data visualization tool for businesses |
| 81 | + - Customers already familiar with it |
| 82 | +- Normally used for Business Intelligence |
| 83 | +- WYSIWYG editor |
| 84 | +- Ecosystem of apps |
| 85 | + |
| 86 | +--- |
| 87 | + |
| 88 | +## tableau "app"<br>(& all the drawbacks) |
| 89 | + |
| 90 | +--- |
| 91 | + |
| 92 | +<!-- _footer: '' --> |
| 93 | +<!-- _header: '' --> |
| 94 | +<!-- _paginate: false --> |
| 95 | +<!-- _class: invert --> |
| 96 | + |
| 97 | + |
| 98 | + |
| 99 | +--- |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | +Drawbacks: |
| 104 | + |
| 105 | +- Limited customizations and visualizations |
| 106 | +- Editing dashboards is painful |
| 107 | +- Very poor performance on heavy database queries |
| 108 | +- Need to maintain huge database materialized views |
| 109 | + |
| 110 | +--- |
| 111 | + |
| 112 | +<!-- _footer: '' --> |
| 113 | +<!-- _header: '' --> |
| 114 | +<!-- _paginate: false --> |
| 115 | +<!-- _class: invert --> |
| 116 | + |
| 117 | + |
| 118 | + |
| 119 | +--- |
| 120 | + |
| 121 | +<!-- _header: '' --> |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | +More drawbacks: |
| 126 | + |
| 127 | +- BI dashboards are not supposed to be websites or products |
| 128 | + - Reactivity hard to achieve (and sometimes impossible) |
| 129 | + - Customer's design language absent |
| 130 | + - Slow and clunky |
| 131 | +- Total lack of access control |
| 132 | + |
| 133 | +--- |
| 134 | + |
| 135 | +<!-- _footer: '' --> |
| 136 | +<!-- _header: '' --> |
| 137 | +<!-- _paginate: false --> |
| 138 | +<!-- _class: invert --> |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | + |
| 143 | +--- |
| 144 | + |
| 145 | +<!-- _footer: '' --> |
| 146 | +<!-- _header: '' --> |
| 147 | +<!-- _paginate: false --> |
| 148 | +<!-- _class: invert --> |
| 149 | + |
| 150 | + |
| 151 | + |
| 152 | + |
| 153 | + |
| 154 | +More more drawbacks: |
| 155 | + |
| 156 | +- We need environments and different versions for different customers |
| 157 | +- No official templating system |
| 158 | + - Exported files are barely human readable 54,000 lines of XML |
| 159 | +- Propagating changes in a consistent way is very hard |
| 160 | + - Custom made deployment system |
| 161 | + - Hack, not meant to be used by Tableau |
| 162 | + - Their on-demand servers would completely crash when deploying |
| 163 | + |
| 164 | +--- |
| 165 | + |
| 166 | +## we can do better |
| 167 | + |
| 168 | +--- |
| 169 | + |
| 170 | +So, what to do now? |
| 171 | + |
| 172 | +- Team has no frontend capacity |
| 173 | + - Initial decision to use Tableau probably |
| 174 | + from fear of slow React development |
| 175 | +- Got approval to make my own thing in Svelte |
| 176 | + - Personal experience from hobbies |
| 177 | + - Made a small page previously for them |
| 178 | + - Rapid iterations seen with previous project |
| 179 | + |
| 180 | +--- |
| 181 | + |
| 182 | +## why svelte? |
| 183 | + |
| 184 | +--- |
| 185 | + |
| 186 | +<!-- _footer: '' --> |
| 187 | +<!-- _header: '' --> |
| 188 | +<!-- _paginate: false --> |
| 189 | +<!-- _class: invert --> |
| 190 | + |
| 191 | + |
| 192 | + |
| 193 | +--- |
| 194 | + |
| 195 | + |
| 196 | + |
| 197 | +Why did I choose Svelte? |
| 198 | + |
| 199 | +- I love to experiment with new things |
| 200 | +- It looked so easy and magic |
| 201 | +- Top-ranked in the latest *State of JavaScript* |
| 202 | + |
| 203 | +<br><br><br><br><br> |
| 204 | + |
| 205 | +--- |
| 206 | + |
| 207 | + |
| 208 | + |
| 209 | +What's good about Svelte? |
| 210 | + |
| 211 | +- Faster and smaller websites |
| 212 | +- Ultra-reactive by design |
| 213 | +- Easy to animate by design |
| 214 | +- Easy to build custom features |
| 215 | +- Easy to maintain |
| 216 | +- Better user experience |
| 217 | + |
| 218 | +<br><br> |
| 219 | + |
| 220 | +--- |
| 221 | + |
| 222 | + |
| 223 | + |
| 224 | +The customer uses React |
| 225 | + |
| 226 | +- A lot of boilerplate and ceremony and types |
| 227 | +- Our designer knows to expect a two-week wait for new minor features |
| 228 | +- React has become bloated over the years |
| 229 | + |
| 230 | +--- |
| 231 | + |
| 232 | +# The journey |
| 233 | + |
| 234 | +--- |
| 235 | + |
| 236 | +**Milestone 1**: Reach feature parity with Tableau dashboard |
| 237 | + |
| 238 | +- Setting up a new project |
| 239 | +- Building components from scratch |
| 240 | +- Preserve functionality while improving usability |
| 241 | + |
| 242 | +--- |
| 243 | + |
| 244 | +<video autoplay loop muted src="charts.mp4"></video> |
| 245 | + |
| 246 | +--- |
| 247 | + |
| 248 | +<!-- _footer: '' --> |
| 249 | +<!-- _header: '' --> |
| 250 | +<!-- _paginate: false --> |
| 251 | +<!-- _class: invert --> |
| 252 | + |
| 253 | + |
| 254 | + |
| 255 | +--- |
| 256 | + |
| 257 | +**Milestone 2**: Optimize performance |
| 258 | + |
| 259 | +- Tableau could only query databases |
| 260 | +- Building a BFF |
| 261 | +- Switching from on-demand queries to pre-calculated data on S3 |
| 262 | + |
| 263 | +--- |
| 264 | + |
| 265 | +<video autoplay loop muted src="loading.mp4"></video> |
| 266 | + |
| 267 | +--- |
| 268 | + |
| 269 | +**Milestone 3**: Add real access control |
| 270 | + |
| 271 | +- Integration with existing auth solution |
| 272 | +- Workflow integrated within Svelte using plugins |
| 273 | + |
| 274 | +--- |
| 275 | + |
| 276 | +<!-- _footer: '' --> |
| 277 | +<!-- _header: '' --> |
| 278 | +<!-- _paginate: false --> |
| 279 | +<!-- _class: invert --> |
| 280 | + |
| 281 | + |
| 282 | + |
| 283 | +--- |
| 284 | + |
| 285 | +**Milestone 4**: Innovate and improve |
| 286 | + |
| 287 | +- User settings |
| 288 | +- Themes |
| 289 | +- 3D maps views |
| 290 | +- Emissions equivalents comparator |
| 291 | +- Report generation |
| 292 | + |
| 293 | +--- |
| 294 | + |
| 295 | +<video autoplay loop muted src="3d.mp4"></video> |
| 296 | + |
| 297 | +--- |
| 298 | + |
| 299 | +<video autoplay loop muted src="comparator.mp4"></video> |
| 300 | + |
| 301 | +--- |
| 302 | + |
| 303 | +<video autoplay loop muted src="settings.mp4"></video> |
| 304 | + |
| 305 | +--- |
| 306 | + |
| 307 | +<video autoplay loop muted src="report.mp4"></video> |
| 308 | + |
| 309 | +--- |
| 310 | + |
| 311 | +## Awards! |
| 312 | + |
| 313 | +--- |
| 314 | + |
| 315 | +<!-- _footer: '' --> |
| 316 | +<!-- _header: '' --> |
| 317 | +<!-- _paginate: false --> |
| 318 | + |
| 319 | + |
| 320 | + |
| 321 | +--- |
| 322 | + |
| 323 | +## Customer feedback |
| 324 | + |
| 325 | +--- |
| 326 | + |
| 327 | +- Product owner: |
| 328 | + - Roadblocks gone |
| 329 | + - Focus shifted to innovation |
| 330 | +- Designer & director of product: |
| 331 | + - Impressed with development cycle speed |
| 332 | + - Easier to experiment with features |
| 333 | +- Early end-user feedback (Port of Houston): |
| 334 | + - Positive reception |
| 335 | + |
| 336 | +--- |
| 337 | + |
| 338 | +## Lessons learned |
| 339 | + |
| 340 | +--- |
| 341 | + |
| 342 | +Early decisions: |
| 343 | + |
| 344 | +* Don't use business tools for client-facing products |
| 345 | +* Be open to new technologies; |
| 346 | + Speed and simplicity outweigh keeping your stack |
| 347 | + |
| 348 | +--- |
| 349 | + |
| 350 | +Using Svelte: |
| 351 | + |
| 352 | +* Making stuff is so easy and intuitive |
| 353 | +* Low effort needed for creating components: |
| 354 | + - Encourages building from scratch, reducing reliance on libraries |
| 355 | +* Wrapping vanilla JS libraries is very easy and powerful in Svelte |
| 356 | + |
| 357 | +--- |
| 358 | + |
| 359 | +Other: |
| 360 | + |
| 361 | +* Optimize data flows by pre-calculating |
| 362 | +* BFFs are nice |
| 363 | + |
| 364 | +--- |
| 365 | + |
| 366 | +## Questions time |
| 367 | + |
| 368 | +--- |
| 369 | + |
| 370 | +<div class="thanks"></div> |
0 commit comments