What’s new in Composite C1 2.1
Almost six months have passed since we released the source code for Composite C1 as free open source and it has been a really positive, exciting and instructive experience for us.
Much of our time during this period has been spent studying the feedback we got and reacting on it by making our code more feature rich, robust, faster, easier to install and available to more platforms, and this release should
bring joy to most of the community that have voiced their opinion. In addition to making Composite C1 a sweeter experience we also added a bunch of features that help professional web development agencies deliver websites faster and with (very) easy migration
options for both SQL Server and Windows Azure broadening the scope of tasks you can solve with the free open source version of Composite C1.
Below is a run through of the major new changes in the Composite C1 2.1 release – if you don’t find what you were hoping for, make sure your feature idea is registered on
http://compositec1.codeplex.com/workitem/list/basic and that you have voted for it!
- Complete support for all major browsers
- Get 30 days free trial access to premium add-ons
- SQL Provider is free open source - and easy to switch to
- Windows Azure CMS
- Full ASP.NET Master Page support via contrib. project
- A brand new Visual Editor with awesome CSS decoration possibilities
- New source code editor, full browser support
- Faster in key areas
- Page performance profiling
- A multi lingual C1 Console - in 3 languages so far
- 100% support for double byte characters
- API that makes your code work on premise and in the cloud
- C1 Functions can attach attributes to html elements
- Measures to combat brute force hacking added
- New standard C1 Functions added
- New dynamic data functions added for CRUD
- Verbose logging disabled by default
- Critical issue with XML Provider file corruption fixed
You can download Composite C1 2.1 from CodePlex today and from the Windows Web App Gallery (Web Platform Installer and WebMatrix) within a few weeks.
Composite C1 2.0 users can
upgrade to 2.1.
Complete support for all major browsers
Internet Explorer 7, 8 and 9, Firefox 3.6 and 4 and Chrome – now they are all equal and first class citizens in the C1 Console. If you run the latest Firefox, Chrome or IE9 you should expect great UI performance.
You can read more about the browser support in Composite C1 2.1
Get 30 days free trial access to premium add-ons
The “Available Packages” wizard in Composite C1 that lets you download and install add-ons and updates on demand now displays premium packages as well. You can download them like any free package and evaluate it for
30 days without constraints. If you like it you can buy it and continue your use without interruption, or you can simply uninstall it again. Premium add-ons currently include Newsletter, Extranet, Event Calendar and Content Versioning and Auditing.
SQL Provider is free open source - and easy to switch to
When we open sourced Composite C1 we kept the SQL Data Provider as a closed source commercial product and got a lot of negative feedback from the developer community. Following our policy of always providing developers with free
tooling and understanding that SQL Server is a common developer tool we have released the SQL Data Provider as free open source and included it in the Composite C1 source code.
We have also made a package available that will migrate XML based websites to an SQL Server using a wizard and a valid database connection string. The migration process takes about five minutes in total and very rarely requires
any change in code, thanks to the data layer in Composite C1.
A little background about the data layer in Composite C1: Source code written in and for Composite C1 is ‘data store agnostic’. This is achieved via a LINQ oriented API, where LINQ queries are transformed to LINQ for
XML (in memory) or LINQ for SQL. Because of this you can change the physical data store, without interfering with the application code. Composite C1 2.1 contains a ‘dynamic data provider’ for SQL Server that is capable of mimicking the default
XML data provider, and by installing a migration package you can automate the process of moving from XML to SQL. You install the package, start a small wizard, enter a connection string (a dbo login to an existing empty database) and verify and finish. A few
minutes later your website is running on an SQL Server and you should notice no difference in the application or on your website.
Windows Azure CMS
You can copy an existing Composite C1 website to Windows Azure simply by ZIP’ing it (there is a package for that) and then move the ZIP to Azure using the Azure control panel and a premade Azure package and configuration
file. The migration process is very easy and fast and allows you to scale out a Composite C1 website across regions and servers.
Full ASP.NET Master Page support via contrib. project
The contribution project
http://compositec1contrib.codeplex.com/ for Composite C1 adds features like shorter extensionless URLs, Sitemap providers and Master Page support. In cooperation with the contrib project lead the “in memory preview” feature in Composite C1 -
where page editors can instantly preview their finished page without saving - was refactored to use the same ASP.NET handlers as normal page renderings, ensuring that the Master Page feature is now available in all view/preview situations.
A brand new Visual Editor with awesome CSS decoration possibilities
The editor for managing HTML visually (the WYSIWYG editor) has received a major overhaul. The Tiny MCE based core has been upgraded to a fresh version and the toolbar has become customizable. The features for customizing easy
CSS class selection in the UI have become highly customizable, enabling ‘instant HTML effect’ buttons and style selections that adapt to CSS3 selector rules. Front-end developers can empower the end users with easy styling access, all controlled
via your own CSS.
New source code editor, full browser support
CodeMirror is a smooth browser based source code editor and we have integrated it with Composite C1 giving great auto indent and syntax highlighting features and the ability to search in your
source code using the browsers built-in search feature. We decorated it with a toolbar giving you access to auto indention, the C1 Function markup wizard, URL’s for pages, images, media and flat files, like css.
In previous versions the editor and toolbar were only available to Firefox users – now Firefox, Chrome and IE users have the same features available.
Faster in key areas
Previewing pages is much, much faster and developers should find that working with code and data types is a lot faster. Those are the only real areas of poor UI performance we had left and the overall impression of the C1 Console
should be good for all user groups.
Page performance profiling
Add “?c1mode=perf”to a page URL and a function call tree with time measurements will tell you what you need to optimize or cache the page rendering. This feature enables developers to locate any performance problem
a page rendering might have in a matter of seconds. You can see a sample screen shot showing a profiling at
A multi lingual C1 Console - in 3 languages so far
During the beta phase Composite C1 2.1 was translated to Russian and Ukrainian, ensuring that those languages are now supported and that the C1 Console is ready for more languages, and we urge the community to consider helping
us translate the C1 Console to as many languages as possible.
Tools for localizing the C1 Console are available at
http://docs.composite.net/LocalizingConsole - the tool integrates changes into your Composite C1 console “live” and uses the Google Translate service to propose a translation
from English to your local language. A tool that can export your translation work as a C1 Package is also available.
The language of the C1 Console is user specific, allowing some users to have an English web interface and other users to see a translated version.
100% support for double byte characters (中文 etc.) on websites
Composite C1 is 100% ready for languages like Chinese, both for building Chinese websites and have a C1 Console that can translate to Chinese. In the previous release the web based source code editor lacked double byte support,
requiring the use of an external editor to manage double-byte languages in markup files.
API that makes your code work on premise and in the cloud
If you use our API namespaces Composite.Data and Composite.Core.IO you can be pretty certain that the code you write can run on standard Windows Server and on Windows Azure, no matter what data store you use and how you choose
to work with files. The two API’s make your application much more independent of a physical data store and even the architectural platform. Read more about Composite.Data
http://api.composite.net/html/N_Composite_Data.htm and Composite.Core.IO
C1 Functions can attach attributes to html elements
C1 Functions that return XAttribute can now be placed below another element and have their return value (an XML attribute) attached to the parent element. For example “<html><f:function name=”Sample.MyAttrib”
/> …” will attach the attribute returned by the Sample.MyAttrib function to the enclosing <html /> element.
Measures to combat brute force hacking added
The service validating login requests for the C1 Console will now react to failed logins with a pause and automatically log out accounts for 30 minutes if 30 consecutive login attempts have failed. This change should minimize
the change of successful brute force / rainbow attacks on Composite C1 ever happening.
New standard C1 Functions added
The following have been added to the built-in set of functions:
Composite.Utils.Guid.NewGuid – returns a new random GUID.
Composite.Web.Html.Template.CommonMetaTags – returns common HTML meta tags like content-type, encoding, language of the page, generator (optional) and designer (optional). Place this function in your HTML <head />
Composite.Web.Html.Template.LangAttribute – returns a lang attribute reflecting the current page language. The attribute will attach to the html element the function call is nested within. Add this as a child to your <html
Composite.Web.Response.SetServerPageCacheDuration - Sets the maximum number of seconds the current page should be publicly cached on the server. This function enables you to disable or minimize the public caching of individual
pages, contents, functionality and templates.
Composite.Web.Server.ApplicationPath – get the virtual path for the web application. When running at a root application this is an empty string, otherwise the name of the folder hosting Composite C1. This path can be used
to construct absolute paths that adapt to the folder hosting the application.
New dynamic data functions added
to do basic CRUD on data, without having to resort to C#.
(Dynamic type name).AddDataInstance – this function will have parameters matching the fields on your data type one to one. Fields with no default value are required parameters. Calling this function will add a data row.
(Dynamic type name).DeleteDataInstance – given a reference (ID) to a data item, deletes the data item.
(Dynamic type name).UpdateDataInstance – lets you update one or more fields of your data. You can scope the affected records by providing a filter, for instance, targeting a specific data row by ID.
Verbose logging disabled by default
The default logging provider in Composite C1 will no longer store verbose log messages, greatly reducing the size of Composite C1 system log files on running installations. To enable verbose logging on a Composite C1 site, install
the package Composite.Tools.VerboseLogging and uninstall it to stop verbose logging. Verbose log messages can be viewed via the C1 logging console.
Critical issue with XML Provider file corruption fixed
In situations where the web server process was abruptly terminated (for instance, due to a power failure), the XML data provider could leave data files in a corrupt state, which in the worst case could lead to loss of content.
This issue has been fixed.