Search the web
Sign In
New User? Sign Up
svg-developers · SVG Developers
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
SVG ouside the browser...   Message List  
Reply | Forward Message #46175 of 63018 |
RE: [svg-developers] SVG ouside the browser...

Hi Peter,

Here are a few comments on your posting.


> the web application we are building has really grown up and is
> beginning to tax the reach of JavaScript - by that I mean more then
> 12,000 lines of code . That is why we are looking to move to a more
> robust/rich programming environment.

Understandable! I have long felt that the path SVG is currently following is
dangerously close to the one that HTML+JS has gone down.

> Our consideration at this point is to move to Java/Batik or Windows
> application (.NET). Maybe even Flash.

I would have thought Flash was out of the frying-pan and into the fire --
surely it's just more script?

I can see the motivation for powerful languages like Java and C# though, but
might I suggest that you take a look at XForms to provide the data
management side, such as schema validation, talking to web services,
spreadsheet-style calculations, and so on. Then you could use SVG solely for
the user interface.

We have a simple demo on our home page that shows how you can use XForms to
talk to a weather web service, and then use the values returned from the
service to update the bars in an SVG bar chart. DOM 2 Events is used to
connect the two together, so that if the underlying data changes, the bars
also change. The 'wiring' that happens when the events fire is, in this
example, done with some script (although it's just cut and paste stuff). But
the imminent version 2.0 of formsPlayer uses XBL to 'hide the join' (so to
speak) between XForms and custom user interfaces.

This dramatically reduces the amount of code you need, and of course the
maintenance headache. For example, a thermometer defined using SVG could be
made to render simply by setting the data type of the underlying data (a
feature already used in XForms for dates and booleans):

<xf:model>
<xf:instance>
<data xmlns="">
<lo>6</lo>
<hi>10</hi>
</data>
</xf:instance>
<xf:bind nodeset="lo" type="temperature" />
<xf:bind nodeset="hi" type="temperature" />
</xf:model>

<!-- schema definition for 'temperature' needs to be present -->

<xf:output ref="lo" />
<xf:output ref="hi" />

Once the correct rule is established in the XBL code, both xf:output widgets
will be rendered as thermometers because they are 'bound' to data of type
'temperature'. This may happen 30 times in one form, or once in 30 forms,
but regardless of how many times this is used, it can always be driven by
the data type (so if it changes, the choice of widget will change, too).

As a consequence of all of this, we get a genuinely clean separation; the
SVG code deals only with how the thermometer looks and perhaps acts (the
user may be allowed to slide the indicator, for example). And XForms looks
after the data, submission, schema types, validation, calculations, and so
on. XForms tells the SVG widget when the data has changed, or has become
invalid, and the SVG widget tells XForms if the user has entered a new
value. But the SVG widget could now be used in numerous different places, on
many different forms, whilst equally, the underlying form could be used with
a range of different widgets, for different environments.

Although I've explained this in terms of our product formsPlayer, I'm really
talking about general principles concerning the separation of data and the
UI that manipulates that data. There are other ways that XForms and SVG
could be used together, but my main point is that the combination of XForms,
SVG and DOM 2 Events is incredibly powerful, and I think it is important to
start provoking a bit of discussion about how this combination might be
used.

Best regards,

Mark


Mark Birbeck
CEO
x-port.net Ltd.

e: Mark.Birbeck@...
t: +44 (0) 20 7689 9232
w: http://www.formsPlayer.com/

Download our XForms processor from
http://www.formsPlayer.com/






Tue Nov 23, 2004 2:01 am

mark_birbeck
Offline Offline
Send Email Send Email

Forward
Message #46175 of 63018 |
Expand Messages Author Sort by Date

Hi all, the web application we are building has really grown up and is beginning to tax the reach of JavaScript – by that I mean more then 12,000 lines of...
peterkalev2002
Offline Send Email
Nov 23, 2004
1:11 am

... then ... animations, ... Hi Peter, I am working on an SVG project with over 300,000 lines of code and still counting...Using Javascript within the IE5.5/6...
Francis Hemsher
fhemsher
Offline Send Email
Nov 23, 2004
1:58 am

Hi Peter, Here are a few comments on your posting. ... Understandable! I have long felt that the path SVG is currently following is dangerously close to the...
Mark Birbeck
mark_birbeck
Offline Send Email
Nov 23, 2004
2:02 am

... Not to steal Mark's thunder here (I too am a big advocate of X-Forms) but you may also want to look at C# SVG implementations, such as that produced by...
Kurt Cagle
kurt_cagle
Offline Send Email
Nov 23, 2004
5:12 am

Hi, ... How is 12,000 lines a problem? I am not sure how many lines of script Mozilla has but the number is not small. The only problem I can think of is...
Jan-Klaas Kollhof
keyjaque
Offline Send Email
Nov 23, 2004
9:47 am

Jan-Klaas, Great to see some discussion starting on how we might build these types of applications. ... Are you arguing for or against, here? ;) The "only...
Mark Birbeck
mark_birbeck
Offline Send Email
Nov 23, 2004
11:44 am

... more spaghetti, and debug. That is bad development. ... using modules and objects? My suggestion was to use declarative mark-up like XForms which decreases...
Jan-Klaas Kollhof
keyjaque
Offline Send Email
Nov 23, 2004
1:27 pm

... Well the move to Java/Batik is probably your path of least resistance (smallest amount to learn, easiest to translate). You should even be able to run your...
Thomas DeWeese
world_mage
Offline Send Email
Nov 23, 2004
11:32 am

If you move to .NET, VG.net is the fastest GDI+ based graphics system. It is not an SVG object model but an open-source SVG importer is under development. Much...
frankhileman
Offline Send Email
Nov 23, 2004
1:20 pm

"Mark Birbeck" <Mark.Birbeck@...> wrote in message news:005201c4d151$ab2d5ed0$0e01a8c0@W100... ... Sure, I'd agree with that, but the reason I'd agree...
Jim Ley
jibberjim
Offline Send Email
Nov 24, 2004
12:09 am

"Mark Birbeck" <Mark.Birbeck@...> wrote in message news:000b01c4d100$67ccd9a0$0e01a8c0@W100... ... But the reason for this is that we can ship solutions...
Jim Ley
jibberjim
Offline Send Email
Nov 24, 2004
12:11 am

Jim, Thanks for the very interesting points in both your posts. I'm very keen to debate these issues, so I really do appreciate the input. I've also ...
Mark Birbeck
mark_birbeck
Offline Send Email
Nov 24, 2004
1:20 am

"Mark Birbeck" <Mark.Birbeck@...> wrote in message news:002f01c4d1c3$a3f002e0$0e01a8c0@W100... ... Where it needs to be checked all again of course, so...
Jim Ley
jibberjim
Offline Send Email
Nov 24, 2004
9:29 pm

Jim, ... This is a common argument, but with respect, it's completely upside down! We are *already* validating on the server, right? We already check our data ...
Mark Birbeck
mark_birbeck
Offline Send Email
Nov 25, 2004
12:49 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help