What is Netbiscuits?

Netbiscuits is a platform for the development and delivery of next generation web apps across all mobile and connected devices.

In other words, It is a platform that helps you in developing and delivering mobile device specific websites or webapps. In order to develop webapps using netbiscuits platform, you will have to develop your pages in a specific format of XML suggested by Netbiscuits, which they call as BML or Biscuit Markup Language or BiscuitML.

How does Netbiscuits work?

When a mobile device requests a URL of a Custom Application (mobile portal) this HTTP request will be routed to and processed by the NetBiscuits platform. In the first step, NetBiscuits will forward the HTTP request to your Web-Application Server (e.g. Apache, Tomcat, IIS, etc.) which hosts the BiscuitML Application. As in a normal web application, you will process the request and retrieve content from a Content Management System or database for example. Instead of creating HTML output, your application has to send a HTTP response back containing a valid BiscuitML document. The BiscuitML markup will then be processed by the NetBiscuits platform and be transcoded into the right markup (XHTML MP, WML etc.), specifically optimized for the mobile device that sent the initial request.

The following diagram shows the system architecture of Netbiscuits.


Netbiscuits Architecture

Netbiscuits Architecture

Setting up an application on Netbiscuits

Setting up an application is quite easy task.

  1. Login to www.netbiscuits.com  using your credentials.
  2. Create a New Custom Application.
  3. Configure your custom application and Provide application name, programming language used, backend-url etc.

Pl note that your backend-url should point to a default document like index.aspx etc which contains BML data.

Eg: http://demospace.com/yourapp/index.aspx

You can access your page using the application url that Netbiscuits provide after you create the custom application.

What is BML, Biscuit Markup Language or BiscuitML ?

BML or Biscuit Markup Language is an XML based markup language used to build mobile web pages with the Netbiscuits Platform.

It is as easy as writing an XML file but the only thing to keep in mind is that you need to follow the BiscuitML rules. We’ll talk more about the rules etc in a while.

Following is an example of a section of BiscuitML code

How to create BiscuitML pages ?

BiscuitML pages have a structure of their own but since it basically is XML, it becomes very easy to understand them.

Structure of a BiscuitML page

As BiscuitML is an XML markup, we start it off with an XML header:

Unlike HTML, there is no <body> tag for a BiuscuitML page. Instead, the root node of the XML is the “<page>” tag. It defines the start and the end of a BiscuitML page. All other tags would be wrapped inside opening and closing <page> tag like the following :

Once the opening and closing <page> tag is written, all the further tags and Biscuits(widgets given by Netbiscuits) would be wrapped inside the <container> and <column> tags. For eg :

The <container> and <column> tags are very important in BiscuitML as every other tag would be wrapped under these.

Rules for Nesting the Container and Column

The <container> tag is always the parent tag. And the <column> tag must come as a child of the <container> tag. A <column> can contain multiple containers under it. But a <container> can contain only 2 <column> under it. For e.g. :

Mixing elements under <container>

You cannot mix containers, columns and Biscuits; a column or container may only directly contain one type of element, for example:

 What are Biscuits?

Well in the context of Netbiscuits, “Biscuits” do not refer to an edible cookie instead it refers to a widget or a pre-defined tag which generates a specific type of layout. They are always written in capital case. Biscuits are not allowed directly inside a <container>, they must be wrapped inside a <column>.

Rules of Nesting Biscuits

Please note that Nesting of Biscuits are not possible and they should be used individually.

A Biscuit can not be nested inside other Biscuit. Which means we can not have a Biscuit as a child node of other Biscuit.

Netbiscuits provides us with a collection of different Biscuits that can help you during development.

Lets take a look at few Biscuits.

<TEXT> Biscuit

The simplest way to put text into your page is through use of the Text Biscuit. It accepts a number of different node types. For example, you can add a headline and some short text with a little formatting:

The <richtext> tag also supports BBCode (Bulletin Board Code). Some of the BBCode that BiscuitML supports are :

<IMAGE> Biscuit

You can add images using the <IMAGE> Biscuit. For e.g:

Linking an Image in BiscuitML

The image tag in BML also supports href and it also requires the image format to be mentioned. Like in HTML it also supports class attribute.

How to use CSS on a BiscuitML page ?

NetBiscuits supports CSS and it can be included in two ways.

  1. Through an external css file using the <external> tag : For e.g
  2. By defining the CSS within the page using the <styles> tag: For e.g


Containers, columns and Biscuits can be given classes and ID.

How to use Javascript on a BiscuitML page ?

Like CSS, Netbiscuits also supports Javascript and can be included in the following two ways:

  1. Through an external javascript file using the <external>tag :

  2. By defining the Script within the page using the <event>tag:


Defining javascript functions in BiscuitML

Netbiscuits’ scripting engine allows you to define functions within a script block. These functions can be called again and again without writing the whole function code again. E.g

Calling a function declared using the call element

The call element allows calling a defined function by its name. E.g :

You can also write Custom Scripts to use your own JavaScript Code, which you define in an external file using the eval action. E.g :

BiscuitML Resources on the Net

There is a good amount of information available on the Netbiscuits website. We have filtered out few links for quick access: