Documentation
Sample code
The best way to understand how biNu works is to see working examples with sample code that you can copy and paste.
PHP Helper Class
Our developers have created a helper class for generating a basic framework for a typical app page or form. You are free to use this class to help develop your first app and familiarise yourself with biNu.
PHP Helper Class
Hello World
No developer's tutorial would be complete without a "Hello World" example, so here's ours.
|
Let's have a look at a sample biNu XML page and break it down to explain each of the sections. The sample we'll use is for a page that says "Hello World" which appears on the handset like the one alongside. The biNu XML for this page is shown below. For illustration purposes we have attempted to show the anatomy of a biNu XML page by highlighting the different sections or tags and providing a brief explanation for each one. |
![]() |
| <binu ttl="1" developer="13" app="431"> | Opening <binu> tag with optional ttl (time to live) value defined. developer defines the ID of the developer – used to authenticate. app defines the application ID. |
|
|
Here the <styles> section defines the font face, colour and size for a single style. |
|
<pageSegment x="0" y="0" h="height">
|
The layout of the page is defined by specifying a number of <pageSegment> tags which together form the complete page. This simple page contains only one <pageSegment> that contains the "Hello World" text. Page segments are positioned by coordinates, and elements within a page segment use their own offset coordinates. Here the "Hello World" text is placed 5 pixels from the left and 30 pixels from the top of the |
|
|
The This example shows that an action has been defined only for the Action key (which is usually the left hand key just beneath the handset screen). If the user presses that key the app will navigate to the home page. Other keys that can be defined are the number keys, Select and Navigate keys. |
|
</binu> |
Closing </binu> tag to end the page |
Google Search
For something a little more complex you might want to take a look at the biNu >Google Search app. This is a real-world app that is in use today.
|
Below is the biNu XML with an explanation of each of the sections. The Google Search page appears on the handset like this. You can see the page is made up three main sections, known as "page segments":
|
![]() |
Now let's take a look at the biNu XML for this page. For illustration purposes we have attempted to show the anatomy of a the biNu XML page by highlighting the different regions and providing a brief explanation for each one.
| <binu ttl="86400" developer="13" app="522"> | Opening <binu> tag with optional ttl (time to live) value defined. developer defines the ID of the developer – used to authenticate. app defines the application ID. |
|
<styles> <style name="list_text"> <style name="footer_text"> <style name="body"> <style name="grey_line"> <style name="footer_bg"> </styles> |
A set of <styles> is defined for this page. Styles can either reference an external stylesheet or be defined inline. |
|
<page> <pageSegment x="0" y="0"> <pageSegment x="0" y="y" h="-13"> <pageSegment x="0" y="-15"> </page> |
The layout of the page is defined by specifying a number of The first The second contains a The third
|
|
<control> <menu key="action" align="Left"> <action key="2" text="Image Search"> <action key="3" text="Turn Safe Search Off"> <action key="4" text="Help"> <action key="5" text="My biNu"> <action key="6" text="Exit" actionType="exit"/> </menu> <action key="select" spider="Y"> <action key="navigate" spider="Y" actionType="back"/> </actions> |
The This example shows that actions have been defined for keys, 1, 2, 3, 4, 5 and 6. The following keys have also been defined:
|
|
</list> |
A <listing> was defined earlier in the page in a <pageSegment>. The items that appear in a <listing> are defined separately and are defined here in a <list>. |
| </binu> | Closing </binu> tag to end the page. |
Try Your Own
If you found those samples useful, why not copy and paste the biNu XML and have a go at creating your own app? biNu provides you with a dashboard in the My Apps section of this website to help you manage the development and testing of your app in a safe development environment. There you can go through the normal develop ⇒ test ⇒ develop ⇒ test cycle and when you're happy that it's working the way you want, you can publish the app to the biNu production environment.

