Segunda-feira Out 27, 2008

AJAX and NetBeans - jMaki and ZK

Hi everybody,

Last Thursday I did a Tech Demo about developing AJAX web apps using the powerful NetBeans 6.1 at Federal University of Rio de Janeiro.

I started talking about AJAX and how it improves usability and creates user friendly interfaces for the Web. Many people thinks that having ajax apps will overload the server and network just because you have a prettier interface. People have the idea that how more sophisticated is the app, heavier it will be. AJAX shows that it's not true.

The division of concepts let the server deal only with the data requested from Javascripts at client side. The interface refreshing is done all by the browser. So, instead of sending full and big HTML blocks to the client each time he refresh or navigate to a different page, the server just send the information requested and the browser deal with page drawing dynamically.

A great doubt about developing an AJAX app is to choose a framework. I suggested 2!

First I talked about jMaki. (

I did a demo showing the features of jMaki framework and its cool plugin for NetBeans.

jMaki is a client-server framework that encapsulates many AJAX components from other frameworks in the form of a Widget. With the NetBeans plugin, it let you create your pages dragging and dropping widgets to your JSP. You only need to customize your page changing the CSS file as you like and choosing the best widgets to compose your web page.

To start learning about jMaki, I suggest these links:
NetBeans jMaki Introduction Tutorial
jMaki Screencast
To get a little more advanced learning, try this Another jMaki NetBeas tutorial with RESTful WS

Later I started talking about ZK framework to build AJAX RIA using NetBeans.
When a friend showed me ZK, I got really impressed. It's a complete framework and it let you develop your app programming only in Java.

Yes! All the server side AND the client side scripts can be written in pure Java language (sweet Java)! Check some videos and examples at ZK Home Page

I did a simple demo using ZK to build a Web Telephone List.

WARNING: I don't use a database on this demo, but it's just to leave things faster. On a real world implementation , you should really consider that, specially because ZK has great tools to deal with Database and Persistence. If you understand Brazilian Protugese, check this blog post.

Now let's start our demo.

First, install NetBeans ZK plugin:
There are 2 plugin options:
1. ZK Designer plugins for netbeans 6.1
2. REM for NetBeans 6.0

The first let you develop your ZUL web pages dragging and dropping the components into your xml, but the second one is the one with code completion and highlighting.

Actually, in a very near future they will became only one plugin. Stay tuned for next release of REM plugin because it will came with the visual ZK designer bundled too!

Download the plugin and install it on NetBeans through the Tools->Plugins window.

For my Demo, I chose the first plugin that let me create my pages faster using drag n drop.

So now, let's create a New Project.

1. Go to File -> New Project
2. Choose a new Web / Web Application
3. Choose a name for your project (like ZKDemo)
4. Choose your server (GlassFish)
5. Choose the framework you would like to use. Here you must choose ZK!

The project opens with two index files: the index.jsp and index.zul. Delete the JSP and keep the ZUL. ZK support JSP includes, but its main ajax components are arranged to compose your web page on a XML file called ZUL file.

The index.zul file comes with a simple window page like this:

Try some drag and drop with the ZK components of the palette and then Run you project to check some ZK features!! Not all the ZK components are already on the palette! To see a full list of ZK Components, check: ZK Explorer!

For our Telephone List project you will need this index.zul file.
Copy it's content on your index.zul.
You will also need the catalog.zul file that is included on our index.zul and the catalog.zs file that is used by the ZSCRIPT tag on the begining of the index.zul file.

Just save catalog.zul and catalog.zs on your project page at your NetBeansProjects/YourProjectName/Web folder!.

Then go to NetBeans and open the ZS file. Look! It's Java code! No Javascript in here :D! See that it does 2 imports:

import ufrj.zkdemo.Catalog;
import ufrj.zkdemo.Contact;

This classes need to be created! But it's quite simple! Remember that if you create your classes on a diferent package, you will need to update the ZS file with yourpackage.Catalog and yourpackage.Contact imports!

Download class.
Download class.

And put them on your project's source code packages!

Now Run your application and enjoy your veeeery simple telephone ajax catalog! See that, since we are using Lists and a Map to store the data, every time you Refresh your Web Page, you will have your telephone data ERASED!! Yes, this is not a very useful Tel catalog, but I encourage you to improve this project using a Database! ;)


