473,396 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Xml: Whats the point?

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
Jul 20 '05 #1
9 2394
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" <co********@hotmail.com> wrote in message
news:S1******************@news.indigo.ie...
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

Jul 20 '05 #2
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" <co********@hotmail.com> wrote in message
news:S1******************@news.indigo.ie...
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

Jul 20 '05 #3
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.
Jul 20 '05 #4
In article <3f**************************@posting.google.com >,
GIMME <gi*******************@yahoo.com> 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
pt**@interlog.com
Jul 20 '05 #5
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.
pt**@interlog.com (Patrick TJ McPhee) wrote in message news:<bq**********@news.eusc.inter.net>...
In article <3f**************************@posting.google.com >,
GIMME <gi*******************@yahoo.com> 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.

Jul 20 '05 #6
In article <3f*************************@posting.google.com> ,
GIMME <gi*******************@yahoo.com> 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
pt**@interlog.com
Jul 20 '05 #7
Patrick TJ McPhee <pt**@interlog.com> wrote:
In article <3f*************************@posting.google.com> ,
GIMME <gi*******************@yahoo.com> 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
ta***@augustmail.com Perl programming
Fort Worth, Texas
Jul 20 '05 #8
In article <sl******************@magna.augustmail.com>,
Tad McClellan <ta***@augustmail.com> 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
pt**@interlog.com
Jul 20 '05 #9
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.

Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: asdfkajsdflkjsadlfkjoewqifoeiwjf | last post by:
Hi Im using php to parse an xml file of below format. I have no problem extracting the various values within the tags (lib, id, url, file etc), but cant get hold of whats in the tag (max_page,...
2
by: Arjen | last post by:
Hello, I'm currently doing this: ObjectA aObjectA = new ObjectA; ObjectA.tabel.Values.CopyTo( aObjectA, 0 ); XmlSerializer x = new XmlSerializer( typeof(ObjectA) ); TextWriter writer = new...
5
by: Arjen | last post by:
Hello, Can somebody help me a little bit? I can't get it to work. Please see my code below... I have placed some comments like "// And whats next?". I'm sure that I have to code something...
1
by: zoneal | last post by:
I'm making a "favourites" for a browser, as i may have said in previous post. So I want to be able to read a simple xml's <Url> <Favourites> <url>http://www.google.ca</url> </Favourites> Any...
3
by: ANDY AIYER | last post by:
Guru's! Your time and guidance is much appreciated in this task that i am trying to get done. Background I have a SQL Server 2000 database table which contains 2 Fields (RecordID, XMLData...
2
by: Mayur | last post by:
Hello All, My code below sending request to web server and getting response as XML string. char* response; wf.getResponse(response,500); where outout of above function returns xml string...
1
by: Subrato | last post by:
Hi, I am very new to xml and I have this piece of code which I took off a website. The situation is that on of the website, user files up a form and it is submitted. On submission, the page should...
1
by: aine_canby | last post by:
Hi, The code below is something I found on the net which serializes lists of objects. I have a few problems with it though. First, I hate that you have to have a default constructor - public...
12
by: RoLo | last post by:
Is there anyway to use the html document on IE as an XML document?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.