Developing custom applications

Hi, how can I develop a custom Elasticsearch backed web application? Kibana provides great visualizations but seems to only be useful for building dashboards, not more complex applications.

So far we are using Ajax-Solr which provides a great way to develop widgets that share a common query manager, but unfortunately that does not work with Elasticsearch. Is there anything like that available for Elasticsearch? I have googled quite a bit but didn't find anything with that functionality.

Thanks,
Jens