Quinta-feira Out 02, 2008

Software Freedom Day Report!

Hi everybody,

I know I'm late. I should have written this post last week, but I was quite occupied and forgot about sitting and writing the blog post.

The SFD event on Rio de Janeiro was fine! We had an attendance of 36 people and many of them were excited about what the OpenSource could give them.

About 10 o'clock of the morning we started the event speaking about the Software Freedom Day, Open Source and Sun intentions on this world! Next, we had a really great talk given by Magno Cavalcante, RioJUG's Leader and Sun Java Champion, about the Web 2.0 and people's value, including a lot of important concepts about software freedom, market and development.

After the lunch, we've kept talking about open source, showing great features of OpenSolaris 2008.05, VirtualBox and NetBeans. We explained the Sun Open Source University Meetup initiative to the students and invited them to join it! In the end, we had an OpenSolaris installation inside VirtualBox and we raffled give-aways!

Lots were said about the importance of software freedom! And how much the great companies support it, specially Sun!

That's it!
I will be probably posting something more technical here, like the SFD demo about NetBeans+AJAX that I have done.


Segunda-feira Ago 18, 2008

Developer Web Days 2008

Hi everybody,

This Friday I will give a Tech Talk at Developer Web Days 2008 meeting, here on Brazil.

At 9:00 o'clock, I will be in Room A, talking about Web Development using AJAX and NetBeans:
I will give a little overview about AJAX and show how to easily construct and deploy AJAX content on your projects without Javascript, using the outstanding jMaki framework and the amazing ZK framework. I will possibly show the Dynamic Faces project with AJAX too.

at 18:30 o'clock, I will be attending Room D, talking about Service Oriented Architecture (SOA), Web Services and EJB. On this presentation, I will talk about how to support SOA with EJB, using them as web services and orchestrating them with BPEL, constructing your own composite application. Using the Open ESB SOA plugin for Netbeans, I will make almost everything visually, what makes it easy to understand and use later.

You can find more Information about the event at

After the presentations I will post the demos' Tutorials right here on this blog!! Stay tuned.


Quinta-feira Ago 07, 2008

Deploying Web Services on other Servers using NetBeans

Hey everybody!

A friend made a question on the WebServices and JSP on NetBeans 6.1 post about deploying Web Services on other servers, like Tomcat. It could be, actually, a problem, because many will say that you won't be able to deploy WS on Tomcat. That is not true. If you are using a version of JDK greater than 1.6.0_04, nothing needs to be done, you will just have to use TomCat on your project. If you are using older versions, you may check this link

I will do some demonstration here using Tomcat 6.0.16 that cames bundled with NetBeans 6.1 using JDK version 1.6.0_07 and JBOSS version 4.2.2 that I downloaded some time ago from

First, let's do our simple WS - that will receive a name as a parameter and return Hello name. Quite simple ;)
I will not get into details here because the other post has already covered the Web Service easy creation on NetBeans.
Just ask for a New Project on NetBeans (File->New Project or Ctrl+Shift+N). Select a Web Application, using the Web Category and press Next. Choose a name for your application (for example: HelloTom) and press Next again.
On this screen, you choose the server you will use for the project, select Tomcat.

