Reputation: 584
Here's my dilemma, we're looking at building a new version of an online toolset. Basically we have custom pages to store information. Now, the dilemma is that we are trying to make things a little less static and we have 2 methods proposed for doing it.
In your opinions what would be the optimal solution?
For the most part we store the data, although we have a few reports that are built off of the information as well. There are some lightweight calculations that are done, but it's mostly done through javascript.
I've been pushing for database driven pages since it would allow us to use the same code-base for each client. But I want to know if there are alternatives or if the XML idea would be a better option.
Edit:
Just to clarify we'll continue to store the data through our Oracle database, but we're debating on how the pages should be handled.
I think we should store all of the page related information through the database, including elements and functions. That way we have a central template (view) and we use the controller to build the pages based off of the information in our model.
The other option that has been discussed is building the views with XML and we just load a different xml file based on the page.
Upvotes: 0
Views: 192
Reputation: 32905
Have you heard of MongoDB? Schema-less DB might be what you're looking for.
http://slidesix.com/view/MongoDB-RIAUnleashed-2010
Upvotes: 0
Reputation: 12446
To be honest I keep away from XML for data representation in all cases except for information exchange.
But this sentence caught my eye:
I've been pushing for database driven pages since it would allow us to use the same code-base for each client.
This sounds to me like a compelling reason. We use multi-branded websites and all we need to do is drop in a new configuration file and some new CSS and bingo - new branded website. I cannot emphasize how important this is in terms of maintenance.
If your XML approach doesn't allow this then going with a database is a no-brainer.
Upvotes: 4
Reputation: 1853
I thought about too alternatives: 1.Using Json, which is pretty similar to using xml. 2.implement a database that works just for an application, such as what you can do with sqlite.
Upvotes: 0
Reputation: 2260
Store the page information in a database and build the pages dynamically. This will give you the greatest amount of flexibility. It will allow for custom queries to return datasets that would otherwise require you to loop through and parse every XML file.
Also, if speed is a concern consider caching the output of your database queries. This can be done in many ways at various levels of your application.
Upvotes: 2