Search This Blog

Tuesday, November 27, 2012

What is The Black Toolkit?

Rock the Cat
The Black Toolkit is an RAD IDE for development of web JSP, PHP, ASP or static HTML pages. It was created initially by Raphael Vinícius Corrêa.

The tool is totally free, the interface supports drag and drop HTML components, and generating a very fast code, with no additional softwares layers or libraries, but you can put libraries, like jQuery. The generated code works with all browsers.

What it supports?

  • Visual programming, in PHP, JSP, ASP and Java Swing.
  • Visual event-driven programming.
  • Works in all browsers
  • Online help access.
  • Integrated programming and debugger for Java and C++.
  • Support for MingGW, GCC and Winegcc compilers for C++
  • Built-in AJAX support.
  • PHP-PDO and JDBC db support.
  • Bult-in SQL Client.

The project was made with these main goals:

  • To be a fast IDE, running even in old hardwares.
  • Support visual programming, in many programming languages.
  • Run in most Operating Systems.
  • Be more extensible as possible.
  • Support free tecnologies.
  • And of course, give the maximum of productivity.

The downloads include:
  • The installers for 32 and 64 bits Windows.
  • The .rpm and .deb packages for Linux (need GTK+2).
  • A portable version, you can put it in an USB stick to run in any PC. It loses nothing for the installer versions.

The system is in in the URL:

Saturday, November 10, 2012

Omega Base 1.0.1 is released

Omega Base 1.0.1 is relased with new features:

  • The file indexer now supports FreeMind (.mm) and Dia (.dia) Charts also.
  • The PDF indexer now uses PDFBox library instead of iText. Less bugs. 
  • Some bugs fixed.
Omega Base has focus on speed and security, made in JSP and PostgreSQL. It uses just open source components.
Can be used since as your own cloud, in a home computer, or even in a big and concurrent enterprise network.

Saturday, September 29, 2012

Generating a DAO Class in The Black Toolkit.

DAO (Data Access Object) code pattern has advantages over using exposed DB commands:
  • Database independency: What DBs are you using? MySQL, Oracle, LDAP, PostgreSQL,...? Can be SQL or not. DAO isolates the DB data from the rest of the code, making easy to support many DBs.
  • Performance for SQL: SELECT with many JOINs are slower than a SELECT per table joined by the programming language. DAO avoids using much of these  JOINs.
  • Maintain code: Separating the DB code from other parts of the source makes it much more easy to  maintain.

Since 1.0.7 the IDE has a Visual RAD Form to generate and maintain the DAO class and Transfer Object  for Java and PHP.
Since 1.0.8 the IDE can import it from a SQL table, and support many drivers. Just go Database->Import DAO/CRUD, and connect to the database

Just do a right-click on the files panel  and go New->Visual Form->DAO Class.

  1. Set the Form properties.
  2. Create a Field Instance for each Field in the table, and set its attributes.
  3. If using it in many DBMS, you will need to set abstractDAO as true and make DAO class abstract.
  4. If the class is not abstract, set the getConnection event to get the PDO/Connection object.
  5. Create your own (abstracts or not) methods in the declarationsDAO event.
  6. The IDE gives the Transfer Object class and the Data Access Object class with some SQL generic methods:
  •  select() - selects a row.
  • query() - selects many rows. You can add a WHERE / ORDER BY clause  for parameter. This method will NOT load fileds which loadonquery property is false You may use this method just in the subclasses or not, depending for what you want to do.
  • map() - maps an array to a key-value array, by the primary key. It's for joining with another table's query.
  • insert() - inserts a row. You probably will need also to put the primary key 's value, using a generator or sequencer.
  • update() - updates a row.
  • delete() - deletes a row.

If you use many DBs you 'll need to create a concrete subclass of this DAO class for each DB, like this:

public class CategoryDAOPgSQL extends CategoryDAO { //Using PgSQL Syntax
   public long genID() {

   public Category[] findByDescription(String description) {
        return this.query(
             "WHERE to_tsvector('portuguese', name||' '||description) @@ to_tsquery('portuguese', '"+description.replace("'", "''")+"')");

You 'll also need to create the Factory Class which encapsulates the DAO Class:

public abstract class DAOFactory {
    public abstract CategoryDAO getCategoryDAO();
    public abstract EmployeeDAO getEmployeeDAO();

   public static DAOFActory getInstance() {
   return new DAOFactory() {
    CategoryDAO getCategoryDAO() { return new CategoryDAOPgSQL(); }
    EmployeeDAO getEmployeeDAO() { return new EmployeeDAOPgSQL(); }
return new DAOFactory() {
    CategoryDAO getCategoryDAO() { return new CategoryDAOOracle(); }
    EmployeeDAO getEmployeeDAO() { return new EmployeeDAOOracle(); }


Wednesday, May 2, 2012

Aligning web objects to left-right-center or top-center-bottom

The Black Toolkit comes with the v_align and h_align properties to align objects in the parent object.
These aren't from HTML itself, but you can use it to align the object in the parent box without problems.

Thursday, April 26, 2012

Using AJAX with the Visual Editor

AJAX is powerful, and with the Black Toolkit it is very easy to use.
You can use a AJAX component, or a simpler AJAX form.

For the AJAX Form:
  1. In the Visual Editor click the "Custom" tab, and then click the AJAX Form component.
  2. After dragging the component to the HTML, set the functionname property to the function name, and the action property to the url of the AJAX page on server..
  3. In the events tab, set the onreadystatechange4 event. It is the event when the AJAX response is successfully retrieved.
  4. Put form objects, like inputs, selects, etc... as you need inside the form. Note the functionname property will make the AJAX code automatically.
  5. You can use a AJAX submit button or call the functionname property directly to call AJAX.

For the AJAX component:

  1. In the Visual Editor just click in the "Script" tab, and then click in ajax component.
  2. After dragging the component to the form, set the functionname property to the function name.
  3. In the events tab, set the onreadystatechange4 event. It is the event when the AJAX response is successfully retrieved.

The functionname 's parameters are (method, url, async, data, contentType, contentLength):

  • method - Supported are "POST" and "GET".
  • url - The URL to the page.
  • async - Asynchronous, generally is true.
  • data - The "POST" data.
  • contentType(optional): The "POST" contenttype header. If it is not filled, is"application/x-www-form-urlencoded".
  • contentLength(optional): the "POST" contenLength header. If it is not filled is data.length.

ajx_getcustomers("POST", "../ajax/customers.php", true, "all=true&type="+frm.type.value);

Monday, March 26, 2012

How can I extend the Visual Editor for other language, like C++?

The Visual Editor of The Black Toolkit was made to work with many programming languages, and be extended for other needs of RAD Visual programming...

The good part is: ...just with XML.

The Componentset API is here:

Acctually the Black Toolkit supports (natively) is Web documents (HTML, PHP, JSP, ASP), Java Swing with NullLayout. But you can write the componentset for your favorite language, without recompiling the IDE.

I have too much work in developing the toolkit plus writing the componentsets.  Because of this I had to drop the Win32 Form, to work on it some months later. Someone wants to help me?

Sunday, March 25, 2012

Creting your own language support in the Black Toolkit

This is an easy part. The IDE doesn't need to be recompiled for this.

  1. Go to the languages folder and copy the en.ini to <your_country_code>.ini
  2. The file encoding is UTF-8. Edit <your_country_code>.ini, changing just the values part to your language's text.
  3. Make sure to keep %s, %d, %f from values part because they will be expanded in printf()/Format() functions. Like "Do you wish to save %s". The %s will be expanded to the file name.
  4. Start the editor. Choose from menu Configurations->Languages and choose your language.

Tuesday, March 6, 2012

Connecting to a remote Black Toolkit through X11 and SSH

 The black toolkit has some advantages, in being centered in a X11-forwarded SSH server, above others editors:

  • It is faster compared to most of editors, consuming less resources.
  • It runs on Linux.
  • SSH is open source.

To connect the black toolkit in a Linux server you need:
  1. Install Black Toolkit in the Linux server.
  2. Turn on SSH server, if it is not already enabled.
  3. Enable X11 forwarding in SSH server (X11Forwarding yes), on /etc/ssh/shhd_config, and restart SSH.

Now, in the client side, it depends of the operating system:

On Windows, you need to install XMing for access SSH.

  1. Activate XMing service
  2. Configure XLaunch to call blacktoolkit, instead of Xterm, and call the software.

Running Black Toolkit (from a Linux server) on Windows XP

For Linux client is a bit simple, just install SSH-client (already comes with) package and do:
$ ssh -p <port> <-X or -Y> <-C> user@server blacktoolkit

You can use it in cell phones, like Android:

  1. Install ConnectBot and QVD.
  2. Start QVD service.
  3. Start ConnectBot and configure connection.
  4. Remember to do a port forward of the port 6000 for ConnectBot.
  5. Connect with ConnectBot and call the program you want, or blacktoolkit.
  6. Now see the QVD window. 
  7. The Xvncpro home page contains the documentation for double-clicks, right-clicks, etc.

I hope had helped everyone.

Friday, February 24, 2012

Installing Slackware softwares with Blackpkg

The semi-official site of packages is, but compiling them can be difficult.

By using Blackpkg you can install packages of the repository in just one line of command, and set flags like the processor.

Example installing Google-Chromium. ( -march=native to compile natively for my CPU):
# export SLKCFLAGS="-O2 -march=native"
# blackpkg -y libevent chromium

Installing ExtremeTuxRacer with all 3D power of CPU!
# export SLKCFLAGS="-O2 -march=native"
# blackpkg -y extremetuxracer