Your apps are part of the iTunes library on your computer and they can also be downloaded again for free:http://support.apple.com/kb/HT2519
Photos taken with your phone, contacts and app data are part of the latest backup you made.
You can use this backup to restore your phone again.
To be on the safe side, copy the iphone backup folder to a separate place, in case you'll need it again.
See this article about backups for more details about the location of this folder and the content of the backup and how to use it to get your data back: http://support.apple.com/kb/HT1766