Sense/Net 6.0 Devblog
The development blog of Sense/Net 6.0
Back to Sense/Net

Sense/Net 6.0 Beta 5 preview is on codeplex.com

December 28, 2009 12:12 by Peter Zentai

The source code only version of the Sense/Net 6.0 Beta 5 has just made available on codeplex as an alpha release.

There are quite a number of things we need to polish before we can reach production quality. And we are hardly working hard on the evaluation materials too that describe the Beta 5 features in detail. So get this version to experiment only with the Sense/Net 6.0 Content Lists, the Templated Field Controls and the Lucene based Content Query.  Do not implement anything important with it just yet.

More...

Searching a tree structure with Lucene.Net

December 16, 2009 03:00 by Peter Zentai

 

   1: /*
   2: Newsflash!
   3: 
   4: It’s now just a couple of days and we release Beta5. 
   5: In that the Content Query infrastructure is moved to the Lucene platform. 
   6: Sense/Net 6.0 endorses the eat your own dogfood philosophy, 
   7: so the Content Query feature is massively used across the system 
   8: in the core functionality. Even the repository type system 
   9: relies on the Content Query layer. 
  10: We expect a nice boost in the global system performance 
  11: in every content releated feature. Read on to find out why.
  12: */

Lucene is amazing – it is really everything you want from a software component: it’s smart, does it’s job well - asking very little in response, greatly simplifies your (professional) life :), open source (so you can feel more confident: you will have a higher success rate in mitigating project risks coming from relying on a 3rd party tool),  extensible and proven.

On our way to implement the Sense/Net Content Repository Lucene Adapter we had some experiences that worth sharing on using Lucene with deeply structured content and path based queries.

As Lucene follows a flat model (one and only one document type, arbitrary fields, no structures), the most trivial approach would be to flatten the tree by storing the position of each node as an extra stored/indexed field added to the node’s own fields– let call it the Path field.

The PrefixQuery

Now, finding nodes in a specific sub-tree looks really simple as we have PrefixQuery at hand:

private IEnumerable<DocumentWrapper> Search()
{
var pathquery = new PrefixQuery(new Term("Path", "c:\\Development"));
var result = Searcher.Search(pathquery);
foreach (Document o in result.Iterator)
{
yield return (new DocumentWrapper(o));
}
}

In your first couple of test scenarios it works nice. So you increase the size of your prototype to let’s say handle quarter a million of items now. Just to run into the the dreaded “TooManyClauses was unhandled” exception

image

It turns out the the PrefixQuery compiles into a list of possible TermQueries connected with OR relation, so basically the query Path = “C:\Development*” transforms into this: Path = “C:\Development\Folder1” OR Path = “C:\Development\Folder2” OR … and so on. The list is capped at 1023.

This 1023 limit looks really bad, but googling around the topic quickly brings up a solution that appears to be working.

The PrefixFilter solution!

The PrefixFilter let’s you efficiently filter rows from the query result based on a prefix criteria.

var query = new MatchAllDocsQuery();
var filter = new PrefixFilter(new Term("Path", "c:\\Development"));
var result = Searcher.Search(query, filter);

The query completes nicely, but with a touch of sluggishness. It has two major drawbacks however

- This approach splits the original query into two parts – a query and a filter, and it would complicate things to a level that would likely to be error prone in complex query cases (where multiple references of filters would be needed)

