• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What was the goal of creating two sources for code (XML & Java)?

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What was the goal of creating two sources for code (XML & Java)? Is one more suited for one platform type over another? (e.g. SmartPhones vs. Desktops) Are there any published rules of thumb about when to Java and when to use FXML?

 
Author
Posts: 285
12
Scala IntelliJ IDE Netbeans IDE Python Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
XML is not a source for code. It is, however, capable of describing certain types of data structures (trees, essentially), and interfaces to behavior (e.g. WSDL).

Java can, of course, do that too, but people don't all write in Java (silly people! ) and so, it was decided some time ago that it would be a GoodThing(TM) to have a means of describing data structures (particularly for use in network communications) that was independent of any programming language. For a long time, there were many of these (e.g. tools in XDR/RPC, and in CORBA), but at some point, the world decided to start all over and use XML (I'm cynical enough to believe that this was because XML was trendy ;) but there were some valid arguments about it looking enough like HTML to get through firewalls to and from web servers, and because many of the pre-existing tools were not free, or open source)

HTH
Simon
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Going from the second sentence on https://docs.oracle.com/javase/8/javafx/fxml-tutorial/why_use_fxml.htm ("FXML is an XML-based language that provides the structure for building a user interface separate from the application logic of your code."), Id' say it gives you the possibility to let a design team write the user interfaces and a development team to write the code behind it all.
 
Simon Roberts
Author
Posts: 285
12
Scala IntelliJ IDE Netbeans IDE Python Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah woops, sorry, answered the implied first question, not the actual question. Silly me...
 
Opportunity is missed by most people because it is dressed in overalls and looks like work - Edison. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic