Xml: Whats the point?

Discussion in 'XML' started by Colum, Nov 29, 2003.

  1. Colum

    Colum Guest

    Hi,
    I am a complete newcommer to XML.
    I am planning to build a website with html, interacting with an Oracle db
    through Jsp. I want to use Xml, mainly because Ive heard about the kind of
    OO approach it takes, but I cant see how it would be beneficial. Could
    someone tell me what it the point of seperating content from presentation,
    surely content is stored in the database?? Also, are there such things as
    forms in XML, or what is the solution for XML sites that wish to use forms,
    do you write some of the site in XML and the forms part in HTML
    Thanks
     
    Colum, Nov 29, 2003
    #1
    1. Advertising

  2. Colum

    Iain Guest

    Re: Whats the point?

    One of the problems with getting to grips with XML is that it does very
    little or nearly everything depending on how you look at it. Very little
    "it's just a data description languague" through to 'the core technology of
    the future internet (mainly IMHO because everyone's jumped on the bandwagon
    so there are LOTS of tools and peripheral standards - something which was
    markedly lacking in previous data description languages [such as ASN.1]).

    The sort of answer I would expect to give to your question (and I'm not
    quite an XML devotee either though I've mad a fair amount of use of it)
    would go like this.

    The point of any multiple tier archtecture is to all changes at any point
    (extending / reformatting the database, changing the layout) without
    (necessarily) having to consider the effects on the other tiers. This is
    especially true when dealing with multiple source and multiple consumers
    (e.g. your database tables are used by many applications supported by
    different programmers). In this case you may wish to make a change to the
    data layouts - possibly a major one and be confident that it will not break
    the other programmers code. If you have an intermediate layer (business
    object / XML data representation) then you can do this relatively safely.

    With a description language like XML you can add data without breaking the
    'code' which accesses it (removing data may be another matter, of course).

    The other point to XML technologies (IMHO) is that they allow declarative
    rather than procedural programming.

    In the case of your example, you would emit an XML document from your
    database (which can be a single database operation) and then transform it
    into the look and feel you want (an HTML page) with XSLT. With XSLT (once
    you've learned it) you can make major changes to the presentation without
    writing a line of code - something (generally) not true of JSP and it's
    competitors.

    you can of course embed form objects in the transformed XML so yes you can
    do forms.

    Is it worth it? If you have a simple application you have to get out the
    door and you already know the technologies, don't bother.

    If your application may grow more complex or you may have to share data with
    other programs / pages, or if you just like learning new things, then givbe
    it a go.

    Iain

    In fact you may not need jsp at all!

    "Colum" <> wrote in message
    news:S17yb.2664$...
    > Hi,
    > I am a complete newcommer to XML.
    > I am planning to build a website with html, interacting with an Oracle db
    > through Jsp. I want to use Xml, mainly because Ive heard about the kind of
    > OO approach it takes, but I cant see how it would be beneficial. Could
    > someone tell me what it the point of seperating content from presentation,
    > surely content is stored in the database?? Also, are there such things as
    > forms in XML, or what is the solution for XML sites that wish to use

    forms,
    > do you write some of the site in XML and the forms part in HTML
    > Thanks
    >
    >
     
    Iain, Nov 30, 2003
    #2
    1. Advertising

  3. Colum

    Bob Foster Guest

    Re: Whats the point?

    I'm not a complete newcomer. XML does not add significant value to a
    conventional website, i.e., one that serves humans through browser, though
    needlessly processing XML can add significant overhead.

    When XML was getting started, people had the odd notion that websites would
    serve XML "content" that would be dynamically converted to presentation form
    when humans wanted to look at it. You can actually do this with some
    browsers by including an <?xml-stylesheet PI at the start of your document
    and letting the browser transform the document to HTML. Unfortunately for
    this idea, eye candy matters and it's quite difficult to get an equivalent
    quality presentation by this method, compared to simply transmitting HTML in
    the first place. The extra level of indirection makes most web designers
    throw up. Then, you will find browsers that won't do the transform for you,
    so you will have to do the transform on your website, adding lots of
    overhead. But the true rub comes when you discover you don't have any actual
    clients for the "content" - just people who want to view your pretty
    website.

    The above has all the earmarks of a Bad Idea. If you, for some reason, want
    to allow people to get at your content without picking through your
    presentation, e.g., you provide the daily weather forecast for your area,
    provide it as a separate service. IOW, separate presentation from content by
    serving them separately. The only kind of XML-based service you can find
    clients for today, unless you want to write and distribute your own clients,
    are called Web Services.

    There are such things as forms in XML - XForms - but most browsers don't
    support them.

    Oh, and the Semantic Web? Last time it phoned in, I couldn't hear it.

    Bob Foster

    "Colum" <> wrote in message
    news:S17yb.2664$...
    > Hi,
    > I am a complete newcommer to XML.
    > I am planning to build a website with html, interacting with an Oracle db
    > through Jsp. I want to use Xml, mainly because Ive heard about the kind of
    > OO approach it takes, but I cant see how it would be beneficial. Could
    > someone tell me what it the point of seperating content from presentation,
    > surely content is stored in the database?? Also, are there such things as
    > forms in XML, or what is the solution for XML sites that wish to use

    forms,
    > do you write some of the site in XML and the forms part in HTML
    > Thanks
    >
    >
     
    Bob Foster, Nov 30, 2003
    #3
  4. Colum

    GIMME Guest

    Re: Whats the point?

    The point of XML is that if you make everything service you
    create a web service, then it can be shared by other applications
    inside your organization. And code can be reused.
     
    GIMME, Dec 2, 2003
    #4
  5. Re: Whats the point?

    In article <>,
    GIMME <> wrote:

    % The point of XML is that if you make everything service you
    % create a web service, then it can be shared by other applications
    % inside your organization. And code can be reused.

    Of course, that's the point of every development in computer science
    for the past 30-odd years. We're sure to have a winner some day.
    --

    Patrick TJ McPhee
    East York Canada
     
    Patrick TJ McPhee, Dec 2, 2003
    #5
  6. Colum

    GIMME Guest

    Re: Whats the point?

    XML is different in that it isn't code that is reused, function
    results are reused.

    A lot of what happened in the past referred platform portability ...
    Reusing the same code on different platforms.


    (Patrick TJ McPhee) wrote in message news:<bqj5kl$8n6$>...
    > In article <>,
    > GIMME <> wrote:
    >
    > % The point of XML is that if you make everything service you
    > % create a web service, then it can be shared by other applications
    > % inside your organization. And code can be reused.
    >
    > Of course, that's the point of every development in computer science
    > for the past 30-odd years. We're sure to have a winner some day.
     
    GIMME, Dec 4, 2003
    #6
  7. Re: Whats the point?

    In article <>,
    GIMME <> wrote:

    % XML is different in that it isn't code that is reused, function
    % results are reused.
    % A lot of what happened in the past referred platform portability ...
    % Reusing the same code on different platforms.

    I was joking in my first reply, but to be serious, nearly every
    development in computer science since the advent of structured
    programming _has_ been touted as a way to increase the amount of code
    which can be re-used either in future versions of the same program or in
    other programs. Some of these have addressed cross-platform portability,
    but I wouldn't say it's been a big concern -- to make a gross
    generalisation, CS has mostly worried about software efficiency
    (algorithms) and programming efficiency (aka re-use). A tremendous
    amount of code has been thrown away in the effort to adopt new
    technologies which facilitate code re-use.

    So, sure, XML is different, and all the 0% code re-use we get as
    we throw away old applications and old communications protocols
    will be offset by the 110% code re-use we'll get in the future,
    but I wouldn't be inclined to list this as a big feature, myself.
    --

    Patrick TJ McPhee
    East York Canada
     
    Patrick TJ McPhee, Dec 5, 2003
    #7
  8. Re: Whats the point?

    Patrick TJ McPhee <> wrote:
    > In article <>,
    > GIMME <> wrote:
    >
    > % XML is different in that it isn't code that is reused, function
    > % results are reused.
    > % A lot of what happened in the past referred platform portability ...
    > % Reusing the same code on different platforms.
    >
    > I was joking in my first reply, but to be serious, nearly every
    > development in computer science since the advent of structured
    > programming _has_ been touted as a way to increase the amount of code
    > which can be re-used



    But what does that have to do with XML?

    XML is not code. XML is data.


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Dec 6, 2003
    #8
  9. Re: Whats the point?

    In article <>,
    Tad McClellan <> wrote:

    [...]

    % But what does that have to do with XML?
    %
    % XML is not code. XML is data.

    Hey, I didn't bring up code re-use. Someone else suggested that use
    of XML (in services particularly) will result in code re-use. I simply
    pointed out that the same thing has been said of almost everything
    that's happened in CS for a long time. Imagining I had a point, it would
    be that you shouldn't imagine that using technology X will lead to
    code re-use, no matter what technology X happens to be.

    --

    Patrick TJ McPhee
    East York Canada
     
    Patrick TJ McPhee, Dec 6, 2003
    #9
  10. Colum

    GIMME Guest

    Re: Whats the point?

    Think Web Services ...

    You can marshall and unmarshall data many different ways ...

    CORBA/EDI is a solution ...

    XML is a solution ...

    And within XML you can use SOAP or publish EJBs through a web
    server, or role your own.

    >
    > But what does that have to do with XML?
    >
    > XML is not code. XML is data.
     
    GIMME, Dec 8, 2003
    #10
    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. Gopi

    point to point protocol

    Gopi, Jul 13, 2004, in forum: VHDL
    Replies:
    1
    Views:
    477
    Mike Treseler
    Jul 13, 2004
  2. David

    Whats the point of EJBs?

    David, Aug 3, 2004, in forum: Java
    Replies:
    16
    Views:
    750
    dave artus
    Aug 9, 2004
  3. kid joe

    Whats the point of bool?

    kid joe, Jun 3, 2009, in forum: C Programming
    Replies:
    34
    Views:
    1,116
  4. Saraswati lakki
    Replies:
    0
    Views:
    1,350
    Saraswati lakki
    Jan 6, 2012
  5. Laser Lips

    Whats the point in these groups?

    Laser Lips, Oct 17, 2008, in forum: Javascript
    Replies:
    19
    Views:
    154
    Mike Duffy
    Oct 25, 2008
Loading...

Share This Page