- Performance drops to mediocre/bad this way: in my test environment (Processor: Core2Duo, 2Ghz, Lucene index: 219000 rows, my complete c:'\ drive effectively) searching for c:\Development* returned 34.000 hits in 500 milliseconds. What is even worse: the execution time does not drop significantly as the result count get smaller. You may say: hey, 500 milliseconds is fantastic for such a mighty query!! yes. for the desktop it is… For the “Server Side”– it isn’t. In our case millions of queries will run a day, most of them around content pathes, and if each would cost us 500ms then we are – let’s face it - mucked.

So what else do we have?

The ConstantScoreQuery Solution?

The ConstantScoreQuery wraps a filter – a PrefixFilter in our case – and turns it into a Query class, ready to be combinef with other query parts. It removes the complexity of the split query model at least.

private IEnumerable<DocumentWrapper> Search()
{
var prefixFilter = new PrefixFilter(new Term("Path", "c:\\Development"));
var query = new ConstantScoreQuery(prefixFilter);
var result = Searcher.Search(query);
....
}

But

- The performance is even worse, 800 milliseconds now

- Plus now we need to give up ranking and scoring or at least we are threatened by constant scores instead of the default relevant scores.

And this is the point where we can be relatively sure that the problem lies in our approach and not in the implementation. Lets think in TERMS.

The Ancestors array property way

Instead of querying the Path field for a prefix match let’s extend our Lucene storage model. On the top of the path field let’s store each and every ancestor’s path of the node in the Ancestor array property.

 

private static Field[] CreateAncestorFields(string path, string separator)
{
string[] fragments = path.Split(new string[] { separator }, StringSplitOptions.None);
List<Field> fields = new List<Field>();
for(int i = 0; i < fragments.Length; i++)
{
string value = string.Join(separator, fragments, 0, i+1);
fields.Add(new Field("Ancestor", value, Field.Store.NO, Field.Index.NOT_ANALYZED_NO_NORMS));
}
return fields.ToArray();
}

so:

the document at c:\development\sensenet\luceneadapter\program.cs will have 4 Ancestor fields, these:

c:\
c:\development
c:\development\sensenet
c:\development\sensenet\luceneadapter

Lucene thinks in TERMS. Each of the above lines became a TERM of its own, and when we search for contents with a specific term as a value for one of the content’s fields, then we are back in Lucene’s domain. A simple TermQuery to the Ancestor field will produce the desired result: in no time.
private IEnumerable<DocumentWrapper> Search()
{
var query = new TermQuery(new Term("Ancestor", "c:\\Development"));
var result = Searcher.Search(query);
....
}

 
 Capture
  Times are milliseconds.

 

And what is the trade here? Index gets bigger of course. For ~219K items this meant about 30 extra MBs. Compared to the total index size which is 1.6GB this tradeoff is acceptable. The memory footprint is small however: searching the index gobbled up only an additional 4MB of memory.

The sn:SenseNetDataSource is here!

December 1, 2009 19:25 by Peter Zentai

I am really excited to announce that today -as part of the Beta5 marching- we checked in the SenseNetDataSource feature.

With this new ASP.NET DataSource you can use the Sense/Net Content Repository with the rich set of DataBound controls  provided by Microsoft and other vendors (like GridView, ListView or Form) to produce more in less time using the data driven, rapid application development approach.

Also, the SenseNetDataSource (and some other controls I’ll tell you about later) makes it easier for you to build declarative solutions, that are easier to maintain, as much of the scenarios that in previous Betas needed coding now can be developed without a line of code – as long as we don’t consider writing html tags coding :).

So here is how it works: of course the way you expected it. You place a SenseNetDataSource object in the markup (you can do this from code of course) and link it to a DataBound control - GridView in our example.

image

The ContentPath attribute specifies the Content (typically a collection) we are interested in. MemberName is optional, and its default value is “Children” – so the default behavior is to list a content’s child items. You can also target reference properties with the MemberName attribute if the content has any (like “Related Articles” can be a reference property defined on an Article content type).

The result is as might expected to be:

image

Beyond accessing simple collections of the Content Repository, the SenseNetDataSource can also provide an easy access to the ContentQuery functionality. Setting the Filter, OrderBy and GroupBy attributes will help you to define your query expressions on an easy, declarative way.

But wait! Haven’t I seen Eval and BoundField there? So all these new stuff now needs C# classes and so? Do I have to define my content types in CODE NOW????

 

Wait, no! Not at all! Quite the contrary: the best thing is that all these data binding magic works with the Content Types you created as Content Types Definitions – mere XML data. This is a really really important thing: with Sense/Net 6.0 your are able to define data types – content types we call it – dynamically and then your are able to treat instances from them as strongly typed, bindable data entities.

Here is how it works:… But now I really must be going home :) I’ll finish this today, so stay tuned.

Permissions at the speed of light

May 14, 2009 22:41 by Molnár Gergő

 Load 25 000 nodes with a query
 Time needed
Sense/Net 6.0 Beta 1 and Beta 2 21 sec
Sense/Net 6.0 Beta 3
8.7 sec
Sense/Net 6.0 Beta 3.1 3.7 sec

In a nutshell: the latest branch is more than 5 times faster than Beta 1 and Beta 2.

In Sense/Net Content Repository, apart from the usual "open", "modify", etc permissions, we handle "see" permissions as well. If you run a query against the repository you'll get back nodes the user of the query can see. It is even more complex in case of versioned nodes. For example if you are an intranet user checking out a document from another project or department, you may see only the approved, public version. The checked-out draft versions can be seen only by the members of the project or department. When you run a query, you'll get back only the latest version of the node you have access to.

