I am currently designing a business app and I have a few questions. For some background, my application is split up into UI layer, Business Layer and Data Layer. It is a multiform app that the user selects certain options from a backend db and adds other input. It uses the user input and applies business rules (calculations...) to the data. Then it displays a report and saves the application data to file (xml) and later down the road it might save to a db. I am having a problem designing the business layey (business entities). I am trying to decide how to save the user input (during the life of the application) especially since the user input will be needed in different areas of the program and it will need to be saved as a xml file and have the capabilities to be saved to a db (future possibility). I am toying with the idea of using typed datasets however one area that typed datasets cannot meet is the criteria (user data) is dynamic in the fact that it changes based on user input (options for certain choices). I would have to manually add each column and row; it is not that bad. However, the typed datasets are great for either saving to a xml file or db. I decided against custom business entities because why reinvent the wheel that typed datasets have. So, my first question are typed datasets the norm? Any other choices?
I am also looking for a design reccomendation on how to use the business entities. I am going to create 3 to 4 business entities that will model the user data into logical categories (tables). Since, these entities will be needed throughout the application is it better to create a main business entitiy that has static members of each business entity and then when I want to save to file I can make this class serializable or put logic to save each business entity to db (calling the right business object for each business entity? Or when I need access to each entity I just call the main entity to get the data. Is this a good idea? I am just a bit confused on the best approach, before .Net I used a temp file for user data serialization however I am looking for a .Net approach with typed datasets/business entities.
Thanks and any ideas would be appreciated!