Re: netWindow - PHP data transfer model
Alex Russell <[email protected]>
| Newsgroups | gmane.comp.windows.devel.netwindows |
|---|---|
| Organization | netWindows.org |
| Message-ID | <[email protected]> |
On Friday 08 August 2003 13:57, Mark Anderson wrote:
> It is hard to say without knowing your application requirements, user
> platforms, and
> developer skills, but I think a working application could be made with
> this architecture.
> I don't think there is any redundancy with netwindows.
I think that the XML-RPC sections might be redundant with the new version of
the __data__ object that I'm working on, but everything else looks like
pretty much what I'd expect from an app being developed w/ NW.
> Some comments that may or may not be applicable:
>
> - I'm not sure xmlrpc buys you anything. It requires the javascript side
> to encode requests into xml, and decode responses from xml. Also (and this
> is important), it undermines the ability to test your data server with a
> browser by typing things into the address bar.
I tend to agree on this count. Some people call it "REST" or whatever, but I
think that call-by-HTTP-param tends to make debugging much easier. At least
it does on my projects.
> Whatever your server layer is that does xml-rpc, could just as well do
> REST: decode a url to make a request, and then send a response in an
> appropriate format. In this architecture, a more efficient response format
> than XML would be javascript text that could be directly eval'd. (That is,
> you'd have a nested array [] and hash {} data structure).
Unless you're moving mountains of data, this is something of a personal style
choice. You'll find me a proponent of either approach, depending on the
requirements.
> - in general, testability is fundamentally important in any architecture.
> You'll want your client-server protocol testable by static urls in a
> browser address bar and/or a command-line http GET utility.
> You'll also want your data layer (PEAR::Tree) on the server side to
> support command-line testing.
>
> - that particular xml rpc javascript library is GPL. A more loosely
> licensed one is http://scottandrew.com/xml-rpc/
This is an important point, as there is some debate as to whether the AFL is
GPL compatible. Larry Rosen says "yes", RMS says "no". Thar be dragons
thataway.
> - just because PEAR::Tree gives you storage abstraction does not mean you
> want to try to take advantage of all the alternatives at once. I would
> not try to have a system that relied both on persistent xml files and on a
> sql database> unless for some reason it is absolutely necessary. Because of
> the need for query-style reports and understandable indexing behavior, a
> real sql database is probably preferable. You might in some cases want to
> store free-form xml as opaque strings in the sql database, if they cannot be
> subjected to a strict schema. Not knowing anything about your needs, I'd
> consider not using persistent xml files nor mysql, but use postgres.
Also of note, many commercial databases support automatic mapping between XML
and RDBMS constructs. This can be quite handy, and works very well for some
types of data (mainly those in which order isn't strictly important). I know
that BDB now supports this type of mapping as does DB2 and to a lesser extent
Oracle.
> - don't forget about UI design! if users can't make sense of it, all the
> work is for nothing.
Let the list know if you need help in finding someone who can help you out in
this respect or if you need help with a particular UI design choice. NW
doesn't have a "style guide" the way many other UI toolkits do, but that
doesn't mean we're not interested in it or can't help improve NW GUIs. That
is the point of NW after all: to make web GUIs more useable.
All in all, it sounds like you've got a pretty cool app, and NW seems to fit
into your plans in the way I would expect.
Regards
--
Alex Russell
[email protected]
[email protected]
_______________________________________________
The netWindows developers list: [email protected]
http://netwindows.org/mailman/listinfo/devel_netwindows.org