XSLT: Extensible Stylesheet Language Transformation

No Gravatar

XSLT is a language that allows you to make changes through the manipulation of an XML source and a second pattern choices, XML documents into other formats (xml with different structures, files, plain text, HTML, PDF, RTF and .. so on and so forth).

That it seems a trifle. I thought I too at first but I undeceived in recent days when I was reminded of how to use that language to make your life easier.

After using it to generate Java code from an XML file for the project advanced programming I realized that the road to generic programming using XSLT is particularly suitable for automation of repetitive tasks very monotonous.

A good lazy programmer (and especially in the enterprise Java developer) there are 2 things in particular that I characterize it:

  1. I hate to write graphical interfaces using Swing and the like;
  2. I have a strong preference for using XML to define data and graphics (and of course HTML as its subset).

Good example of XAML for WPF (one of the few things I really envy you. NET) I said to myself: "Why can not describe in Java interfaces with a nice xml document?".

Answer: "Let's invent a set of tags that carry the wrap of the main Swing components and create rules using XSLT to generate code that we would otherwise write to hand!".

They are also RAD environments (Matisse for NetBeans and Eclipse are VisualDesigner for some ..) but I like seeing things first hand and then my ultimate goal is not exactly the phase of Wrapping :)

Currently, in about 2 days, I made functional objects: JPane, JButton, JFrame, JLabel, JTextField, JPasswordField, JComboBox, BorderLayout and BoxLayout.

We've worked a lot already but this way I must say that the saving of time to write an interface is high enough.

I pointed out before the ultimate goal .. well you always present in XAML (but also in JavaFX) a very nice pad that allows you to view on-the-fly while the interface is described without the need to start the application? Well the last step will be. For now the idea is realized using a browser and the appendices of Condicio javascript but before you come to this I have a good translation of the main components and layout in my new "language of description."

Of course the language does not currently allow the bind between events and components, this part will be one of the last tackled, but in principle the intention is to work at the level of non-View Controller: mini-framework I do not want to disperse organic losing at the moment.

Stay Tuned!

Popularity: 23% [?]

Tags:


leave a response , or trackback from your own site. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

This website uses IntenseDebate comments, but they are not currently loaded Because either your browser does not support JavaScript, or they did not load fast enough.

Leave a Reply