Blog

  • SSR vis CSR for application

    SSR refer to Server side rendering mechanism, as the name imply, the web page is rendered on the server then get send to the client, this approach reduce the load on the client and enhance SEO.

    CSR refer to Client side rendering, used mostly by single page applications with a lot of dynamic UI component, like grid table, chatroom. they handle page update via http request and server only send the data need for rendering, meaning less data get transfer in the pipeline.

  • 2 CSS features for theming

    prefers-color-scheme is a css media feature that allow toggling/applying a set of css properties when the browser has be configure with a color scheme

    using global css variable on the root level via the :root css selector, variable defined in :root has the highest level of specificity than those defined in html, and html has higher specificity than body

  • 3 Primary benefits from using webpack as your build tool for javascript development

    There are many benefits from using webpack, the important ones are managing dependencies for your component, performance optimization with algorithm like tree shaking to load only things that are actually being used, improved compatibility with less modern browser by translating functionalities that are not available in older browser.

  • Mongo DB as part of MERN Stack

    Why do people use Mango DB?

    Schema

    Unlike relational database, MongoDB does not require a predefined schema. This feature allow us to store documents with varying data structures. This flexibility also eliminates the need for complex JOIN operations, as related data can be embedded directly within a single document.

    MongoDB can efficiently produce aggregated results without incurring the overhead typically associated with joins in relational databases.

    Indexing

    Using the combination of single field index, compound index, and build-in query optimizing tool, we can further enhance query performance.

    db.products.createIndex({ category: 1, tags: 1, price: -1 });

    Here’s some example of CRUD operation performed on the Mongo DB.

    Create

    db.products.insertMany([ { name: "Headphones", price: 150, category: "Electronics", inStock: true, details: { brand: "Sony", "noiseCancelling": true } }, { name: "Notebook", price: 5, category: "Office Supplies", inStock: true } ])

    Read

    db.products.find({ price: { $gt: 50 } })

    Update

    db.products.updateMany( { category: "Books" }, { $set: { inStock: false } } )

    Delete

    db.products.deleteMany({ category: "Office Supplies" })

  • I’m Pursuing a AWS Certified Cloud Practitioner

    Why? because I can.

    I’ve been running an AWS EC2 server reliably for years, despite running with minimal (free-tier) hardware, the server efficiently hosts multiple WordPress sites for my clients, as well as my own app. Feel free to check out my planning Poker game built with vue3, nodeJS with Socket.IO –> https://smeeta.com

  • Use this post to checkout the features

    This is the heading block

    Pick your favorites

    1, 2, 3 or 4

    “Freedom is given by people with power”