![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUl7gi9gAmnBAcrhyXMcOQolg10RgsUAcQxTz9xhO-1PExn0qZ-q5Z3PogXTq_1WytLLB8G9sk_l1nboo6fMs4KQ3X3X4wQ7A6ZJrZlJz3HV_71O0arSBjwWOUWhGdEArGSJUBUbVbuHeF/s320/studiosus4.png)
The client uses the HTTP API of SUSE Studio to talk to the server. This way it gets the list of appliances and builds of a user and can operate on this data. It does some local caching of results of HTTP request in order to provide a very responsive user interface. The client is implemented using the KDE development platform, which provides all the bits and pieces to do the UI, to perform the HTTP communication, and also the embedded VNC viewer. It's pretty much standard technology, but I'm still amazed of how well all these pieces fit together and how easy it is to write such a client, which allows to move into areas, which aren't covered by the web application.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2r7yR220JnznPUna9IUqvK_fduANhQKtswT901m9P0KIoDfX6AXeFnpxrRR4QLK44yWDgcYSiMflNYUuISVBJ_6ApfgwNLGkMXMVj1L7B5KRvR36Eure84fONOKaQtd-fU5sGSzmLdRlX/s320/studiosus6.png)
One detail of the implementation is particularly interesting, that's the XML parsing part. The REST-like API, which uses XML over HTTP, obviously involves quite a bit of XML parsing. Usually this is tedious code to write. This always annoyed me, so I wrote a tool to generate the parsing code, KXML Compiler. It's one of my hobby projects I work on from time to time since a couple of years now. It takes an example XML file and generates C++ classes from that, which represent the data, including parsers and writers from and to XML. So the application developer gets a nice native API to the data represented in XML without having to write any code. The tool works well for my use cases, but of course there are quite some situations, where it could produce better results or where it doesn't cover everything, so it sometimes needs fixes and improvements when taking on new data. It's an ongoing project and quite some fun as it involves some mind-twisting metaprogramming. The code is hosted as part of the Kode repository on github.
The code for the client is hosted in the Studiosus repository on gitorious.org. Some more information about the development during this hackweek can be found in my Hackweek blog.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_8vWvg9oHC5o2hgw5ANJ21OXY0kM2I62ni4Cw5PAWhXh47-EZwahIiBXCiW1tMrGkLAb2N5YhlcXmgdhWd9N613FXtusOdo5Zg54RSL6AAsIXb4p1LCvZ9-s9MCpMpd9MrHUqVWWyIXbL/s320/Hackfife.png)
Hackweek was fun. I'm happy about the progress I made. It also was great to see some of the other exciting projects which were done during this week. This is a fantastic way to stimulate innovation. I'm really looking forward to see more of what came out of this week and what future hackweeks will bring.
Oh this sounds really sweet. That KXML compiler sounds awesome too, it would be really neat to have it integrated into KDevelop by default! :D
ReplyDeleteGreat work I'm going to test this.
ReplyDelete