applet to applet - servlet model

Discussion in 'Java' started by Tedy, Aug 4, 2005.

  1. Tedy

    Tedy Guest

    Hi!

    I have an applet which takes XML document and with help of SAX it finds
    values.

    Structure of XML looks in shortcut like this:



    < category >

    < block >

    < value > 5,234 </ value >

    < possible result > 3,9219 </ possible result >

    < possible result > 6,28365 </ possible result >

    < possible result > 32.768 </ possible result >

    </ block >

    </ category >

    < category >

    < block >

    < value > 23 </ value >

    < possible result > 4345 </ possible result >

    < possible result > 637.9 </ possible result >

    </ block >

    </ category >

    < category >

    < block >

    < value > 2.8 </ value >

    < like for > 5,234 </ like for >

    </ block >

    </ category >

    Applet has three classes . First class has JTextField from which I receive
    values and takes them to second class that starts SAX with properly
    values - and third class which contain overloaded SAX functions. Results
    come back to first class.

    I have two questions:

    1:

    Is it hard to change such applet in to applet - servlet model?

    Problem is that this applet takes data form XML document and the document is
    on the www server. The time that this action last becomes longer and longer
    because XML file is growing.

    When the file was small every thin was OK ;)

    Where can I find tutorials or howto documentation ?

    I have written some programs in java but never in JSP or servlet.



    Question 2 :

    Is there any programs that helps manage such XML data base. Especially I am
    interested in:

    Sorting categories blocks by the value in < value > tag, checking syntax.



    Thanks for all help

    Tedy
     
    Tedy, Aug 4, 2005
    #1
    1. Advertising

  2. On Thu, 4 Aug 2005 12:44:56 +0200, Tedy wrote:

    > I have an applet which takes XML document and with help of SAX it finds
    > values.


    > I have two questions:
    >
    > 1:
    > Is it hard to change such applet in to applet - servlet model?


    Qn. 1a.

    Is there any point to doing that?

    You need to transmit the data from the server to the
    client, then the cleant back to the server, is that right?

    In between, your applet does transformations on the XML.

    If you were to do that work on the server, that would increase
    the need to transfer data between the server and the (..could be
    an) applet (..but by this stage the user can do what they need
    with an HTML FORM input textarea) considerably.

    > Problem is that this applet takes data form XML document and the document is
    > on the www server. The time that this action last becomes longer and longer
    > because XML file is growing.


    How do you expect the user to do anything useful with it, unless
    you transmit the bytes from the server to the client? (and back)

    > Question 2 :
    >
    > Is there any programs that helps manage such XML data base.


    Yes. They are generally known as databases.

    It sounds as if this job is far better suited to an actual
    D/B on the server for the queries. <my advice>Don't p*ss
    about, trying to reinvent what already exists.</my advice>

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    Beats A Hard Kick In The Face
     
    Andrew Thompson, Aug 4, 2005
    #2
    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. Andy Fish
    Replies:
    4
    Views:
    2,421
    Andy Fish
    Dec 17, 2003
  2. Sean Clarke
    Replies:
    1
    Views:
    1,900
    Sudsy
    Jan 7, 2004
  3. circuit_breaker
    Replies:
    2
    Views:
    2,016
    Jack Jia
    Apr 4, 2004
  4. chamikara
    Replies:
    1
    Views:
    49,874
  5. Replies:
    1
    Views:
    489
    Andreas Wollschlaeger
    Oct 6, 2006
Loading...

Share This Page