Via Ajaxian we get an object lesson in the dangers of exposing business logic in the browser:
Beau Hartshorne of Snipshot (formerly Pixoh) says “massive chunks” of Cellsea code are identical to Snipshot. “This is not an accidental inspiration. Check out the cropping code, the resizing code, and so on. We’ve also noticed that portions of their website are also stolen directly from ours … We are contributors to MochiKit open source project. However, the code in question is proprietary and was taken directly from out site.”
Can I say “I told you so?” I’ve blogged about the danger of Ajax and Leaky Business Logic before. What is the danger here and the lesson the be learned?
- Don’t put your crown jewels in the browser. See if you can’t lock a fair bit of your business logic on the server side by using a server-side component framework like Echo2 or ZK.
- Build in anti-theft mechanisms. This could be something as simple as a method that checks to see that the url the application is running on is the correct one, otherwise display a nasty message. You could make this as tricky and complicated as you like, all the way to encrypting big chunks of code with the website url and only decrypting them at runtime.
A combination of all of these may be what we end up with. I’m not sure I’d want to run any script in my browser, though, that I can’t understand. Still, you would hate to be the victim of code-theft as has apparently happened to Snipshot.
How similar are these two programs? Well, Cellsea offers a bunch more functions, but they do look very similar, both in terms of the UI and the underlying code. The original Snipshot is here and the knock off here. You be the judge.
If you are really hungry for a good AJAX image editing app, the best of the bunch of them may be Phixr, which gives you preview, the ability to marquee select for certain operations, etc. Slick, even if the UI is a bit jumpy.