This guide provides best practices and tips for developing applications with BRX. Whether you’re building a simple prototype or a complex production application, these guidelines will help you make the most of the BRX platform.
Design your BRKs to be modular and reusable. Each BRK should have a single responsibility and do it well.✅ Good: Separate BRKs for data extraction, analysis, and report generation
❌ Bad: A single BRK that does everything
Always validate inputs to your BRKs to ensure they meet the expected format and constraints.
Copy
// Before executing a BRK, validate its inputsif (!myBrk.input['data'] || typeof myBrk.input['data'] !== 'string') { throw new Error('Data input must be a non-empty string');}
When creating BRKs with dependencies, be mindful of the dependency graph to avoid circular dependencies and excessive nesting.✅ Good: A clear, directed acyclic graph of dependencies
❌ Bad: Circular dependencies or deeply nested dependencies