w_service 1.1.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 32

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.

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 failed Download w_service 1.1.0 archive
1.0.2 Sep 4, 2015 failed Download w_service 1.0.2 archive
1.0.1 Jun 26, 2015 failed Download w_service 1.0.1 archive

Analysis

We analyzed this package on Apr 23, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.49.0
  • pana: 0.10.6

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
22 / 100
Health:
Code health derived from static analysis. [more]
70 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0 / 100
Overall score:
Weighted score of the above. [more]
32
Learn more about scoring.

Platforms

Detected platforms: unsure

Error(s) prevent platform classification:

Error(s) in lib/w_service_diagnostic.dart: Target of URI doesn't exist: 'package:react/react.dart'.

Suggestions

  • Fix platform conflicts.

    Error(s) prevent platform classification:

    Error(s) in lib/w_service_diagnostic.dart: Target of URI doesn't exist: 'package:react/react.dart'.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 52 errors 14 hints.

    Make sure that the imported libraries are not in conflict. Error(s) in lib/w_service_diagnostic.dart: Target of URI doesn't exist: 'package:react/react.dart'.

    Strong-mode analysis of lib/src/diagnostic/components/collapsible_panel.dart failed with the following error:

    line: 62 col: 5
    The method 'setState' isn't defined for the class '_CollapsiblePanel'.

    Similar analysis of the following files failed:

    • lib/src/diagnostic/components/detailed_message_view.dart (error)
    • lib/src/diagnostic/components/diagnostic_panel.dart (error)
    • lib/src/diagnostic/components/message.dart (error)
    • lib/src/diagnostic/components/message_stats.dart (error)
    • lib/src/diagnostic/components/message_ticker.dart (error)
    • lib/src/diagnostic/components/provider_panel.dart (error)
    • lib/src/generic/interceptors/csrf_interceptor.dart (error)
    • lib/src/http/http_context.dart (error)
    • lib/src/http/http_future.dart (error)
    • lib/src/http/http_provider.dart (error)
    • lib/src/diagnostic/diagnostic_interceptor.dart (hint)
    • lib/src/diagnostic/diagnostics.dart (hint)
    • lib/src/diagnostic/provider_diagnostics.dart (hint)
    • lib/src/generic/interceptors/json_interceptor.dart (hint)
  • The description is too long.

    Search engines will display only the first part of the description. Try to keep it under 180 characters.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use w_service.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.9.0 <2.0.0
fluri >=1.0.1 <2.0.0 1.2.4
w_transport >=1.0.1 <2.0.0 1.0.1 3.2.2
Dev dependencies
browser ^0.10.0+2
coverage ^0.7.2
dart_dev ^1.0.0
dart_style ^0.2.0
dartdoc ^0.8.0
mockito ^0.10.0
react ^0.7.0
test ^0.12.4