How to create and host your first Orkut/OpenSocial application

In this tutorial, I'm going to show you how to create a very simple OpenSocial application that displays the message "Hello World !".

The Open Social API is comprised of a Javascript and a REST-based API.

To create a Javascript application, you will need to create a XML file, place it in a server outside Orkut and add it to Orkut's directory by linking to its URL.

This XML file is, in fact, what is known as a Google Gadget file. Google Gadgets have been used much before the OpenSocial API. They can be installed in your Windows desktop, for example.

An Open Social Google Gadget is a special kind of Google Gadget, that references the Open Social javascript API, as you can see bellow:

How to create a conditional component with the Wicket Web Framework

The Wicket Web Framework is entirely based on XHTML views. It doesn't use JSP, Velocity or any other view template mechanism. Therefore, there is no way to define, in the view page, that a certain markup has to be generated conditionally. Bellow, there is an example of how you insert a dynamic string into a wicket XHTML page:

First, you have to use a SPAN, DIV, P or any other XHTML tag to define the boundaries of the text:

<span wicket:id="labelText">SampleText</span>

This wicket:id is a special attribute used by Wicket to define an insertion point, the point where the markup of a Wicket component will be inserted. So, the string inside the tag ("SampleText") will never be shown in the web application. Imagine that instead you want to insert the content of a string variable named stringVar. That's how you would code in Java:

My RSS Project Dashboard

Some rules concerning the use of Asserts in Test Classes:

I wrote the message bellow to be read by a team of developers in a project I'm working on:

"
Some rules concerning the use of Asserts in Test Classes:

1) never use Assert.assertTrue(true) or Assert.assertEquals(true,true)

This recommendation seems stupid, but who hasn't been tempted to write something like that when pressed by an almost impossible deadline ? And who has not forgotten to go back to that code later and change it to a meaningful assert ? So, my recommendation to you is to never ever write something like that.

You should use assert methods to verify that the return of a method is equal to what is expected. When you call Assert.assertTrue(true) or Assert.assertEquals(true,true) you are introducing waste in the code and a false sense of security. You may think that you have finished the test method because you create the assert code but you have not. So, always put a real logic condition inside assert methods.

Configuring your Java Web Application to use UploadTag

The UploadTag is a project I have been working on in the context of the NanoLearning project (www.nanolearning.com) to implement its multimedia upload features. The UploadTag project is a tag library to help you create upload areas inside JSP pages. It was inspired by the Upload features of web applications like Google's Gmail.

Take a look at the image bellow:

The main difference between traditional upload forms and Gmail's is that in Gmail, it's all based on DHTML. If you click on the “Attach a file” link, it will open a text field and a button, as you see bellow:

Scaffolding JEE applications with AppFuse (1/3)

| |

One of the perceived advantages of the Rails framework and its many clones over the JEE stack, is a feature called Scaffolding. The idea is that developers concentrate on creating the domain model and the framework gives them a set of tools for creating the actions and views, automatically from the domain model, targeted at the basic CRUD operations.

There are some frameworks in the JEE space, such as Grails and Trails, which try to emulate many of the basic ideas of Rails. The problem with these tools is that they are not only scaffolding tools, but whole new frameworks you have to learn. What we didn't have up to now, was a tool for code generation, similar to Rails scaffolding, but that could be used with common Java Web and Persistence frameworks like Struts and Hibernate.

5 reasons why virtualization for software development environments is a good idea

I have been using VMWare Server for creating software development environments for 6 months. I already have a collection of VMs, one for each project, and some shared VMs, for stuff like bug tracking, version control, wiki, etc. The experience has been so far very good and I intend to continue using virtualization in future projects. In my experience, the main advantages for using virtualization in software development are:

1) It's more difficult to get distracted

In VMWare, you can run your virtual machine in full screen. I usually install only the softwares related to the job on the virtual machine. No MSN, no Google Talk, or anything else that I don't need for the job. When someone calls me from Skype, I can hear the sound, minimize the VM window and answer it. But having no messaging or multimedia softwares installed inside the VM, reduces the temptation to distract myself from my task.

Palestra: o Struts morreu. Como escolher um novo framework Web.


Essa palestra tem o objetivo de apresentar as características dos novos frameworks Web que podem substituir o Struts, como o JSF, WebWork, Spring, e vários outros. O objetivo é melhorar o entendimento sobre as diferenças entre as várias alternativas e estimular uma escolha bem fundamentada de um novo framework Web.

My First Nano

This is the 1st Nano Course, I tried to create.

If you don't know yet, my company is working on the development of a Web 2.0 application for the education area. The idea is that anyone can create a digital course, based on Flash technology, with audio, video, games and interactivity.

The project's website and the online authoring tool are based on Java and Ajax. Part of the code that we used to upload media files has been donated to the OpenSource project UploadTag, which I already had mentioned in a previous post. This project is located on http://uploadtag.dev.java.net/, but it's already moving to a new website, on http://www.uploadtag.org.

A 3a parte de uma palestra sobre o JBoss Portal


Faltam ainda as 2 últimas partes da palestra...