Guide for developing J2ME applications - netbeans

I am new to J2ME and what I have now is Netbeans 6.7.1 IDE. Is there any basic guide for developing Mobile applications in Netbeans 6.7.1? Please provide me the links.

Netbeans.org itself has great tutorials for mobile development in Netbeans. And that is what you need:
http://netbeans.org/kb/trails/mobility.html
For examples this is a very good Quick Start for Netbeans J2ME development:
http://netbeans.org/kb/docs/javame/quickstart.html

I think this book best source for J2ME with Netbeans:
Kicking Butt with MIDP and MSA: Creating Great Mobile Applications (The Java Series)
Book Description:
The release of MIDP 2.0 and the introduction of the new Mobile Service Architecture (MSA) are generating momentum for the Java ME platform. As more and more Java-enabled mobile devices become available and more service providers become open to third-party development, the demand for customized applications will grow dramatically. Now, there's a practical, realistic guide to building MIDP 2.0/MSA applications that are robust, responsive, maintainable, and fun.
Long-time Java ME author Jonathan Knudsen offers real solutions for the complex challenges of coding efficiency, application design, and usability in constrained mobile environments. Experienced Java developers will master MIDP 2.0 and MSA programming through clear, carefully designed examples. Downloadable code is available for both NetBeans Mobility Pack and the Sun Java Wireless Toolkit. Kicking Butt with MIDP and MSA's wide-ranging content covers:
Pushing MIDP's limits, and exploiting MSA's full power
Using MIDlets, Forms, commands, core classes, and invocation
Building effective mobile user interfaces
Designing graphics with the Canvas, the Game API, SVG, and 3D
Providing storage and resources: record stores, FileConnection, and PDA PIM
Internationalizing mobile applications
Networking via WMA, Bluetooth, Web services, and SIP
Parsing XML documents
Implementing audio and advanced multimedia
Securing mobile applications with SATSA and the Payment API
Building advanced location-based applications
Designing applications for multiple devices
Creating end-to-end mobile application architectures

Tell what platform you are developing on so that the tools available for you can be given.
Also, you most definitely want an emulator so that can test your applications directly on your computer (Saves time).
Honestly, can't give much more advice than to know java well and to use google + stackoverflow. Those are what I did and ended up developing a commercial app in j2me just fine.

Related

Cross-platform mobile app & RESTful web service & scoring algorithms - architecture & technologies

I am planning to create a cross-platform mobile app that has native-like versions for most mobile platforms, maybe Windows Phone, Android, iOS. It's supposed to store data in DB on server, and the mobile app is mostly for visualizing that (numerical) data.
Basic usage scenario
User opens the app
App data is refreshed via internet connection
User inputs new data
New data is sent to server, handled and DB updated
User's app data is updated according to DB data (ANIMATION!)
User updates settings on his app that alters it's behaviour.
I'm a noob when it comes to designing and programming mobile apps + web services alone, so I'm hoping you could help me with the following questions. Technologies I'm most familiar with: Java EE, Python, HTML/CSS/JS, MySQL, Graphics. Maybe I should go for PhoneGap? Thanks a lot!
1) What cross-platform mobile technology you would recommend?
2) What kind of solution would be most suitable for server/app server? (Estimated code lines < 5000)
3) What's a good place to start learning scoring algorithms?
Please respond if you have answers to any of the questions asked.
EDIT: found a similar question: Cross-Platform Mobile Application Solution
#thevangelist: It's a very good question you have raised, all mobile developers face the same problem when we start writing an app. Today there are multiple Open Source Frameworks available in market which are trying to solve the same problem but in different manner.
Based on my research and experience, I would like to recommend below technologies which we can consider while building an mobile apps.
View: View is an important part of any mobile apps. When we start building UI/UX we also have consider it's platform design principles. Looking these points I would like to recommend React Native for the same.
React Native: It is a Facebook, and Instagram developed JavaScript library used in creating native mobile applications. It allows us to write iOS and Android applications using JSX, a known HTML look-a-like code, and JavaScript. It is based on “Learn once, write anywhere” methodology.
Pros
Renders native views with a native behavior and interaction … you’ll end up with a real native application
Has a paradigm of “Learn once, write anywhere” where developers only need React and JavaScript to create better application for Andoroid, iOS.
Uses native architecture and concept
It does not require a WebView
CSS Flexbox is used for layout design
Cons
Code abstraction leads to bugs and memory leaks
Cannot work without the API, which is provided by React Native, technically there’s no fallback like with classic hybrid mobile apps
When creating proper native applications, a developer will have more power and control regarding performance tuning
React Native is still a new framework so we can’t predict possible problems and downsides
These cons are somewhat negligible, especially if we consider that React Native is empowering more and more native applications with each passing day.
Data in Transit: If your app sync data from web services, then there are multiple frameworks available in the market to make our job easier. Please find below some of the most popular JavaScript RESTful Frameworks:
ACTIONHERO, StrongLoop
Data at Rest: You would also be needing offline storage for the sync data. Since we do not have direct support for native SQLite in JavaScript, we need to use some of the React Native SQLite Plugins. Please find below plugins which are available in the market:
almost, andpor, jbrodriguez, ramsundark5, remobile
For Data at Transit/Data at Rest, I would like to recommend Siminov Framework which is available on all the major platforms (Android, iOS, Windows). It also supports hybrid technologies such as React Native, Cordova, Xamarin.
Pros
Available on all the major platforms (Android, iOS and Windows)
Easy to configure, it provides standard xml based structure using we can easily configure our app database
It allows developers to bind ORM with remote RESTFul web services too
Also have support for SQLCipher on all the platforms
Cons
Lack of community: Recently they have launched their products on all the major platforms, not many people are using it.
Since the configuration is based on XML structure which looks pretty old to me. But based on their documentation it was done to support all the major platforms
Algorithm: I have found this link nurlybayevaAMS9 related to algorithm, hope this may help you.
Try avoid writing cross platform application. It is doable using HTML5+jQuery. But you can never get the same look and feel as native app. secondly windows, ios and android have their own look and feel and will come up with their own elements. You can never cater to all three having same code base. Better is to code using native sdks.
1) Never used PhoneGap, although aware of it, but don't forget to consider a simple HTML5 application. If possible, this would save you lots of work and maximize compatibility.
2) You can develop great RESTful webservices with both Java EE (see JAX-RS/Spring) and Python (see django). The choice is really more a matter of personal taste.

