Page 1 of 2

Devnetwork project idea!

Posted: Fri Mar 14, 2008 4:54 pm
by JellyFish
I just got this idea. Sometimes I would like to explain my self with images rather then words (after all a picture is worth a thousand of them).

So I had this idea of creating a simple HTML canvas editor that generates a URL to a php file with passed in parameters that tell that file to generate the image created with the editor, via php GD lib functions.

This would allow you to draw lines, circles, arcs, rectangles, etc. And all you would have to do to publish the end image, is copy the URL.

Why am I talking about this rather then just doing it. Because I would like to know DevNet's opinion, and if there is already such a tool. Would it be useful, what would you think that the pros and cons would be of this project. Also would you use/support this project?

Bottom line: just thought I'd throw it out there.

Re: Devnetwork project idea!

Posted: Fri Mar 14, 2008 8:09 pm
by alex.barylski
A picture is worth a 1000 words. :P

Check this out -- let us all express outselves with charts and diagrams. I meant to share this the other day but totally forgot. arborint and I were talking about his framework and I thought this would make for a neat tool to collaborate ideas of the architectural nature and even algorithmic kind via the flowcharts.

http://draw.labs.autodesk.com/ADDraw/draw.html

p.s-It's done in VML and javascript -- to demonstrate the power behind it.

Cheers :)

Re: Devnetwork project idea!

Posted: Fri Mar 14, 2008 8:10 pm
by Luke
I'm not sure how that would help you explain a php / programming related question. :?

EDIT - just to be clear this was in response to the original post, not Hockey's post :)

Re: Devnetwork project idea!

Posted: Fri Mar 14, 2008 8:15 pm
by alex.barylski
I'm not sure how that would help you explain a php / programming related question.
Look at his last question in the other thread -- trying to express his question using nothing but text was confusing, representing a chart of any kind is a PITA. Using a diagramming tool makes it a breeze.

How many times we try and ask how class dependencies should or shouldn't look -- a diagramming tool would make that much easier to express. I dunno man, I see countless opportunities for use of such a tool. I was pretty excited about it when I first discovered it's existance. :P

Re: Devnetwork project idea!

Posted: Sat Mar 15, 2008 6:32 am
by onion2k
One of my old projects, PHPhoto, sort of does this ... you can upload an image, add text to it, draw circles, lines, and rectangles on it, and edit them again (and a whole bunch of other stuff like effects, black and white conversion, flipping, watermarking, etc). The vector layers are held in an XML file as "layers" that a renderer redraws every time you view the image. It's a very long way off being finished, and the code is nasty PHP 4 procedural stuff, but it proved the concept worked.

You should definitely have a go at this. It's a grand idea. Fun to write too.

Re: Devnetwork project idea!

Posted: Sat Mar 15, 2008 8:32 am
by Chris Corbyn
There is a flash application called ffART which can do this sort of thing. It's a canvas with drawing tools, but nothing specific to UML diagramming or such like.

Re: Devnetwork project idea!

Posted: Sat Mar 15, 2008 4:14 pm
by JellyFish
ffART? lol :lol:

Yeah I mean it would help, not only with devnetwork but with other BB forums. But the idea would be that you get a url with the right parameters passed to a php file that generates the image. But what concerns me, I heard that there was some URL limit in IE? Would this effect the application?

Re: Devnetwork project idea!

Posted: Sat Mar 15, 2008 4:40 pm
by Luke
yea I laughed when I first heard the name ffArt too man. That's so funny. :lol:

Re: Devnetwork project idea!

Posted: Sat Mar 15, 2008 5:10 pm
by onion2k
JellyFish wrote:But what concerns me, I heard that there was some URL limit in IE? Would this effect the application?
1024 characters I believe, and it's a limit in the HTTP spec so it should affect all browsers. That need not be a problem though, just give the user a unique URL when they create their image ... like http://www.domain.com/imagescript/asd7823klnd9v ... then fetch the corresponding image using that reference to query a database of image details. That would actually be preferable because it would allow you to easily cache a version of the image rather than generating it again every time it's requested.

