[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"navigation":3,"url-settings":86,"blog-\u002Fblog\u002Funderstanding-the-pillars-of-object-oriented-programming":671,"blog-author-\u002Fblog\u002Funderstanding-the-pillars-of-object-oriented-programming":1045,"i-material-symbols:arrow-back-rounded":1057},{"id":4,"extension":5,"footer":6,"header":73,"meta":83,"stem":84,"__hash__":85},"navigation\u002Fdata\u002Fshared\u002Fnavigation.yml","yml",{"brand":7,"columns":13,"legal":63},{"name":8,"tagline":9,"downloadCta":10},"Pieces","The memory layer for modern work.",{"label":11,"href":12},"All downloads","\u002Fdownloads",[14,26,39,51],{"title":15,"links":16},"Product",[17,20,23],{"label":18,"href":19},"Pieces Desktop","\u002F",{"label":21,"href":22},"Pieces Enterprise","\u002Fenterprise",{"label":24,"href":25},"Pieces MCP","\u002Fmcp",{"title":27,"links":28},"Resources",[29,33,36],{"label":30,"href":31,"external":32},"Documentation","url:docs.home",true,{"label":34,"href":35},"Blog","\u002Fblog",{"label":37,"href":38,"external":32},"GitHub","url:github.org",{"title":40,"links":41},"Community",[42,45,48],{"label":43,"href":44,"external":32},"Discord","url:social.discord",{"label":46,"href":47,"external":32},"X \u002F Twitter","url:social.x",{"label":49,"href":50,"external":32},"LinkedIn","url:social.linkedin",{"title":52,"links":53},"Company",[54,57,60],{"label":55,"href":56},"About","\u002Fabout",{"label":58,"href":59},"Updates","\u002Fupdates",{"label":61,"href":62},"Contact","\u002Fcontact",[64,67,70],{"label":65,"href":66},"Privacy Policy","\u002Flegal\u002Fprivacy",{"label":68,"href":69},"Refund Policy","\u002Flegal\u002Frefund",{"label":71,"href":72},"Terms of Service","\u002Flegal\u002Fterms",{"links":74,"signIn":75,"contact":78,"cta":80},[],{"label":76,"href":77},"Manage account","url:portal.home",{"label":79,"href":62},"Get in touch",{"label":81,"href":82},"Download","url:routes.downloads",{},"data\u002Fshared\u002Fnavigation","XlSALC7vYCXHcmcXnjJViwIZKsqnQWF4bn4o9RrcSBE",{"id":87,"extension":5,"links":88,"meta":668,"stem":669,"__hash__":670},"urlSettings\u002Fdata\u002Fshared\u002Furls.yml",[89,93,97,101,105,109,113,117,121,125,129,133,137,141,145,149,153,157,161,165,169,173,177,181,185,189,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,252,256,260,264,268,272,276,280,284,288,292,296,300,303,307,311,314,318,322,326,330,334,338,342,346,350,354,358,362,366,370,374,378,382,386,390,394,398,402,406,410,414,418,422,426,430,434,438,442,446,450,454,458,461,465,469,473,477,481,485,488,491,494,497,501,505,508,512,516,520,524,528,532,536,540,544,548,552,556,559,563,567,571,575,579,582,585,588,592,595,599,603,607,611,614,618,622,625,628,631,635,639,643,646,649,652,656,660,664],{"key":90,"label":91,"href":92},"downloads.desktop","Desktop download page","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fdownload",{"key":94,"label":95,"href":96},"downloads.macOS.dmgArm64","macOS DMG Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fdmg-arm64\u002Fdownload",{"key":98,"label":99,"href":100},"downloads.macOS.dmgIntel","macOS DMG Intel","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fdmg\u002Fdownload",{"key":102,"label":103,"href":104},"downloads.macOS.pkg","macOS PKG","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg\u002Fdownload",{"key":106,"label":107,"href":108},"downloads.macOS.universal","Desktop macOS Universal","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fmacos-universal\u002Fdownload",{"key":110,"label":111,"href":112},"downloads.macOS.pkgArm64","Desktop macOS PKG Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg-pfd-arm64\u002Fdownload",{"key":114,"label":115,"href":116},"downloads.macOS.pkgIntel","Desktop macOS PKG Intel","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg-pfd\u002Fdownload",{"key":118,"label":119,"href":120},"downloads.windows.appinstaller","Windows App Installer","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fappinstaller\u002Fpieces_for_x.appinstaller",{"key":122,"label":123,"href":124},"downloads.windows.exe","Windows EXE","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fwindows-exe\u002Fdownload",{"key":126,"label":127,"href":128},"downloads.windows.msix","Windows MSIX","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fwindows-msix\u002Fdownload",{"key":130,"label":131,"href":132},"downloads.windows.suiteManager","Windows Suite Manager","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_suite_windows\u002Fappinstaller\u002Fdownload",{"key":134,"label":135,"href":136},"downloads.linux.flatpakRepo","Linux Flatpak repository","https:\u002F\u002Fbuilds.pieces.app\u002Fpieces-flatpak-repo\u002Fpieces-flatpak.flatpakrepo",{"key":138,"label":139,"href":140},"downloads.linux.snapDesktop","Linux Snap Desktop","https:\u002F\u002Fsnapcraft.io\u002Fpieces-for-developers",{"key":142,"label":143,"href":144},"downloads.linux.snapPiecesOS","Linux Snap PiecesOS","https:\u002F\u002Fsnapcraft.io\u002Fpieces-os",{"key":146,"label":147,"href":148},"downloads.linux.snap","Desktop Linux Snap package","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fsnap\u002Fdownload",{"key":150,"label":151,"href":152},"downloads.piecesOS.macOS.dmgArm64","PiecesOS macOS DMG Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fdmg-arm64\u002Fdownload",{"key":154,"label":155,"href":156},"downloads.piecesOS.macOS.dmgIntel","PiecesOS macOS DMG Intel","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fdmg\u002Fdownload",{"key":158,"label":159,"href":160},"downloads.piecesOS.macOS.universal","PiecesOS macOS Universal","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fmacos-universal\u002Fdownload",{"key":162,"label":163,"href":164},"downloads.piecesOS.macOS.pkgArm64","PiecesOS macOS PKG Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg-pos-launch-only-arm64\u002Fdownload",{"key":166,"label":167,"href":168},"downloads.piecesOS.macOS.pkgIntel","PiecesOS macOS PKG Intel","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg-pos-launch-only\u002Fdownload",{"key":170,"label":171,"href":172},"downloads.piecesOS.windows.appinstaller","PiecesOS Windows App Installer","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fappinstaller\u002Fos_server.appinstaller",{"key":174,"label":175,"href":176},"downloads.piecesOS.windows.exe","PiecesOS Windows EXE","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fwindows-exe\u002Fdownload",{"key":178,"label":179,"href":180},"downloads.piecesOS.windows.msix","PiecesOS Windows MSIX","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fwindows-msix\u002Fdownload",{"key":182,"label":183,"href":184},"downloads.piecesOS.linux.snap","PiecesOS Linux Snap package","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fsnap\u002Fdownload",{"key":186,"label":187,"href":188},"downloads.combined.macOS.appleSilicon","Combined macOS installer Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg-arm64\u002Fdownload",{"key":190,"label":191,"href":104},"downloads.combined.macOS.intel","Combined macOS installer Intel",{"key":193,"label":194,"href":195},"downloads.guides.macOS","macOS installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Fmacos-installation-guide",{"key":197,"label":198,"href":199},"downloads.guides.windows","Windows installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Fwindows-installation-guide",{"key":201,"label":202,"href":203},"downloads.guides.linux","Linux installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Flinux-installation-guide",{"key":205,"label":206,"href":207},"downloads.guides.linuxFlatpak","Linux Flatpak installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Flinux-installation-guide\u002Fflatpak",{"key":209,"label":210,"href":211},"downloads.guides.linuxSnap","Linux Snap installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Flinux-installation-guide\u002Fsnap",{"key":213,"label":214,"href":215},"downloads.guides.piecesOS","PiecesOS manual installation","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os\u002Fmanual-installation",{"key":217,"label":218,"href":219},"extensions.chrome","Chrome extension","https:\u002F\u002Fchrome.google.com\u002Fwebstore\u002Fdetail\u002Fpieces-save-code-snippets\u002Figbgibhbfonhmjlechmeefimncpekepm",{"key":221,"label":222,"href":223},"extensions.firefox","Firefox add-on","https:\u002F\u002Faddons.mozilla.org\u002Fen-US\u002Ffirefox\u002Faddon\u002Fpieces-save-code-from-the-web\u002F",{"key":225,"label":226,"href":227},"extensions.edge","Edge add-on","https:\u002F\u002Fmicrosoftedge.microsoft.com\u002Faddons\u002Fdetail\u002Fpieces-save-code-snippet\u002Fhglfimcdgonaeeobjckfdabcldfidmim",{"key":229,"label":230,"href":231},"extensions.vscode","VS Code extension","https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=MeshIntelligentTechnologiesInc.pieces-vscode",{"key":233,"label":234,"href":235},"extensions.visualStudio","Visual Studio extension","https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=MeshIntelligentTechnologiesInc.PiecesVisualStudio",{"key":237,"label":238,"href":239},"extensions.jetbrains","JetBrains plugin","https:\u002F\u002Fplugins.jetbrains.com\u002Fplugin\u002F17328-pieces--save-search-share--reuse-code-snippets",{"key":241,"label":242,"href":243},"extensions.obsidian","Obsidian plugin","https:\u002F\u002Fobsidian.md\u002Fplugins?id=pieces-for-developers",{"key":245,"label":246,"href":247},"extensions.sublime","Sublime package","https:\u002F\u002Fpackagecontrol.io\u002Fpackages\u002FPieces",{"key":249,"label":250,"href":251},"extensions.neovim","Neovim plugin","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fplugin_neo_vim",{"key":253,"label":254,"href":255},"extensions.jupyterlab","JupyterLab plugin","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fjupyterlab-pieces",{"key":257,"label":258,"href":259},"extensions.cli","Pieces CLI","https:\u002F\u002Fpypi.org\u002Fproject\u002Fpieces-cli\u002F",{"key":261,"label":262,"href":263},"docs.home","Documentation home","https:\u002F\u002Fdocs.pieces.app",{"key":265,"label":266,"href":267},"docs.getStarted","Get started docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces",{"key":269,"label":270,"href":271},"docs.api","API docs","https:\u002F\u002Fdocs.pieces.app\u002Fapi",{"key":273,"label":274,"href":275},"docs.desktop.overview","Desktop overview","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop",{"key":277,"label":278,"href":279},"docs.desktop.onboarding","Desktop onboarding","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fonboarding",{"key":281,"label":282,"href":283},"docs.desktop.timeline","Desktop timeline docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Ftimeline",{"key":285,"label":286,"href":287},"docs.desktop.summaries","Desktop summaries docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fsingle-click-summaries",{"key":289,"label":290,"href":291},"docs.desktop.search","Desktop conversational search docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fconversational-search",{"key":293,"label":294,"href":295},"docs.desktop.drive","Desktop drive docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fdrive",{"key":297,"label":298,"href":299},"docs.desktop.account","Desktop account settings docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fconfiguration\u002Faccount",{"key":301,"label":302,"href":92},"docs.desktop.download","Desktop download docs",{"key":304,"label":305,"href":306},"docs.piecesOS.overview","PiecesOS overview docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies",{"key":308,"label":309,"href":310},"docs.piecesOS.details","PiecesOS details docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os",{"key":312,"label":313,"href":215},"docs.piecesOS.install","PiecesOS install docs",{"key":315,"label":316,"href":317},"docs.piecesOS.quickMenu","PiecesOS quick menu docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os\u002Fquick-menu",{"key":319,"label":320,"href":321},"docs.piecesOS.storage","On-device storage docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fon-device-storage",{"key":323,"label":324,"href":325},"docs.piecesOS.troubleshooting","PiecesOS troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os\u002Ftroubleshooting",{"key":327,"label":328,"href":329},"docs.mcp.overview","MCP overview docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp",{"key":331,"label":332,"href":333},"docs.mcp.cursor","MCP Cursor docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fcursor",{"key":335,"label":336,"href":337},"docs.mcp.vscode","MCP VS Code docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fvs-code",{"key":339,"label":340,"href":341},"docs.mcp.claudeDesktop","MCP Claude Desktop docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fclaude-desktop",{"key":343,"label":344,"href":345},"docs.mcp.claudeCode","MCP Claude Code docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fclaude-code",{"key":347,"label":348,"href":349},"docs.mcp.claudeCowork","MCP Claude Cowork docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fclaude-cowork",{"key":351,"label":352,"href":353},"docs.mcp.githubCopilot","MCP GitHub Copilot docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fgithub-copilot",{"key":355,"label":356,"href":357},"docs.mcp.goose","MCP Goose docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fgoose",{"key":359,"label":360,"href":361},"docs.mcp.windsurf","MCP Windsurf docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fwindsurf",{"key":363,"label":364,"href":365},"docs.mcp.zed","MCP Zed docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fzed",{"key":367,"label":368,"href":369},"docs.mcp.jetbrains","MCP JetBrains docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fjetbrains-ides",{"key":371,"label":372,"href":373},"docs.mcp.continueDev","MCP Continue docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fcontinue-dev",{"key":375,"label":376,"href":377},"docs.mcp.cline","MCP Cline docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fcline",{"key":379,"label":380,"href":381},"docs.mcp.raycast","MCP Raycast docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fraycast",{"key":383,"label":384,"href":385},"docs.mcp.rovoDevCli","MCP Rovo Dev CLI docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Frovo-dev-cli",{"key":387,"label":388,"href":389},"docs.mcp.openaiCodexCli","MCP OpenAI Codex CLI docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fopenai-codex-cli",{"key":391,"label":392,"href":393},"docs.mcp.googleGeminiCli","MCP Google Gemini CLI docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fgoogle-gemini-cli",{"key":395,"label":396,"href":397},"docs.mcp.amazonQ","MCP Amazon Q docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Famazon-q-developer",{"key":399,"label":400,"href":401},"docs.mcp.chatgptDev","MCP ChatGPT Developer Mode docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fchatgpt-developer-mode",{"key":403,"label":404,"href":405},"docs.mcp.openclaw","MCP OpenClaw docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fopenclaw",{"key":407,"label":408,"href":409},"docs.mcp.mcpRemote","MCP Remote docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fmcp-remote",{"key":411,"label":412,"href":413},"docs.mcp.ngrok","MCP ngrok docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fngrok-setup",{"key":415,"label":416,"href":417},"docs.troubleshooting.macOS","macOS troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Ftroubleshooting\u002Fmacos",{"key":419,"label":420,"href":421},"docs.troubleshooting.windows","Windows troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Ftroubleshooting\u002Fwindows",{"key":423,"label":424,"href":425},"docs.troubleshooting.linux","Linux troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Ftroubleshooting\u002Flinux",{"key":427,"label":428,"href":429},"docs.privacy","Privacy and security docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fprivacy-security-your-data",{"key":431,"label":432,"href":433},"docs.support","Support docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fsupport",{"key":435,"label":436,"href":437},"portal.home","Pieces portal","https:\u002F\u002Fportal.pieces.app",{"key":439,"label":440,"href":441},"site.home","Website home","https:\u002F\u002Fpieces.app",{"key":443,"label":444,"href":445},"site.about","About page","https:\u002F\u002Fpieces.app\u002Fabout",{"key":447,"label":448,"href":449},"site.features","Features page","https:\u002F\u002Fpieces.app\u002Ffeatures",{"key":451,"label":452,"href":453},"site.plugins","Plugins page","https:\u002F\u002Fpieces.app\u002Fplugins",{"key":455,"label":456,"href":457},"site.contact","Contact page","https:\u002F\u002Fpieces.app\u002Fcontact",{"key":459,"label":58,"href":460},"site.updates","https:\u002F\u002Fpieces.app\u002Fupdates",{"key":462,"label":463,"href":464},"site.news","News","https:\u002F\u002Fpieces.app\u002Fnews",{"key":466,"label":467,"href":468},"site.events","Community events","https:\u002F\u002Fpieces.app\u002Fcommunity\u002Fevents",{"key":470,"label":471,"href":472},"site.userStories","User stories","https:\u002F\u002Fpieces.app\u002Fuser-stories",{"key":474,"label":475,"href":476},"site.academy","Academy","https:\u002F\u002Fpieces.app\u002Flearn\u002Facademy",{"key":478,"label":479,"href":480},"site.support","Website support","https:\u002F\u002Fpieces.app\u002Fsupport",{"key":482,"label":483,"href":484},"site.standup","Standup","https:\u002F\u002Fpieces.app\u002Fstandup",{"key":486,"label":34,"href":487},"site.blog","https:\u002F\u002Fcode.pieces.app\u002Fblog",{"key":489,"label":43,"href":490},"social.discord","https:\u002F\u002Fdiscord.gg\u002Fgetpieces",{"key":492,"label":46,"href":493},"social.x","https:\u002F\u002Fx.com\u002Fgetpieces",{"key":495,"label":496,"href":493},"social.twitter","Twitter",{"key":498,"label":499,"href":500},"social.instagram","Instagram","https:\u002F\u002Fwww.instagram.com\u002Fgetpieces\u002F",{"key":502,"label":503,"href":504},"social.tiktok","TikTok","https:\u002F\u002Fwww.tiktok.com\u002F@getpieces",{"key":506,"label":49,"href":507},"social.linkedin","https:\u002F\u002Fwww.linkedin.com\u002Fcompany\u002Fgetpieces\u002F",{"key":509,"label":510,"href":511},"social.youtube","YouTube","https:\u002F\u002Fyoutube.com\u002F@getpieces",{"key":513,"label":514,"href":515},"github.org","GitHub organization","https:\u002F\u002Fgithub.com\u002Fpieces-app",{"key":517,"label":518,"href":519},"github.support","GitHub support","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fsupport",{"key":521,"label":522,"href":523},"github.issues","GitHub issues","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fsupport\u002Fissues",{"key":525,"label":526,"href":527},"github.discussions","GitHub discussions","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fsupport\u002Fdiscussions",{"key":529,"label":530,"href":531},"github.documentation","GitHub documentation","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fdocumentation",{"key":533,"label":534,"href":535},"github.opensource","GitHub open source","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fopensource",{"key":537,"label":538,"href":539},"github.sdks.python","Python SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-python",{"key":541,"label":542,"href":543},"github.sdks.typescript","TypeScript SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-typescript",{"key":545,"label":546,"href":547},"github.sdks.dart","Dart SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-dart",{"key":549,"label":550,"href":551},"github.sdks.kotlin","Kotlin SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-kotlin",{"key":553,"label":554,"href":555},"github.plugins.obsidian","Obsidian plugin repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fobsidian-pieces",{"key":557,"label":558,"href":255},"github.plugins.jupyterlab","JupyterLab plugin repository",{"key":560,"label":561,"href":562},"github.plugins.sublime","Sublime plugin repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fplugin_sublime",{"key":564,"label":565,"href":566},"github.plugins.neovim","Neovim plugin repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fplugin_neovim",{"key":568,"label":569,"href":570},"github.cliAgent","CLI agent repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fcli-agent",{"key":572,"label":573,"href":574},"github.mcpDart","MCP Dart repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fmcp_dart",{"key":576,"label":577,"href":578},"github.awesomePieces","Awesome Pieces repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fawesome-pieces",{"key":580,"label":581,"href":66},"legal.privacyPolicy","Privacy policy",{"key":583,"label":584,"href":69},"legal.refundPolicy","Refund policy",{"key":586,"label":587,"href":72},"legal.terms","Terms",{"key":589,"label":590,"href":591},"legal.security","Legal security","https:\u002F\u002Fpieces.app\u002Flegal\u002Fsecurity",{"key":593,"label":594,"href":511},"videos.youtubeChannel","YouTube channel",{"key":596,"label":597,"href":598},"videos.gettingStartedDesktop","Getting started desktop video","https:\u002F\u002Fyoutu.be\u002FdUr1lRM_TYk",{"key":600,"label":601,"href":602},"videos.snippetDiscoveryxR","Snippet discovery video","https:\u002F\u002Fyoutu.be\u002FG6vb1USw-30",{"key":604,"label":605,"href":606},"sales.bookACall","Book a sales call","https:\u002F\u002Fcalendar.app.google\u002FWVUDtUfNy5Vst3sH7",{"key":608,"label":609,"href":610},"sales.enterprise","Enterprise form","https:\u002F\u002Fgetpieces.typeform.com\u002Fto\u002FaVQFTvpE",{"key":612,"label":613,"href":527},"sales.feedback","Feedback discussions",{"key":615,"label":616,"href":617},"sales.earlyAccess","Early access form","https:\u002F\u002Fgetpieces.typeform.com\u002Fearlyaccess",{"key":619,"label":620,"href":621},"sales.supportEmail","Support email","mailto:support@pieces.app",{"key":623,"label":624,"href":19},"routes.home","Home route",{"key":626,"label":627,"href":56},"routes.about","About route",{"key":629,"label":630,"href":12},"routes.downloads","Downloads route",{"key":632,"label":633,"href":634},"routes.thanks","Post-install thanks route","\u002Finstall\u002Fthanks",{"key":636,"label":637,"href":638},"routes.pricing","Pricing route","\u002Fpricing",{"key":640,"label":641,"href":642},"cta.freeTrial","Start free trial CTA (Pieces Pro) — used by \u002Fcampaigns\u002F* landing pages","https:\u002F\u002Fcampaigns.pieces.app\u002F",{"key":644,"label":645,"href":22},"routes.enterprise","Enterprise route",{"key":647,"label":648,"href":62},"routes.contact","Contact route",{"key":650,"label":651,"href":59},"routes.updates","Updates route",{"key":653,"label":654,"href":655},"routes.migrationError","Migration error route","\u002Fmigration\u002Ferror",{"key":657,"label":658,"href":659},"routes.authenticated","Post-login authenticated route","\u002Fauth\u002Fsigned-in",{"key":661,"label":662,"href":663},"routes.signed-out","Signed out route","\u002Fauth\u002Fsigned-out",{"key":665,"label":666,"href":667},"routes.authentication-error","Authentication error route","\u002Fauth\u002Ferror",{},"data\u002Fshared\u002Furls","2AvfSWI6bZACH5Kr1ZS3txMLjteRjCjbDR_ul1uRZ9Q",{"id":672,"title":673,"author":674,"authorPhoto":675,"authorPhotoAlt":676,"authorSlug":677,"body":678,"buttonText":676,"buttonUrl":676,"category":1031,"date":1032,"description":1033,"draft":1034,"editorsPick":1034,"extension":1035,"featured":1034,"image":1036,"imageAlt":1037,"meta":1038,"navigation":32,"ogImage":676,"ogImageAlt":676,"path":1039,"seo":1040,"stem":1041,"tags":1042,"__hash__":1044},"blog\u002Fblog\u002Funderstanding-the-pillars-of-object-oriented-programming.md","Understanding the Pillars of Object Oriented Programming","Soloudo Uzoukwu","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Funderstanding-the-pillars-of-object-oriented-programming\u002Fauthor.jpeg",null,"soloudo-uzoukwu",{"type":679,"value":680,"toc":1004},"minimark",[681,685,690,693,704,707,712,715,719,722,726,729,733,736,740,743,765,769,772,776,779,783,786,790,793,797,800,804,808,811,814,817,828,831,834,840,849,853,856,860,867,870,873,879,882,888,891,895,902,913,919,937,943,952,956,959,962,968,974,978,985,988,994,997,1001],[682,683,684],"p",{},"This article will provide an overview of the four pillars of object oriented programming (OOP), including a look at a few concepts related to OOP and steps for implementing OOP concepts in JavaScript.",[686,687,689],"h2",{"id":688},"why-use-object-oriented-programming","Why Use Object-Oriented Programming?",[682,691,692],{},"Writing highly readable code is crucial in programming because it promotes code reusability and scalability; OOP helps us achieve this.",[682,694,695,696,703],{},"We have shared that the ",[697,698,702],"a",{"href":699,"rel":700},"https:\u002F\u002Fpieces.app\u002Fblog\u002Fthe-top-3-object-oriented-programming-languages",[701],"nofollow","top 3 object-oriented programming languages"," are Java, Python and C++, though some great alternatives include JavaScript and C#. OOP focuses on organizing software around specific data or objects rather than around the logic required to manage them. In essence, OOP models a system as a collection of data called objects, and each object represents a part of the system.",[682,705,706],{},"Certain features make up the foundation for a language to be considered object-oriented:",[708,709,711],"h3",{"id":710},"classes","Classes",[682,713,714],{},"These are user-defined data types that are grouped together. They share similar attributes and serve as a template for creating objects.",[708,716,718],{"id":717},"methods","Methods",[682,720,721],{},"Methods are functions defined inside a class. They dictate how an object will behave. They are used to keep functionality encased in an object.",[708,723,725],{"id":724},"objects","Objects",[682,727,728],{},"These unique entities contain methods and properties. They are instances of a class created with specifically defined data.",[708,730,732],{"id":731},"attributes","Attributes",[682,734,735],{},"This is a characteristic that defines the state of an object. It is used to manipulate or reference a class’s property.",[708,737,739],{"id":738},"why-is-oop-important","Why is OOP Important?",[682,741,742],{},"There are several benefits of object-oriented programming:",[744,745,746,750,753,756,759,762],"ul",{},[747,748,749],"li",{},"Code re-usability as a result of inheritance allows the use of properties from the main class in a new subclass.",[747,751,752],{},"It also improves general productivity by allowing developers to create programs more quickly.",[747,754,755],{},"It makes collaborative development and troubleshooting much more straightforward.",[747,757,758],{},"It improves code scalability significantly.",[747,760,761],{},"It makes software maintenance much more accessible by hiding complex code and protecting parts of the code.",[747,763,764],{},"It allows more flexibility through polymorphism; since a single function can be modified to adapt to the class that it's placed in.",[686,766,768],{"id":767},"what-are-the-four-pillars-of-object-oriented-programming","What are the Four Pillars of Object Oriented Programming?",[682,770,771],{},"There are four pillars of object oriented programming that apply to supported languages:",[708,773,775],{"id":774},"abstraction","Abstraction",[682,777,778],{},"This is the process of refactoring complex code, making objects reveal only internal mechanisms that other objects require. This OOP concept allows developers to quickly make changes or additions to the code over time.",[708,780,782],{"id":781},"encapsulation","Encapsulation",[682,784,785],{},"The principle of encapsulation ensures that code is only used as intended by securing important information inside an object and allowing only a selection of information to be exposed. The values and data cannot be manipulated because they are held privately inside a defined class. Other objects do not have the authority to make changes; they can only call public functions in the class. This pillar of OOP provides a greater level of program security and avoids unintentional tampering.",[708,787,789],{"id":788},"inheritance","Inheritance",[682,791,792],{},"Inheritance allows classes to reuse code from other classes. For example, there is one class called the main class with all the primary features, and then another called the sub-class, which inherits all the functionality from the main class. This allows developers to reuse common logic while maintaining a unique hierarchy. This practice ensures a higher level of accuracy and reduced development time.",[708,794,796],{"id":795},"polymorphism","Polymorphism",[682,798,799],{},"When an object shares traits with a class, there are certain times when changes need to be made to the behaviors inherited from the main class. Polymorphism helps by allowing us to override functions inherited from the main class in a sub-class. This OOP pillar helps reduce the amount of duplicated code.",[686,801,803],{"id":802},"implementing-principals-of-object-oriented-programming-in-javascript","Implementing Principals of Object Oriented Programming in JavaScript",[708,805,807],{"id":806},"object-literals-for-abstraction","Object Literals for Abstraction",[682,809,810],{},"An object in JavaScript is a collection of data and similar functionality. It mostly consists of variables and functions (known as properties and methods) separated by commas. Objects can also contain other objects within them.",[682,812,813],{},"Abstraction requires that we package code into more uncomplicated form factors, and objects are a perfect way to achieve this. Of course, there are other ways to achieve abstraction in JavaScript, but for the purpose of this article, we’ll stick to using object literals to accomplish this result.",[682,815,816],{},"An object is declared as so:",[818,819,824],"pre",{"className":820,"code":822,"language":823},[821],"language-text","const objectname1 = {\n                    property1: ”String”, \n                    property2: 100,\n                    objectname2: { }\n                }\n","text",[825,826,822],"code",{"__ignoreMap":827},"",[682,829,830],{},"Let’s use an example to illustrate object use in object-oriented programming.",[682,832,833],{},"Next, we’ll attempt to create a car object inside of a land vehicle class. Instead of individually declaring the car's properties in the class, we can use an object to organize everything in one spot:",[818,835,838],{"className":836,"code":837,"language":823},[821],"const car = \n{\n    brand: ”Audi”,\n    model: “Q” + 7,\n    year: 2021,\n    dashDisplay()\n    {\n        console.log(“This is a ” + brand + ” ” + model + “ ”+ year );\n    }\n };\n const truck =\n {\n    \u002F\u002Ftruck properties.\n };\ncar.brand;\ncar.model;\ncar.year;\ncar.dashDisplay;\n",[825,839,837],{"__ignoreMap":827},[682,841,842,843,848],{},"As shown above, ",[697,844,847],{"href":845,"rel":846},"https:\u002F\u002Fpieces.app\u002Fblog\u002Fhow-to-refactor-large-react-components",[701],"refactoring code"," with object literals makes it easier for a developer to see the essential parts of the code. It also prevents other objects, like the truck object, from accidentally accessing the properties of the car object. No changes or additions can be made quickly to the code.",[686,850,852],{"id":851},"javascript-classes","JavaScript Classes",[682,854,855],{},"Classes in JavaScript are blueprints for creating an object. They encapsulate data and code to work on that data. In JS, they are built on prototypes, but they also have their own syntax and semantics. For example, classes can contain variables, methods and objects.",[708,857,859],{"id":858},"defining-a-class","Defining a Class",[682,861,862,863,866],{},"To declare a class, we use the ",[825,864,865],{},"class"," keyword followed by the class name and curly brackets. It is possible to declare a class without specifying the class name. Both methods of declaration are illustrated below.",[682,868,869],{},"One thing to note about classes is how different they are from functions. For example, they can only be called after they have been defined, unlike functions, which can be called before being defined. Therefore, calling a class before its definition will result in a reference error.",[682,871,872],{},"It’s also important to note that defining a class with a class name is known as a class declaration.",[818,874,877],{"className":875,"code":876,"language":823},[821],"class Person\n{\n    constructor(name, age, height)\n    {\n       this.name = name;\n       this.age = age;\n       this.height = height;\n    }\n}\n",[825,878,876],{"__ignoreMap":827},[682,880,881],{},"Further, defining a class without a name is known as a class expression.",[818,883,886],{"className":884,"code":885,"language":823},[821],"let person = class{\n    constructor(name, age, height)\n    {\n       this.name = name;\n       this.age = age;\n       this.height = height;\n     }\n     sayHi()\n    {\n     console.log(`Hey, my name is ${name} and I am ${age} years old)\n    }\n}\n",[825,887,885],{"__ignoreMap":827},[682,889,890],{},"The constructor method used above is unique, and can only be defined once in a class using the keyword constructor. It is used to create and initialize an object with a class. Declaring a constructor is optional, as one will be made in the background for the class if one is not defined.",[686,892,894],{"id":893},"inheritance-using-classes-and-subclasses","Inheritance Using Classes and Subclasses",[682,896,897,898,901],{},"It’s possible to have one class share properties with another class. In JavaScript, we create one class called the main class. The main class has all the features and functionality needed across the board, and other classes inherit from that class. The other classes are known as subclasses, and they use the ",[825,899,900],{},"extends"," keyword followed by the name of the main class.",[682,903,904,905,908,909,912],{},"Now, let's create a ",[825,906,907],{},"Lion"," class that is inherited from the ",[825,910,911],{},"Animal"," class to illustrate this:",[818,914,917],{"className":915,"code":916,"language":823},[821],"class Animal\n{\n    const trait =\n    {\n        animal,\n        hunger,\n        speed,\n        sound\n    };\n    Speak()\n    {\n       let sound = trait.sound;\n       console.log(“This animal makes a ” + this.sound);\n    }\n    Feed(food)\n    {\n       If(trait.hunger == 0)\n       {\n          console.log(\"It eats its fill of \" + food);\n       }\n    }\n    Walk(speed)\n    {\n       trait.speed = speed;\n       console.log(“It walks at ” + speed + ”km\u002Fh”);\n    }\n}\nclass Lion extends Animal\n{\n    trait.animal = “lion”;\n    trait.hunger = 0;\n    trait.sound = “roar”;\n}\n    const lion1 = new Lion();\n    lion1.Speak();\n    lion1.Feed(“Deer”);\n    lion1.Walk(10);\n",[825,918,916],{"__ignoreMap":827},[682,920,921,922,924,925,928,929,932,933,936],{},"By adjusting the properties of the trait object in the ",[825,923,907],{}," class and calling the ",[825,926,927],{},"Speak",", ",[825,930,931],{},"Feed"," and ",[825,934,935],{},"Walk"," functions. The resulting message would be the following:",[682,938,939],{},[940,941,942],"em",{},"This animal makes a roar.It eats its fill of Deer.It walks at 10km\u002Fh.",[682,944,945,946,948,949,951],{},"The ",[825,947,907],{}," class has inherited all the functionality and properties associated with the ",[825,950,911],{}," class and can make changes to these properties as needed. Using inheritance allows for code reusability. Also, the methods and properties of an existing class can be shared, allowing us to write shorter, more efficient code.",[686,953,955],{"id":954},"polymorphism-through-method-overriding","Polymorphism Through Method Overriding",[682,957,958],{},"Just as inheritances enable the sharing of properties and functions, sometimes the shared functions might need to be tweaked to suit the class inheriting these functionalities. In this case, we have to use polymorphism. It allows a common method to be implemented differently in multiple objects. Polymorphism can be achieved through a process known as method overriding.",[682,960,961],{},"Method overriding allows a subclass to implement the main class method differently by redefining the method in the subclass. A simple example to illustrate this is shown in the two classes below:",[818,963,966],{"className":964,"code":965,"language":823},[821],"class Vehicle\n{\n    Horn()\n    {\n       console.log(“This vehicle makes a sound”);\n    }\n}\nclass Truck extends Vehicle\n{\n    Horn()\n    {\n       console.log(“A truck makes a loud honking sound.”);\n    }\n}\nlet transport = new Truck();\ntransport.Horn();\n",[825,967,965],{"__ignoreMap":827},[682,969,970,971],{},"The above code will output: ",[940,972,973],{},"A truck makes a loud honking sound.",[686,975,977],{"id":976},"encapsulation-in-javascript","Encapsulation in JavaScript",[682,979,980,984],{},[697,981,977],{"href":982,"rel":983},"https:\u002F\u002Fwww.scaler.com\u002Ftopics\u002Fjavascript\u002Fencapsulation-in-javascript\u002F#:~:text=Encapsulation%20brings%20together%20data%20and,implementation%20details%20from%20the%20interface.",[701]," is done using an access modifier before the variable or function name. By starting a character with a hashtag(#), we make the variable or function private in the class, hiding it from other objects that have access to it. When a variable or function is made private, it can only be accessed within the declared class.",[682,986,987],{},"Here’s a method and variable declaration that does this:",[818,989,992],{"className":990,"code":991,"language":823},[821],"class Time\n{\n    #hour = 22;\n    #minute=15;\n    #second = 05;\n    constructor(hour, minute, second)\n    {\n       this.#hour = hour\n       this.#minute = minute\n       this.#second = second\n    }\n    #ResetToZero()\n    {\n       this.#hour = 0;\n       this.#minute=0;\n       this.#second = 0;\n       console.log(`New time ${this.#hour} : ${this.#minute} : ${this.#second}`);\n    }\n    callResetToZero()\n    {\n       #ResetToZero();\n    }\n}\nclass Watch\n{\n    let time = new Time(19,30,0);\n    time.#hour;    \u002F\u002F this will produce an error\n    time.#ResetToZero();     \u002F\u002Fthis will also produce an error.\n}\n",[825,993,991],{"__ignoreMap":827},[682,995,996],{},"Additionally, the only way to access a private variable or method from another class is by calling that method in a public method within the main class and using that method in the sub-class.",[686,998,1000],{"id":999},"conclusion","Conclusion",[682,1002,1003],{},"Using the pillars of object oriented programming will help make you a better programmer and allow you to write more effective code. With the OOP principles and concepts explained in this article, you can better implement object oriented programming in your JavaScript code.",{"title":827,"searchDepth":1005,"depth":1005,"links":1006},2,[1007,1015,1021,1024,1027,1028,1029,1030],{"id":688,"depth":1005,"text":689,"children":1008},[1009,1011,1012,1013,1014],{"id":710,"depth":1010,"text":711},3,{"id":717,"depth":1010,"text":718},{"id":724,"depth":1010,"text":725},{"id":731,"depth":1010,"text":732},{"id":738,"depth":1010,"text":739},{"id":767,"depth":1005,"text":768,"children":1016},[1017,1018,1019,1020],{"id":774,"depth":1010,"text":775},{"id":781,"depth":1010,"text":782},{"id":788,"depth":1010,"text":789},{"id":795,"depth":1010,"text":796},{"id":802,"depth":1005,"text":803,"children":1022},[1023],{"id":806,"depth":1010,"text":807},{"id":851,"depth":1005,"text":852,"children":1025},[1026],{"id":858,"depth":1010,"text":859},{"id":893,"depth":1005,"text":894},{"id":954,"depth":1005,"text":955},{"id":976,"depth":1005,"text":977},{"id":999,"depth":1005,"text":1000},"Software Development","2023-01-10T00:00:00.000Z","This article provides an overview of the pillars of object oriented programming (OOP), a few related concepts and steps for implementing them in JavaScript.",false,"md","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Funderstanding-the-pillars-of-object-oriented-programming\u002Fhero.jpeg","decorative cover image showing off laptop",{},"\u002Fblog\u002Funderstanding-the-pillars-of-object-oriented-programming",{"title":673,"description":1033},"blog\u002Funderstanding-the-pillars-of-object-oriented-programming",[1043],"development","sIrpItEEac6T3mAs2HuGNue3EJZ8g0flo1-PnVOuoPY",{"id":1046,"title":674,"body":1047,"description":827,"draft":1034,"extension":1035,"meta":1051,"navigation":32,"path":1052,"photo":1053,"photoAlt":676,"seo":1054,"stem":1055,"__hash__":1056},"authors\u002Fauthors\u002Fsoloudo-uzoukwu.md",{"type":679,"value":1048,"toc":1049},[],{"title":827,"searchDepth":1005,"depth":1005,"links":1050},[],{},"\u002Fauthors\u002Fsoloudo-uzoukwu","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fauthors\u002Fsoloudo-uzoukwu.png",{"title":674,"description":827},"authors\u002Fsoloudo-uzoukwu","-A_a32MCfi0U-ytNVeeNOkafdgLqpmFxj9QdkjSKPZQ",{"left":1058,"top":1058,"width":1059,"height":1059,"rotate":1058,"vFlip":1034,"hFlip":1034,"body":1060},0,24,"\u003Cpath fill=\"currentColor\" d=\"m7.825 13l4.9 4.9q.3.3.288.7t-.313.7q-.3.275-.7.288t-.7-.288l-6.6-6.6q-.15-.15-.213-.325T4.426 12t.063-.375t.212-.325l6.6-6.6q.275-.275.688-.275t.712.275q.3.3.3.713t-.3.712L7.825 11H19q.425 0 .713.288T20 12t-.288.713T19 13z\"\u002F>"]