Community-Credit.com | NonProfitWays.com | SOAPitstop.com   Skin:   
      User: Not logged in 
Home
Newsletter Signup
XSLT Library
Latest XML Blogs
Featured Examples
Presentations
Featured Articles
Book Chapters
Training Courses
Events
NewsGroups
 
Discussions
Examples
Tutorials
Tools
Articles
Resources
Websites
 
Sign In
My Profile
My Articles
My Examples
My Favorites
My Resources
Add a Resource
Logout
 
About Me
My Blog
HeadGeek Articles
Talking Portfolio
Resume
Pictures
World Trip Pics

Interacting with the Matrix
Author: mikael bergkvist
Published: 12/8/2004 12:00 AM
Category: XML
Summary: The web isn't as safe as it used to be. Find out why.....

 
I dont know if you''ve noticed, but the web isn''t as safe as it used to be. Ordinary images pose a danger and various experts are recommending people to turn off javascripting. So, what if they actually did turn off javascripting? The user-experience would be severely damaged for one. No vendor would ever make such a damaging decision, but people have a will of their own (damn, there goes my plans for world domination) and if scared enough, they could choose to do this. Then a lot of interactivity would transfer to java or flash, but my IE6 reacts to both after each security upgrade. I keep turning it off, but it keeps coming back, and it''s getting to be quite annyoing. It''s reminding me of that ""assistant"" that kept popping up in Word a few years back, which made me download a freeware that allowed me to shoot it down with a shotgun. (It was hilarious and very liberating) The again, there are other browsers.. ;-) I imagine that some of the interactivity will eventually transfer to the server, where it won''t really matter if the user has javascripting turned off or not, but then other problems arise. Keeping track of what the user has done, or where, is more difficult serverside. You end up with a lot of if/else, and an awful lot of embedded html depending on the responses. You got to hand it to plain old dhtml - using the DOM to find an element and directly manipulate it for immidiate feedback, making it ideal for interfaces.So why not migrate dhtml, or that particular quality, to the server? Yeah, well, how? Simply merge asp 3.0 and xml into a new format, which has a boring productname attached to it (miopages) and there you have it. Load the asp 3.0, as xml, and then manipulate elements for immidate feedback, by ID, NAME, or place in the DOM-tree.
<html>
<serverscript allow=""newfun"">
function newfun(str, arg){
	getElementByID(arg).text=str;
}
</serverscript>
<a exec=""newfun(''Hello world'',''a'')"">Call function</a>
<br/>
<p id=""a"">Output goes here</p>
</html>
After the link was clicked, we get this sent to the browser.
<html>
<a href=""adress.asp?newfun(''Hello world'',''a'')"">Call function</a>
<br/>
<p id=""a"">Hello world</p>
</html>

Miopages accepts querystrings only as function calls. Functions takes arguments and live or die by them, so it''s harder to manipulate in a hostile manner. If a function ""dies"", it get''s thown and the page reloads. The function must also be permitted, so in this example, the server will only accept newfun() and the arguments has to be plain text. Everything else ""dies"".

So, we have recreated the immidate feedback that is typical for dhtml, and we used xml to do it. The DOM remains in memory as a thread allthrough the session, and therefor you can run several apps simultainously, along with other visitors doing the same thing. We added a really long list of features to this thing, but those are outside the subject for this column, so we are skipping those here. The point is that XML has in it''s very conception the possible solution for some of the problems that might occur in an immidiate future, and that it allows developers to continue to use their current dhtml-skills to handle the situation. The big drawback is, of course, the reloadings of the page - but hey, nothing is perfect. If it was, the web would be a much safer place. And I would be dating twins.

Signing off:
Mikael Bergkvist
Naltabyte

You can find a lot of more or less advanced examples at out site (plug, plug) here: http://www.naltabyte.se , under ""miopages"". (We do use javascripts, off and on, but that''s because we are lazy, and because it''s kinda fun too.)

 

 
Fans of "The Office"
Dwight Bobbleheads are here!
  “It's me! I'm the bobblehead! Yes!”



Advertise on XMLPitstop

Advertise on XMLPitstop


EggHead Cafe
Web Servicee development
DotNetSlackers
Buy text ads here!
desktop online backup
Color Laser Printer
Dior sunglasses
Skype vs. sipcall
VoIP Internettelefonie
Buy text ads here!

Interested in Text ads?
2,222 Total Members
35 members(last 30 days)
7 members(last 7 days)
1 members(today)

1,609 Total Discussions
12 Posts(last 30 days)
0 Posts(last 7 days)
0 Posts(today)

17,169 Total Blog Posts
1,748 Blogs(last 30 days)
251 Blogs(last 7 days)
0 Blogs(today)

8,699 Newsgroup Posts
0 Posts(last 30 days)
0 Posts(last 7 days)
0 Posts(today)

13,786 Total Resources
5 Resources(last 30 days)
1 Resources(last 7 days)
0 Resources(today)


 

David Silverlight's XMLPitstop.com| 2801 Florida Ave #225|Miami, FL 33133|Ph:305-447-1139