Montag, 11. August 2008

Controls Managment Project: Desiding for JCR/Sling

I am pondering for a half year on the idea of creating a piece of software which allows to manage (security) controls. There are several programs which allow to manage risks, but they assume the existence of a complete business services catalogue, broken down to hardware installations and software instances. Which I do not have atm.

What we do have is a set of controls, together with measures which describe how to implement those controls. The very basic model is:
1 control <-> m measures
1 measure <-> m implementations
A set of controls can be packet together in a workbook (haven't found a better word for it), which then can be assigned to someone (e.g. infrastructure guys) to define the implementations and their respective fulfillment.

This is all kind of vague, and it will probably will remain to be vague and not 100% defined in a strict (relational) domain model. It might for example be possible that some controls have more attributes than others. This is of course possible to be modeled with object compositions, but this is always the point where ORM starts to produce to much friction heat...

And this vagueness is imho a indicator for the need of a kind of semi structured data model. And this again is a good sign for using the data first approach: use the hierarchy as structuring model, and, well, see to more structure later. Maybe :). Therefore JCR is the weapon of choice....

As for Sling: I am still completely indecisive regarding the right client technology. Therefore it makes sense to have a REST-full interface to the business domain.

And Sling is sexy. Want to use it. 'Nuff said.

Next steps would be to answer some questions regarding Sling development. Currently I am scouting the message boards and the (way too sparse) documentation...
  • what's the best way to setup a Sling project? Use webdav for deployment?
  • How to backup/restore work?
  • How to design a JCR/Sling project? Top down? Paralell development of content model and functionality?
  • OSGI Best Practises
  • Which client-side technology to choose?

6 Kommentare:

Anonym hat gesagt…

what's the best way to setup a Sling project? Use webdav for deployment?

For the "heavy" functionality (servlets, observers, java beans) use OSGi and build your modules with Maven. This should also answer the question of how to deal with version control.

Anonym hat gesagt…

How to backup/restore work?

For scripting you can use the FileSystemResourceProvider that allows you to put your scripts on the file system and use version control there.

Anonym hat gesagt…

How to design a JCR/Sling project? Top down? Paralell development of content model and functionality?

Start with your content model. You will extend it later on anyway, but a content model gives you a mental idea what you want to build. Then start filling in example content. On the one hand this will validate your content model, on the other hand it gives you a good starting point when developing scripts and templates.

Anonym hat gesagt…

Which client-side technology to choose?

Use Dojo. It is bundled with Sling as an extension module, has integration with the Data Store and it works with all major web browsers and Adobe AIR.

Michael Marth hat gesagt…

Hi,

I can only encourage you to give Sling a try. You will like it. Re your questions:

* what's the best way to setup a Sling project? Use webdav for deployment?

I use WebDAV. On Windows it is advisable to mount the webdav drive with WebDrive or similar so that you have a drive letter. There is also an Eclipse plugin but have not tried it.
You really only need a text editor, maybe a JSP editor, but there is no need for a big gun like Maven or similar big setups.

* How to backup/restore work?

I user CRX quickstart and do backups through the JCR export (exports the whole repository). That is of course possible with any JCR repo. Another possibility would be the CRX Quickstart Package Manager. The scripts (and file content) can of course also be backed up via WebDAV.

* How to design a JCR/Sling project? Top down? Paralell development of content model and functionality?

IMvHO Sling projects lend themselves to an agile/iterative approach. Design your screens and write some jsps to put in content, then iterate. You will get very far with data first (e.g. just store all your props a s strings). Once you are certain what you want you can easily refactor the JCR content. The only aspect of the content model that I recommend to think about in advance is the hierarchy.

* OSGI Best Practises

You're sure you need OSGi?

* Which client-side technology to choose?

You mean Rich client stuff? This is orthogonal to Sling. It is useful, though, if your client speaks JSON because Sling can do that OOTB.

Chrigel hat gesagt…

Thx for the hints, very much appreciated!

I currently tend towards Flex as a frontend, without any justifications (this beeing an advantage of a weekend project) except curiosity (and "Because I can (TM)".

I will investigate a little bit in Flex/JSON, since, as you said, there is (not yet) the same ootb XML-functionality in Sling.