Who are you calling a SmartObject ?

The last few days, I’ve attended the K2 Global Learning (101) course, covering all manner of K2[blackpearl] – including K2 Studio, SmartObjects, Web Designer, K2 Workspace, SharePoint+InfoPath – and so much more.

While I’d been involved in the BETA program, and lots of reading/videos, it’s only recently that I’ve started to really explore the various pillars of K2[blackpearl] – and touch/feel for myself with some real examples.

There are so many topics that I want to discuss/describe – following the training course. By far the most important, and maybe misunderstood – is entitled SMARTOBJECTS.

Jey Srikantha from K2 was excitedly proclaiming what it is/does – many aspects to it, fairly difficult to sum up in a single phrase.

Unrelated (in some respects) from workflow, SmartObjects are essentially an Object Oriented Data Modelling paradigm, for systems integration – but with “function” – not just data.

Another way to think of it is a “point-and-click” business layer – we’re used to having nice designers for the screens & pages we develop – and SmartObjects has a similar concept (GUI business objects).

I’ll try to explain by looking at two distinct “pillars” – related to SmartObjects :

Data

The basis of any system is simply “data” – often pushed back to a database (persistance). Many pieces of data make up an “object” – akin to a database table.   You then perform actions – such as ADD, DELETE, UPDATE and LIST methods.  Think of some SQL statements – like INSERT, UPDATE, DELETE, SELECT – if that helps.

Often some stored procedures, or business layer objects (C# classes – for example) would be used to pull/push data – as well as any other specific business “functions”.

The good thing about SmartObjects is that these data “things” have the CRUD (create, read, update, delete) methods automatically created for the developer.

  • Within K2 Studio – add a new SmartObject (SODX)
  • Define some properties (data elements)
    • eg. ProjectName, Owner, Budget and ExpectedStartDate
  • These values are (by default) saved into the SmartBox SQL Server database
  • A table for the object is automatically created
  • And – the CRUD method is also auto-created

So – have just create a quick database (persistence) layer, and a data access layer – with absolutely no code – in about 30 seconds !!

You can essentially think of these “SmartBox” data stores as database design (tables) – but all the in’s and out’s are generated behind the scenes.

Not sure if the CRUD generated is SQL or stored procs – or what – will check up on this.

The developer can also create “object hierarchies” – as you would do with a database design, and referential integrity.

Such as an Employee – with ExpenseReports.

  • An ExpenseReport can come from one (and only one) Employee
  • Foreign key constraint, essentially.

OK – so I have a set of data attributes, and methods to utilise this data – using the point-and-click designer in Visual Studio.

What next ?

Well, you can then add other data elements – sourced from disparate systems. Such as Active Directory, SharePoint, and you could code your own for Great Plains (for example).

A data example is that the same Employee could have their payroll number in another system, or when you add a new employee, you need to create a new “My Site” in SharePoint.

Functions

The second pillar of functionality is thus the ability to specify what happens when certain methods are called – akin to methods within business object class library.

The example shown by Jey was the “Create” method for an Employee would add a row to the SmartBox data store (SQL Table) – as well as then add a listitem in SharePoint – without ANY code !

This SmartObject function – regardless of K2[blackpearl] is a great area for developers to quickly establish components with business rules – no need for any SQL, or procs, or data layer, or CODE at all !

Even transactional support is simply CLICK and choose – rollback, continue, commit, etc.

Here’s a quick look at the designer for SmartObjects :

  • Properties – simply name, description, type and “key” for linking
  • Methods – what “type” of Service does it relate to, and what to do !

SmartObject

More about SmartObjects to come – the bit I’m excited about is the LOB integration – will have to try out some Web Service hooks, into Great Plains, or CRM.

Advertisements
This entry was posted in SmartObjects. Bookmark the permalink.

2 Responses to Who are you calling a SmartObject ?

  1. uttara says:

    have you tried the integration with GP yet?

  2. Hey, This is a awesome thread. I found you on yahoo. Keep up the work.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s