hipster_mvc 0.3.0

  • README.md
  • Installing
  • Versions
  • 16

Hipster MVC #

The MVC library for Dart, inspired by Backbone.js and used extensively in the Pragmatic Programmers book, "Dart for Hipsters".

API Documentation.

Getting Started #

A fully functional sample app is available at dart-comics.

Displaying a collection of resources is as simple as defining model, collection and collection view classes and then instantiating them:

import 'Collections.Comics.dart' as 'Collections';
import 'Views.Comics.dart' as 'Views';

main() {
  var my_comics_collection = new Collections.Comics()
    , comics_view = new Views.Comics(
        el:'#comics-list',
        collection: my_comics_collection
      );

  my_comics_collection.fetch();
}

If the backend exposes a REST-like API, your collection and model classes can be very brief.

A Collection Example #

library comics_collection;

import 'package:hipster-mvc/HipsterCollection.dart';

import 'Models.ComicBook.dart';

class Comics extends HipsterCollection {
  get url => '/comics';
  modelMaker(attrs) => new ComicBook(attrs);
}

A Model Example #

library comic_book;

import 'package:hipster-mvc/HipsterModel.dart';

class ComicBook extends HipsterModel {
  ComicBook(attributes) : super(attributes);
}

History #

  • 0.2.0 — New import / library support. Method signature for EventListenerList#add has changed again.
  • 0.1.0 — Initial release, ready for Dart M1.

More information #

This grew out of a series of blog entries at: http://japhr.blogspot.com/search/label/dart

License #

This software is licensed under the MIT License.

Copyright Chris Strom, 2013.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Use this package as a library

1. Depend on it

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


dependencies:
  hipster_mvc: ^0.3.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:hipster_mvc/hipster_collection.dart';
import 'package:hipster_mvc/hipster_history.dart';
import 'package:hipster_mvc/hipster_model.dart';
import 'package:hipster_mvc/hipster_router.dart';
import 'package:hipster_mvc/hipster_sync.dart';
import 'package:hipster_mvc/hipster_view.dart';
  
Version Uploaded Documentation Archive
0.3.0 Nov 6, 2013 Go to the documentation of hipster_mvc 0.3.0 Download hipster_mvc 0.3.0 archive
0.2.12 Oct 10, 2013 Go to the documentation of hipster_mvc 0.2.12 Download hipster_mvc 0.2.12 archive
0.2.11 Sep 1, 2013 Go to the documentation of hipster_mvc 0.2.11 Download hipster_mvc 0.2.11 archive
0.2.10 Sep 1, 2013 Go to the documentation of hipster_mvc 0.2.10 Download hipster_mvc 0.2.10 archive
0.2.9 Aug 31, 2013 Go to the documentation of hipster_mvc 0.2.9 Download hipster_mvc 0.2.9 archive
0.2.8 Aug 31, 2013 Go to the documentation of hipster_mvc 0.2.8 Download hipster_mvc 0.2.8 archive
0.2.6 Jun 9, 2013 Go to the documentation of hipster_mvc 0.2.6 Download hipster_mvc 0.2.6 archive
0.2.5 Mar 12, 2013 Go to the documentation of hipster_mvc 0.2.5 Download hipster_mvc 0.2.5 archive
0.2.4 Dec 21, 2012 Go to the documentation of hipster_mvc 0.2.4 Download hipster_mvc 0.2.4 archive
0.2.3 Dec 20, 2012 Go to the documentation of hipster_mvc 0.2.3 Download hipster_mvc 0.2.3 archive

All 14 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
32
Health:
Code health derived from static analysis. [more]
--
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
--
Overall:
Weighted score of the above. [more]
16
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://dart.dev/dart-2#migration.

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.