Re: Devnetwork project idea!

Posted: Sat Mar 15, 2008 5:18 pm
by JellyFish
onion2k wrote:
JellyFish wrote:But what concerns me, I heard that there was some URL limit in IE? Would this effect the application?
1024 characters I believe, and it's a limit in the HTTP spec so it should affect all browsers. That need not be a problem though, just give the user a unique URL when they create their image ... like http://www.domain.com/imagescript/asd7823klnd9v ... then fetch the corresponding image using that reference to query a database of image details. That would actually be preferable because it would allow you to easily cache a version of the image rather than generating it again every time it's requested.
http://www.domain.com/imagescript/asd7823klnd9v would include the php file that generates the image? I like the idea of sending the php the variables to generate the image: http://.../generator.php?w=100&height=100&i=sdf,jl,j3,24,5jonf,o,s,knfo,s,i,do,w,5,u,j3,490 the cryptic part is each image's pixel or something.

I wouldn't want people to have to login, that would require a large database of people; costs money.

Re: Devnetwork project idea!

Posted: Sat Mar 15, 2008 6:59 pm
by Chris Corbyn
JellyFish wrote:I like the idea of sending the php the variables to generate the image: http://.../generator.php?w=100&height=100&i=sdf,jl,j3,24,5jonf,o,s,knfo,s,i,do,w,5,u,j3,490 the cryptic part is each image's pixel or something.
That's really not what you should be using GET requests for. If you wanted to send per-pixel data it's almost certainly got to be in a POST request where the message body can have a much greater length.

Re: Devnetwork project idea!

Posted: Sat Mar 15, 2008 7:00 pm
by Chris Corbyn
I do agree this would be a great addition, provided it wasn't over-used. Who's got time to code and integrate such a tool I don't know ;)

Re: Devnetwork project idea!

Posted: Sun Mar 16, 2008 5:53 am
by onion2k
JellyFish wrote:http://www.domain.com/imagescript/asd7823klnd9v would include the php file that generates the image? I like the idea of sending the php the variables to generate the image: http://.../generator.php?w=100&height=100&i=sdf,jl,j3,24,5jonf,o,s,knfo,s,i,do,w,5,u,j3,490 the cryptic part is each image's pixel or something.

I wouldn't want people to have to login, that would require a large database of people; costs money.
I'm not suggesting anyone would need to log in. I'm just suggesting you have a single database record per image, and the URL includes a reference to that record. It'd be a lot more flexible than trying to include all of the image information in the URL. The reference could be used to load an image from a cache too, that will make the whole system a lot faster... generating an image is a really slow process so you need to cache them on the server-side.

Re: Devnetwork project idea!

Posted: Sun Mar 16, 2008 5:45 pm
by JellyFish
onion2k wrote:
JellyFish wrote:http://www.domain.com/imagescript/asd7823klnd9v would include the php file that generates the image? I like the idea of sending the php the variables to generate the image: http://.../generator.php?w=100&height=100&i=sdf,jl,j3,24,5jonf,o,s,knfo,s,i,do,w,5,u,j3,490 the cryptic part is each image's pixel or something.

I wouldn't want people to have to login, that would require a large database of people; costs money.
I'm not suggesting anyone would need to log in. I'm just suggesting you have a single database record per image, and the URL includes a reference to that record. It'd be a lot more flexible than trying to include all of the image information in the URL. The reference could be used to load an image from a cache too, that will make the whole system a lot faster... generating an image is a really slow process so you need to cache them on the server-side.
What kind of information would I record in a database? Would it be the 'per-pixel' rendering information?

Re: Devnetwork project idea!

Posted: Sun Mar 16, 2008 6:03 pm
by Luke
I hadn't considered drawing diagrams. That would be pretty useful. Good luck to ya. :)