javascript - Building a Graph Editor - How to create a data driven graph -


i'm developing graph-editor uses drag , drop build hierarchical graphs (containing nodes , links), each node in graph should linked table in our database (sql server), did lot of research libraries based on javascript or/and json specifications draw nodes , links, there lot of great examples follow. have no idea way can link graph database (sql server, oracle, mysql...). thought architecture :

technical architecture

i have looked @ d3 library , creates data driven charts think uses flat files, , not relational databases. first can please tell me if architecture thought out? , secondly can give me ideas way can link graphs dbms.

thanks lot.

lets node deserialized following poco:

public class node {     public int id {get;set;}     public string name {get; set;}     public list<int> outboundconnection {get;set;}     public list<int> inboundconnection {get; set;} } 

the id field database. use keep track of object. assuming each row/node/.. has unique id, need keep around through out life cycle of object (query -> poco -> json -> d3). id link d3 dataset sql server rows.

i hope helps general outline.

  1. set web project, expose web services d3 use.

  2. create web service query nodes. return data json.

    d3 has api web serivces

you might want in automapper, makes super easy convert datatable/reader poco. or dto/oom framework in favorite language.

in web service: create connection database, query needed tables, execute query, turn returned data in class object (automapper), return ever structure constructed json.

now, since id kept throughout life cycle, can make requests web service id parameter.

so, example, if wanted delete note. make http delete request (jquery comes in handy here) web service endpoint accepts id parameter.

or if want remove connection node, create web service takes 2 ids, or id of connection (if have schema set way).

you want hook on unique graph data.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -