Bespoke Controls - a framework to deliver
One of our main architectural considerations is that we believe you should have no limit to the functionality you wish to develop on your website.
Visual Studio can be used to develop and debug anything on your Contensis managed site
In most cases we have controls and functionality that you can immediately leverage to deliver on the requirements of your web project, whether it be a sitemap, an image gallery or a forum, for example.
Sometimes, however, the functionality you wish to offer may be entirely bespoke to your company; a product list with up to the minute stock information may be such an example.
The approach to creating bespoke functionality, largely depends upon the technology that you are deploying with. If you are using our standard .Net model then we have a range of standard options available, if you are using another model such as PHP or JSP, you can quite literally do anything that you desire, as the templates used can include any code whatsoever that you choose.
We will look at the most common ASP.Net routes to start with.
This is an example of a Server Control. In this case it is one of our own, but there are no limitations on what you can produce.
Bespoke User and Server Controls
In the .Net world, the most common approach to developing components is to use .Net Server Controls or User Controls.
Either of these methods allows you to develop any functionality you desire within the bounds of managed .Net code, something we're sure your developers will love.
We have linked to a page from MSDN on developing a simple ASP.Net Server Control - http://msdn.microsoft.com/en-us/library/aa310915(VS.71).aspx
If you wish to use User Controls please see -http://msdn.microsoft.com/en-us/library/26db8ysc(VS.85).aspx
The advantage of these controls is that you can develop them in a standalone development environment, and deploy them into Contensis in a couple of simple steps.
You can develop anything you choose.
In essence all you need do is copy the dll assembly file a to your Contensis solution and add a reference in the relevant template.
As an example, our entire Forum module is a single .Net Server Control simply partitioned into various sub classes and controls.
In essence you can write ANYTHING that you can write in .Net inside a Contensis published webpage.
Visual Studio is used as standard
Writing .Net Server Controls requires a development environment such as Visual Studio. Contensis currently runs on the Microsoft .Net 3.5 framework
Using our Control API
You may decide that you want to follow the standard mark-up that Contensis produces. If this is the case, rather than inheriting from standard .Net Controls you can, instead, inherit from our controls. We provide training on achieving this as part of our standard .Net Developer Training course.
If you do use our controls, you will have the added advantage of being able to access certain information about the page in a managed manner. For example, if you were wanting to personalise the homepage, you may choose to check the group assignment of a particular user. This can be done in a single line of code with ease.
Custom Code can be used to add code to any template. As long as .Net supports it, it can be entered in this Editor.
Custom Code
If you just want to add a simple line or two of code to the template, then Custom Code is the way to go. You don't have to be a .Net expert to do this, and there are plenty of examples on our support site. We show a screenshot of the Custom Code used on one of the templates on this site.
Each placeholder has its own events, so you can hook up to any of these and execute code at runtime if required.
Include Files
If you just want to include some HTML or a particular piece of script directly into a page without Contensis changing it in any way, then Include Files is the way to go. Include Files are used heavily when deploying to other environments such as PHP-driven sites. We have an Include File for PHP that produces a replica of the Simple Menu XML control as an example.
Include Scripts
If you want to use JavaScript heavily in a site, then any JavaScript files can be referenced. We even ship some of the standard frameworks, such as JQuery, which we use a lot for our own development.