The Contensive Server Framework (CSF) provides an environment for internet applications. Among it's goals are:
Pages are rendered using several primary components:
The rendering client creates the document as follows:
Addons can be configured to add to content (as drag-and-drop in the wysiwyg editor), or they can run automatically in several positions of every page, or they can run in the background periocially. They can also be referenced by other addons as a requirement. For instance, any feature you create that needs jQuery just has to check the box marking jQuery as a dependency. The system automatically adds it once and only once, in the correct order.
There are two primary parts of an application, the content structure and the addons. The content structure are the components you might consider as a normal dynamic website, pages, templates, etc. Addons execute the custom functionality. Content development will not be covered here.
To include the output from a dotnet assembly to an addon, build a compatible assembly, install it on the destination machine and add it's full name space plus class name to the DLL section of the addon. This is a quick description of how to do this.
You need Studio 2010, Visual Basic or C-sharp. 2012 should be fine but it is not tested yet.
Download the templates from:
Unzip the files. Eventually you might want to create a visual studio project template from these projects. For now just use them.
There are a few basic changes you will have to make:
If your system is a 64-bit system, please update the destination to the \Program Files (x86)\ folder.
To test the addon, build this first. Then create an addon in the website. In the DLL tab, put addonTemplateCs.addonClass (or whatever you changed the namespace/class name to). Click on the addon and you should get "Hello World"
Addon assemblies only have one public method, execute( cp ). CP is the main API to the system. The assembly returns a string back to the system, which is the result of the addon.
There is a reference online at:
BE CAREFUL -- The argument passed to contensive assemblies, cp is an object from a class that inherits an abstract base class. What that means is that you will program assuming the object passed to you is cpBaseClass. ALL the doumentation is written about cpBaseClass and all the other base classes. In reality, the cp object is built from cpClass, but it is a subclass on cpBaseClass so all the cpbaseclass properties and methods are supported.
The cp object does not have properties or methods by itself, it has classes with properties and methods. So if you want to save a string to a file, you would us the cp.file.save()
Looking at the API page, on the left,
open Contensive Base Classes
open to CPBaseClass
and click on members.
You see everything in CPBaseClass are classes
One of the objects in CPBaseClass is the CPFileBaseClass. Go back to the left navigation and open the CPFileBaseClass section, and click on members. You see a list of methods, one of which is save()
To use this save method, you enter cp.file.save( "filename", "content to save" )
You should restrict your access to two locations:
cp.site.PhysicalFilePath - the file area your site stores files, located at \inetpub\sitename\files\
cp.site.PhysicalWWWpath - the root of the website, located at \inetpub\sitename\wwwroot\
Reads and writes will be restricted by the framework in future builds.