You don’t have to cut it all in pieces. Its definitely much easier to maintain afterwards though.
If the data you are quering for is in the same database as the MODX database, you will not need to make the connection manually or sanitize data if you use xPDO objects to query stuff.
I personally find it easiest to use existing Extras to perform tasks like processing forms (FormIt) or keep track of comments (Quip). There’s quite a number of good extras in the repository and a lot in the works - and the community is more than happy to help you achieve your goals.
As for the very broad question "how to transform an existing php driven site to MODX" here’s a few steps (in somewhat random order) you should be taking:
- Setup your template(s) which tell MODX how to display your pages. This guide is quite detailed:
http://bobsguides.com/porting-your-site-to-modx.html
- Make resources for your pages where you enter the content, choose the right template.
- Use snippets for dynamic content (menus, member area), processing etc
- Enjoy the power and flexibility
If you have any specific questions, do let us know.