Philippe Poulard said:
it's not a barrier, as you can also use Java if you like, but you're true,
it's better to focus on RefleX's strengths ; there are many reasons for
which you should prefer Active Tags instead of other similar technologies
like PHP/ASP/JSP/Cocoon/etc :
-those mentioned above are all dedicated to a Web environment, whereas
RefleX can run XML programs in a Web environment as well as from the
command-line
I don't know about the others, but you can also run PHP from the command
line. Also, from my understanding, RefleX programs always emit XML documents
as output. Is this correct? If not, you may wish to update the tutorial (or
"Hello World" example) on your site to clarify this.
-try to define a schema language with any of them ; it wouldn't be obvious
(at best), or would be simply impossible (at worst) ! RefleX embeds one
called the Active Schema Language, which goes a step further than DTD, W3C
XML Schema, and Relax NG (for example, ASL allows to design dynamic
content models and design semantic data types)
-you can extend Active Tags with custom modules (libraries) ; you can
design declarative-oriented grammar -which are very concise and
expressive- and make them runnable within RefleX ; RefleX also allows to
switch from declarative sentences to imperative instructions when you have
reached the intrinsic limits of the declarative grammar
-RefleX is self-descriptive, it is built upon itself : any built-in or
custom module is an application of RefleX ; Active Tags foundations are
very sane, based on the cooperation of few core modules, each focusing on
a single well-defined problematic
-you can define custom tags and functions with other tags (a kind of macro
mechanism)
</groupOfFeatures>
I've grouped the above features together because, to me, they are
abstract, hard to understand, and it's not clear to me why they would help
me write programs faster. I think you should provide a concrete scenario
that a programmer might find themselves in, and then show what they might do
if they were using Java (if posting to a Java group; replace with some other
language if posting to a different group), and then compare what they would
do in RefleX, to show why RefleX is better.
For example, when you write "Try to define a schema language with any of
them", I think "Gee, when was the last time I was coding this Java
application, and I *really* wished I could define my own schema language?"
and the answer seems to be very rarely. So when I read about this "feature"
in RelaX, I'm thinking "It looks like this product solves a problem that I
don't have".
BTW, I'm not trying to be argumentative for the sake of arguing; rather,
I'm just trying to point out why the features of RelaX, as they have been
presented so far, might not be so appealing. I'm doing this because if RelaX
actually does turn out to be a decent time-saving tool, I'd like to know
about it. So I'm trying to give you a chance to illustrate all the strengths
of RelaX.
-programs written with Active Tags (that are called Active Sheets) can
dramatically decrease the amount of code to produce (we used it in a
production environment at INRIA for a real application, and estimate that
the number of lines to code was reduced to 10% (comparison with the
hypothetic lines of Java to write))
This is somewhat a weak argument, because we might suspect you of just
being a sloppy Java programmer. The example you posted in another branch of
this thread (recursively list all text files in a subdirectory which is not
in /WEBINF/) was a very good one, as it does seem shorter in Active Tags
than in Java. You should stick to concrete examples like these whenever
possible.
-there are also some smart features in Active Tags not available with its
competitors : in Active Tags you can consider some non-XML objects as
XML-friendly : use XPath to access them and apply XUpdate-like operations
to modify them
Okay, this sounds handy. I saw you gave an "XML-like" view of the OS
file system. What other kind of objects can you provide an XML-like view of?
-Active Tags is easy to use and easy to learn : what you need is only a
knowledge of computer sciences in general, XML + namespaces + XPath ;
Active Sheets are easy to read
This claim is also weak, after having looked at your sample code. I'm
fairly comfortable with Computer Science, XML and XPath, but I had a lot of
difficulty understanding the code posted on your site. It actually looks
like there's some other language embedded within the attributes and contents
of the XML, and THAT'S the programming language in which the behaviour of
the application is encoded, rather than in the XML itself.
For example, when you have a node like:
<rdbms:connect name="db" url="{ string(
$web:application/@web:init-param/@db-url ) }"/>
I'm wondering how many of those are keywords that I have to memorize, and
how many of them are names that were defined elsewhere (perhaps in some
external/included file?). Your tutorial needs a lot of work in this
direction. Right now it's almost "copy and paste these programs, and you'll
see these results", rather than "here's the structure of an ActivePage
program, and here's what all the instructions do".
-you can design entire applications with RefleX without writting any Java
code ; but you can also embed your own Java classes
This might be best for someone transitioning from Java to RefleX. Can
you show some concrete examples of these as well? Maybe given an example
scenario of where a Java programmer can write, say, 99% of his or her
application in Java, but then use a bit of RefleX to handle the cases where
RefleX excels at? The AspectJ tutorials that are out there take a similar
approach: They show how a cautious Java programmer can "test the waters"
with AspectJ, before diving in completely.
- Oliver