On Thu, 09 May 2013 09:53:35 -0400, Lynn Nichols <lynn at starstruckdesign.com> wrote: > I have a client that has an online calculator... it figures out the > amount of silica gel that's needed to work with their product. You input > a bunch of data, it calculates and returns the answer. When I first was > asked to have the code written for this, the client didn't specify that > the code was "top secret" so it was written in javascript. However, now > they have decided that they would like the code hidden and there's > obviously no way to do this with javascript. > > And since they want to sell the calculator code to their distributors, > we'll be getting a new domain and hosting it separately from their website. > > I'm talking to one coder who suggests doing it in Python using CGI and > an Ajax call, but I'm open to other suggestions... is this something > that can be written in PHP? Another language? > > Is there anyone out there in HT land who would be perfect for this job? Doing it via a Python script and an Ajax-type call sounds perfectly reasonable to me (you might not even need the Ajax depending on the complexity of the input). Although I don't really think it is necessary, I will point out (because only the customer knows where they fall on the cost-vs-amount-of-security spectrum) that it is possible to get even more paranoid. My company recently did a job similar in spirit to this, converting a proprietary back-office windows ap that generated some cryptographic keys into a web-based form talking via a REST API to a Python application running on a secured server behind their corporate firewall. The customer is very happy with the result. In the above scenario your customer would be selling their distributors access to the REST API and some javascript to put on their site that talks to it, but they would then have the responsibility for maintaining the server infrastructure with high availability, so they may not want to go that route for that reason alone :) Although one big advantage of the scenario is the distributor doesn't need any special setup on their web server, they just put the provided javascript into their web pages at the appropriate place. Oh, and as far as javascript goes, these days there *are* ways to run javascript server side, so that might also be an option. It would still involve some re-coding, obviously, but the core of the algorithm would probably work just fine. Personally I'd prefer to rewrite it in Python, though, especially if the code is being sent to distributors. I don't think the server-side javascript is as easy to get set up as server-side Python, but since I've never done server-side javascript myself I can't say that for sure, you'd want to check. --David