Fortune_Hunter - 3:43 pm on Aug 3, 2010 (gmt 0)
If your client wants a no-compete clause, he should add it into the contract. If your client wants full ownership of the application (i.e., preventing you form re-using the code on any other project), he should add that into the contract as well (that should correspond to a higher payment to you as well).
I completely agree with Asia on this and have faced this issue personally, but I also learned from hard won experience that I would try really, really, hard to not let yourself get pinned down by a non-compete. These agreements can really kill your business over time as you start getting pinned down by them and find there are entire industries you can't work in for a year or more. Even if you get a higher fee up front for agreeing to this term you may find that you would have gotten a lot more revenue by building this application for other firms instead of selling it to only one firm for a higher fee.
You may want to explore licensing as solution. You essentially own the license and you allow the client to have a non-exclusive license to this application as part of the project fee. This shouldn't be an unreasonable request, after all Microsoft didn't sell Windows to one company, instead the exact same application is used by everyone who has a non-exclusive use to the software including direct competitors to each other.
Personally, I would check out the Nolo guide on web and software development. I used this guide years ago and found it had a great document in there that explained in legal terms that the client might own the web site and application, but code, software, etc. were considered "tools of the trade" and hence were not the ownership of the client.
While I am not a lawyer I took the legal meaning to being the equivalent of a contractor building a house and while the client owned the house he wasn't allowed to tell the contractor he couldn't use 2x4, nails, hammer, blue prints, etc. in the building of someone else's house even if it looked similar upon completion.