More...

CMS Vendor Meme - The Sense/Net 6.0 response

April 9, 2009 10:31 by Orosz Gergely

Even though we have not yet been tagged by the CMS Vendor Meme started off by Day. So far we have been left out of tagging so we decided to join without being tagged. And to keep the flow going we are tagging Umbraco and DotNetNuke and Liferay to participate.

 

"WE GET IT" CHECKLIST FOR VENDORS

1. Our software comes with an installer program. - Not yet

As of now it does not: you have to install Sense/Net 6.0 Beta 3 manually. However the installer is under development and is likely to ship with the next release. 

2. Installing or uninstalling our software does not require a reboot of your machine.- Yes 

Quite the obvious question: no. Deploying .NET based solutions barely has the need for restart and we are no exception either. 

3.You can choose your locale and language at install time, and never have to see English again after that. - Sort of

Language is not chosen at install time (yet). And as of now some strings within the administration interface are still English though we are constantly localizing all interfaces.

4. Eval versions of the latest edition(s) of our software are always available for download from the company website. - Yes

There is no eval version to download: you can only download the full version. And the source code as well. Did I mention that we are open source?

5. Our WCM software comes with a fully templated "sample web site" and sample workflows, which work out-of-the-box. - Yes


It does: after having downloaded it you can start with a rich demo site.

6. We ship a tutorial. - Sort of

As of now we do not include a tutorial in the download, only some sample addon code (and of course the source code). Numerous tutorials can be accessed through the wiki though.

7. You can raise a support issue via a button, link, or menu command in our administrative interface. - No

We do not have an interface as such. Support issues can be reported via our forum or - with a license - directly at our team.

8. All help files and documentation for the product are laid down as part of the install. - Sort of

Code documentation does come with the install. However non-developer help files are not shipped with the install: these can only be found online.

9. We run our entire company website using the latest version of our own WCM products. - No

Oddly enough we run on the previous version, Sense/Net 5.5. There is a large amount of data that would have to be migrated and we have not allocated enough resources to do so as of now. We are planning on updating though.

10. Our salespeople understand how our products work. - Sort of

They understand most of it. However we often have developers help in the sales process as they are much more aware of the current state of the software in the development cycle.


11. Our software does what we say it does.- Yes

This we take very seriously. We want you to get at least what you expect.

12. We don't charge extra for our SDK. - Yes

As an open source product this is self understanding. Our SDK as of now are some sample projects. You will need to have bought Microsoft Visual Studio though to use them.

13. Our licensing model is simple enough for a 5-year-old to understand. - Sort of

We have an open source GPL license and 3 different kinds of enterprise licenses. The enterprise licenses vary in the amount of support we guarantee. The licenses are not yet public as we will only be posting them with the stable release.

14. We have one price sheet for all customers. - Yes

We do not differentiate, yes. 

 

15. Our top executives are on Skype, Twitter, or some similar channel, and: Feel free to contact them directly at any time. - Sort of

We are not doing good with Skype or Twitter: we have a rather infrequently updated company account which we are planning to post to more often and one of our developers runs tweets on his everyday development. However we do respond quite fast on our forum and via email and do encourage you to contact us.


Final score: 33/45

Two notes to the final score:

  • We do not beleive in over valueing ourselves. The score represents the real value of our software right now: not bad, but far not perfect. We value your time and do not want to trick you in trying out this software and be disappointed. As we've said: it does exactly what we say it does. Try it yourself by downloading.
  • Our product is stillin beta phase. A lot of the checklist items missing right now (like installer, localization) will be included in the stable release of Sense/Net 6.0.
 

 
 
Meme ID to : 9c56d0fcf93175d70e1c9b9d188167cf Google this id to find other posts related to this meme.

Sense/Net 6.0 Beta 3 released

March 25, 2009 16:41 by Peter Zentai

It's now only the matter of minutes and our newest release will be revealed on Codeplex. There is a lot work in this release and we do hope you will enjoy its results.

In the last minute we found an important scenario in the Source Code version that leeds to an unexpected behavior by pressing F5 in the VS solution. The Visual Studio  development experience is a key aim for Sense/Net 6.0, therefore the Pending release in Codeplex remains pending untill the solution for the issue is tested. It shouldn't take longer then a couple of hours :). 

I was happy about being rated to 1 by someone. This is a sign of ipatience for me, for what I really thank you guys.