Native Mobile browser based apps

Wondering if someone could point me in the right direction, as I am unsure of the correct terminology. I am looking to create a mobile website, which loads in a browser based application (iPhone, Android).
I have seen this done before. For example, the bank of america application is actually installed via the App Store, however, it is simple a browser window that loads the Bank of America mobile site (which is built to look and function like an app).
I find this to more cost-effective, as developing a mobile app is less intense, as opposed to developing applications for 2-3 different mobile platforms.
Can someone provide insight into the terminology or methods used to accomplish this? Looking for articles, examples, etc.
Thanks in advanced!
I would suggest to use IBM Worklight.
Worklight is an Eclipse-based visual development and server platform for mobile apps. Using Worklight and popular open technologies, you can build, test, deploy, and manage your smartphone and tablet apps for iOS, Android, Blackberry, and Windows Phone devices, with maximum code reuse and per-device optimization.
Worklight supports open technologies such as HTML5, CSS3, JavaScript, Apache Cordova, and popular JavaScript frameworks such as jQuery, Dojo Mobile, and Sencha Touch.
Worklight offers extensive runtime libraries and client APIs that expose and interface with native device functionality.
Worklight includes a browser simulator so you can test and optimize the user experience of your mobile content on varying mobile devices.
Worklight consists of an IDE (Worklight Studio), a Java-based server, device runtime components, a web-based console for managing deployments, and an application center.
for more info see
http://www.ibm.com/developerworks/mobile/worklight/getting-started.html
Take a look at PhoneGap or Appcelerator, two of the bigger names in this "native wrapper" technology.

Mobile App - Targeting iPhone, WP7, Android, and Blackberry

Is there a sane way to develop a cross platform Mobile app? We want these to be native apps on each platform, and not necessarily some kind of web page.
Currently we're thinking to split it into two languages:
C# backend (business logic)
--> Standard C# app for WP7
--> App built on MonoTouch for iPhone/iPad/etc.
Java backend (business logic)
--> Standard Android Java app (MonoDroid version of C# not ready
yet)
--> Standard Blackberry Java app
We could also develop initially in C# and use one of the conversion tools out there to get our C# converted into Java as a starting point.
Is there another approach? Our skillsets include mainly include a strong C# .Net background, and minor Java experience.
We don't really want to go low level and use something like C/C++ to get the job done. These are usually going to be simple LOB applications that communicate to some web service.
Side Question: how do game devs like the makers of Angry Birds do it?
UPDATE:
MonoDroid is now officially released. So it seems you would only need to use Java for the BlackBerry. We are considering not developing for BlackBerry at all, because developing for the other 3 platforms has been simplified. There is definitely some cost involved, as MonoTouch and MonoDroid are both $399 and you would also need a license for Visual Studio (this doesn't include cost for App store, etc.).
There's no good simple answer that I know of for all mobile platforms. You can use development environments like Appcelerator Titanium, which cross-compile to native code on various platforms (right now, for instance, I think Titanium supports iOS and Android, with plans for Blackberry). However, these usually have a limited API that you have access to, and you still end up needing to design different UIs for the different platforms (in my commercial work, I have never successfully used such a platform)
You could also design all the business logic in a web-services back end, and then just write "thin client" apps for each platform. This works, but of course requires network access when the end user wants to use your app. (Usually it'll be there, but sometimes may not)
Ultimately, I usually end up doing what you propose -- writing the basic business logic in a couple of different languages as generically as possible, and then bundling that in with custom UI/device code for each platform. Haven't found a better way myself....
(BTW, I believe games like Angry Birds are written largely in OpenGL and then loaded onto the OpenGL processor on each platform. But I could be mistaken...)
Those are some great answers. I agree, x-platform development is still very primitive. I'd like to add 2 points:
1) You do not need to write your backend in different languages. Choose one language (based on your comfort level, performance etc. criteria) and then connect from your platform-specific apps directly to the backend. If your backend is server-side code, one way of talking to it would be via XmlHttpClient. If it's a piece of native code common across various apps and is written in say C++, you can use JNI from Java and wrapper assembly from C#.
2) Another reason for avoiding x-platform tools is that you'd always need to wait for them to support the new APIs released by the platform vendor (Apple, Google, MSFT etc.). Once these companies release new APIs, the tools will need to be updated and only then will you be able to use the new APIs.
I don't think this is (easily) possible, if you're not using some HTML5 (jquerymobile etc.) in a WebView in your own app (looks like a real app, but still you will somehow see that it's not) instead of the normal browser. You can still use some native API from the device (accelerometer,...).
There are (commercial) platforms like Sybase Unwired Platform that help you in generating some client code. Afaik for Blackberry and Windows Mobile even some UI can be generated out of the business objects on the server. But to me it sounds that this might be too heavy-weight for your case.
Regards,
Martin

cross-platform phone development environment

I'm working on guidance for development of mobile applications in a -mainly- .Net shop.
How do you tackle the different platforms when developing mobile applications from the perspective of a .Net developer? What are advantages and disadvantages of these approaches?
Probably the simplest approach is to just stick to web-based development (HTML5, jquery mobile, etc). But I can imagine this won't be enough for any and all applications.
I have looked at Titanium, which claims to be a platform where you develop in JavaScript, which is then "translated" to the native platform (android/iPhone). The lack of a 'declarative' (read xml-based) UI development experience seems like a disadvantage.
Another option could be the mono-based stack (monotouch, monodroid), where you don't really have a full cross-platform, develop once, deploy everywhere experience, but you can share your business logic and develop reusing part of your .Net skills and tooling. An additional advantage is that the same approach can be used to target Windows Phone 7.
Are there other options? Is it worthwile to even try this? What's your experience?
I am the head of mobile development for a government contractor that develops various systems for large government organizations, including Budget Management, Time Tracking, Radiological Monitoring and Assessment, and other much more intensive systems. We've been using jQuery Mobile with great success. Our clients have been universally satisfied with both the UI and UX afforded by JQM. We use ASP.NET's Razor engine for inline coding within the pages that drive JQM. Though not every possible feature is implemented in JQM by default, it's not that difficult to extend. I haven't yet run into any roadblocks I wasn't able to easily overcome.
As far as cross-platforming goes, we've found that the best option is combining JQM and PhoneGap. Titanium is seriously hindered by the lack of a XML UI engine as you said, and MonoTouch just isn't robust enough to do everything we need.

Dev efforts for different mobile platforms

I'm in the middle of development of a client-server "socializing" that is supposed to run on several mobile devices. The project is pretty complex, involving networking, exchanging media, using geolocation services, and nice user UI.
In terms of development efforts, technical risks and extensibility what is the best platform to start with? Taking into the account that the goal is go "live" as fast as possible with the mobile version. And second goal is to cover most users (but first is more important).
iPhone (iPod iPad)
Android
BlackBerry
Java ME,
Symbian
I realize that there are limitations on every platform, and there are different aspects to take into the account (for example iPhone has better developer's community then Android, J2ME runs in a terrible sandbox but covers most devices).
Please share your pros and cons. I have the experience only with J2ME, unfortunately I can't evaluate other platforms.
If you're looking at native applications on the platforms you list, then the development effort required in order from least to most is:
iPhone
Android
Blackberry
Java ME
Symbian
Development effort is largely governed by language/libraries, tooling and fragmentation. Hence iPhone wins (good language & libraries, excellent tooling, little/no fragmentation). Symbian comes last (C++ with limited libraries, poor tools, large fragmentation). Android beats Blackberry on libraries and fragmentation, and Blackberry beats Java ME on fragmentation.
The counterpoint to this is market size, especially among your target user base - Java ME reaches far more devices than any other platform, whereas the Android installed base is still the smallest of the 5.
There's no one right answer, but if reach is important then Java is a good place to start, if time-to-market and user experience are the keys then iPhone makes sense.
It's also worth looking at how easy/difficult it would be to port across to other platforms. There are various cross-platform libraries around such as Airplay or J2ME Polish that might reduce the costs - provided you can implement your application on the cross-platform part.
I'd like to speak up for Maemo/Meego(Nokia's/Intel's mobile Linux). While it is in a state of transition and currently Maemo 5 has only one good phone(and a couple of cheap Chinese ones), but I feel that it will soon be big(I like many people believe that Meego will be Nokia's high end strategy and Nokia is the biggest phone maker in the world). Plus the N900 is the coolest phone around.
Also their it basically an open Linux device (pretty similar to standard desktop Linux). The ide QT Creator is great and cross-platform(comes with embedded visual designer and nice documentation broser) but you don't have to use it, there is some support for using your own text editor or ide.
There is no sort of signing key nonsense(I did a student project for the blackberry and have been quite annoyed by keys). Other things I didn't like about the blackberry: windows only eclipse plugins, our team had a lot of trouble figuring out how to add third party libraries to blackberry COD archives . Also some of the Classes are somewhat sparse in a lot of ways especially String/Char, probably since its ME based, I also didn't like the file read/write apis, it felt somewhat awkward, possibly since blackberry apps only recently got the ability to store files(before you could only store/retrieve objects to disk via the persistence layer)..
The preferred Languages are (Gobject C currently but less so for Meego) , Qt flavoured C++ and python. There libraries are nice and the qt ones are especially well documented. Since its a tiny linux box you can have on device debugging (there is also an emulator).
Note I haven't developed anything for Maemo/Meego but I've read a lot about and just fell in love.
I think that the best solution might be to start with a smartphone optimized web site. A native app can provide a richer interface, but a well designed web app can come close and will run on any device.
Have a look at the WPTouch for an example of a very good phone optimized web site.
In line with Roman A. Taycher, I'd like to raise my voice for windows Mobile/Windows Phone. It's has a large installed base, it has the tried and true Visual Studio toolset to develop with, it has the best emulator of them all (it actually emulates the ARM instruction set - you hear that, Apple?), and you can leverage your Win32 experience.
MS-haters - please don't bother responding. I've heard them all.
A cross-platform runtime such as Qt or HTML5 are good bets and are portable.
Qt supports many platforms including Symbian, Meego, Linux, Windows etc. It is highly regarded as one of the best programming frameworks around currently.
Qt creator is also a very highly regarded IDE.
HTML can be accessed on nearly everything of course and can there are plethora of tools out there.
While applications natively developed for a given platform typically win in terms of platform UI consistency and performance, you could try going for one of the available multi-platform frameworks, such as Rhodes (just to name one). Personally, I do not have any specific experience with Rhodes and only learned about it a couple of days ago (having a closer look is still on my todo list), so please judge the user experience that the framework offers on different devices on your own.
It sounds like you need Mobile Community Framework (MCF). It is cross-platform framework to develop network-centric, location- and proximity-aware applications on all modern smartphone platforms (iPhone, Android, Blackberry, Symbian, WinMo - almost all you mentioned, except J2ME). It provide native binaries for all these platforms. With MCF development time can be reduced, as you don't need to code all this network stuff by yourself, but you can just use simple API to send any amounts of data across enrypted connections, via Wi-Fi ad-hoc mode or via special proxy-server.
More info at http://www.uvamobiltec.com.