So I'm having some level of difficulty with architecting a particular solution with some dynamic data elements....
So I've got two places where I'm storing data -- a database and a pdf (although I only write to the pdf - I never read from it). You can think of the pdf working a lot like a database -- except that the schemas for the table and the pdf are different. Different fields will go into the database and the pdf. Users will be able to edit certain fields -- but not all fields. I'm trying hard to enforce a separation of UI and logic here, but I'm running into difficulties. My logic is essentially having to tell my UI what UI elements to create and what restrictions to enforce on them (required, options, etc) so I feel a bit like I'm making a UI from within my business logic; but I don't really know how else to do this with dynamic data elements. When this is done, I have to write to the database and then print the pdf.
You can essentially think of this question as... "I have a ton of disparate data. I need to do different things with different pieces of data. I can't figure out a way to do this generically without making some coding atrocity." Does anyone have any ideas?