Skip to main content

Getting Started with Java and Bluetooth

Posted by daniel on July 28, 2004 at 7:23 AM PDT

One million Bluetooth devices ship each week.

Bruce Hopkins gives this astounding figure In his feature article Getting started with java and Bluetooth. He introduces the Bluetooth protocol along with he classes and methods of JSR-82, the official Java Bluetooth API. Hopkins explains, " Before you start communicating to other Bluetooth devices, you need to discover the devices in your vicinity, and search for their services. After all of the preliminaries are out of the way, you can stream data back and forth to any Bluetooth-enabled device in your area, whether it's running Java or not." By the way, we would love to publish more articles about J2ME and areas that focus on wireless and devices.

. . . today's blog summary is brought to you by the numbers 2,5,1.5, ... My favorite news item today was on the latest release of the standard edition JDK. The description is almost like an IP address. We are now on J2SE 5 version 1.5 beta 3 build 59.

In Also in Java Today , Massimiliano Bigatti has been thinking of patterns as they relate to his work integrating disparate web services. As he and his team started integrating, he found himself applying patterns: "I started thinking that some solutions could be considered to be 'Domain Patterns', a specialized form of the original Gang of Four (and other) patterns, placed into the context of web services and integration." In the webservices.xml.com article "Web Services Integration Patterns, Part 1", he introduces four of the patterns developed in his team's work.

It's sometimes useful and instructive to revisit plans for the future from the recent past. In this August 2003 weblog entry from Adam Bosworth, he outlines his thoughts on a Web Services Browser. In addition to his thoughts on how you interact with information in this browser, he begins to outline his thoughts on a browser that could more intelligently accomodate offline and online browsing.


Alex Toussaint joins us
in today's
Weblogs with a blog on Dynamic Coupled Services. He writes about the work he has "been doing a lot of work around WSRP (Web Services for Remote Portlets) where services are basically portlets that can be federated out to any consumer. There are two main concepts in WSRP, producers' software that exposes applications using the WSRP standard on the network and consumers' software that aggregates WSRP applications. Consumers are typically a portal-like infrastructure. Producers do not have to be portals. There are WSRP implementations in Java, .NET, and other varieties out there."

Malcolm Davis links to a pdf of Dijkstra's classic The Humble Programmer. Davis pulls out the quote "The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague.."

Lance Anderson is looking for your EJB 3.0 comments. He writes "One area that has been greatly simplified, is the amount of code that is required to create an EJB. For example, consider the following EJB 2.1 Stateless Session Bean. " and points to an example.


AHolub writes about replacing function pointers with classes and interfaces
In today's

Forums. " Stroustrup resisted member-function pointers in C++ for years, simply because they aren't necessary. Rather than pass a function that knows how to do something, it's much better to pass an object that knows how to do something. For one thing, the object can do more than one thing (both do and undo an operation, for example). The Gang-of-four Command pattern is based on this way of working, as are simlilar patterns like Strategy. (Java's Runnable is an example of Command, LayoutManager is an example of Strategy)."

Tackline writes that " From the perspective of client code there is no significant difference between interfaces and abstract classes. So for most applications, where subtypes are strictly limited, you might as well stick with an abstract class defining both interface and your abstract skeletal implementation. Having a separate interface just makes for more code with JavaDocs split from common implementations, which makes maintenance much more of a problem with no upside."

C_jinx follows on the use of interfaces only to define types, Constants defined in interfaces should have been treated as compilation errors by javac. That would have eliminated the problem.

Johnm adds to design and document for inheritence or else prohibit it, saying "ava's support for composition is seriously lacking relative to its support for inheritance. E.g., a programmer has to basically manually construct the compositional forwarding. [Yes, I know about various introspection based libraries/tools -- they help prove my point.] "


In Projects and Communities, for a growing list of online Java resources check out the JavaPedia
page on Web Sites. As always, add to the list if you have a link we are missing.

UltraMock" is a Mock Exam simulator system with advanced features like customizable exams using XML files, progress reports and stats, different difficulty levels."


In today's java.net News Headlines
:

Registered users can submit news items for the href="http://today.java.net/today/news/">java.net News Page using
our news submission
form
. All submissions go through an editorial review before being posted to the site. You can also subscribe to
thejava.net
News RSS feed
.


Current and upcoming
Java Events
:

Registered users can submit event listings for the href="http://www.java.net/events">java.net Events Page using our href="http://today.java.net/cs/user/create/e"> events submission
form. All submissions go through an editorial review before being
posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the
Java
Today RSS feed
. Also, once this page
is no longer featured as the front page of
java.net
it will be archived along with other past issues in the href="http://today.java.net/today/archive/">java.net Archive.