Skip to content

Alex Rusin Blog

  • BlogExpand
    • AWS
    • Javascript Development
    • Remix
    • PHP MySQL Development
    • Laravel
    • System Administration
    • WordPress Development
    • Magento
    • Uncategorized
  • My Projects
Alex Rusin Blog
  • Javascript Development

    Observer Pattern in JavaScript

    Byalexrusin December 31, 2023September 28, 2024

    In this article we will explore the Observer Pattern in JavaScript. We will look at a real world example that involves processing order shipment and how to implement observer pattern in that context. In object oriented programming the Observer Pattern defines a one-to-many dependency between objects, where one object (the subject or observable) maintains a…

    Read More Observer Pattern in JavaScriptContinue

  • Strategy Pattern in Javascript
    Javascript Development

    Strategy Pattern in JavaScript

    Byalexrusin December 17, 2023September 28, 2024

    The Strategy Pattern is a powerful design pattern in JavaScript that allows you to define a family of algorithms, encapsulate each one as a separate object, and make them interchangeable. This pattern is especially useful when you want to select an algorithm’s implementation at runtime without altering the client code. In this article, we explore how the Strategy Pattern works in JavaScript, providing practical examples to demonstrate its flexibility and scalability in solving various problems.

    Read More Strategy Pattern in JavaScriptContinue

  • GET JavaScript Error Message
    Javascript Development

    Correctly Handle JavaScript Error Messages

    Byalexrusin December 10, 2023

    In the post about REST API Filtering we have getFilterBy method in BaseRepository that calls getSequelizeWhereClause function and returns result. The call is wrapped up in try…catch block, so when an error is thrown, it gets transformed into an API error and get re-thrown. The message from the original error is assigned to the API…

    Read More Correctly Handle JavaScript Error MessagesContinue

  • Advanced Filtering in REST API
    Javascript Development

    Advanced Filtering in REST API

    Byalexrusin December 10, 2023December 10, 2023

    In this article we will look at how to implement advanced filtering in REST API when a GET request a list of results. In our API project that will be GET /v1/travels and GET /v1/tours endpoints. Although setup for filtering is similar to sorting, the implementation is a bit more complex. First we are going…

    Read More Advanced Filtering in REST APIContinue

  • Sorting REST API Results
    Javascript Development

    Sorting REST API Results

    Byalexrusin November 30, 2023December 10, 2023

    In this article we will look at how to sort results when using a GET request that returns a list. Implementing sorting functionality in a RESTful API is a crucial aspect of designing a robust and user-friendly web service. Sorting REST API results empowers developers and end-users alike by providing a systematic and organized way…

    Read More Sorting REST API ResultsContinue

  • Javascript Development

    Sequelize Seeders: Generating Test Data

    Byalexrusin November 19, 2023

    In this article we will look at how to use Sequelize seeders to seed the database with test data and use Faker library to generate the test data. We will continue working in the project travel-api-db-migration-service we created in the video Sequelize Migrations. Please, watch that video if you would like to see how the…

    Read More Sequelize Seeders: Generating Test DataContinue

  • REST API Delete Resource
    Javascript Development

    REST API Delete Resource

    Byalexrusin November 5, 2023November 5, 2023

    In this article we will look at REST API Delete operation. Compared to Create and Update, Delete operation is fairly easy and straightforward. REST API Delete Implementation Below, we will outline the basic steps of Delete operation implementation. Please, watch our video for more in depth explanation of this concept. Route and Controller In routes/v1/travels…

    Read More REST API Delete ResourceContinue

  • REST API Update Resource
    Javascript Development

    REST API Update Resource

    Byalexrusin October 29, 2023October 29, 2023

    In the previous article REST API Request Validation we looked at how to create a resource using POST request and Joi validation. In this article we will look at how to use REST API Update operation to modify a resource. We will also be using Joi validation to ensure security and consistency. Compared to creation,…

    Read More REST API Update ResourceContinue

  • Javascript Development

    REST API Request Validation

    Byalexrusin October 22, 2023July 14, 2024

    In this article we will look at how to validate POST requests to the REST API using Joi library. Joi lets you describe your data using a simple, intuitive, and readable language. We will also look at how to turn Joi errors into 422 Validation Error API responses. Describe REST API Request Shema with Joi…

    Read More REST API Request ValidationContinue

  • Javascript Development

    API Gateway Webhooks Lambda HMAC Validation

    Byalexrusin October 15, 2023February 16, 2025

    In the previous post HMAC Validation we explored how to validate HMAC in an API project. The video Webhooks Processing: HTTP API Gateway + SQS +Lambda shows how to created a scalable solution for receiving webhooks and throttling them with SQS and Lambda. In this article we will look at how to use HMAC Validation…

    Read More API Gateway Webhooks Lambda HMAC ValidationContinue

Page navigation

Previous PagePrevious 1 … 3 4 5 6 7 … 13 Next PageNext

© 2025 Alex Rusin Blog - WordPress Theme by Kadence WP

  • Blog
    • AWS
    • Javascript Development
    • Remix
    • PHP MySQL Development
    • Laravel
    • System Administration
    • WordPress Development
    • Magento
    • Uncategorized
  • My Projects