BANGALORE, INDIA: Brainwave is a Web-based rapid application development platform for developers, which aims at solving developer issues surrounding integration. Most of the platforms available have three-tier architecture constituting components for building interface of the application, for developing actual logic of the application, and for databases.
Normally one goes for different vendors to carry out work in these three different domains and finally integrates these components to get a final product. Owing to different vendors, integration becomes a complex task; Brainwave tries to simplify this complexity by introducing a single platform that can take care of all the components required in building applications. Brainwave SDK comes with a special database engine, API widgets library and deployment server.
Components
Brainwave platform has six components for rapid application development. Let's take a look at these components.
Implementation
To start working with Brainwave, download Brainwave SDK from www.brainwavelive.com. Besides SDK we also installed Python 2.5 for our sample implementation. One also needs Firefox 1.5 or later version. After installing these components, click on 'Start brainwave' and log in using username 'root' and password as 'password'. To create an application, click on 'Application Builder' icon in middle and then on 'Application Generator' icon on left; this will direct you to the page where one can enter the name of the application along with type (sample/crude/basic). We create a basic application by the name 'PCQuest.' Now click on 'Submit.' This will show a tree view of your application. To add code to your application move to the 'pcquest.py' file situated at 'c:\Program Files\Brainwave \apps \pcquest\'. Open this file in a text editor (we used Notepad++) and add the following code:
import iris, aphrodite, hermes
from idea import Idea
class pcquest(iris.App):
def __init__(self):
iris.App.__init__(self)
self.aphrodite = aphrodite.Aphrodite('pcquest')
@iris.expose
def index(self, *args, **kwargs):
return "This is first demo for PCQuest"
Now that we have created an application, let's move to the next step of deploying it. Brainwave comes with inbuilt facility of deploying applications. To deploy applications, click on the 'Application Deployer' icon on left. This will generate a list of applications both loaded and unloaded. Just click on application to be loaded and you are done. To check the output of your application browse to:
http://localhost:8080/pcquest/
In the above code we mixed design and logic. Brainwave platform comes with various template plugins like Cheetah, Mako, etc. These can be used to render data. Following code snippet shows how we can use Cheetah template in our application:
from plugins.CheetahPlugin import CheetahRender
def my_view(self, data):
return CheetahRender(template="my_template.tmpl", data=data, aphrodite=True
In this snippet 'my_template.tmpl' lies at the path 'c:\Program Files\brainwave\apps\pcquest\views'.
Brainwave as a platform is an innovative idea that cuts down issues related to integration and deployment; but it requires knowledge of Python and little bit of brainstorming by developers.