The development of this feature is considered complete (of course, some features are never really complete, but we have to put a certain number of boundaries...)

The feature is expected to be bug free and is likely so. However, other features that you use may have side effects that makes such a feature "bogus" even though this feature itself is perfect and really others generate the bug.

See a complete list of features sorted by Snap! Websites Development Status

Detect Ad Blocker

This feature detects whether the client is running an ad blocker add-on. If so, sending that user code for ads (such as AdSense) is going to be useless... however, you may have a way to advertise with a simple picture from your website, which should not get blocked.

This specific plugin only determines whether an ad blocker is running or not and saves the information for later so we can avoid sending ad code which won't work with such clients.

The flag can be checked on the client side (with JavaScript) or the server side (in C++) and your plugins can depend on this one and react ...

The European Union decided that it would be best if websites were to tell you that they are using cookies. This is important for many people who want to protect their freedom.

Unfortunately, without cookies many things cannot be achieved in a website. However, you may have a clear policy that spells out what you do with cookies (i.e. cook them, eat them, market them...) and that way people can decide to use your website further or not.

This is done by displaying a very clear pop-up, most often at the bottom of the screen, which gives the user a way to go to the page describing your cookie ...

C-like Expressions

The snapwebsites library includes a parser (yacc like tool) which can be used to generate grammars and thus support different mini-languages that are used internally by the Snap! system to enhance the capabilities by letting end users enter really advanced expressions or definitions.

For example, the domain and website definitions make use of a mini language that allows for a set of domains, a set of websites and each include a set of parameters with optional data.

One extension that is part of the library is support for advanced C-like expressions that are linked to the Cassandra database. ...

What is the Session Random Number?

Each time a user access Snap! Websites pages, he receives a cookie. That cookie include a session identifier and a session random number defined as:

<session identifier>/<session random number>

The session identifier does not change between accesses unless something goes wrong. The session random number changes on each access. This allows us to prevent the use of a session by a hacker for more than one page access if both the hacker and the user being hacked both use the site at the same time. Figure 1 shows a normal session with a ...

Introduction (implemented)

Snap! Websites make use of sessions to track the user and react accordingly.

There are currently three types of sessions:

  • Form Sessions
  • User Sessions
  • Secure Sessions

The following describes their use. Note that the basic type of a session does not automatically mean it is used by a plugin of that name. It is viewed as a security level for the session rather than the owner of the session.

Form Sessions

To avoid a lot of website spam, forms have to be protected. This is done by creating a session for the form. The form is then given a ...

In order to implement the layout selection we setup the QtScript instead of using our own scripting language since it's already working. At some point we'll want to switch to our own version for speed (i.e. pre-compiled byte code.)

The QtScript is plain JavaScript without any special extensions, however only the system will generate code so we're safe on that end.

The script is expected to return the name of the column defining the layout to use, or an empty string. If empty, then the process is repeated with the page type and its parents (see Layout feature [core]) This column name is ...

Links between rows

All the data in our system is linked one way or another. It is important in order to organize the data in a tree and to categorize it (to not say tag it).

The data starts with a Root node and everything is defined under that root node. The linkage is done using the name of each node and the name of the category being used (a category is itself a node of content, so for example the User category is a node defined under the Root node and a user account is defined as a child of the User category. Thus to find users, you start from the Root, go down to the User category, and then list all the ...

When using an SQL environment, it is very easy to create a new row of data with a unique number. You use a sequence identifier and your SQL system generates the numbers for you.

With Cassandra, there is no such thing as a unique number. There are facilities to count (add and subtract) but no unique number. This is actually very important to let the system go as fast as possible as it is expected to do. Because the only real way to create a unique number is to either make use of a single computer which generates those numbers (be it with an SQL database or another system) or to have all the ...

The core system offers an easy way to add tags to the header. This ease the handling of the header and allows us to ensure that the encoding appears first (before the title) which solves several issues with Internet Explorer (including a security issue in IE 6.x.)

Style Sheets

Having one place that handles the HTML header gives us a way to manage the style sheets in one place. This allows us to do two things to the style sheets:

  1. Add them inline when small enough (i.e. less than 1 kb)
  2. Compress them (remove all the possible new lines, spaces, etc.)

Also, all the style ...

Build System


To handle the environment, as it grows, we want a build system that is capable of recompiling everything, build and publish the binaries, make source that compiles available to our users and run the available tests to detect that everything still works as expected.

Launchpad Builds

We actually went with building everything directly on Launchpad which is offered by Ubuntu (owned by Canonical.) This means if you are running Ubuntu, you do not need to worry about recompiling everything. Instead you can just install the necessary PPA and do:

sudo apt-get install snapserver ...
Syndicate content Syndicate content

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly