w_service 1.1.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 0

w_service

Pub Build Status codecov.io documentation


DEPRECATED

This library has been deprecated in favor of w_transport. All of the functionality provided by this library has been covered by w_transport.


Platform agnostic library for sending and receiving data messages between an application and a server with the ability to shape traffic and transform data through the use of message interceptors.

What?

The w_service package provides a data transport layer that makes message preparation, data transformation, and traffic shaping easy.

w_service does not directly interact with data transport protocols like HTTP and WebSocket. It utilizes w_transport - a platform-agnostic library with ready to use transport classes for sending and receiving data.

Why?

Creating a service API often starts out with a simple interface between client and server with some basic error handling. But, as an application grows, the demand for a higher quality service tier inevitably arises. The wish list usually includes more sophisticated fault tolerance, retry logic, data transforms, and traffic shaping.

w_service's goal is to provide you with classes and patterns designed with these ideas in mind so you can scale your service tier to handle comprehensive use cases while eliminating unnecessary complexity.

How?

w_service includes ready to use classes for immediate consumption and is built with extensibility and composability in mind for more customized applications. It makes data transformation and traffic shaping easy by leveraging the interceptor pattern to compose independent pieces of logic into a single workflow for every single service message.

This is accomplished through the use of Providers, Interceptors, and an InterceptorManager.

For more detailed information on these concepts, check out the w_service wiki.

Platform Agnostic

The main library (w_service/w_service.dart) is built on w_transport (also platform-agnostic) and depends on neither dart:html nor dart:io, making it platform agnostic. This means you can use the w_service library to build components, libraries, or APIs that will be reusable in the browser AND on the server.

The end consumer will make the decision between client and server, most likely in a main() block.

Usage in the Browser

import 'package:w_service/w_service_client.dart' show configureWServiceForBrowser;

void main() {
  configureWServiceForBrowser();
}

Usage on the Server

import 'package:w_service/w_service_server.dart' show configureWServiceForServer;

void main() {
  configureWServiceForServer();
}

Development

This project leverages the dart_dev package for most of its tooling needs, including static analysis, code formatting, running tests, collecting coverage, and serving examples. Check out the dart_dev readme for more information.

Changelog

1.0.0

  • Initial version of w_service.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  w_service: ^1.1.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:w_service/w_service.dart';
  
Version Uploaded Documentation Archive
1.1.0 Aug 11, 2016 Go to the documentation of w_service 1.1.0 Download w_service 1.1.0 archive
1.0.2 Sep 4, 2015 Go to the documentation of w_service 1.0.2 Download w_service 1.0.2 archive
1.0.1 Jun 26, 2015 Go to the documentation of w_service 1.0.1 Download w_service 1.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
0
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.9.0 <2.0.0