Which topics of Java SE are prerequisites for Java ME? [closed] - java

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 7 years ago.
Improve this question
I'm really new to Java and I'd like to ask you ,which aspects of Java SE are considered to be necessary for someone wanting to learn Java ME? Something like prerequisites.
To start with Java SE, I chose this book, but since I don't have much time, it would be great to hear from experienced developers which parts I should definitely focus on and which parts I could skip to save time.
If is there any topic from Java SE that could also be considered a prerequisite for Java ME, feel free to mention it.

According to content in the book that you mentioned in the questions
Section 1 is must, would teach you basics about java.
Section 2: If you have already worked in any oo language then you can skip this section and come back to it later stage.
Section 3 and Section 6 will be good for you as the code you need to write , need to be memory efficient and multi-threaded.

If you really need to learn JavaME from Java SE, then you should read an old Java SE 1.4 book, and just stick to the basics of the language.
Why? Well Java ME is based on JRE 1.3, so there are no generics, no collections (added in Java 6) and let alone Java 8's new stuff. If you buy a recent Java SE book, you might get confused because you won't be able to use these new features.
Second thing that differs, it is not an homogeneous platform. It is divided in two parts (CLDC/CDC for the core classes, and MIDP for the GUI classes). And there are optional profiles (JSRs) that migh or might not be supported in a certain device.
Other than this, you should always keep an eye on memory efficiency. Old devices do not have much RAM, so you should never try to load large images or data in memory, and always free resources when not used.

Related

