npm.io
3.0.0 • Published 1 month agoCLI

breeze-client

Licence
MIT
Version
3.0.0
Deps
0
Size
2.5 MB
Vulns
0
Weekly
0
Stars
1

Breeze

Breeze Data Management for JavaScript Clients

Breeze is a library from IdeaBlade that helps you manage data in rich client applications. If you store data in a database, query and save it as complex object graphs, and share those graphs across screens, Breeze is for you.

Client-side querying, caching, dynamic object graphs, change tracking and notification, model validation, batch save, offline — all part of rich data management with Breeze. Breeze clients talk to any remote service that speaks HTTP and JSON.

This is breeze-client 3, published to npm as breeze-client 3.0.0. 2.x is maintained in breeze-client.

What v3 is

Same public API, rewritten for modern TypeScript, with a build you can read in one sitting.

  • ESM only, one package, one npm tag. No CommonJS, no UMD, no mjs/cjs dist-tags.
  • One tsc invocation. No ng-packagr, no second node_modules, no downlevel-dts.
  • No runtime dependencies.
  • Knockout, jQuery, AngularJS and OData removed, including CSDL/EDMX metadata parsing.
  • Angular support moves to its own package so Angular and RxJS stay out of the core build.

Source is 42 files / 15,630 lines, down from 51 / 19,708.

Documentation

UPGRADE.md Converting an app from 2.x — every consumer-facing change
TESTING.md Running the tests — creating the database, starting the server
DOCS.md Building and viewing the docs — the guides and the API reference
BUILD-AND-PACK.md Packing the library and trying it in another app without publishing
CHANGES-DEV.md Structural changes, for people working on Breeze itself
STATUS.md What is done, what is in flight, what is next

The user documentation is at breeze.github.io/breeze-client-v3. The 2.x documentation is still at breeze.github.io/doc-js.

Install

npm install breeze-client
import { EntityManager, EntityQuery } from 'breeze-client';

const em = new EntityManager('/breeze/Northwind');
const { results } = await em.executeQuery(EntityQuery.from('Customers').take(10));

That is all a Breeze .NET server needs. There are no adapters to import or register, and property names are camel-cased by default: CompanyName on the server is companyName on the client. If your server already sends the names the client should use, call NamingConvention.none.setAsDefault() at startup, before creating an EntityManager. 2.x defaulted to none — see UPGRADE.md.

Building

npm install
npm run typecheck     # tsc --noEmit
npm run build         # -> dist/

Server

The .NET server lives in breeze-server-v3. The integration tests in this repo run against it.


If you have discovered a bug or missing feature, please create an issue.

If you have questions about using Breeze, please ask on Stack Overflow.

If you need help developing your application, please contact us at IdeaBlade.

Keywords