开发者

What Are Some Prominent Real-World Applications of Java? [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 a beginning programmer and the I&CS program at our school starts us off learning Java. It seems to me like C and its spin-offs are way more prevalent in the real world. Is this true? How do expert programmers use Java for their work?

To be more precise, I want to know in what situations would a programmer prefer to use Java over other languages. OpenOffice is definitely a prominent example of Java, but couldn't it have been coded using anything e开发者_StackOverflow社区lse?


Unless you're writing games, embedded device software, maintaining legacy software, or writing high performance parallel computation software (eg CUDA), you'll get much more mileage out of Java these days than C/C++. C# is actually more Java-derived than C-derived despite the name, in case you're thinking of that (many would argue that it's better than Java, myself included).

The statement that "Java is slower than C/C++" is slowly but steadily becoming a myth (see for instance this benchmark). It's certainly much more programmer-friendly, and there are rapidly emerging more and more enterprise-grade solutions that specifically deal with Java, its development, and its deployment in the real world.

Particularly in server applications, you'll find that Java is gaining enormous ground. In most fields at this point, it's debatable whether it really is second-place to C/C++ in usage.


Your perception of the "real world" is maybe not accurate because many (most?) big Java applications are not "visible". Sure, there are desktop Java applications but, in my opinion, it's server-side Java that made it so popular, especially in heterogeneous corporate environments (portability brings you vendor independence) and Java is used in almost all industries. And because you asked for an example, mine would be GMail. Is that big enough?


Java is quite prevalent. It's really hard to compare its prevalence with "C and its spin-offs" because no one keeps statistics on how many "real world" problems are solved with each one. Java, however, is quite popular. Some Java applications that you can install and play with on your own desktop machine:

  • OpenOffice
  • Vuze
  • Eclipse
  • NetBeans
  • jEdit

Java also runs on many cell phones and web servers.

As far as your second question -- expert programmers tend to use Java to get things done. (Just like C, C++, perl, Lua, python, Javascript, ruby, Clojure, Pascal, SQL, COBOL, and any other programming language.) As a beginning programmer, don't worry about the real-world applicability of Java. If your school teaches it, use it to learn the computer science concepts that will serve you in whatever language you end up using to solve prevalent real world programs.


I've been a C/C++ programmer forever, but I've recently started using Java as I write web applications using the very cool Google Web Toolkit (GWT). This little gem will compile your java code to Javascript and, if you write the server code in Java too, it can radically simplify client-server communication. I've written webapps in PHP and Python before, with raw javascript or jQuery, but to me the GWT+Java combo is a much more enjoyable solution.

Granted, it's not the most popular use of Java, but I thought you might be interested to know alternate uses of the language.


Java is perhaps second place in use to the more closely C-based languages, but it's a close enough second that I wouldn't worry too much about its applicability. More generally, I wouldn't worry too much about the applicability of the first language you learn - there are so many languages out there, each with their particular domain. Focus on learning concepts, and you won't have a hard time switching to whatever language is appropriate for the current task.

Regarding Java"s problem domain:
Java is often used for cross-platform applications with a graphical user interface, for cell phone applications, and on the server for generating web pages. The code that has already been written in Java in these areas is what makes it attractive for future projects in these areas - but no problem domain belongs explicitly to one language.

Getting a little technical:
Java is a statically typed and garbage collected language. This means that it is slightly more difficult to accidentally do unsafe things, and Integrated Development Environments (like Eclipse) can provide more help to the programmer, so Java is perhaps better suited to larger projects or projects that are likely to have programmers unfamiliar with the code base.

As a garbage collected language, Java is perhaps less well suited for programs with severe resource constraints or speed requirements (where C is generally preferred). As a statically typed language, it is less suited for rapid application development (where dynamically typed languages like Python, Ruby, and PHP are generally preferred).

More broadly, Java is also an imperative language, so its style is more familiar to most programmers, and it is better for telling the computer exactly how to do something, as opposed to, for example, functional languages (like Haskell), which may be better for describing what needs to be done, so that the computer can divide the work up as it needs to (but are not as good at dealing with things that change, like what's on the screen).


There are tons of JAVA applications out there. Perhaps not as many on the standard Windows desktop, but on mainframes, etc, Java is very heavily used. Also, a lot of sites still use jsp, etc. Java is a very relevant language, and will likely remain so. (Even though, personally, I would rather use .NET.)

In our company, we use Confluence as a content management system for documentation, MAXIMO as an asset tracking software.. both of which run on Java. Most of the internal web apps that we have that interact directly with the mainframe run on JSP. For desktops, probably the most notable Java app is Open Office...

Also, Java is a relatively nice language for learning Object-Oriented programming. A lot of what you learn in Java can be easily carried over into other OO languages (such as C#, VB.Net, C++, etc). It's a heck of a lot easier to learn than C++, so it makes for a good "learning" language. (I still think C# is easier, but that's probably a personal bias.)


Reasons for choosing Java specifically:

  • Your application must run on multiple operating systems - Java makes this easier than most other languages
  • You're planning to use one of the huge number of libraries that are available in Java
  • You want to be able to find developers for your project easily

Also, there are two misconceptions in your question:

  • Java is a spin-off of C. Its syntax and concepts are closer to C and C++ than most other modern languages.
  • OpenOffice is not written completely in Java. Some small parts are, but most of it is C++


The reason a lot of commercial enterprises use Java (and similar high level languages) is that it (they) make it easier to write complex, robust and relatively efficient applications that are maintainable in the long term. With C or C++, large scale applications of the same level of complexity requires more effort (developer years). The software also tends to be more fragile because programmers with average skills make more mistakes in C / C++ than in Java (et al), and those mistakes tend to be more insidious (e.g. buffer overruns) and to have more serious consequences.

It is claimed that C / C++ is more efficient than Java and other managed languages. While this is demonstrably true for some small (lines of code) applications, it is rather difficult to demonstrate for large (e.g. 100k+ SLOC) applications ... because nobody writes such applications to the same design in multiple languages.

Besides, in most kinds of software, the speed of an application is less important than things such as cost of development, cost of maintenance, system reliability and so on. Often, the only hard performance criterion is that the software runs fast enough to be tolerable. A lot of young programmers find this hard to grasp, and hard to accept, but the folks who pay our salaries think about these things differently ...


My personal usage of Java has been on cell phones. I ported an application to Android and BlackBerry. So for real world publicly visible usage, those operating systems and their myriad applications are fair examples.

The more I work with Java the less I like it. That is partly the developer tools (Eclipse), partly the target platform, and partly the language itself. Java is a fine first language, but at some point I hope you try others to see what you are missing.


"C spin offs" are not in as much use as it seems when you factor in the business world (unless you consider Java a spin off, which I think you definitely should).

If you want to get a high paying job in IT Development (look at job postings), Java is currently the language to know (not second, not even close, unless you combine all alternatives but that means little).

J2EE (web development, server 'middle tier' development) is where Java dominates. Unfortunately, this is not something you will likely learn--or even talk about--in college (most profs don't know J2EE, anyway). Java also does well in situations where you need integration with some technology, database, or software. Of course it's multi-platform (if coded correctly). It also offers more choice (overwhelmingly so) and support for developers than most (if not all) alternatives.

J2EE applications don't "seem" common because they are usually hidden within corporate or government internal networks, or are used on web servers which you obviously don't ever see.


How? I open my editor, swear at Java for being so verbose and low-level (but not as low-level as C!), and then start typing.

Except for slight variations in step 2, it's pretty much the same for all languages I use for work.


You mean prominent applications that you face as a general member of the public? There aren't many, I can only think of Frostwire for one. Doesn't mean its presence is not there, before I started my programming career I have never heard of Oracle, even though right now its as big as the Coca Cola company.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