XML in web apps

Discussion in 'Java' started by dbmaster1443@rediffmail.com, Jul 25, 2006.

  1. Guest

    I am new to XML as far as its actual usage in application is concern.
    My client has asked me to make use of XML in his project. At present my
    proposal is based on 3-tier architecture. In which a application front
    end talks to database using java based business logic. In other words
    it is simple insert, retrieval and updating of data in database. I am
    stuck up with the use of XML. My queries related to use of XML are as
    follows.
    (1)Shall I insert the data in XML file instead of database? If so will
    I have to create Individual XML files for each record or i have to keep
    append a single XML file? There are 42000 records. Whether 42000 unique
    XML files or single file of size close to 30-35 MB, in both cases
    performance will get hit. Am I right?
    (2)Where shall I store XML file, in file system (C or d drive) or in
    database directly as a Blob?
    What advantage will I get if i ditch my proposed architecture and adopt
    XML based system?

    John Snow
     
    , Jul 25, 2006
    #1
    1. Advertising

  2. wrote:
    > I am new to XML as far as its actual usage in application is concern.
    > My client has asked me to make use of XML in his project.


    Did he specify the way you should use XML. When XML is concerned its not
    very suitable for storage and quick retrieval. You should see it more as
    an generic exchange format.

    > At present my
    > proposal is based on 3-tier architecture. In which a application front
    > end talks to database using java based business logic. In other words
    > it is simple insert, retrieval and updating of data in database. I am
    > stuck up with the use of XML. My queries related to use of XML are as
    > follows.


    Does your client have any reasons for the use of XML in this project. As
    a requirement in a project is means just as much as 'use a programming
    language'. If the requiment was that the data should be stored as XML,
    you should consider asking why it should be stored as such. Maybe an
    export/import function is enough for your client.

    > (1)Shall I insert the data in XML file instead of database?


    If you must use XML to store business domain information, then you must.

    > If so will
    > I have to create Individual XML files for each record or i have to keep
    > append a single XML file?


    Maybe one XML file referencing several other XML files. You could build
    the index in the one and use an ID to reference to another XML file.

    > There are 42000 records. Whether 42000 unique
    > XML files or single file of size close to 30-35 MB, in both cases
    > performance will get hit. Am I right?


    If you need to search though them sequentually yes... you might cache
    search criteria in the memory of your app for more peformance.

    > (2)Where shall I store XML file, in file system (C or d drive) or in
    > database directly as a Blob?


    You might use an XML database:
    http://www.rpbourret.com/xml/XMLDatabaseProds.htm#native

    > What advantage will I get if i ditch my proposed architecture and adopt
    > XML based system?


    Well, your data will be easy to export, and you could transform it with
    XSL into serveral other types of data (like HTML)... PDF with XSTL-FO.
    But really.. domain data should be stored in a database and transported
    as for examle XML. The use of XML files as 'database' is like going back
    to the stone age when they use to store client information in
    text-files. Unless your client has a really good reason, its a bad idea
    to store information in XML. XML is just not suitable for it. It misses
    vital facilities like indexing and foreign key constraints.

    Vincent
     
    Vincent van Beveren, Jul 25, 2006
    #2
    1. Advertising

  3. Guest

    Thanks Vincent... I realized and appreciate your efforts and time which
    u spent for this task, and gave Inputs which are valuable for me. Again
    thanks for your quick response.
     
    , Jul 25, 2006
    #3
  4. wrote:
    > Thanks Vincent... I realized and appreciate your efforts and time which
    > u spent for this task, and gave Inputs which are valuable for me. Again
    > thanks for your quick response.
    >


    Well good luck in your endeavor. If you must use XML, use a native XML
    database. I have however never done something like that. Native XML
    databases do give you some performance advantages over just storing it
    in the file-system.

    Vincent
     
    Vincent van Beveren, Jul 25, 2006
    #4
  5. bowman Guest

    Vincent van Beveren wrote:

    > Does your client have any reasons for the use of XML in this project. As
    > a requirement in a project is means just as much as 'use a programming
    > language'.


    Probably because he read about XML in InfoWeek and thought it was a Good
    Thing. I have a canned rant about what XML is and isn't for those impressed
    by buzzwords. One day, I thought one of my co-workers was choking on a
    hairball, but he had was just reading some documentation that described XML
    as a 'programming language'.

    > If the requiment was that the data should be stored as XML,
    > you should consider asking why it should be stored as such. Maybe an
    > export/import function is enough for your client.


    Check the latest DB2 release. IBM has been touting an XML interface coming
    real soon now for several years so I'm uncertain how much is ready for the
    real world. Oracle 10 may have something, too, if your client has deep
    pockets.


    ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
     
    bowman, Jul 25, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    419
  2. Replies:
    0
    Views:
    468
  3. aph
    Replies:
    4
    Views:
    415
    Peter Hansen
    Jan 14, 2006
  4. anonymous

    Call windows apps from web apps

    anonymous, Feb 22, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    4
    Views:
    224
    anonymous
    Feb 28, 2005
  5. Richard Choate

    Web enabled apps/Thin client apps

    Richard Choate, Jul 23, 2003, in forum: ASP General
    Replies:
    2
    Views:
    300
    Chris Barber
    Jul 23, 2003
Loading...

Share This Page