Skip to content

Coalesce Demystified

Understanding the Coalesce Rapid-Development Framework for ASP.NET Core Web Applications

Looking to develop an ASP.NET Core web application quickly and efficiently?

Meet Coalesce – a framework designed to boost your productivity when building interactive web applications. Web development is filled with time-consuming boilerplate development tasks. Using your Entity Framework data model, Coalesce scaffolds all the basic services required for your website. It does this by automating the creation of DTOs, API controllers, and TypeScript files based on the Entity Framework Core data model you create.

IntelliTect CTO Grant Erickson and Senior Software Architect Andrew Scott (two great minds behind Coalesce) discussed making the framework at the latest Spokane .NET Conference.

So, what exactly can Coalesce do? Let’s dive into some of its key features.

Code Generation

Instead of manually writing code for DTOs, API controllers, and TypeScript, you can create your data model and let Coalesce handle the rest. Coalesce generates a full suite of CRUD endpoints that you can use to build your front-end UI immediately. These endpoints have overridable methods, making them easy to customize as needed.

Extensibility

The framework is designed with flexibility and configuration in mind. You can easily modify how data is provided to the user and how actions like saving and deleting are implemented. This makes scenarios like validation and cascading deletes easy to implement. With Coalesce’s tiered model, you can choose the pieces you want to use and won’t feel boxed in.

Security

Coalesce takes security seriously and allows users to easily restrict access to specific classes, properties, and methods based on user roles. In a multi-tenant scenario, you can easily hide data from certain clients entirely. Coalesce also offers row-level security features, which can be implemented using custom data sources.

CRUD for EF Models

For each DbSet<> in your DbContext, Coalesce generates a full set of endpoints, including /get, /save, /delete, /count, and /list. You can quickly secure or omit these endpoints entirely using attributes or customize them further with custom Data Sources and Behaviors. Paging, searching, sorting, and filtering features are built-in. Every exposed model will get an automatically generated set of TypeScript classes that allow for simple invocation and binding on the client. Features like auto-save and debouncing are handled automatically.

Endpoints for Methods

If you have client requests that don’t fit the standard CRUD mold, Coalesce has you covered. You can add methods to your entities and annotate them with [Coalesce] to generate controllers and TypeScript automatically. These instance or static methods can accept and return complex types and include full TypeScript wrappers that allow for features like loading indicators and easy data binding.

Wrapping Up

Coalesce is a robust framework that can help you create ASP.NET and Entity Framework web applications quickly and efficiently and have a lot more fun doing it. With its code generation, extensibility, and security features, you can focus on the models, business logic, and user interface rather than on the boilerplate.

Ready to get started with Coalesce? Check out the documentation on GitHub to learn more about all its features and how to get started.

Want More?

Once you’ve built your new web application with Coalesce, you should add some automated UI testing! Check out Mike Curn’s talk on testing webpages using Playwright to learn how to get started.

Does Your Organization Need a Custom Solution?

Let’s chat about how we can help you achieve excellence on your next project!