Sas Jacobs

Author
+ Follow
since Jun 24, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sas Jacobs

Congratulations to the winners and thanks for having me as a special guest in your forum.

Cheers

Sas Jacobs
Hi Maha

It depends on whether you want to read the contents on the client or the server. On the client, you can use DOM scripting through JavaScript. It reads the XML into a tree structure which you can then manipulate. You can use any server-side language to work with XML documents as well.

Cheers

Sas Jacobs
Hi Steve

I really want to draw you a diagram! The architecture I describe below is a classic Ajax approach.

Firstly, this approach involves generating XML content on the server usually from a database or some other enterprise level application, although you can create static XML pages from software such as Office 2003.

An XHTML page on the client provides the interface for the data with styling provided by CSS. The XHTML page also includes JavaScript that scripts the XMLHttpRequest object. This object requests the XML content from the server. You can also POST information as part of this request.

JavaScript also provides a way to apply an XSLT stylesheet which generates XHTML for inclusion in the interface. Ajax applications use DHTML approaches to display and manipulate the data in the interface - styling updated data, changing the content of DIV elements etc.

The only problem I see with Ajax is that it's easy to disable by turning off JavaScript and because the processing is carried out on the client, it can slow to a grinding halt if there's too much data.

There are many toolkits and cross-browser libraries that you can use. I have worked with the Sarissa library quite a bit. Others include Backbase, Bindows, Dojo, qooxdoo etc.

I hope that helps.

Cheers

Sas Jacobs
sas
Thanks Ayub

I love to travel as I'm sure you can tell :-)

There are lots of great books on Flash 8 (the current version). If you want to learn about ActionScript, I would recommend Object Oriented ActionScript for Flash 8. It's a great introduction and I contributed 2 chapters to it.

However, Flex is an alternative approach to build SWF applications - it uses an XML language, a bit like the .NET framework. As far as I'm aware, there are no books around about this version because it's so new. ActionScript 3.0 and Flex Builder have been recently released. I'm currently editing a book on the topic by Charles Brown and that looks like being great.

Cheers

Sas Jacobs
Hi David

As I said in an earlier post, I don't have any say in the title. It's all up to marketing!

The title is a difficult call. The book does cover the fundamental things required for Ajax because Ajax is such a mix of technologies. But it only devotes one chapter to pulling it all together.

I think one issue that seems to have arised is that the term Ajax is not well understood and that people expect it to be a single technology rather than an architecture.

Cheers

Sas Jacobs
Hi Harish

I can't conclude anything. I'm not a Java developer!

Sas Jacobs
Hello

I'm actually female, not male.

You just described what is so special about the book - it is for a raw beginner like yourself. It covers the main things that you need to know and gives you a taste of areas like Ajax and Flash. I'm not aware of any other XML books that include Flash.

Cheers

Sas Jacobs
Sorry to confuse you.

You can apply XSLT stylesheet transformations either on the server using a server side language or on the client using JavaScript.

Yes, you can load XML using the Ajax approach. This uses the XMLHttpRequest object with JavaScript. The JS can also apply your XSLT stylesheet.

Office 2003 creates whatever XML content you tell it to. Its native XML vocabularies are complicated but you can apply either an XML schema or an XSLT stylesheet to generate your own content. This includes XHTML.

Cheers

Sas Jacobs
Anthony

It depends how tightly you define programming languages! You'll need to use some type of scripting language on the client to process the contents of the XML document. This is usually JavaScript which some people don't consider a programming language.

You'll need a server-side language as well if you need to access contents from a database or apply a server-side transformation before the contents are loaded into the browser. VB.NET is a one of the .NET server-side languages.

I use XMLSpy to edit my XML documents. It's free and works really well. If you have Office 2003 you can also use it to generate XML really easily.

Does that help?

Sas Jacobs
The term schema is a generic term for anything that describes an XML vocabulary. In broad terms, the schema explains the structure of elements and their attributes in the XML documents. A validating parser can use it to check that an XML document is valid.

There are several way to describe a schema - one of the oldest is a DTD (Document Type Definition). Another is using the XML Schema Language (XSD). The two aren't related to each other.

The main differences are that:
DTD's don't use an XML structure whilst XML Schemas do.
A DTD allows entities to be defined, an XML Schema does not.
XML schemas allow data types to be assigned to character data.
XML schemas allow you to define custom data types.
XML schemas have good support for namespaces, while a DTD has none.
XML schemas allow for including and importing other schema documents.
A DTD uses a more concise syntax than XML Schema, resulting in smaller documents.
The XML Schema language is newer than the DTD specification, and so has addressed some of the weaknesses of DTDs.

I hope that helps.

Sas Jacobs
Hi Anthony

On the server-side, the book covers the .NET framework and PHP. It doesn't deal with Java.

Yes, it's possible to use Ajax on IIS. Ajax runs on the client although it can access server-side pages from any source.

If you use XML files as the data source, you can use either DOM scripting or the Ajax approach to access the contents and apply transormations. Ajax is an alternative to DOM scripting and in your scenario, I think they'd both be fairly equivalent.

Cheers

Sas Jacobs
Lasse

Thanks for the reply on my behalf which is pretty much what I'd have answered - the framework chosen varies according to the nature of the project I'm working on.

Cheers

Sas Jacobs
Amir

Ajax and Flash are both request and response type approaches. This means that they have to poll the server for changes or use some other event to check for changes. Ajax doesn't offer you any advantages over Flash in this regard.

You can force Flash to refresh the interface by appending a changing querystring to the swf URL in the OBJECT and EMBED tags. I often use a timestamp generated with JavaScript.

Cheers

Sas Jacobs
Fabio

The book has one chapter on Ajax and one chapter on DOM scripting. It is about XML rather than Ajax and certainly isn't a JavaScript book. Accordingly, I don't start with the basics about JavaScript. Instead, I show the JavaScript methods and properties necessary for DOM scripting and working with the XMLHttpRequest object. This includes cross browser approaches.

I hope that helps.

Sas Jacobs
Hi Fabio

Ajax is considered to be a combination of the following:

XML - data storage mechanism (although this can also be plain text)
XMLHttpRequest object - allows asynchronous data retrieval from the server
JavaScript - scripts the XHR object and allows for DOM manipulation and application of XSLT stylesheets
XSLT - transforms XML content into XHTML or other XML sources, adds filtering and sorting
XHTML - generates the application interface
CSS - provides styling for XHTML content

The other tehnologies that you mention do the following:

SOAP (Simple Object Access Protocol) - one XML vocabulary involved in web services
XPath - used in XSLT to target different parts of an XML document, an understanding is essential to use XSLT
Xalan - an XSLT processor. I've never used it.
Jakarta XTags - a library for working with XML. I've never used it.
JSLT XML tags - I'm not familiar with this as I'm not a Java developer.

I think you need to know about XML, XPath and XSLT. If you work with web services, you'll also need a broad understanding of SOAP. I'm not sure about how necessary the other areas are for Java development. Maybe someone else could comment.

Cheers

Sas Jacobs