开发者

Creating Graph - Which Language? [closed]

开发者_运维知识库 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 10 years ago.

I have an idea for creating graph like the "social graph" application from facebook,for my site.

I want this to be on application on the internet and as a software,that will the user on the center and the his friends from the site sorrounding him, with a features to zoom to specific people and to show his last message at the forum,his name,his picture and to search for a specific user.

I don`t know which programming should I use?

I know HTML(4/5),CSS,JavaScript,Server Side Languages(PHP/Ruby/Python) and C#.

I would like to get suggestions about programming language and about specific technology.

Thanks a lot,Yosy Attias


It sounds like you are looking for suggestions for technologies for visualizing graphs and not how to manipulate them programatically.

If that is the case, there are a couple of options that I know of. One option is to draw upon the ecosystem of open-source tools associated with graphviz. I've used Graphviz tools to generate SVG output for a web page. Graphviz expects the graphs to be defined in a language called DOT. Here is an example of DOT code that defines a graph of three nodes (A,B and C) where A is related to B, B is related to C and C is related back to A:

graph myfriendgraph {
a -- b -- c -- a
};

You could make this a directed (edges connecting nodes have a 'direction' which means something) graph like so:

digraph myfriendgraph {
a -> b -> c -> a
};

DOT is a very efficient language for graphs but it is not XML which might be an issue for you depending on your system's design.

If you want an XML-based graph definition language, you might want to try out the Automated Graph Layout library which uses DGML. If you have an MSDN subscription you can download the library for free. I'm pretty sure this is the same library that is used in VS2010 for displaying DGML files. DGML looks like this for the second (directed graph) DOT example above:

<?xml version='1.0' encoding='utf-8'?>
<DirectedGraph xmlns="http://schemas.microsoft.com/vs/2009/dgml">
  <Nodes>
    <Node Id="A" Label="A" />
    <Node Id="B" Label="B" />
    <Node Id="C" Label="C" />
  </Nodes>
  <Links>
    <Link Source="A" Target="B" />
    <Link Source="B" Target="C" />
    <Link Source="C" Target="A" />
  </Links>
  <Properties>
    <Property Id="Label" Label="Label" DataType="String" />
  </Properties>
</DirectedGraph>

The microsoft library allows for rendering to a windows app or web page.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