Press Finish.
After project creation, right click the project name (HelloTom) and select "New->Web Service" from the drop down menu. On the wizard screen, define the Class and package name for your WS (like Hello and NetBeans will open your WebService for visual development.

Click on the "Add Operation..." Button. On the wizard screen, select the name of the operation (i.e. helloOperation). Do not use just 'Hello' as the name of the operation because it will be interpreted as the WS class constructor and you may get confused. Leave the Return Type as String but add a String parameter called "name". Click OK and see that the visual designer added your operation to the WS Operations list on the screen. Right Click the helloOperation and select "Go To Source".

On the Source edit the Operation code like this:

@WebMethod(operationName = "helloOperation")
public String helloOperation(@WebParam(name = "name")
String name) {
       return "Hello "+name;

Done. Now, right click your project name (HelloTom) and choose Run. If Tomcat is up and running, it will show the Hello World! message for you that is on its default JSP page.
The "Test Web Service" functionality we have used on the other post will not be avaiable on Tomcat like on Glassfish, but you can easily try your WS creating another project that access the Web Service on the server. If you have problems creating a project to access the WS, check the WebServices and JSP on NetBeans 6.1 post.

Now let's add another server to NetBeans and make use of it.

Click on the Services tab, on the left side of IDE. Righ Click the Server node and click on "Add Server..." just like the next picture:

The Wizard starts and you need to choose the Server type. Here, on my example, I chose JBoss Application Server (but there are many others):

Press Next. On the next screen, select the server location (ie, where is it installed) and press Next again.
On this screen, you will need to select a server configuration, I've just left the default:

Press Finish. The Server will be added to your Server list on the IDE. You may right click on its icon and Start the server just like this (Iniciar=Start, in Portuguese):

Wait until JBOSS starts and let's test it.

Go Back to your projects clicking on the Projects Tab. Right Click the Hello Project and select Properties from the drop down menu. On the Properties screen, select the Run category (that may be the last one) on the left panel just like the next picture (the picture has somethings in Portuguese where Run=Executar). After selecting the Run category, you will see (on the right side) the option to select the server where you want to deploy your project, we will have Tomcat selected, change it to JBoss Application Server.

Press OK and wait while NetBeans save your project's Settings. Now your can Run the Hello project again and it will be deployed directly on JBoss. The "Test Web Service" functionality is not avaiable on JBoss too, you need to create another simple project that access the Service on the server. It'easy and described on the WebServices and JSP on NetBeans 6.1 post.

That's it! There is no limit!

Quarta-feira Jun 04, 2008

WebServices and JSP on NetBeans 6.1

Turn The Very Easy mode On and Play

Hi Everybody! Today I'm writing a little review (that may sounds like a tutorial) about the easiest way to write a simple Web Service and use it on your projects. See, you don't need to be an expert on Web Services nor JSP nor Web Technologies, because we are using NetBeans 6.1, the only IDE you need to learn something big on the very easy way.

From 6.0 to 6.1, NetBeans has grown faster, more stable and more practical. I haven't found anything specific about the development of WS using the New NetBeans, only using the 5.5 version. That's why I decided to write it here.

I've downloaded the Web & JavaEE Pack of Netbeans 6.1 on NetBeans Download Center. It comes with TomCat and Glassfish bundled, but we can use others Containers too, like JBOSS, for example. On the Services tab, on the left side of IDE, you can find the servers that NetBeans is using.

You may click on 'Servers' and choose 'Add Server...', A list of 'Connectible' servers appears. You will be able to connect Servers like JBOSS, WebSphere, BEA WebLogic, Sailfin, and, of course, TomCat, Sun Application Server and Glassfish, all out-of-the-box. (They just need to be installed, TomCat and Glassfish can be installed during NetBeans Setup).

Now Let's Start our Web Service. We just need to go to File -> New Project (Ctrl+Shift+N), choose Web on Categories and Web Application on Projects. Then Press Next. Choose the name and folders of your application and press Next again, then choose the server where your Web Application will be deployed. You will see the screens below (but they will be shown separated, through the next steps, not layered). On the End, just press Finish. (If you press Next, you will be able to choose a framework like JSF or Struts)

Now we have our Web Project. A Default index.jsp is there waiting - delete it - we are doing WebServices for now. Select the Project, click on the Project name with your right mouse button, choose New -> Web Service... on the list. NetBeans will then open a tab on the development area showing it's graphical interface to create Web Services, just like that:

A Web Service is quite like a java class (it's a .java file), in which the methods are called Operations. A Web Service may have many Operations. So, let's create our Operations clicking at the 'Add Operation...' Button. A window will pop up, asking the details of your operation, just like this:

I created two operations, one to add a user (the addUser Operation show above) and one to check if the user has been added to the list, like a login check (the checkUser Operation). NetBeans shows me the details graphically:

(If the image is too little, click with your right mouse button and choose View Image, The blog may be resizing the pictures, making them unreadable)

Now we go to the Source Code (Clicking on the Source button on the development area, just below the file tab)! You can click with the right button on the Operation and choose 'Go to Source' option on the Menu.
At The Source you see all the Structure of your code. Out of the methods scope, create a List of Users like:
>> List users; . There is no User Class defined in the package, so click on the light bulb near the code and ask NetBeans to create User Class in the package for you:

Go to User Class source code and add two parameters to the class: String username; and String password;
Then we ask NetBeans to create the getter and setter methods, and to override equals and hash code methods. How?? Easy! Just click with the right button and select Insert Code: A little menu will appear:

and we may choose to generate many kinds of methods. For example, if we choose to generate equals and hash code, another windows will pop up asking about which parameters of the class do you want to use, just like this:

Any doubts about the User Class, see it's source here.

Back to the Web Service source code, now we have to implement the addUser and checkUser Operations. They are both easy, see the idea of the code below:
To add a user:
   User user = new User();
   if(!users.contains(user)) { //if the user is not already on the list
     users.add(user); // add the user and return true to say everything has gone OK
     return true;
   } else { // user is already on the list.
     return false; // Return false to say no one has been added to the list

To check the User:
   User user = new User();
   if(users.contains(user)) { //if the user is on the list
     return true; // let it login, return OK
   } else { // user isn't on the list
     return false; // return 'there is a problem here'

The Full Web Service Code can be viewed (and copied ;) ) here.

Now, we may just Run our Web Service, and see that it's Running on the Service tab under your container's Web Applications.

But, let's Test it to see if it's really working!
Expand the Web Service Folder of Your Project and select your Web Service. Click with the right button and select Test Web Service:

Something like that will be opened on your Browser:

Amazing, isn't it?? You may test your Web Service as you want, and get answers like this:

Tip: Add some users using the addUser Operation and see if checkUser works returning True for added Users and False for unknown users.

Now Lets quickly create our JSP! Yes... really fast.

Create a New Project (File -> New Project). Select Web / Web Application Again!
Now we may use the 'index.jsp' file. There is a palette on the right side of the IDE, you may drag and drop HTML Form Items to your code. You need a FORM that collect user's login and password. Something like this:

<form name="loginForm" action="checkLogin.jsp" method="POST">
<input type="text" name="login" value="Your Login" />
<input type="password" name="pwd" value="\*\*\*\*\*\*\*" />
<input type="submit" value="Submit" name="loginSubmit" />

The Form action is checkLogin.jsp... so Let's create it. Click on your new Web Project name with the right button, go to New -> JSP. Create the JSP named checkLogin.
Now let's add a client to our WebService, the one we created on the other Project.
Click with right button on your New Project Name, go to New -> Web Service Client...
Select the Project where the WebService has been Created, just like this:

There are other ways to get the Web Service (thought WSDL link, for example), you may explore it yourself latter.
Wait while NetBeans process the Web Service into your New Project, you will be able to see it on the project. Like this:

(On the properties of the webservice, you will find the WSDL address of the service, then you can visualize it o the browser, and see it's XSD too.)

Now, go to the JSP code. Below the Hello World default Message, click with the right button and select:
Web Service Client Resources -> Call Web Service Operation
A window will appear asking which operation you want to choose:

Choose checkUser and NetBeans will do all the code for you. Of course, you need to put some by yourself. Our FORM, on index.jsp, send it's data using POST. so let's get these values from POST. Add the fallowing code before the Web Service process, just after the 'try {' put by NetBeans on your JSP:
    String uname = request.getParameter("login");
    String pwd = request.getParameter("pwd");

Then, change the generated code lines to point to your collected data:
    java.lang.String login = uname;
    java.lang.String password = pwd;
    // TODO process result here
    boolean result = port.checkUser(login, password);
    if(result) {
       out.println("User Logged");
    } else {
       out.println("Access Denied");
    } catch (Exception ex) {
       out.println("Unable to operate the WebService");

Any doubts, check index.jsp and checkLogin.jsp codes.

Then, ask NetBeans to Run the index.jsp file. The browser will be opened with your JSP page asking a login and password (Just after the Hello World! message). Try the login and password you have added using the Test tool and see if checkLogin grants access to the users or not. Try the users you have added and another ones. If no User is recognized, the data on the Server may has been lost, try adding new login/passwords using the Test Tool or using the addUser Operation, now you know how to do it.

You don't need to use a Web Interface to access your Web Service, you can create a Java Project with a GUI that connects to the server and use the Web Service, or use a Mobile, everything through NetBeans. Just Explore!

Remember!! We are keeping this user information on a List inside the Memory (through the Web Service inside the Server). If you restart the Server or the IDE, all information may be lost. This example is just a simple one, to do a more professional system, you should use a database, this way your data will be kept safe.

Hope you enjoy that! The text is quite big, but it's simple to do that!
Any doubts or tips, just send a comment! ;)


Terça-feira Abr 15, 2008

Tech Demos

As promised, the tech demos' abstracts. All in Portuguese because they will be done on Brazil... so...(for English versions, send me an e-mail).

Iniciativa Acadêmica Sun :: Tech Demos

Quinta-Feira dia 24/04: Construindo Aplicações para dispositivos Móveis visualmente usando o NetBeans 6.0

    A Tech demo busca expor alguns conceitos da elaboração de aplicativos para dispositivos móveis usando Java, explicando sucintamente a arquitetura da plataforma JAVA Micro Edition (JavaME) e ferramentas de suporte à citada tecnologia presentes no NetBeans 6.0. É realizada uma pequena demonstração do que pode ser feito nele, construindo os aplicativos de forma simples e visual.

Sexta-Feira dia 25/04: Serviços Web utilizando o NetBeans 6.0

    Esta pequena demonstração tecnológica aborda o suporte oferecido para a plataforma Java Enterprise Edition, também conhecida como JavaEE ou J2EE, no NetBeans 6.0, exemplificando com o desenvolvimento rápido e prático de serviços web. Além da demonstração, explica-se sucintamente o que é um serviço web, sua arquitetura e por que este se mostra como uma solução tão interessante no mercado atual.

Em ambas as Tech Demos, o programa de iniciativa acadêmica da Sun é explicado lembrando as vantagens para os alunos nos treinamentos online gratuitos e certificações com desconto.

Quinta-feira Mar 27, 2008

Developing OpenGL with NetBeans 6.0.1

Last semester I did a subject on my university where I needed to do a project with OpenGL. Our professor asked us to program a 3D graphic modeler – a program capable of drawing 3D figures, set material properties and scale, move, rotate, group and copy them. We could not use high level libraries like Java3D, he wanted us to program OpenGL, only that. Things got complicated, but NetBeans made my life easier... again!

A OpenGL code may became quite complicated if you do not take care. There are too many settings, many variables, matrices, transformations... and a little detail can turn things horrible if you don't know what you are doing. On this point, working with a great IDE may help you a lot!

Another fact is that I liked the way of programming openGL with JAVA.
On the most other programming languages, you should use callback functions to do things on openGL, for example: you may create a function display() that will draw things on the screen, in python:

def display():
“Draw a triangle”
“Set Color”
glColor3f (1.0, 1.0, 1.0)
glVertex3f(0.0, 1.0, 0.0);
glVertex3f(-1.0, -1.0, 0.0);
glVertex3f(1.0, -1.0, 0.0);
// Finished Drawing The Triangle

but then, you should say to openGL that display() is the one taking care of screen drawings, saying:


In JAVA there is no callback function, it's just Programming to an Interface style! It's really cool and make your code more comprehensive. My openGL project become more understandable having a Sphere class that extends Shape class and implements Drawable interface (you know, my sphere is actually a drawable shape!)! The openGL functions like display(), init(), reshape() can all be coded inside a class that implements the interface GLEventListener, just that... make more sense to me! In Java:

//Draw a triangle
public void display(GLAutoDrawable drawable)
GL gl = drawable.getGL();
// Clear the drawing area
gl.glVertex3f(0.0f, 1.0f, 0.0f); // Top
gl.glVertex3f(-1.0f, -1.0f, 0.0f); // Bottom Left
gl.glVertex3f(1.0f, -1.0f, 0.0f); // Bottom Right
// Finished Drawing The Triangle
// Flush all drawing operations to the graphics card

This post is not about teaching OpenGL, it's just too complicated for a single post. But you may find your way through NetBeans6.0 OpenGl plugin and the following tutorial:

(and you may want to check the OpenGL red book too)

BUT LET'S START THIS GUIDE about turning JavaOpenGL ON at NetBeans6.0.1 and HAVE FUN!

The first step is to download the the cool JOGL plugin from page:

The file downloaded from above is zipped, unzip all the nbm files (that are inside the zip) on a directory.

Note: This plugin is really nice: check it's features list:
\* Editor for the OpenGL Shading Language (GLSL) with compiler error annotation, code folding, syntax highlighting, auto completion and documentation.
\* Easy access to the GLSL compiler and linker of your graphics driver integrated in the editor
\* OpenGL Capabilities Viewer
\* Integration of JOGL GUI components into the Matisse GUI builder
\* JOGL project templates
\* Ready to run JOGL demos and examples of the OpenGL Programming Guide (also known as Red Book)

Ready to use it? Let's install it!
Open you NetBeans IDE. Go to Tools > Plugins

On the window, go to "Downloaded" tab (it may be empty). Press the "Add Plugins..." button. Go to the directory you unzipped the plugin's nbm files, select ALL of them and press OK. The plugin items will appear on the list on the left just like the picture above. Leave all of them selected and press Install button.

You will go through some installation steps; accept the terms of agreement and press Install. The installer may alert you that the plugin is not signed (or something like that), just ask to install it anyway. In the end, you will need to restart your IDE.

Done. The JOGL plugin is installed. After NetBeans restart, you can go through File > New Project and see the OpenGL project option on Categories list.

The Simple JOGL Application is the perfect place to start doing your openGL project, it's an almost empty openGL application that you may increase.

You may have a look at the Demos too (to have an idea about what you can do with OpenGL and JOGL). This plugin cames with many JOGL demos and Red Book demos. So, if you are studing OpenGL using the Red Book, you will find the examples there. You just need to expand OpenGL categories on the New Project window to see the Demos folders:

JOGL Infinite Shadow Volumes Demo:

A very interesting point of the plugin is that it does integrate the OpenGL Panel and OpenGL Canvas to the Matisse system, so you can create your GUI using Matisse and put OpenGL elements on it.

Developing GUI on NetBeans is incredibly easy, and now you can include OpenGL elements on your projects! Quite nice!

Thats all! Hope you enjoy developing OpenGL on NetBeans6.0.1

Cheers! :)

Sábado Mar 15, 2008

Tech Demo at Estácio

Hi all,

Today, I did a 2 hours presentation with Pedro Reis (another CA from Rio de Janeiro) at Estácio de Sá University, on the center of Rio. We had an attendance of 62 people, including 5 professors, of the Java Development pos graduation class.

The presentation slides were prepared by Bruno Bastos (Petrópolis Sun CA) and I added some ones latter. The first arrangement was that Bruno and Luiz Aquino would do the today’s tech talk on Estácio, but in the end, things got totally different.

Bruno had an important appointment for today and Luiz Aquino got Dengue disease and needed to stay resting. So, I completed the task with Pedro!

Bruno made a cool web service and client system on NetBeans to show on the presentation. I constructed a simpler one during the demo (to make it on shorter time), and then, showed Bruno’s. The examples were quite nice because we were able to illustrate many features of NetBeans on a single shot, like the easy implementation of a web service, it’s integration with Glassfish and the way to use it on a client that can be developed using NetBeans Matisse! Everybody got really impressed!

Aside the Web Services and GlassFish, we talked about NetBeans 6.0 features (emphasizing the new ones), the SAI program, and the Java Certification, explaining how they can get theirs with discount! I inserted an OpenSolaris slide, focusing on SXDE, for fast and easy development, they got tempted to try it!

In the end, we raffled some souvenirs like Sun pens, All Access Kit DVDs, OpenSolaris mini-books and locksmiths.

Some professors on the room asked us to schedule more presentation on another institutes and universities on Rio that they give classes too. They will help us organize it there.

Quinta-feira Mar 13, 2008

XAMPP with NetBeans


I'm programming a little registration web system for NACAD (the lab I do work in at UFRJ) using PHP. I was already using xampp platform to have Apache, MySql and PHP working together easily for development. Then I noticed a cool PHP plugin for NetBeans 6.0 and then, decided to use, since there is no real good IDE for php development.
Let's start from the beginning. ;D

You can download XAMPP for Solaris, Linux, Windows and Mac at . It's installation is really easy, you can find any necessary information on xampp's site above. After installation, you may start your services using:
on Solaris:
#/opt/xampp/xampp start
on Linux:
$sudo /opt/lampp/lampp start

Notice that /opt/\*ampp is the directory you (yourself) chose to install xampp. We usually istall on /opt but you may put it anywhere you like.

Your projects folder must be inside the htdocs folder on xampp installation directory to be accessed trough http://localhost/myProject/index.php, for example, like:
on Solaris:
on Linux:

Since myProject folder keeps all your PHP scripts, HTML, images, etc...

Now you may open your NetBeans. You don't have it yet ?!?! Come on! Download it at

Open NetBeans! If your NetBeans do not support PHP (yet), go to Tools > Plugins on the Menu Bar. You may find PHP plugin on the “Available Plugins” Tab. Mark the check box and press Install button to take it!

Press Next button and accept the terms of the contract, then go on through the installation! After finished, you may restart your fantastic IDE.

After that, let's create our new Project. Go to File>New Project menu option. Choose PHP on the left box and on the right one choose PHP project with existing sources (or just PHP project if you are about to start a project from the zero).

Click Next.

Choose your project name, it's location and folder. Notice it's not the folder where your existing sources are in, it's just where NetBeans will keep your project settings and other stuffs.

Press Next.

Now you may give the folder where your existing sources are. On my example, it would be at /opt/lampp/htdocs/myProject.

Click next.

This step is to set your web server. Using xampp, you would be running apache, so you should inform NetBeans about it to let him test your application directly using the existing server. Don't worry, it will be really easy.

On the Configured Web Servers drop down menu, you may just see No Servers.

Press Manage Button.

On the new screen, chose a connection name (xampp for example). On Server type, chose Local Web Server with File Access.

Click Next.

On next screen you have to point the server configuration file, i.e., show the httpd.conf apache configuration file path to NetBeans.
httpd.conf can be found at xampp_instal_directory/etc (for example: /opt/lampp/etc/httpd.conf on Windows it'll be at /xampp/apache/httpd.conf), as you can see:

On Choose host N... menu, choose localhost, and press Next.

Write localhost on server name and leave port 80 for default http configuration.

You can leave Base Directory field empty. Press Next.

On the file access configuration, write the path to your project. DON'T leave /opt/lampp/htdocs directory path only, you may don't have write access to this directory, put /opt/lampp/htdocs/myProject and be sure you have read and write permissions at myProject folder.
Now you can finalize the server configuration and choose it as your Configured Web Server on your Project Creation Window.

Now you may finalize your project creation and start working!

Have Fun!

Segunda-feira Dez 03, 2007


Today they released the amazing new NetBeans!! Try it and get amazed too!


Quarta-feira Out 24, 2007

3 of 4 Tech Demos are Done!

I would like to use here a new HTML tag: < WET >
Yes... you may read this post hearing water streaming...
Yesterday, the rain started before I woke up and (I hope) it will stop after I sleep. I almost started to search for Noe's arc.

The good news now!

Yesterday, we (me and Luiz Aquino) did our second Tech Demo on the Superior Institute of Technology of Rio de Janeiro. The institute is part of FAETEC (a foundation that supports technical education) and has a new and innovative model of teaching. The article I wrote (I posted it here, so you can read it. Just search below) to subscribe to the event were published on an eletronic magazine.
We made two Techs;

The first (on Monday): Innovating with Solaris and OpenSource Technology
It was great, almost 60 people. We got many interested faces and many questions. We talked about Entrepreneurship, bzness planning, IT and the advantages of OpenSolaris and OpenSource choices. We explained Solaris, its distributions and Project Indiana.
The professors got very excited about SAI (we talked about it too, of course) and we are sending them the e-mail with details and instructions about the academic initiative. We distributed Solaris Mini-Books and SXDE DVDs.

The second (on Wednesday): Java & NetBeans, practical development, robust solutions.
It was great too. Because of the rain (in one day, rained what should rain in 45), fewer people arrived for our presentation... about 30 to 40... but It was nice too. We explained about the importance of using OpenSource technologies, the Java Platform and the Amazing NetBeans 6.0. The only problem was that we had to do the demo on NetBeans 5.5 wich was already installed on the machine we were working on... but we talked a lot about the new features of NetBeans anyway. We gave Mini-Books for those who were not present on Monday and talked briefly about Solaris.

Now we will keep contact and make the effort about SAI.

At UFRJ, we did our Tech Demo about Solaris, Introduction and Installation, on last Friday.
It was cool too... we had and audience of 35 students, and many showed interest to join our OSUG, that is growing bigger with 12 members. We distributed OS Mini-Books and SXDE DVDs and got e-mails to add on our Sun@UFRJ mail list.

We are about to repeat this demo on this Friday!! Then I will report it again!

That's it! :D

Domingo Out 21, 2007

4 Tech Demos in a Week

Tech Demos Scheduled!

We've already made one last Friday, 19. Next Friday we'll repeat it. In the middle of this week, we will do two more presentations at the Superior Institute of Technology at Quintino (out of our University), still at Rio de Janeiro. There we will do two different tech demos: Today we will present “Innovating with Solaris and open source technologies”. Wednesday will be “Java and NetBeans – Practical development, robust solutions”.

Below is the UFRJ tech demos' poster.


Segunda-feira Set 03, 2007

Artigo para o IST-RJ

Olá a todos! Desta vez falando em português! Estou postando aqui um artigo que escrevi para realizar a inscrição na Semana Tecnológica e Cultural do Instituto Superior de Tecnologia aqui do Rio de Janeiro. Leiam e opinem!

Abstract: This paper starts from the notice of a a greater competitiveness on the actual market. The IT professional, therefore, should have a knowledge capable of making the organization it works more competitive. Sun Microsystems believes, supports and invest on Open Source technology, letting that the users community could intervene and improve market consolidated tools as Java platform, the Solaris operating system and NetBeans development environment.
Resumo: Este artigo parte da constatação da maior competitividade do mercado atual. O profissional de TI, portanto, deve dotar de conhecimento capaz de tornar sua organização de trabalho mais competitiva. A Sun Microsystems acredita, apóia e investe em tecnologia de código aberto, deixando que a comunidade de utilizadores possa intervir e melhorar ferramentas consolidadas no mercado tais como a plataforma Java, o sistema operacional Solaris e a ambiente de desenvolvimento NetBeans.
[Read More]

Well... Let's keep this blog updated for now on!!


« Março 2015