• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Paul Roubekas
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • 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?

 
Simon Roberts
Author
Ranch Hand
Posts: 170
7
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • 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
 
Rob Spoor
Sheriff
Pie
Posts: 20750
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • 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
Ranch Hand
Posts: 170
7
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah woops, sorry, answered the implied first question, not the actual question. Silly me...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic