Search code examples
javaphpjquerygraphic

Outputting a data driven generated graphic which can be modified by the user


I'm trying to develop a system whereby clients can input a series of plant related data which can then be queried against a database to find a suitable list of plants.

These plants then need to be displayed in a graphic output, putting tall plants at the back and small plants at the front of a flower bed. The algorithm to do this I have set in my mind already, but my question to you is what would be the best software to use that:

1) Allows a user to enter in data

2) Queries a database to return suitable results

3) Outputs the data into a systemised graphic (simple rectangle with dots representing plants)

and the final step is an "if possible" and something I've not yet completely considered:

4) Allow users to move these dots using their mouse to reposition if wanted

--

I know PHP can produce graphic outputs, and I assume you could probably mix this in with a bit of jQuery which would allow the user to move the dots. Would this work well or could other software (such as Java or __) produce a better result?

Thanks and apologies if this is in the wrong section of Stack!


Solution

  • Your question is a bit vague. To answer it directly, any general programming language these days is able to do what you want, with the right libraries - be it C/++, Java, PHP+Javascript, Python, Ruby, and millions of others With Java in particular, you'll probably want to use the swing toolkit for the GUI.

    If you do know PHP+Javascript exclusively, it's probably best for your project to stick to what you know. If, however, you see this more as a learning opportunity than a project that needs be done NOW, you could take time to learn a new language in the process.

    As to what language to learn, each person has a different opinion, obviously, but generally speaking, a higher-level a language is faster to prototype in.

    EDIT

    If you need this for a website, however, you'll need to use something web based - that is, you'll necessarily have two programs, one that runs server-side, the other one in the client (browser). On the server side, you could very well use PHP, JSP (JavaServer Pages), Python or Ruby. On the client side, you'll be limited to Javascript+DOM (maybe HTML5), a Java applet, or something flash-based.