Cover image for dilippitchika

Dilip Pitchika Verified userVerified user

Product Manager

Appsmith

Introducing Reusable Queries & JS

In the fast-paced world of software development, reusability is a game-changer. It's what separates agile, efficient workflows from slow, cumbersome ones. Without the ability to reuse components, the time to roll out changes increases significantly. Moreover, it opens the door for inconsistencies, making it challenging to maintain a seamless and uniform application experience. Today we're taking the first step forward in solving reusability for all our users by introducing reusable queries and javascript.

You can read more about how we're thinking holistically about reusability here

Reusable Queries

With Reusable Queries, you can create a query once, and seamlessly integrate it across multiple applications and pages. Say goodbye to the hassle of duplicating and retesting queries. With Reusable Queries, you're stepping into a world of unmatched consistency and efficiency, dramatically speeding up your development process and ensuring uniformity like never before. Get ready to experience development at lightning speed!

Use-Cases:
  1. Loan Approval App: Imagine creating a loan approval application where each loan type requires a review by managers. While the details differ for each loan type, the fundamental "get" query remains the same. With Reusable Queries, you can effortlessly manage this by creating a single query used across multiple pages for streamlined loan processing.
  2. Construction Work Order Management: In a construction work order management flow, the ability to add new project categories from different application sections is crucial. The project categories query, a common thread, now becomes a breeze to share and utilize efficiently with Reusable Queries.

Reusable JavaScript Objects

Reusable JavaScript Objects goes beyond just reusing JavaScript variables and functions. It empowers you to encapsulate complex logic, including private queries and behind-the-scenes JavaScript. Now, you can effortlessly create and expose abstractions, simplifying your workflow. Imagine centralizing intricate logic without overwhelming yourself or your team members. It's like crafting mini-SDKs or JavaScript libraries right within Appsmith. Get ready to elevate your development experience!

Use-Cases:
  1. Analytics: Imagine an application where triggering analytics events for actions like closing tickets is vital. You've got a Mixpanel SDK set up, but centralizing this behavior becomes a breeze with Reusable JavaScript Objects. Now, you can effortlessly manage and share this essential logic.
  2. Authentication checker: When you need to check if the token your users have been using is invalid and redirect them to the login page to re-authorize, you need a way to centrally control the logic to share it across all the pages. Now you can do that with reusable JS objects

Harness the power of reusability

Unlock the potential of reusability with Appsmith! Eager to explore the endless possibilities? Connect with us using the calendar below to dive into this exciting feature and discover how it can make your life a whole lot easier. Sign up for the beta now and let the journey of effortless app development begin!