Hi,
I was following this thread last week but couldn't chime in yet as I was inundated with work. I am, in a sense, lucky to be able to spend about 2/3 to 3/4 of my time on XQuery and XSLT. It used to be just XSLT but we started using XQuery more and nowadays it's predominantly XQuery (with BaseX of course).
I saw this thread shift towards the merits of XQuery applications in a commercial context. The original question was about a comparison between XQuery and other languages. Marco said that he was anticipating some pushback, or at least some difficulty in proposing an XQuery or even XML-based solution for a client. Maybe I can tell a something about the role XQuery or XML technologies play in our company which is a marketing operations company with many international clients.
I use XQuery for fun and for commercial work. I have also used XSLT extensively for about 15 years. From the start I was able to apply XML technologies on commercial projects. Only quite recently I came to XQuery. Having dabbled with Marklogic and Exist before I knew about XML databases and XQuery. Then I "found" BaseX and about 2 years ago I started to introduce it at work. First for small adhoc jobs, or for, what I call, "glue". But soon for applications that sit beside or are integrated with our main systems or products. Our company has bought into XML technologies from the beginning more than 10 years ago. Mainly XSL-FO and XSLT. Mostly for quite traditional publishing use-cases. Even though our main products are built with Java and we are thus quite a mainstream software development shop we are also not afraid of applying XML technologies where it makes sense.
Our development team is trusted by the business to make their own technology choices. In many cases the business doesn't even care which technology is used to build something. They mostly care about what it can do, how quickly we can build it and how reliable it is. Of course this is not a green-field and we do have to build solutions that operate with or inside our existing applications (which happen to be written in Java for the most part).
We are a marketing operations company and our systems are used by marketing departments of large international clients in retail, government, publishing, manufacturing, automotive and other areas. Where does XQuery, or XML technology in general, fit within our main on-line applications? Here are some examples of areas where it is beneficial for us.
- Publishing: XSLT, XSL-FO and increasingly XQuery are used to create printed materials such as catalogs, posters, brochures, business cards etc. But also micro-sites or web-apps that sales staff can take on the road with them to talk to their customers. The content for these products can be authored in an XML-based system that gives it's users an almost WYSIWYG view of the finished product. Or it can be provided and edited in a configurable database/content mangement system that acts as an on-line ordering system for these products. XQuery is also used for publishing projects that cannot be handled by our existing systems. An example is generating an annual report web site for one of our clients.
- Order fulfillment: when our clients order products via one of our systems they need to have it rendered. Often into PDF for printing but also for on-line use such as publication on their own web-site. Also, each client may have different requirements for fulfilling orders. Some require submitting files to a printer's web-service, or they require order data in the form of spreadsheets. Some are pushed to one of our other systems to be handled by our internal staff. XQuery orchestrates the rendering and reporting (often with XSLT) for these orders in a way that gives each client what they need.
- Content APIs: our customizable content management system is a Java application with a RDBMS. It may store anything from printable products, articles with textual content or even a detailed inventory with photos of all the retail stores of a client. To access this data more easily we developed an XQuery and BaseX integration that will have a synced version of all this system's data in XML format. Any of our internal services (such as the above mentioned order fulfillment service) can use this XQuery-based content API to get the relevant data from this content management system.
- Data & Content Engineering: frequently we are tasked with assignments that cannot be handled by our regular systems. A good example is processing and transforming the data representing the complete and detailed inventory of all 500+ stores from a retail client and bringing it into our content management system used by the client to plan their marketing campaigns for their stores. From this case I learned that XQuery is very well suited for this type of job. Another good example is enabling translation of our applications, preparing UI and content for translation, processing the translated content and merging it back into the application.
So, to sum it up. XML-based technologies, XQuery included, is proving it's value for us each and every day and using it succesfully also helps pave the way for increased usage in our company especially when dealing with publishing and data processing. Most often you will see them appear in between systems (as glue) or at the edges of a system (to deal with special requirements) as these parts often require more flexibility.
I'm always trying to be open to alternative technologies for implementation and often I challenge others by asking for alternative solutions when I pitch the idea of using XML technology. I like to think that I have enough general knowledge of other languages to be able to advocate XML-tech when I think it is a better fit for the job. And I also think that we stay critical once a solution is chosen.
I do admit, however, that it is often more easy to hire a new Java developer than it is to hire an XML developer. In our company both exist side-by-side in the same team, and sometimes even in the same person.
In fact, I wrote this long response not only as an answer to this thread but also to let you know that we could use a new team member. Especially one that knows XML technologies well. In particular XSL-FO, XSLT and XQuery. But if you also have experience in either Java development or front-end Javascript development that would be even better. We, the IT team, operate from Eindhoven in the Netherlands but we have our headquarters in Manchester in the UK. If your are interested in knowing more about this opportunity then reply to me in private.
--Marc