scala vs java for Spark? [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 7 years ago.
Improve this question
Can someone help me understand why people is using scala over Java for spark? I have been researching but haven't been able to find a solid answer, I know both works fine as they both run on JVM and I know scala us functional and OOP language.
Thanks
Spark was written in Scala. Spark also came out before Java 8 was available which made functional programming more cumbersome. Also, Scala is closer to Python while still running in a JVM. Data Scientists were the original target users for Spark. Data Scientists would traditionally have more of a background in Python, so Scala make more sense for them to use then go straight to Java
Here is direct quote from one of the guys who wrote initially wrote spark from a reddit AMA they did. The question was:
Q:
How important was it to create Spark in Scala? Would it have been feasible / realistic to write it in Java or was Scala fundamental to Spark?
A from Matei Zahara:
At the time we started, I really wanted a PL that supports a language-integrated interface (where people write functions inline, etc), because I thought that was the way people would want to program these applications after seeing research systems that had it (specifically Microsoft's DryadLINQ). However, I also wanted to be on the JVM in order to easily interact with the Hadoop filesystem and data formats for that. Scala was the only somewhat popular JVM language then that offered this kind of functional syntax and was also statically typed (letting us have some control over performance), so we chose that. Today there might be an argument to make the first version of the API in Java with Java 8, but we also benefitted from other aspects of Scala in Spark, like type inference, pattern matching, actor libraries, etc.
Edit
Heres the link incase folks were interested in more on what Matei had to say:
https://www.reddit.com/r/IAmA/comments/31bkue/im_matei_zaharia_creator_of_spark_and_cto_at/

Are Custom Libraries Unprofessional? [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'm still in university at the moment, and I'll likely either try to get security or programming job. My first programming course used a custom library that came with the book. It replaced and added many of the basics of Java like Arrays, completely custom math functions, input (scanner), Hashmaps, Queues and Stacks.
If I did land a programming gig, is it considered unprofessional to use a given custom library such as the one above? Either way, I've pretty much weaned myself off of 75% of the custom classes in favor of standard Java classes/objects, but I wanted to know if slipping in a premade class from a textbook is frowned upon. Thanks guys.
"Custom library" is too broad a category to be useful. Libraries that reimplement functionality that's standard in the JRE, such as the Collections API, are almost certainly useless, and probably did more harm than help in an educational setting. However, there are a large number of tools, particularly Google Guava (enhanced collections like multisets and bimaps), the Apache Commons tools (including string parsing, hashCode building, and the like), slf4j/log4j for logging, and runtime environments such as Spring that are basically standard in the industry.
The general principle is "don't reinvent the wheel". If you have an example class out of a textbook that gets a basic job done that isn't in the standard API or one of the de facto standard third-party libraries, by all means use it, but don't prefer some professor's half-baked and untested implementation to ones that have been in use by thousands of developers for years.
Good programmers write good code, excellent programmers find excellent code.
If your library is any good I suspect it's more a case of everyone grabbing a copy.

Desktop application options related to Java [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
These days I got an offer related to a desktop application that I should create.
I'm a Java programmer. I had worked with Swing API about 4 years ago, so I can say that I have some experience with it. I also had worked with Flex 4 about one year ago, but I think it is not a good option for what I need. In my opinion it is not stable enough (present some strange behavior) and I think it is no longer maintained for Linux platform. - (if you think I'm wrong here, tell me).
So, I search for a good Desktop UI API that I should use with Java.
What are the actual desktop UI "trends", taking in account that questions on that issue are relatively old on SO?
N.B. When it comes to talk about platform independence and SWT, I think there are some issues. That's why I would not opt for it.
I would personally use JavaFX for any new UI development work in Java - it's now a 100% Java API and Oracle appear to be pushing it quite strongly:
JavaFX has become more tightly integrated with Java SE, and will soon become a standard component of the platform. Starting with JavaFX 2.0.2 / Java SE 7u2, the JavaFX SDK has become part of the Java SE 7 JDK, avoiding a separate download for developers. The next step in this integration is to include the JavaFX runtime libraries as part of the JRE, which will be achieved through the Java SE 7u6 / JavaFX 2.2 releases in summer 2012. This will ensure widespread adoption of JavaFX on Java-enabled computers, while leveraging synchronized updates and security fixes.
Having used it myself, in my opinion it's also far nicer than Swing in its API (more like SWT in that respect), looks far nicer by default, and far more flexible in what it allows you to do.

What presentation for a local Oracle User Group? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I can do a presentation on a java related technology on the local Oracle User Group (OUG).
The last several times I talked about Java 7 (two or three times) and DVCS. The organizers didn't like the DVCS topic too much because it doesn't come from Oracle, but allowed it anyway.
So, please, can you propose some topics that would be:
1. trendy (optional)
2. oracle related (I prefer java related) (a must)
3. Could be presented in a 1-hour session.
4. Are not too complex. The audience is ... how to put it mildly: more DB oriented than Java oriented. Introductory lectures are perfect.
I saw a presentation on Chronon (a new debugger). This could have been the perfect presentation, but the product is not open-source and not that Oracle related.
I need something simple with a lot of value. I'm thinking for parts of (JSRs) JDK7 and JDK8, but I explained JDK7 already, and jigsaw and others from JDK8 are not clearly defined yet.
invokedynamic and its ramifications for the predominant and upcoming dynamic languages (Groovy, JRuby, Scala, Clojure, Redline Smalltalk come to mind first).

How to create custom JVM? [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 9 years ago.
Improve this question
I was reading item #6.10 on http://www.cafeaulait.org/javafaq.html and I began wondering how the big players go about creating their own implementation of a JVM. Would an experimental something or another be possible (and feasible) for one guy?
technically, all the information people need to create a new JVM is in the public specifications for the language and the targetted platform. A JVM would need to behave differently depending on whether it is meant to run on a desktop computer or a mobile phone, even if the bytecode interpretation would be largely identical.
A few places to start looking for information:
http://en.wikipedia.org/wiki/List_of_Java_virtual_machines
Reading The "Java Virtual Machine Specification" by Tim Lindholm
http://www.jcp.org/en/jsr/detail?id=30
From what I have seen of JVM implementations by Sun, IBM or smaller companies like Esmertec, writing a simple JVM is a several man-months project but adding JSR after JSR to support more functionality can take years afterwards.
Now, if all you need is a simple bytecode interpreter, it's not that bad, but it's still quite a bit of code to write.
A handmade JVM would be a great way to learn about virtual machines in general, the issues of program language design (through the JVM spec), and the nitty gritty of parsing and so forth.
If you choose to take it in that direction, you could also explore optimizations, which is where it can get interesting, and you can take research papers and implement their algorithms.
That being said, if you're less interested in the long and arduous task of creating a VM from scratch, you might want to modify an existing open source VM like Kaffe. It will show you what a virtual machine does, but not necessarily how Java code works in Sun's JVM:
Kaffe is a clean room implementation of the Java virtual machine, plus the associated class libraries needed to provide a Java runtime environment.
This way, you could study the details, but dive in to implementing more interesting features.
I understand that, currently, the big players license the Java library from Sun. They then add their own refinements. The main difference between implementations is the bytecode->machine code compiler.
For one thing, you may want to have a look at Apache Harmony They have come a long way, so their project history may actually give you a good idea on the effort required. I myself would not bet on it being feasible for one guy

Categories

Resources