Universal Translator for your Tweets

I thought this was going to be easy… SO much for preconceptions. Today, I’m going to give you the code to create a twitter translation App using, HTML, CSS, JavaScript and Java, the Twitter API and the Google Translate API. In a future tutorial I will demonstrate cross domain Ajax to get this Application to work totally on the client side but in the mean time you will need to have a Java enabled server to execute the server-side JSP that requests the API for twitter.

As you type your tweet the the JavaScript will analyze your keystrokes and check for when a space is entered assuming you are done typing a word, at this point the text is passed to Google for translation. When your done typing hit tweet and it’s off to twitter with your tweet.

This is what your app will look like when it’s finished:

translateApp

Source

Read More

Creating a JavaWeb Email Contact Form

In a previous tutorial I have explained how to create a new NetBeans project and add a library to it to make the classes that are available in a jar available to use in your own project. If you are unsure how to do this go ahead and check out this article.

In this tutorial I’m going to explain how to create a contact form with a jQuery validation template for you to play with that will send an email to whomever. The end result should look like this:

form

Source

Read More

Creating a PDF Programmatically with iText

All will agree that pdf’s are cool, right? So, In this brief tutorial I will be describing how to create a pdf programmaticallywith NetBeans and how to add the iText library to your NetBeans projects. As is always the case this tutorial is intended to wet your appetite for the iText library. When you get serious you’ll want to create shapes and play with colors. In this tutorial I will show you how to create a pdf that shows a big Hello World at the top and draws eight squares underneath it. Here is the finished product, you can play around with the collors and draw loop to add more effects.

First thing you will need to have a copy of NetBeans. And also a copy of the iText Core jar. In Netbeans you will want to create a new project, call it “HelloWorld”. A this point you should create a new package, call it “pdfbuilder”.

Right click the package pdfbuilder you’ve just created and select New > Java Class:

Creating a New Java Source File

You will need to give the class a name so for this example you should call it HelloWorld then hit finish:

Naming a Java Class

Read More

JavaFX Hello World

It’s fun to learn new languages and althrough I prefer Actionscript 3 I’m giving JavaFX a shot because it’s been developerd by sun the guys that brought us JAVA. Ive heard of the ten minute JavaFX tutorial. This will be like a three minute tutorial. This screenshot gives an idea of how simple this will be:

JavaFX Hello World Read More

Handcrafting a MySQL Database

The natural progression for a developer of web applications is for them to eventually be able to create a solid persistent web application. Solid in that is is robust to scalability and persistent in that the data you create while using it gets stored on the cloud, as it were. Cloud computing is a new way of imagining how data will be handled online. Instead of your data residing on a single hard-drive on your home computer or on a web server somewhere your data will be shifting through the cloud as resources are negotiated automatically to handle the breath of demand for your content.

In this example I’m going to show you how to download, install, create and query a MySQL database. In a future post I’ll show how to connect a JSP page to a database and display some content onto a page. This will be the first steps to creating a Content Management System of sorts, but I’ll leave that for now.

So, First step should be to download MySQL server. if you’ve got a Microsoft computer then choose the download that corresponds to your country. After you’ve downloaded and installed everyting agreeing to everything along the way, you should get to the MySQL Server Instance Configuration Wizard:

1

Read More

Java Web ‘Hello World’

As a Web Developer I naturally enjoy web development and writing a blog has always been on my mind. I start and stop and start and well. You get the message. I’ve even tried my hand at podcasting. With this post I want to introduce people to the NetBeans IDE and to get us started I want to show how to get a hello world running in java through a JSP page. In the future I’ll talk about Servlets and session handling but for now it’s get up and running time.

I love java for some reason. Maybe because it’s the first language I really sunk my teeth into.  Anyhow, first off any aspiring developer should download install and familiarize themselves with an IDE. IDE stands for Integrated Development Environment. Some people swear by Eclipse because of its extensibility and it has its uses but for me NetBeans has it made. It’s released by Sun, the JAVA people so it’s got some neat features like auto formatting that make a developers life easier.

So, first you need to travel to NetBeans.org and download the latest version of NetBeans. You should be looking for the Java version or the all version. Really you just want a version that ticks the Java Web and EE box. Oh, and make sure you’ve got JavaScript enabled or you won’t see anything.

netBeans Download

Read More