effect.website
Open in
urlscan Pro
172.67.212.50
Public Scan
Submitted URL: http://effect.website/
Effective URL: https://effect.website/
Submission: On March 28 via manual from GB — Scanned from GB
Effective URL: https://effect.website/
Submission: On March 28 via manual from GB — Scanned from GB
Form analysis
0 forms found in the DOMText Content
DocsBlog Search Docs... ⌘K GitHubDiscord THE BEST WAY TO BUILD ROBUST APPSBUILD ROBUST APPSIN TYPESCRIPT Watch Video * Maximum Type-safety (incl. error handling) * Makes your code more composable, reusable and testable * Extensive library with a rich ecosystem of packages * Clustering and Workflows (Alpha) Get Started Watch Video Effect works everywhere: And with everything: -------------------------------------------------------------------------------- MAKE THE HARD THINGS EASY As your application grows, Effect scales with it - keeping your code simple and maintainable. Complexity(Lower is better)–Without Effect–With Effect Features * Error Handling Keep track of possible errors and treat them as values. * Retry If something fails, retry with an exponential backoff up to 3 times. * Interruption Abort the request after 1 second, cleaning up resources. * Observability Trace your requests and keep track of their status. WITHOUT EFFECT index.ts * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13 * 14 * 15 * 16 * 17 * 18 * 19 async function getTodo( id: number ): Promise< | { ok: true; todo: any } | { ok: false; error: "InvalidJson" | "RequestFailed" } > { try { const response = await fetch(`/todos/${id}`) if (!response.ok) throw new Error("Not OK!") try { const todo = await response.json() return { ok: true, todo } } catch (jsonError) { return { ok: false, error: "InvalidJson" } } } catch (error) { return { ok: false, error: "RequestFailed" } } } WITH EFFECT index.ts * 1 * 2 * 3 * 4 * 5 * 6 * 7 const getTodo = ( id: number ): Effect.Effect<unknown, HttpClientError> => Http.request.get(`/todos/${id}`).pipe( Http.client.fetchOk(), Http.response.json, ) THE MISSING STANDARD LIBRARY FOR TYPESCRIPT TypeScript/JavaScript, the most popular programming language, is still missing a standard library. Effect is filling this gap by providing a solid foundation of data structures, utilities, and abstractions to make building applications easier. See 2022 State of JavaScript survey MOST DESIRED JS FEATURES 2022 State of JavaScript survey * 2. Standard LibraryDocs * 4. Immutable Data StructuresDocs * 5. ObservableDocs * 6. Pipe OperatorDocs * 8. Pattern MatchingDocs * * * * * POWERFUL BUILDING BLOCKS Every part of the Effect ecosystem is designed to be composable. The Effect primitives can be combined in many different ways to tackle the most complex problems. * Immutable data structures * Asynchronous queues & pub-sub * Configuration & dependency management Read documentation NO MORE ONE-OFF DEPENDENCIES With Effect the batteries are included. Regardless of the application, your package.json will have never been this small. * Data validation & serialization * Frameworks for CLI & HTTP applications * Powerful abstractions for every platform Read documentation NEVER TRY & CATCH AGAIN Effect doesn't shy away from errors — it embraces them as a fact of life. Successfully handle failure with the built-in error-handling primitives. * Type-safe errors as values * Powerful retry & recovery APIs * Tools for logging & tracing Read documentation -------------------------------------------------------------------------------- LET'S SEE SOME EXAMPLE CODE Doing the right thing in TypeScript is hard. Effect makes it easy! We have collated some examples to show you how Effect can be utilized in your next project. * Effect helps you with handling errors, async code, concurrency, streams and much more. * Effect provides a unified replacement for many one-off dependencies. * Effect integrates deeply with your current tech stack. BASICS ECOSYSTEM Effect helps you with handling errors, async code, concurrency, streams and much more. Sync codeAsync codeError HandlingInterruptionRetryConcurrencyComposition -------------------------------------------------------------------------------- WITHOUT EFFECT index.ts * 1 * 2 * 3 * 4 * 5 const main = () => { console.log('Hello, World!') } main() Run snippet $ bun src/index.ts Hello, World! WITH EFFECT index.ts * 1 * 2 * 3 * 4 * 5 import { Console, Effect } from 'effect' const main = Console.log('Hello, World!') Effect.runSync(main) Run snippet $ bun src/index.ts Hello, World! EFFECT GIVES YOU NEW SUPERPOWERS COMPOSABLE & REUSABLE Everything in the Effect ecosystem is designed to work together. Building applications with Effect feels like playing with Lego. MAXIMUM TYPE-SAFETY Effect leverages the full power of TypeScript to give you confidence in your code. From errors to managing dependencies — if it compiles, it works. BUILT-IN TRACING The built-in support for tracing is first-class. Effect integrates seamlessly with OpenTelemetry to give you full visibility over your application's performance. BUILT-IN METRICS Effect has built-in support for metrics. You can use the provided OpenTelemetry exporter to integrate with a wide range of dashboards. EASY TO REFACTOR Make changes to your app with confidence. Effect's powerful abstractions make it easy to refactor your code without breaking anything. -------------------------------------------------------------------------------- WHAT EFFECT USERS ARE SAYING Effect is the 🐐 of TypeScript - Rust style error handling - Retries, Concurrency, Streams, … - Missing standard library Tobias Lins Product Engineer at Vercel Effect is so, so good. Error handling in TypeScript has always felt so haphazard. Effect makes it feel effortless. And that’s only a tiny part of what makes Effect such a great set of libraries. Keep up the great work! Devin Jameson Software engineer at PolyCam I LOVE Effect, been using it for a month now and it took a minute to figure out how to build composable services, but oh-my-god my code has never been this sexy. David Peter Functional programmer in TypeScript Delightfully, Effect is one of those rare tools that lift you up & educate you to become a better developer; Sustainably and well beyond the framework itself. And it does so both /effect/ively and *very* gently... Also, our community is *chefs kiss* Sebastian Lorenz TypeScript Engineer Effect is the 🐐 of TypeScript - Rust style error handling - Retries, Concurrency, Streams, … - Missing standard library Tobias Lins Product Engineer at Vercel Effect is so, so good. Error handling in TypeScript has always felt so haphazard. Effect makes it feel effortless. And that’s only a tiny part of what makes Effect such a great set of libraries. Keep up the great work! Devin Jameson Software engineer at PolyCam I LOVE Effect, been using it for a month now and it took a minute to figure out how to build composable services, but oh-my-god my code has never been this sexy. David Peter Functional programmer in TypeScript Delightfully, Effect is one of those rare tools that lift you up & educate you to become a better developer; Sustainably and well beyond the framework itself. And it does so both /effect/ively and *very* gently... Also, our community is *chefs kiss* Sebastian Lorenz TypeScript Engineer Effect is the 🐐 of TypeScript - Rust style error handling - Retries, Concurrency, Streams, … - Missing standard library Tobias Lins Product Engineer at Vercel Effect is so, so good. Error handling in TypeScript has always felt so haphazard. Effect makes it feel effortless. And that’s only a tiny part of what makes Effect such a great set of libraries. Keep up the great work! Devin Jameson Software engineer at PolyCam I LOVE Effect, been using it for a month now and it took a minute to figure out how to build composable services, but oh-my-god my code has never been this sexy. David Peter Functional programmer in TypeScript Delightfully, Effect is one of those rare tools that lift you up & educate you to become a better developer; Sustainably and well beyond the framework itself. And it does so both /effect/ively and *very* gently... Also, our community is *chefs kiss* Sebastian Lorenz TypeScript Engineer OKAY, SO WHAT'S THE CATCH? LEARNING CURVE Learning Effect can be quite daunting but it doesn’t take long for you to be productive. It’s similar to learning TypeScript. It’s worth it. DIFFERENT PROGRAMMING STYLE To ensure a high level of type-safety, composabilty and tree-shakability, Effect's programming style might be different from what you're used to. EXTENSIVE API SURFACE Effect has an API for every situation. While it may take some time to learn them all, a handful of the most common ones will get you a long way. FREQUENTLY ASKED QUESTIONS CAN I INCREMENTALLY ADOPT EFFECT? Yes! Adopting Effect you can start by refactoring small portions of your app, usually the ones with higher complexity, and keep going as you see fit DOES EFFECT SCALE? Effect was built for production since the very beginning, we take good care of making everything as performant as possible, by providing you with better ways to deal with concurrency and great observability finding bottlenecks in your program becomes easy DO I HAVE TO KNOW FUNCTIONAL PROGRAMMING? No! While Effect makes usage of Functional Programming principles and patterns internally you can be proficient in Effect by simply using it as a smart Promise and forget that there is even a thing called Functional Programming THE LIBRARY IS HUGE, DO I HAVE TO KNOW IT ALL? No! Every module in Effect is made with a specific problem in mind that is deemed to be common enough but you don't need to know everything, in fact you can harness 80% of the productivity gain by just learning a few functions and 2-3 core modules. WHAT'S THE MINIMUM BUNDLE SIZE? The core of Effect is a runtime system that weights about 15k when compressed and tree-shaken, the rest scales with usage. If you end up using 100k of Effect code there is a good chance your app would have been 1Mb if not using Effect ANY MORE QUESTIONS? Feel free to reach out in our Discord community! Join our Discord -------------------------------------------------------------------------------- JOIN OUR WELCOMING COMMUNITY See all contributors Join Discord 2118+ community members 263 currently online See all contributors Join Discord 2118+ community members 263 currently online START TO BUILD ROBUST APPS IN TYPESCRIPT Effect makes it easy to build typed, robust & scalable applications. Check out our friendly documentation to get started. Get Started -------------------------------------------------------------------------------- MIT Licensed Copyright © 2024 Effectful Technologies Inc. GitHubDiscordTwitter DOCS * Getting Started * Guides * API COMPANY * Effectful LEGAL * Terms & Conditions * Privacy Policy * Contact Us