(If you can't wait all you have to do is join to the SenseNet codeplex team to be able to see pending releases)

A week after I initially planned we released the Beta 3 finally. Check http://www.sensenet.hu/download for details.

User Friendly Content Type Editor in Silverlight

February 25, 2009 19:10 by Tamás Bíró

I have just received this screenshot showing the working prototype of a Silverlight based Content Type Editor. As you know, Content Type Definitions or CTDs are stored in the Content Repository (SNCR or PFS) as XML. While XML editing is nice and simple for coders, it is a nightmare and minefield for business users. So what we need is an editor that creates a valid CTD XML  with a friendly and foolproof GUI. Since we wanted to try Silverlisght as an ECMS GUI for quite a while, we decided to do this one in Silverlight. This is just a layer built on top of the XML CTD, so business users can use the nice GUI, while coders can use the raw XML. This Content Type Editor will later become a Form and List editor, so business users will be able to create lists, inventories and forms with a few clicks. We are also keen to see how this thing runs with Moonlight, so we stay browser and client OS independent. Enjoy the shot, I think the GUI needs no special explanation - we can see a list of content types and the content type "user" in detail.

Geek paradise - access your ECMS from PowerShell command line

October 19, 2008 22:42 by Tamás Bíró

Our team lead developer is a real geek, and we love him for this. He wrote a Microsoft Power Shell plugin that enables users, especially developers and command line addict sysops to access the Portal File System (PFS) from a command line interface.

As you can see from the screesnhot, the first commands install the plugin, so when you type CD TNG: you actually switch the current directory to the PFS root. A simple DIR command lists the folders from the PFS, indicating the content type, YourInternet is not a Folder, but a Site.

And now for something completely different. The crazy stuff comes now. You change to YourDocuments. DIR gives you nothing, as the folder is empty. But there is the NEW-ITEM command, which creates ECMS contents right from the command line. So why not create some cars, by which I mean Car content types. Another DIR and the cars are listed... But you can also list any of their Fields, in the next example the complex DIR gives you the make and Model fields of the cars.

Another example, when you read a reference property of a content. In this example, we navigated to the IMS folder where users and groups are store, and listed the Members of the Administrator group.

Plans for future functionality include mounting multiple PFS instances and copying contents from one to another, using the copy command. Stay tuned, you geeks.

Nice job, Gyebi.

Access your contents from Total Commander, Windows Explorer or Visual Studio

October 17, 2008 19:51 by Tamás Bíró

Yeeeesssss. Portal builders, developers and end users will all love this feature. Now you can access your contents from Total Commander, Windows Explorer or Visual Studio, or anything that supports the WebDAV protocol. You can even map it as a drive. So you can hav P:\ as the root folder of your Portal File System. Check out the screenshot with the first working prototype.

This is a big boost to productivity for both builders and end users, because now you can work from your favourite tools, no need to open Portal Explorer most of the time. When you save a content, it is automatically versioned, there is permission check, etc. You can also open office documents, Word and Excel directly from Office and save it back, so there is no need to download, change and upload files one by one. Drag and drop move and copy also works.

On the screesnhot, there is a Content View open in Visual Studio, there is a Content Type Definition open in IE as XML, and you can see the PFS folders in Windows Explorer and Total Commander, in the latter the PFS root is mapped to Z:\ so the folder is Z:\System\Schema\ContentTypes\GenericContent.

Screenshot made with Windows Vista and Sense/Net 6.0 Beta 2 prerelease.

Content Types - The Basis Of Sense/Net 6.0

October 7, 2008 20:40 by Orosz Gergely

Content Types are the heart and soul of Sense/Net 6.0.

A content type is a reusable set of fields you want to apply to certain contents.  Everything (every content) you see in Portal Explorer and on Sense/Net 6.0 portal pages is defined by Content Types - all the files, users, groups, webcontents, page templates, pages and even folders.

If you will be building a site the first thing you will be bumping into are Content Types. For example if you want to run a news site the first thing you will have to do before being able to start off with any kind of designing or programming is define what an article will contain - define its Content Type. Lets say you decide that an Article needs to have an author, title, abstract,  text, and related articles. You will have to create this Content Type. From then on you will be able to start creating and managing these articles in the backend of your portal via the Portal Explorer. And only after that will you will be creating specific Content Views to display these articles on your website in the layout(s) you prefer.

If you want to dig deeper into this topic read the wiki page on Content Types and Tamás's article on Content Type Definitions. If you want to move on check how you can create a Content View to display a Content Type.

Bookmark and Share