|
|
||
Neto Marin's BlogCommunity: Embedded Java ArchivesGetting started with JME - Part III / IIIPosted by netomarin on July 24, 2007 at 10:06 AM | Permalink | Comments (1)Hi all ... I´m back !!! ;-) Let´s finish this post series with the last (but not less important) element that´s I think is essential on a quality JME application development: Connectivity ! To be or not to be CONNECTED ?!?! Because today, be connected is more than a simple feature of a mobile application, it´s a requirement! Since from a simple search until the data synchronization with some service available at the big Net. And why not integration with other systems using SOA and webservices ? Presenting, GCF ! When I used the connectivity recourse by the first time, I didn´t believe that´s how should be too easy! I just called the same method for any kind of connection, and so start using some specific protocol like HTTP. How can GCF do this ??? First, let´s analyze the follow image to understand GCF structure:
How we can observe, all and ever kind of connection extends Connection, and so it´s easier to Java manipulate the connection. And, if we think about the net structure, we really realize that´s all connections has the same basic operation mode. The Connector class By the static calling of the method open() from Connector class, a new connection is opened. The calling is ever the same, and something like this: ...
try {
Connector.open("protocol:address;parameters");
} catch (ConnectionNotFoundExeption e) {
// no handler available for socket connections
}
...
And, if the desired protocol it´s already known, it´s just do the cast to your connection type and so use as you want. You can find practical examples of the usage at API: Low-level Networking Programming But, if you´ve created your own application protocol or have to do some special data manipulation you can use advanced stuffs like SocketConnection, ServerSocketConnection or UDPDatagramConnection, and so do as you want to. What about Bluetooth ?!?! The Bluetooth usage is increasing day-by-day, including by the mobile phones manufacturer that´s making it available in a large number of models. And, what´s already means a high-level mobile phone status, now is a important "accessory" and have been used in a different kind of applications, like: As a remote control, to replace wires, multi-player games and little (or provisional) WLANs. But, if we think about the net aspect, we are (yet) inside the GCF. But, why make it complex if we can simplify ? ;-) On this way, the Marge Project comes to help (and a lot) the usage of this (important) technology. It´s a framework to make easy all Bluetooth programming process: since the device and service discovery until the data exchange properly. JME surfing on SOA and Webservice wave! The availablement of services at Internet using the Webservice paradigm and the increased usage of this to system´s integration with SOA, brings to JME the necessity to talk with this technologies. But... What is SOA and Webservice ?
How to consume Webservices and SOA integration As the name tells, Webservice is a service available at the Web. So, we could think in use directly a HTTP Connection to access the information, correct?
Finalizing With this post, it´s the end of "Getting Started with JME" trilogy (with a little late) and now I´m feel that I can go ahead with many subjects that were introduced here and because some feedbacks that´s I´ve received by e-mail. And, to the end of this week you can wait for a complete post about the usage of Webservices and SOA integration, including some examples and tips that will be present at my session at JustJava 2007 (October, São Paulo-Brazil) !! Thanks all, Neto Marin Getting started with JME - Part I / IIIPosted by netomarin on May 04, 2007 at 01:37 PM | Permalink | Comments (0)Are you one of those that are very interesting on developing something to mobile devices? Or, Are your boss pushing you to show THAT report on his phone ? And so, you decided to visit some sites and mailing lists about, but you found just a "letter soup" like CLDC, CDC, MIDP and others ????? Oh yeah, I´ve already done the same... and because this I´m going to show you the "stones path": What you have to do to know how this platform works (configurations, profiles, life-cycle, etc). And, for not be a large post, I´ll write divided in 3 parts. ;-) Part I The Platform First, to understand this platform lets look to the above picture:
As you can see, the bars are separated by the kind of device you wanna run your application. Because, with this you will be able to know witch APIs will be available to develop you application. And of course, it´s a good idea read your device specification to know witch optional API will be available too. My objective today is show you the path to find the best resource of documentation. In this case, the best option is to visit http://java.sun.com/javame/reference/apis.jsp . Downloads Yet on Sun´s site, you can find at http://java.sun.com/javame/downloads/index.jsp the oficial toolkit to different JME configuration and profiles. And now ?!?!?! :/ Well, now you probably have the minimum necessary to start a JME application development for the device you´ve choose. On the next post I going to write about the application life-cycle and with what you must care when going to start you application development. Any doubt? I forgot something? Wrote something wrong? Cya!! []s Introducing myself !Posted by netomarin on May 01, 2007 at 06:54 PM | Permalink | Comments (3)Hi all! From now on, you´ll find here my little contribution about JME discussion. I´ll post news, articles, codes examples, how-to... well, I´ll try to help you at the JME techonology path! :-) But, before start blogging, I´d like to introduce myself. If you´re looking for something about JME, let me know writing your sugesttion to netomarin@gmail.com and I´ll do the possible to write about what you wanna know ! ;-) Now, is just wait my nex post! ;-) []s | ||
|
|