Welcome
I'm Cory
I am a software engineer at Aumni
Y'all ready for this?
# Objects in JS
{} instanceof Object // true
[] instanceof Object // true
new Class() instanceof Object // true
new Func() instanceof Object // true
new Map() instanceof Object // true
new WeakMap() instanceof Object // true
new Set() instanceof Object // true
new WeakSet() instanceof Object // true
new WeakRef() instanceof Object // true
class {} instanceof Object // true
function () {} instanceof Object // true
Function instanceof Object // true
() => {} instanceof Object // true
Map instanceof Object // true
WeakMap instanceof Object // true
WeakSet instanceof Object // true
WeakRef instanceof Object // true
# Objects in JS
'hello' 0 0n false undefined Symbol('hello') null
('hello').at(0) // 'h' (0).toFixed(0) // '0.00' (0n).valueOf() // '0n' (false).toString() // 'false' (undefined).toString() // 'undefined' Symbol('hello').description // 'hello' (null).toString() // 'null'
Object Construction
Strap on your work boots, put on your saftey glasses and grab your hard hats, cuz we're going object constructing.
Object Construction
Object Construction
{ name: 'fabulous' }
Object Construction
class FabClass {
name = fabulous;
}
Object Construction
FabConstructor () {
this.name = 'fabulous';
}
Object Construction
const fabFactory = () => ({ name: 'fabulous' })
Object Construction
Plain Old JavaScript Object
POJO Factory
Classes
class BeautifulObjectClass {
isMagnificent = true
constructor(marvelousness = 11) {
this.marvelousness = marvelousness
}
}
const myBeautifulObject = new BeautifulObjectClass()
myBeautifulObject.isMagnificent // true
myBeautifulObject.marvelousness // 11
Class Constructor
const beautifulFactory = (marvelousness = 11) => ({
marvelousness,
isMagnificent: true
})
const myBeautifulObject = beautifulFactory()
myBeautifulObject.isMagnificent // true
myBeautifulObject.marvelousness // 11
Class Constructor
// Base "class"
const superFactory = (name) => ({
// Any propery on the "super" object will be a part of the final object
superProp: '🦸',
// Same for methods.
someSuperMethod() {
console.log(`I'm ${name}!`)
},
// We can implement methods meant to be overridden (but should we?)
someOverrideMethod() {
throw new Error('Not Implemented')
}
});
// Function arguments are like constructor arguments
const finalFactory = (configProp) => {
// private things live outside the return value
const privateProp = '🔐';
// internal state
let accessCount = 0
let history = [configProp]
return {
// We mimic inheritance by spreading the result of the pseudo base class
...superFactory('super'),
// override a method from the pseudo base class
someOverrideMethod() {
console.log(`I override the method of the same name in superFactory`)
},
// regular object property
finalProp: '🪦',
// regular object method
someMethod() {
console.log(`I'm only a member of the finalFactory object`);
},
// a property with just a getter cannot be overridden
get finalProp() {
return privateProp;
},
// a properties with a getter and a setter can perform side effects
get configProp() {
accessCount++
return configProp;
},
// It can also keep state.
set configProp(newVal) {
history.push(newVal)
configProp = newVal;
},
// We can have dynamic keys.
get [finalFactory.historyKey]() {
return history;
}
}
}
// Static methods and properties are a thing too.
finalFactory.historyKey = Symbol('history');
# JS POJO
const object = {};
const factory = () => ({});
const language = {
name: 'JavaScript'
};
const languageFactory = () => ({
name: 'JavaScript'
});
const languageFactory = (name) => ({ name });
const js = languageFactory('JavaScript') // { name: 'JavaScript' }
# JS POJO
# PRESENTING CODE
// This slide uses Auto-Animate to animate between
// two different code blocks
const distanceBetween = ( p1, p2 ) => {
// TODO
}
distanceBetween([10,10], [50,50])
# PRESENTING CODE
// Measure the distance between two points
const distanceBetween = ( p1, p2 ) => {
const dx = p1[0]-p2[0];
const dy = p1[1]-p2[1];
return Math.sqrt( dx*dx + dy*dy );
}
distanceBetween([10,10], [50,50])
# PRESENTING CODE
# CHAPTER 2
We offer a variety of services and plans tailored to business needs of any kind and of any size.
Ideation
During the ideation phase, expect to discuss the project in depth to clearly understand the goals and requirements.
Build
Our team makes each part of the build phase seamless with regular check-ins and deliverables.
Launch
It's time to take the product live - the end if the build phase but the beginning of being in market.
# CHAPTER 2
# CHAPTER 2
Our design team has a collective 75 years of experience in crafting digital products. Our diverse backgrounds offer a thorough mix of points of view.
COO
CEO
Advisor
With built-in \( \LaTeX \) typesetting, you can include math formulas like this:
Price $149 /mo
One project
Two designs
7-day turnaround
Premium support
Price $299 /mo
Up to three projects
Three designs/project
7-day turnaround
Premium support
NEW
Price $599 /mo
Up to five projects
Five designs/project
3-day turnaround
24/7 support
Discovery of requirements for a project.
Research into the project space, competitors and the market.
Creating a Plan that sets the requirements for the design and build phases.
Review and Iterate on the designs with testing of ideas, client feedback and prototypes.
Design a number of iterations that capture the plans and requirements.
Build the project to an MVP to test and evaluate. Iterate using these learnings.
Country | City | Contact |
---|---|---|
USA | Los Angeles | +1 555 0194 |
USA | New York | +1 555 0142 |
Sweden | Stockholm | +46 555 0077 |
UK | London | +44 555 0211 |
South Korea | Seoul | +82 555 0138 |
Our team is ready to hear about your project. We're available by email or phone 24/7
+1 555 0194