Early last Friday morning, we released the latest version of ThinWire (1.2 Release Candidate 1). Since then, it’s been very interesting and exciting to watch the reaction.
First of all, there actually was a reaction to this release. Nothing of significant note happened after our previous releases, but this one was different.
America… What a country! In America, you watch TV. In Soviet Russia, TV watches you!
The MPAA is trying to push a bill through Congress that would require anyone with a home theater to register with them. The home theater equipment will have devices that can determine information about the audience watching and report back to the KGB MPAA.
What makes a home theater? According to the MPAA, a home theater is any home with:
“Just because you buy a DVD to watch at home doesn’t give you the right to invite friends over to watch it too. That’s a violation of copyright and denies us the revenue that would be generated from DVD sales to your friends,” said [MPAA head] Glickman. “Ideally we expect each viewer to have their own copy of the DVD, but we realize that isn’t always feasible. The registration fee is a fair compromise.Pay attention to the government! They obviously don’t trust you, why should you trust them?
Source: http://www.bbspot.com/News/2006/11/home-theater-regulations.html [Mirror]
Terrell Owens has released his first book in a series of childrens books. His next book will be called Little T Learns What Not to Say, followed by Little T Learns To Say I’m Sorry. I swear I’m not making this up.
I don’t know why I do the things I do. Today I searched Google for a phrase that I used to say a lot: ”Sleepmode is the squidaud” It was an inside joke of sorts. Busta Rhymes often says “Flipmode is the Squidaud,” refering of course to his group. Some friends of mine hijacked that phrase and began using it to refer to a love of slumber. Anyway, I digress.
The point is that I Googled ”sleepmode is the squidaud” and only got three results. Two were from the previous version of TedCHoward.com, and one was from a blog that I apparantly had 4 years ago. Using Google as the record, I am the only person to ever post the phrase “sleepmode is the squidaud” on the internet. I’m not sure how I feel about that.
The New York Times has yet another story on scientists attacking religion and vice versa. Does it make me foolish to believe that faith in God and scientific truth are in harmony with each other and not polar opposites? It would be nice to be able to believe in things proven by observation without being labeled a heretic, and likewise, I would enjoy discussing my faith in God without being labeled an idiot.
http://www.metafilter.com/mefi/56316
This is interesting for two reasons:
He has 3 SuperBowl rings.
He holds the record for all-time rushing yards in the NFL.
Now he’s the new winner of Dancing With the Stars.
What can’t he do?
http://www.newsnet5.com/education/9891863/detail.html
As far as I’m concerned this is Class IV Retarded. It was an orange watergun. Now this six year old will be suspended for 10 days and have on his permanent record that he brought something resembling a weapon to school.
From the Slackware current changelog:
I took several stabs with me sword at ripping out kdebase’s surprise HAL requirement as well, but the best I could achieve was “Internal Error”. Aarrr!!Also, here’s more pirate talk from Mr. Linux himself.
I am such a nerd.
Well, there was supposed to be a big world premiere event for this video on AOL today, but apparantly it was leaked on the internet early, so the premiere was canceled. [youtube=www.youtube.com/watch
Talk Like a Pirate Day is tomorrow, and to help get you in the mood, ABC’s season premiere of Wife Swap features a pirate family. Actually, not just any pirate family, but the family who started Talk Like a Pirate Day a few years back.
[youtube=www.youtube.com/watch
OmniNerd has a very interesting article on our obsession with finding the cheapest gas available. He mathematically determines possible savings over a month, and then applies the formulas to other commodities that we generally aren’t as obsessive at finding better prices.
I have been known to go out of my way for that extra $0.05/gallon savings, but how much am I actually saving?
Waiting for me in my inbox this morning was an email from Amazon.com.
As someone who has purchased books about pirates, you might like to know about our featured booklist celebrating Talk Like a Pirate Day.Well, they’ve got me pegged. Here’s the list.
This tutorial will walk you through the creation of a simple Rich Internet Application with ThinWire using Eclipse 3.2 (Callisto) and the Eclipse Web Tools (WTP). It will also show you how to use these tools to debug your ThinWire application.
NOTE: Neither Eclipse nor the WTP plugins are necessary for ThinWire development. There are also other methods of using Eclipse to debug your ThinWire application that don’t require the WTP, but this currently appears to be the most straight-forward approach.
To follow this tutorial, you must have Eclipse 3.2 and the WTP installed with Apache Tomcat installed and configured. Below is a quick summary of the steps necessary. For more information see http://www.eclipse.org/webtools/.
Once you have Eclipse installed and configured, you can create your new project. Open Eclipse and switch to the J2EE Perspective. Then right-click on the Project Explorer and select New –> Project.
Choose Web –> Dynamic Web Project and click Next.
Set the project name to SimpleApp and make sure the Target Runtime is the Apache Tomcat that you set up in the configuration. Click Finish. Eclipse will create the project for you. If this is your first web project, you may have to accept a license agreement.
If you haven’t already done so, download the ThinWire SDK from http://www.thinwire.com/download.html. Extract the zip archive, and copy the tree JAR files from demos/playground/WEB-INF/lib (thinwire.jar, retroweaver-rt.jar, commons-fileupload-1.0.jar) to $ECLIPSE_WORKSPACE/SimpleApp/WebContent/WEB-INF/lib (where $ECLIPSE_WORKSPACE is the path of your Eclipse Workspace).
Back in Eclipse, right click on SimpleApp in the Project Explorer and choose Refresh. The three JAR files should now appear under Web App Libraries.
At this point you should have a Dynamic Web Application Project with the ThinWire Runtime and support libraries. Let’s write some code.
Right-click on Java Resources: src and choose New –> Package.
Make sure the Source folder points to SimpleApp/src and set the package name to thinwire.apps.simple. Click Finish. Right-click on the thinwire.apps.simple package and choose New –> Class.
Make sure the Source folder and Package are correct. Call your new Class Main and check the box to create the public static void main(String[] args) method. Click Finish. Eclipse will generate the following java code in a file called Main.java:
package thinwire.apps.simple;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
}
}
We’re going to create a simple application that presents the user with a Dialog asking for their name. When the user types their name anc clicks the OK button, the Dialog closes and another Dialog appears to greet the user by name.
The first thing we need to do is import the ThinWire UI Package and the ThinWire Event Package:
package thinwire.apps.simple;
import thinwire.ui.*;
import thinwire.ui.event.*;
public class Main {
The thinwire.ui package contains the classes for all of the user interface components provided by thinwire. ThinWire contains over 20 components, but for this application will will be using only Divider, Label, TextField, Button, and MessageBox. The thinwire.ui.event package contains the event listeners for the UI components. In this application we will be using an ActionListener with a Button.
The creation of a ThinWire web application is very straightforward and is very similar to creating a standard desktop application. Basically all we do is:
The code looks like this:
public static void main(String[] args) {
final Dialog dialog = new Dialog("Simple ThinWire Application");
// The position of the Dialog is relative to the browser
dialog.setBounds(25, 25, 215, 210);
Label label = new Label("Hello, what is your name?");
// The position of the Label is relative to the Dialog
label.setBounds(5, 5, 200, 25);
// the Dialog and TextField are declared final so they can be
// refereced inside the Button's ActionListener
final TextField input = new TextField();
input.setBounds(5, 35, 200, 25);
Button button = new Button("OK");
button.setBounds(55, 65, 100, 25);
// When the button is clicked, close the dialog and greet the user
button.addActionListener(Button.ACTION_CLICK, new ActionListener() {
public void actionPerformed(ActionEvent ev) {
dialog.setVisible(false);
MessageBox.confirm("Hello " + input.getText() + "!");
}
});
dialog.getChildren().add(label);
dialog.getChildren().add(input);
dialog.getChildren().add(button);
dialog.setVisible(true);
}
Once you have finished typing your code, save the file.
Now, we need to configure the web app. In the Project Explorer, expand the Deployment Descriptor tree element. Right-click on Servlets and choose New –> Servlet.
Check the box next to Use existing Servlet class. Click Browse and choose WebServlet. Click Next.
Add two Initialization Parameters:
Param1 (the name of the class with the main method):
name = mainClass
value = thinwire.apps.simple.Main
Param2:
name = extraArguments
value = initParam,clientInfo,header
Select the only URL Mapping in the list, click Edit, and change it to “/” (without the quotes). Click Next.
Uncheck all the boxes and click Finish.
Eclipse then writes this configuration information to WebContent/WEB-INF/web.xml. Your servlet is configured. Let’s run the app.
Right-click on SimpleApp in the Project Explorer and choose Run as –> Run on Server
Make sure that the Tomcat server you configured is selected and click Finish. Eclipse then starts Tomcat and launches a browser pointed to your web app.
We have a Dialog with a Label, TextField, and Button. You can drag the Dialog around the screen if you like. Type your name in the TextField and click the Button.
The MessageBox component functions like a JavaScript alert (although you can do more with a MessageBox such as include an image, display multiple buttons, and include any ThinWire component). When you click OK, the MessageBox closes and the app is done. Back in Eclipse, right-click on the Tomcat Server and choose Stop.
This is a very simple application, but in the case of more complex web applications, you may need some assistance in debugging your code. Since a ThinWire application is written in pure Java, we can fully utilize Eclipse’s built in debugger.
In the code editor pane, find the first line of code that executes in the main method, and double-click in the left margin. A blue dot appears in the margin indicating a break point has been inserted. Now, right click on SimpleApp in the Project Explorer and choose Debug as –> Debug on Server. Click finish. Again Tomcat starts and the browser is launched. This time, Eclipse comes back into focus in the debug perspective. You may now step through the execution of your app as you watch the variables change.
When you’re done debugging, close your browser and stop the server.
There’s only one more thing left to do: deploy the application. Eclipse WDP makes this extremely easy. Just right-click on SimpleApp in the Project Explorer and choose Export –> WAR file.
Choose a name for your WAR file and Eclipse will create the archive ready to be deployed onto any Java Servlet Container.
This is just one method for creating ThinWire Rich Internet Applications. We took advantage of several advanced features of the Eclipse Web Tools Project, but really the only things a developer needs to create a ThinWire application are the ThinWire library JAR files, a Java complier, and a text editor. The only thing you need to run a ThinWire application is a Java servlet container. With ThinWire, creating Rich Internet Applications are as simple as creating desktop GUI applications.
Lead developer of the ThinWire Framework Joshua Gertzen has written an article going over existing approaches to implementing OO inheritance in Javascript (including the famous example by Douglas Crockford) and explains the final solution that they needed on the ThinWire framework for super class method calling.
read more | digg story
While there are many methods that attempt to make JavaScript into an Object Oriented Language, most fall short when it comes to the ability to call methods on parent classes. This article analyzes several broken approaches, including the famous one by Douglass Crockford, and then presents a working solution.
After several weeks of hard work, the next beta has been released. You can read all about it at the ThinWire Blog. The main two things are the ability to change the style of each component or the entire application at a global level through a properties file, and a major performance enhancement minimizing client-server traffic.
My main contribution to this release is the RangeComponent interface and two component implementations of this interface: Slider and ProgressBar. The progress bar is very useful for providing feedback to the user while your application is doing some sort of processing. The slider is used for selecting a numeric value from a specified range of values.
As this release was mainly about style, I have revamped the look of ThinWire Mail (my demo application built in my spare time). Today we are also announcing live demos of ThinWire, so you can click here to try out ThinWire Mail without having to download anything.