|
Re: [xmlc] xmlc options: msg#00003java.enhydra.xmlc
On Wed, 11 Jul 2007 10:01:36 +0200 Franck Routier <franck.routier@xxxxxxxxx> wrote: Hi, You might not care to. However, it can help you enforce your implementations to have certain methods (corresponding to Id's defined in the markup). "-generate both" can give you a kickstart to defining all the interfaces to whatever the current markup has for Id's. Later, you might just use "-generate implementation". You can check in your interfaces to source control and reference those. As you find that you need a new method, you can add it to the interface manually. You define "-implements [interface]" (one or more times) to point to the interface that should be implemented. If your markup doesn't contain the Id corresponding to the new interface method, then you will know this at compile time. Furthermore, "-generate both" is useful in order to avoid having to change your code. Maybe you don't use -implements now, but at some point you might want to. If your code already references the interfaces rather than the implementation, then there's no need to change your code. "-generate both" can be used until you project stabilizes so you are not having to constantly manually modify interfaces. And if you never end up using -implements, no problem. But it will be much easier to do so if you reference interfaces up front. It is arguable that you would know this anyway by having your code refer to the new method in the implementation class. However, take Barracuda, for instance. In most cases, you don't reference the getElement*() methods so you wouldn't know if your markup didn't implement a required Id until runtime. But by using interfaces, the implementation won't compile against the interface if the implementation is missing methods that the interface requires. It's nice to know this before you deploy. For more information, read the XMLC docs... http://xmlc.objectweb.org/doc/doc/xmlc/user-manual/xmlc-command.html Or read David Young's book (available online or very cheaply in print) http://safari.oreilly.com/0672322110 http://www.amazon.com/Enhydra-XMLC-Java-Presentation-Development/dp/0672322110
It has something to do with letting the XMLC Ant task know whether or not files changed to keep from regenerating every time the task is run until the markup or options actually change. I don't recall exactly how it works. I believe it was written by David Li a few years ago. They are not meant for runtime and don't need to be deployed with your app.
-- You receive this message as a subscriber of the xmlc@xxxxxxxxxxxxx mailing list. To unsubscribe: mailto:xmlc-unsubscribe@xxxxxxxxxxxxx For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [xmlc] Problem with xmlc 2.3 (and more probably with nekohtml), Jacob Kjome |
|---|---|
| Next by Date: | Re: [xmlc] Problem with xmlc 2.3 (and more probably with nekohtml), Franck Routier |
| Previous by Thread: | [xmlc] xmlc options, Franck Routier |
| Next by Thread: | [xmlc] Problem with xmlc 2.3 (and more probably with nekohtml), Franck Routier |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |