Is J2ME worth learning - java

I want to get into some mobile development. I studied a tiny bit of J2ME way back in the day and it wasn't too bad. But now with newer technologies like Android and so forth I ask myself if it is worth my while to (re)learn and invest in J2ME as there is this perception that it is 'old' and 'clunky', yet it's what still runs on most mobile phones. What do you all think? Thanks in advance.

I don't know, but this Google Trends comparison suggests that Android is far more significant:
http://www.google.com/trends?q=java+mobile,+android&ctab=0&geo=all&date=ytd&sort=0
You might also be interested in this:
J2ME VS Android VS iPhone VS Symbian VS Windows CE
Not an exact duplicate, but close...

It's not difficult if you already know Java so why not? Everyone focuses on consumer stuff like smart phones, but it's used in a lot of embedded systems, so it might pop up in a project.

Related

Why shouldn't an Android app be written in C/C++ because you "simply prefer to program in C/C++"? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
Updated(for clarity and to reduce ambiguity):
I'm going to start tinkering around with android apps. I was planning on writing the in C++ using the NDK (since I have more experience in C++ and prefer it to Java) but came across the following on the Android NDK page:
you should only use the NDK if it is essential to your
app—never because you simply prefer to program in C/C++.
I was under the impression that you should use the language that you prefer, as long as it fits the job. Could somebody explain why it is so heavily advised not to use C/C++ for android development?
Original:
I'm going to start tinkering around with mobile apps, specifically android which is the OS of my current phone, and I was wondering if writing the app in C++ (or at least the core, then wrapping in Java) was an acceptable option.
Some background, I'm a computer science major who has taken 3 C++ courses(intro, intermediate, OOP, and am taking an STL course in the spring) and only 1 Java course(intermediate). Because of this, I am more comfortable with C++ and prefer it to Java. I came across the following on the Android NDK page:
Using native code on Android generally does not result in a noticeable
performance improvement, but it always increases your app complexity.
In general, you should only use the NDK if it is essential to your
app—never because you simply prefer to program in C/C++.
I was under the impression that you should use the language the fits
the job as well as one you're familiar with
I may want to port the application to another mobile platform, such
as iOS, that supports C++ but not java
While Java is a high level language and thus should make development
faster, I feel like development would be slower because I would have
to relearn almost everything (since I have only taken one class on
the language)
Any advice would be much appreciate.
ps: many of the answers on this subject are from years ago and there are very few follow up answers that mention the NDK allowing the development of full native apps on android 2.3 and newer.
Think of it this way. You have the ability using the Java SDK to build a full working application that takes advantage of 100% of the APIs available to developers. There is nothing you can do with the NDK that cannot be done with the SDK (from an API perspective), the NDK just provides higher performance.
Now look at it in reverse. If you choose to write an application 100% in the NDK, you can still write a fully functional application, but you are limited in the number of framework APIs you can access. Not all of the Android framework can be accessed at the native layer; most APIs are Java only. That's not to say that all the APIs YOU may need aren't available in the NDK, but nowhere near ALL the APIs are exposed.
Beyond this, the NDK introduces platform-specific code which expands the size of your distribution. For every device architecture you intend to support, your native code must be built into .so files (one for armv5, armv7 and x86) all packaged up into the same APK. This duplication of executable code makes your app 3x the size (i.e. a "fat binary") unless you take on the task of building separate APKs for each architecture when you distribute the application. So the deployment process becomes a bit more work if you don't want your APK to grow in size significantly.
Again, while none of this is prohibits you from doing what you choose, it points out why Google describes Java as the "preferred" method for the majority of your code and the path of least resistance. I hope it sheds some light on why the documentation is worded the way it is.
If you're only going to develop one app in your life, use the NDK.
If you're aiming at learning Android development with the intention of developing more than one application during your lifetime - and want to be able to properly support them all - you're very likely to do better in the long run if you learn Java and use Android's Java SDK instead.
The programmers at King use C++ for their game logic. And they seem to be doing fine judging by their turnover.
In my experience, C++ is for problem solvers and Java is for problem avoiders. I love either language, but C++ is quite rewarding when you write good code. However, it may just take several moments of wizardry to get there.
You could recommend C++ for Data scientists as well, who would normally get their job done by, say, Python or R. C++ can do the same with as good or not better performance, but it just takes being a genius in the language. That is why I'd never not recommend C++ to the one that wants to do it - I'd just give a heads up to the treat that they're in for.
I found this interesting article from:
http://betanews.com/2014/07/22/why-c-is-the-perfect-choice-for-modern-app-development/
C++ was built specifically for platform independence and as such is found on every single operating system in existence. Your typical mobile user may know that Android apps are written Java and iOS apps in Objective-C, but what many don’t know is that there is more C/C++ code in memory on your devices than anything else. C/C++ drives much of the technology of small devices (like the kernel, which interacts with the hardware, as well as typical run time libraries) and the telecommunications networks that enable these devices. More importantly for a development team, is that there are C/C++ interfaces and libraries for anything you need to do on any device and platform. The Android NDK toolset is a great example of full C/C++ support that was added originally for game development teams to enable them to get the best possible performance out of the device by avoiding Java and the Android Java runtime Dalvik, the virtual machine on which Android Java code is executed on. It has been regularly improved to enable every Android service.
I would say use java for main app. But if you have some c++ code you need to port or some library you need that is efficiently implemented in c++, then use ndk for those bits
I don't see any reason to not use C++ for normal android development , If you have extensive experience in working in C++ and with complex OS like windows or any other such, then you can grasp android quickly and is not as much complicated as the other OS are. while learning java or working without learning it would be more frustrating and complex !
The most important consideration is that the compiled Java code will run on all android devices unchanged, whereas the native code will need to be compiled for all target platforms.
The general intent for both Java and Android is that you write the majority if not all your app in Java and use native things only when there is no other option... so everything about writing the app will lend itself to doing so in Java.
You'll spare yourself a lot of aggravation in bridging between the native and Java worlds by writing in Java.
As well, you will do yourself a big favor if you take the plunge and learn Java. Not only will your Android app be the better for it, but you will expose yourself to a significantly different approach to OO and you will be a better programmer for it.
Add to that the fact that you will side-step a whole bunch of security risks by writing in Java.
In my mind, this is a no-brainer - use Java.

Do you need a "complete" understanding of Java to program Android Applications? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am looking to start developing applications for Android and i was wondering if you could fill me in on the know how's and the requirements on a technical viewpoint.
I have the SDK, Eclipse and Java installed and even a handset to "real" test on.
My question is being a complete amateur to Java and having never used the language how much java would i have to learn to develop Android Applications ?
I would say you can just start with some tutorials the same way you would when starting with just Java. You'll learn along the way, just use a lot tutorials.
There is not much difference for the language, but there is a great difference in the framework, ie. the way you set up applications.
So just Java you would learn:
public static void main(String[] args){
System.out.println("Hello World");
}
In Android it would be:
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
System.out.println("Hello World");
// Or:
Log.v("MyActivity", "Hello World");
}
to print "Hello World" to the console respectively the log.
The short answer is no since nobody has a "complete" understanding of Java anyway.
The longer answer is the complexity of your Android apps will be limited by your knowledge of Java. You can probably learn to write a "Hello, world!" app on day one, but it will take several months before you can write simple but useful apps. It also depends on how whether you are new to Java or new to programming in general.
My suggestion is to get a good introductory book on Java and maybe another on Android apps and start there.
Barry
For basic applications - no, a "complete" understanding ist not essential. What you'll have to learn is to use the android framework, and I think, if you grab some android related tutorials and books, then it should be OK even if you start with basic Java knowledge.
(I assume, that you already know some other language and have a decent experience with object oriented programming)
You should have a good understanding of both Java and object-oriented programming.
You should have a firm grip of how Polymorphism and Inheritance work in java. These are pretty central to Android development. Also, having an understanding of java memory optimization and Threading are useful skills for writing more advanced applications.
Learn java up to understanding within reason the following concepts/implementations:
Object Orientation (this is a biggie)
Interfaces
Superclassing / Extending
Some ultra-common java APIs and syntax
Our good friend, mr. garbage collector.
Then you'll be ready to go in Android dev. I wish I had read the book "Head First" java development before starting with Android, it would have helped me immensely.
You would benefit immensely by learning Java first. All of the "Android" code is Java-based so you will handicap yourself by not going through a few tutorials (at the least) to get caught up on Java.
I would suggest NOT starting with Java first, as others have said the framework is so different you will be learning syntax that you will not use writing Android Apps. Get a good book on Android development for beginners and start from there. I've found Android Application Development for Dummies to actually be a very good book, as well as O'Rielly's Learning Android. As you come across the need for Java knowledge, then hit the Java Tutorials over at oracle.com, pick up what you need and then back to Android specific documentation.
You aren't going to be using System.out.println in a real Android App, you will be setting a textView either programmaticly or in XML, so learning the Java way won't be all that helpful.
Start here: http://developer.android.com/resources/browser.html?tag=tutorial and do all the tutorials.
You need to be familiar with the basic Java tasks
knowing what is a package, a class, some inheritance
understand the building of your app (compile, link and packaging)
debugging
You can start with building the tutorial sample, then going down in Java code progressively.
It depends on the complexity of your app. If you will be building complex and high quality apps like Google Maps or Angry Birds you do need to know Java very well. I would suggest you to learn Java because you can make lots of things with it not only make apps for Android. Good luck!

App quality Android vs IPhone ? The Reasons behind it?

So started recently experimenting with the Android SDK and eclipse IDE and during this time I have found it very hard for various reasons to develop applications the main ones being
Poor emulator makes it hard to see your applications current state as its slow and buggy and often takes an age to load up.
Steep learning curve for xml based views and lack of consistency in application architecture.
Lack of support for dynamic web based applications
I have no experience of iPhone development but how does this compare and does this relate to the better quality of apps on the iPhone
I have no experience of iPhone development but how does this compare and does this relate to the better quality of apps on the iPhone
Just in terms of quality of apps in the store, Android has no approval process, and Android has a cheaper sign up fee, so anyone, literally, can make anything and put it up on the Market. Also, the ever changing OS features and variety of phones also makes it more difficult for an otherwise good app to be "good" on all phones.
Good developers can make amazing apps equal to or better than what is on the iPhone, but both use a completely different language from one another, so the dev part of the question is somewhat relative to your dev. experience.

What should a developer know before building cellphone apps? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to start making cellphone apps with Android as first choice but not the only one. I have 10 years of experience with Java, C#, C++ in commercial applications and I know that many things and practices for this applications are not valid for cellphones. Where do I start reading? How do I adapt my way of thinking to this new environment as quickly as posible? I plan to make some money with it sometime in the future as an extra income or a career change maybe, who know. Any resource or advice you could recommend will be very welcome. Thanks in advance.
Just start with Android Developer site http://developer.android.com/index.html.
It contains all you need for the beginning. Also take a look onto Commonsware android books,
those are really great both for beginners and experienced programmers - http://commonsware.com/books.html.
You could start with two great books listed as reference [1] (Ableson F. et al., Unlocking Android, 2009. Manning Publications Co., ISBN 978-1-933988-67-2) and [4] (Conder S. and Darcey L., Android Wireless Application Development, 2009. Addison-Wesley, ISBN 978-0-321-62709-4) in my degree thesis. Both have an extensive walk-through of Android, which you as a developer should know. You'll get all you need from "Hello World" to deploy an actual application in the Android Market.
Android is the place to start, since you already know Java and C# and C++. You can even use native classes in Java written in C or C++ if you have some useful standard classes in your library. More on Natives you'll find in the reference book [9] (Silva V., Pro Android Games, 2009. Apress, ISBN 978-1-4302-2647-5).
The best of luck!
Only support the TOP os's which generate income. So at this moment IOS and Android.
Don't go down the path of Symbian and Java... it's dirty, and you won't like what you see down there.
What really got me going was the Hello, Views documentation. Will really get you up and running instantly.
I recently decided studying Android, and http://developer.android.com was a great resource. You should read the Application fundamentals doc first and User Interface documentations later.
There are some tutorials too.
I read the whole Application fundamentals, and that gave me a good idea of "how to program for Android" since it has its own architecture and environment. Get the idea of Activities, Services, Broadcast Receivers and Content Providers and try to adapt yourself to that structure. Then read about how Tasks work, and later go into UI.
As a subjective opinion, being Android so popular and growing, I don't think it's worth the effort to study Java ME or even C (I'd go for iPhone devel in any case with Objective-C). Android will probably give you more money and faster. Java FX might be interesting...
iPhone
Android
Samsung Bada
I would like to mention that iphone and Android communities are very much evolved and have a great developer community and resources. Samsung Bada doesnt have a good developer network nor does the SDK support many operating systems. I think it works only on Windows.
You need to first understand the mobile platform architecture, the different frameworks which the platform exposes to the programmers to develop applications.
There are emulators for you to test, however you have to have one of those devices to do a real time on-device testing.
With respect to programming, i think your experience is more than enough but one needs to come out of the frame of mind and think differently. A typical device has limited processing power, limited memory, limited screen space but the user demands beats expectations compared to desktop/enterprise software.
Lastly most important thing is the IDEA of the application. You may want to survey existing application on the stores and start thinking. You can also develop and application which would solve your problem with mobile devices and you know other users also may want such a application.

Is there a real benefit of using J#? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I just saw a comment of suggesting J#, and it made me wonder... is there a real, beneficial use of J# over Java? So, my feeling is that the only reason you would even consider using J# is that management has decreed that the company should jump on the Java bandwagon... and the .NET bandwagon. If you use J#, you are effectively losing the biggest benefit of picking Java... rich cross platform support. Sure there is Mono, but it's not as richly supported or as full featured right? I remember hearing Forms are not fully (perhaps at all) supported.
I'm not trying to bash .NET here, I'm just saying, if you are going to go the Microsoft route, why not just use C#? If you are going to go the Java route, why would J# enter the picture?
I'm hoping to find some real world cases here, so please especially respond if you've ACTUALLY used J# in a REAL project, and why.
J# is no longer included in VS2008. Unless you already have J# code, you should probably stay away.
From j# product page:
Since customers have told us that the
existing J# feature set largely meets
their needs and usage of J# is
declining, Microsoft is retiring the
Visual J# product and Java Language
Conversion Assistant tool to better
allocate resources for other customer
requirements. The J# language and JLCA
tool will not be available in future
versions of Visual Studio. To preserve
existing customer investments in J#,
Microsoft will continue to support the
J# and JLCA technology that shipped
with Visual Studio 2005 through to
2015 as per our product life-cycle
strategy. For more information, see
Expanded Microsoft Support Lifecycle
Policy for Business & Development
Products.
The whole purpose of J# is to ease the transition of Java developers to the .NET environment which didn't work so well (I guessing here) so Microsoft dropped J# from Visual Studio 2008.
For your question, "Is there a real benefit of using J#?"..
in a nutshell... No..
Instead of J#, I would rather prefer IKVM (http://www.ikvm.net/) to convert my JARs to .NET assemblies as well as access Java APIs in C#.
One of the killers I've found with J# in the past is that there is no built in support for referencing web services. That alone has been enough to deter me from it ever since.
C# syntax is so close to Java (and better in some ways) that you might as well learn C# instead of J#. And since C# is more widely used, you can easily find Java --> C# tutorials on google or check out http://www.asp.net/learn and watch some videos.
I don't think it's a matter of which language is better. In the .NET world there are some inconsistencies between the libraries different languages provide. There are certain functionality that is available in VB.NET that you might like to use from C# but can't. I remember I had to use J# to use some ZIP libraries that were not available in any other language in .NET.
I have used J# as an easy interim step to port a java library into C#. It made for a good way to port code I don't plan to maintain from Java to .Net. However, all new development is being done in C#.
Strongly agree that syntactically C# beats Java hands down, so there is really no reason to lament the demise of j#. Now trying to get c# compiling to Java bytecode might be an interesting move as Sun's hotspot jvm is great software.
Or, for a bit of fun with what might well become the next generation of Java, how about Scala on the CLR...

Categories

Resources