This question sprung from a web application, although it should be valid for other types of applications too. I am using MVC.
I have both application code (modeles, views, controllers, forms, helpers, etc.) and library code (external libraries and an internal library with self-written database mappers, json converters etc.).
I wonder where you usually draw the line between application and library code (when both is internally written)?
Some of the library code gets rather project specific, but is still a bit abstracted.