jaguar 0.6.19

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 82

Build Status

Jaguar

Jaguar is a production ready server framework built for speed, simplicity and extensiblity

Advantages of Jaguar

  1. Batteries included
    1. Database
      1. Fluent query builder
      2. ORM
      3. Migration support
      4. Various databases support
        1. Mongo
        2. PostgreSQL (Query)
        3. MySQL (Query)
        4. OracleDB
        5. MS SQL
    2. Authentication and Authorization
    3. OAuth
    4. Session management
  2. Build your routes the way you prefer
    1. Controller based
      1. Reflect
      2. Generate
    2. Mux based
  3. Extensible interceptor infrastructure
  4. Extensive respository of examples
    1. Annotation based
    2. Reflection based
    3. Mux based
    4. MongoDB
    5. PostgreSQL
    6. MySQL
    7. Upload files using Jaguar

Usage

Swiftly build REST Api

Below example shows how to add routes to Jaguar.dart server.

@Api(path: '/api')
class ExampleApi {
  /// This route shows how to write JSON response in jaguar.dart.
  /// [Response] class has a static constructor method called [json]. This
  /// method encodes the given Dart built-in object to JSON string
  @Get(path: '/hello')
  Response<String> sayHello(Context ctx) => Response.json({
        "greeting": "Hello",
      });


  /// This route shows how to read JSON request and write JSON response in
  /// jaguar.dart.
  @Post(path: '/math')
  Future<Response<String>> math(Context ctx) async {
    /// [bodyAsJsonMap] method on [Request] object can be used to decode JSON
    /// body of the request into Dart built-in object
    final Map body = await ctx.req.bodyAsJsonMap();
    final int a = body['a'];
    final int b = body['b'];

    return Response.json({
      'addition': a + b,
      'subtraction': a - b,
      'multiplication': a * b,
      'division': a ~/ b,
    });
  }
}

JSON serialization with little effort

TODO

Connect to MongoDB

TODO

Connect to PostgreSQL

TODO

Add user authentication

TODO

Join us on Gitter

Changelog

0.6.19

  • Bug fix for Session

0.6.18

  • Sessions are now only written when necessary
  • Added HMAC based signing to session data

0.6.14

  • Session in Request
  • SessionManager in Jaguar to parse and write session data

0.6.13

  • bodyAsText's encoding parameter is optional

0.6.12

  • Upgraded intl dependency

0.6.11

  • Bootstrapping root APIs using bootstrap method
  • Supports package:dice based DI during bootstrapping

0.6.10

  • Jaguar shall log only unknown exceptions

0.6.9

  • Return types of route handlers are now FutureOr

0.6.8

  • Mux methods now take response members
  • Definition of RouteHandlerFunc

0.6.7

  • wrap method on Jaguar

0.6.6

  • XML rendering support
  • New error rendering mechanism
  • Debug stream

0.6.5

  • Merged jaguar_reflect and jaguar_mux into jaguar core

0.6.1

  • Global interceptors

0.6.0

  • Context based RequestHandler

0.5.10

  • Expose Logger to Interceptors and Routes
  • Configurable ErrorWriter

0.5.9

  • Fixed writing headers to response by Response

0.5.4

  • Added redirect to Response class

0.5.0

  • Removed RouteWrapper
  • Removed injection

0.2.7

  • Added properly handling List<int> response type
  • Implemented Route redirection

0.1.14

  • Remove Settings from Configuration

0.1.13

  • Removed isolate creation. Control is given to the programmer.
  • Bug fix for "Page not found!" error

0.0.3

Breaking Changes:

Annotation to build annotation from annotated function has changed.<br>

  • PreProcessorFunction has changed to PreInterceptorFunction
  • PostProcessorFunction has changed to PostInterceptorFunction

jaguar.yaml parameters has also changed

  • pre_processors has changed to pre_interceptors
  • post_processors has changed to post_interceptors

1. Depend on it

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


dependencies:
  jaguar: "^0.6.19"

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:jaguar/jaguar.dart';
        
Version Uploaded Documentation Archive
0.6.19 Nov 5, 2017 Go to the documentation of jaguar 0.6.19 Download jaguar 0.6.19 archive
0.6.18 Nov 5, 2017 Go to the documentation of jaguar 0.6.18 Download jaguar 0.6.18 archive
0.6.17 Oct 5, 2017 Go to the documentation of jaguar 0.6.17 Download jaguar 0.6.17 archive
0.6.16 Oct 5, 2017 Go to the documentation of jaguar 0.6.16 Download jaguar 0.6.16 archive
0.6.15 Oct 5, 2017 Go to the documentation of jaguar 0.6.15 Download jaguar 0.6.15 archive
0.6.14 Oct 5, 2017 Go to the documentation of jaguar 0.6.14 Download jaguar 0.6.14 archive
0.6.13 Sep 18, 2017 Go to the documentation of jaguar 0.6.13 Download jaguar 0.6.13 archive
0.6.12 Sep 15, 2017 Go to the documentation of jaguar 0.6.12 Download jaguar 0.6.12 archive
0.6.11 Aug 4, 2017 Go to the documentation of jaguar 0.6.11 Download jaguar 0.6.11 archive
0.6.10 Jul 23, 2017 Go to the documentation of jaguar 0.6.10 Download jaguar 0.6.10 archive

All 66 versions...

Analysis

This feature is new.
We welcome feedback.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Dec 6, 2017
  • Dart: 2.0.0-dev.8.0
  • pana: 0.7.3+1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
70
Health:
Code health derived from static analysis. [more]
90
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
99
Overall score:
Weighted score of the above. [more]
82

Platforms

Detected platforms: server

All libraries agree

Suggestions

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.

Dependencies

Package Constraint Resolved Available
Direct dependencies
args >=0.13.7 <0.14.0 0.13.7 1.2.0
collection >=1.14.1 <2.0.0 1.14.3
crypto ^2.0.2 2.0.2+1
dice ^1.7.0 1.7.0
http_server >=0.9.6 <0.10.0 0.9.6
intl >=0.15.0 <0.16.0 0.15.2
logging >=0.11.3 <0.12.0 0.11.3+1
meta ^1.1.2 1.1.2
mime >=0.9.3 <0.10.0 0.9.4
mustache >=0.2.5+1 <0.3.0 0.2.5+1 1.0.0
quiver_hashcode >=1.0.0 <2.0.0 1.0.0
stack_trace >=1.7.0 <2.0.0 1.9.1
yaml ^2.1.12 2.1.13
Transitive dependencies
charcode 1.1.1
convert 2.0.1
path 1.5.1
source_span 1.4.0
string_scanner 1.0.2
typed_data 1.1.5
Dev dependencies
cookies
http
jaguar_client ^0.1.4
test ^0.12.15+10