On Fri, Apr 24, 2009 at 10:24 AM, Carmine <[email protected]> wrote: > > On Fri, Apr 24, 2009 at 2:41 PM, Masklinn <[email protected]> wrote: > >> 2. is possible to do a Django application without db? Are there any > >> ORM things that will do the same job for XML data instead? If not, is > >> possible to do that for mere mortals (with xpath/dom/sax as the > >> preferred ways)? > > Where are you storing your XML data exactly? > > The data is hardcoded in an XML file stored on the user's pc, and > uploaded to the server through an http POST. There's actually no need > for a DB. >
I'm having a hard time reconciling this statement with what you said in your first note: "The project is essentially a "server" web application that holds data in XML, and answer to queries on that data through a REST interface, and a "client" web application that queries the server's data and displays the results." So where is the persistent storage of this XML data? Always in a file on the client (is there only one client?), and POSTed to the server each time a client wants to run a query on the data? If so: why even have a server, why not just run the query processing on the client's data file directly? If instead, when the data is POSTed to the server it is then persistently stored there -- where is it stored? If not in a database, if in file(s) -- how does the server track what files have been uploaded to where, and what clients can access which files, etc. (I can't really believe there is only one client)? Or do all clients have a copy of the exact same file? Does it never change? If it does, how are you managing updating all the clients? (As you can tell, I'm having a hard time understanding your application.) For a web application you are generally going to have the core data for your app, and then a bunch of other stuff -- user definitions, permissions, sessions, etc. -- that facilities allowing clients to access/query/update your core data. If you want to store your core data in XML files rather than a database, you can do that. You won't be able to manipulate/query it with the Django ORM but Django won't stand in the way of you using whatever Python APIs there are for accessing XML data in files. (It also won't provide anything special in the way of supporting it either -- you are on your own in terms of finding what's out there to support whatever it is you want to do with these files.) Where do you plan to store the ancillary data associated with your web application -- things like user definitions, permissions, sessions? If your "no database" fiat extends to this data, you are going to have to re-implement a fair amount of function that Django would provide for you if you were just able to use a database. Honestly this database prohibition makes me think Django may not be the right tool for your task, as it implies a fundamental mismatch in world view. In the Django world, the database is generally considered a good place to store data. If you are coming from a world where databases are considered bad and must be avoided at all costs, that implies you are starting off in a very different place and will likely need to take approaches that are counter to normal Django practice, simply to avoid using a database. No doubt it can be done and you can take advantage of other bits of Django, but I'm not sure it would be worth the effort. Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

