K2 and jQuery: Creating a simple Worklist
With the release of K2 Services in the 1290 release, we’re able to get all sorts of data using RESTful services. These services provide output in 3 formats:
- XML
- ATOM
- JSON
XML is the default output. ATOM is a feed-style output which is in essence XML. And JSON is the one we’re going to use. JSON output can be seen as the serialized output of a JavaScript object. This makes it very easy to use in JavaScript and especially jQuery.
K2 Services - Part 2
Back when 1230 came out, I wrote a pretty long blogpost about the K2 SmartObject Services and (what was the beginning of) K2 Services. K2 Services is the Web Service that exposes a number of interfaces. K2 SmartObject Services is the K2 Server hosted WCF endpoint which allows SmartObject functionality. This post focuses only on K2 Services. The only change to the K2 SmartObject Services that 1290 brought was CRUDE (E for Execute) functionality to the RESTful part of K2 SmartObject Services. I’ll do another post on that new functionality.
This post is a follow up, since the K2 Services has more features in the 1290 release. The service now offers the following endpoints:
- SyncREST.svc
- SyncWCF.svc
- REST.svc
- WCF.svc
- WS.asmx
The WCF.svc and WS.asmx have already been covered in the 1230 post. They have changed, but not much, you can read about it in this KB1227 article.
The new sync services are designed with batch processing in mind. This also includes batch-actioning of worklist items so you can do things offline and have your app sync at a later stage. Sync simply stands for synchronization, something you can do with batch processing more easily.
K2 SmartObject Service and Versioning
Since the coming of the K2 SmartObject Service in KB1230 , people might have noticed the smartobjectVersion parameter in the managedEndpoints definition. Since SmartObjects have been around, they always had a version. The version number starts at 0 (zero) and increases by 1 (one) when the SmartObject is deployed.
K2 1290 is released
LINQ2SQL: Where is the DataShape class?
C# using statement and the K2 APIs
Recently in one of our projects, we had to do some performance optimizations that required us to look a bit closer at the resources our application used. In general, you should always dispose an object that’s implementing the IDisposable interface.
K2’s client API’s use a connection to the K2 server which needs to be closed and disposed after you’re done using them. In C# you can use the using-statement to dispose your objects when you’re done with it. The using-statement only works on objects that inherits from IDisposable.
Here are some examples of how to correctly use the using-statement when using K2 API’s.
K2 Web Services - Part 1
In the 1200 series, a few new web services are available out of the box. In this article I’ll tell you what they are for, how you can use them and give some insight on the technical details behind the services to make you understand them better.
There are two services new to K2 in the 1200 series:
- K2 Services
- K2 SmartObject Services
The K2 Services were first introduced in the KB001200 Update which contains a WS and WCF endpoint. A later release will bring REST-enabled endpoints for the K2 Services. The SmartObject Services are released in KB001230.
This post will cover the KB001200 and KB0001230 release functionality. The additional REST-enabled endpoints for K2 Services will be discussed in a separate post once released.