AngularNYC talk from February 18, 2020
Learn how to get started with Electron and Angular (Create a Win, Mac, & Linux App with one code base). Discover how powerful Angular pipes can be for an advanced search & filter functionality. Find out how functional programming can in places simplify your code. Hear how making a project open source was an excellent decision for Video Hub App.
15. Anatomy of a pipe
2)Transform input
1) Declare name
3) Return output
length.pipe.ts
16. How pure are your pipes?
pure impure
pure: false
changes when
string/number/boolean input changes or
object reference of date/array/function/object
every mouse move, keystroke,
timer tick, server response
default
22. Pure functions
• Think “pure pipe” with no side effects • Data “flows” through it
Bonus:
• unit testing is a breeze
• portable
• parallelizable
• Output of function 100% determined by input • Deterministic
25. “It's also easier to get started in [JavaScript]
since it's mixed paradigm and you can fall
back on your current practices while there
are gaps in your knowledge.”
26. In my app:
• Refactored one function at a time
• Any state used inside, became an input (parameter),
• Moved state ‘back’ to whoever called the function
• Moved to separate file once function “purified”
• “cheated” by strategically allowing some side-effects
33. Charityware
• $3.50 of every purchase goes to a cost-effective charity
most/all proceeds go to charity
Video Hub App
• Pay what you want, $3.50 minimum
• I need about tree fiddy
41. started
making
this app
released
1.0.0
2018 2019 2020
spoke at
AngularNYC
madeVHA
open source
today at
AngularNYC
released
2.0.0
1,000th
purchase
100th
purchase
500th
purchase
1,300th
purchase
Timeline