Skip to content

To learn how to use client-server communication, dartling and MongoDB.

Notifications You must be signed in to change notification settings

dzenanr/todo_mongodb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Todo MongoDB

Project based on Target 11: Use IndexedDB, Using Dart with JSON Web Services, [dartling] (http://pub.dartlang.org/packages/dartling) and mongo_dart: MongoDB driver for Dart.

Client

  • client uses locally IndexedDB
  • client starts by loading data from IndexedDB
  • local data saved in IndexedDB by default
  • client has 2 buttons: To server and From server
  • To server (POST) integrates local tasks to data on the server
  • From server (GET) integrates server data to local tasks

Server

  • when server starts, it loads data from MongoDB to the model in main memory
  • when the model in main memory changes, the database is updated
  • server programming uses the model in main memory and not the database

Use

  1. no need to create a database before 2; however, do not forget to start the MongoDB server (mongod; Ctrl-C to stop it)
  2. run bin/server.dart in Dart Editor; it runs when you see in the server.dart tab in Dart Editor: Server at http://127.0.0.1:8080; if it does not run, use Run/Manage Launches
  3. run client (todo_client_idb/web/app.html) in Dartium
  4. run client as JavaScript (todo_client_idb/web/app.html) in Chrome
  5. use the client app in Dartium:
    1. From server to integrate server data locally
    2. add, remove and update tasks (saved locally in IndexedDB by default)
    3. To server to integrate local data to server
  6. use the client app in Chrome:
    1. From server to integrate server data locally
    2. add, remove and update tasks (saved locally in IndexedDB by default)
    3. To server to integrate local data to server

Paper

Dart Server with Dartling and MongoDB

About

To learn how to use client-server communication, dartling and MongoDB.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published