views:

49

answers:

3

We want a web app that allows a user to edit images on the browser and we're trying to decide which technology to use. We want to support simple image customization, such as high-quality resizing, cropping, image merging, and color transformations, as well as the addition of text elements with different fonts and colors.

The current options are:

  1. Flash: no worries about cross-browser compatibility; could use same image library on client and server; no iPhone/iPad support.
  2. Java (compiled to javascript with GWT): need to find a good image library in pure Java so it can be compiled to JS.
  3. Plain old javascript + HTML5: may be a mess due to multiple browsers; may need to write image editing code from scratch.

Here's what's most important to us / criteria for choosing:

  • Image consistency: the image that the client edits on the browser must be exactly the same as the one we'll eventually use on the backend. We can achieve this by (a) having the same library both on the client and server to process images, (b) having the client generate the image and upload it to the server, or (c) use two different image processing libraries on the client/server and hope for the best in terms of consistency. Option (a) seems best, but it would only be possible if we use Flash or Java/GWT. We don't like option (b) because the images are large; we'd rather save a sequence of operations to perform on a raw image than saving multiple transformed images. And we don't really know if option (c) is safe or not.
  • Scalability: We prefer the client to do as much work as possible to decrease server load.
  • Image quality must be kept high
  • Cross-platform: We'd like to support as many platforms as possible without rewriting everything (big negative for Flash due to iPhone/iPads).

What path do you recommend? Are there any alternative we're missing?

Thanks for any help!

A: 

We went with 3 because Java applets are pretty much dead and we don't like Flash. HTML5 is, hopefully, the future.
GWT sounds like an interesting option but we couldn't use it because server side is .NET. Writing image editing code is fun :)

MK
I'm sad that "we don't like Flash" is what it came down to.
Tegeril
What's wrong with not liking a technology?
MK
nothing wrong , but wouldn't you agree that "don't use this because i don't like it" is not a very helpful answer.
PatrickS
@MK did you consider Silverlight?
Allan
@Allan no, we try no to be locked to Microsoft when possible.
MK
A: 

I would choose JS + HTML5\canvas. If you're just in the beginning of writing that app and there are no dependencies on technology, it's the best choice. Browsers are getting better rapidly in contrast to Flash or Java plugin(40-60% of desktops got it?). The only creepy monster that holds the revolution is IE, but I think IE9 will bring us to the new era, where we can make really cool cross-browser apps on the web using new standards :) So you can start now, and 2-3 months later IE9 will come with canvas support and all that fancy stuff. All other browsers are ready right now, but they will evolve and improve JS engine speed. I hope :)

gothy
But until IE9 becomes widespread (which will be a while), you're basically saying "screw you" to all your IE users.
musicfreak
Windows XP users will be out of luck.. that is a big market share..
Allan
Indeed... it seems it'll be at least a few years until the percentage of users on IE8 or below is small enough to be negligible (allowing us to tell them "screw you" for living in the past)
rod
Millions of users on windowsXP are using normal browsers, they are not limited to IE :)
gothy
But millions more are still stuck using IE, for whatever reason. Simply throwing away IE support is pushing away more than half your potential customers. (IE is still the majority browser.)
musicfreak
+2  A: 

Definitely Flash. If you go with JavaScript and HTML5, you are basically saying "screw you" to all the IE users. Flash's rendering engine is quicker for these things than the browser would be, and the speed would be consistent across all browsers. Also, Flash has very powerful image-manipulating libraries built-in, whereas in JavaScript you'd have to write them yourself.

musicfreak
@musicfreak I agree with you. @rod See Aviary and Picnik for examples of what is possible for image editing with Flash/ActionScript.
Wade Mueller
Thanks for the answers.. I guess a negative for Flash is that nobody in our team has used it before.. I guess we'll have to learn :)Would you recommend doing this in Flex instead of in plain flash?Lastly, what about just javascript, without the use of HTML5?
rod
@rod: Flex is a great framework, and I'd highly recommend it for Flash-based development. It's fairly easy to pick up, although I admit I haven't built anything as powerful as an image editor in it, so take that with a grain of salt. As for just JavaScript without using HTML5, your performance is going to suffer greatly compared to Flash, especially for lower-end browsers (read: Internet Explorer). I wouldn't recommend it. If you do end up using JavaScript, try to take advantage of HTML5 features such as `<canvas>` in browsers that support it, and gracefully degrade in browsers that don't.
musicfreak
@rod: Also, to make feature detection (for things like `<canvas>`) easier, take a look at [Modernizr](http://www.modernizr.com/).
musicfreak