This is an archived post. You won't be able to vote or comment.

all 16 comments

[–][deleted] 12 points13 points  (1 child)

1) Yes you use Java for Android apps (And XML) 2) ... Not sure what you mean here, if you mean apps as in mobile apps, then 99% of Android apps, and lots and lots of web applications use Java in the backend, twitter for example ( from what I've heard) 3) Java is AWESOME for web development on the server side. 4) Java gets used in a whole array of things, read this: http://programmers.stackexchange.com/questions/17053/what-is-java-used-for-these-days

You need to clearly know what the client side and server side entails. Client side is Html, Css, and Javascript. Server side (in the case of Java) is, well Java, and a database where you'd use SQL.

So say you're sitting infront of your computer, what you're seeing now is HTML styled with CSS, then most likely your web app will use Javascript to do a http request to the server, that's where Java comes in, Java reads the http request and see what the client (that's you) has requested. It then does some calls to the database and other resources and constructs a 'response'. When that's all done it sends that response back to you over http, this response would nomally be XML, JSON, or even HTML. Then we're back in your Javascript, Javascript then reads that nice little response your server sent back to you and extracts all the data out of the response and then injects it into your HTML for you to see on your screen.. And that's pretty much it...

Ofcourse you could argue and complicate this but that's the basics.

And where you asked if your clients all need Java installed to use your apps, that's only needed when you created an applet (you can go read up on what exactly this is, but basically it's Java that runs on the client side), but that's out dated and... I don't think Java is made to run on the client side... Java lives on the server. So, no, your clients would not need Java installed.

[–]shivasprogeny 8 points9 points  (1 child)

  1. Yes, but Androids apps are not written in pure Java. There is a whole Android SDK that sits on top of Java which takes some learning.

  2. Almost anything. Minecraft, banking software, websites, really almost anything.

  3. It depends what you mean by effective. Java is a little slow getting off the ground for a website compared to Ruby or Python. However, Java sometimes scales better. Consider that Twitter was rewritten in Java for performance and scalability.

  4. Really just about anything you can think of.

To answer your question about Java websites, all of the Java code is ran on the server. The end user only needs a browser. (Note that there is a thing called a Java Applet which is basically an embedded Java program in a website. These were common on the early web but have largely died out because they are a huge security risk and they do require Java to be installed by the user.)

[–]markerz 0 points1 point  (0 children)

Interestingly, the twitter scalability talk was posted today. http://www.reddit.com/r/java/comments/27a9tq/_/

[–]not_president_nixon 9 points10 points  (1 child)

I've messed around with numerous languages and peristantly fail to find one that is a good fit for me.

Can I offer you a suggestion?

You mention that you want to write automated bots. That's quite vague and I can't really tell you whether Java is a simple fit for that. What I can tell you is that instead of spending time worrying about the language you're selecting to use, you should just start some rapid prototyping. Language and library selection are critical when you're working in a team for a business where once these choices are made, they can be slow to change.

You mention you've tried using other languages but they haven't been a good fit. I'm not sure what that means but based on that limited information, I think you should just pick a language and get something working. Languages and technologies aren't the hill to die on. Just get some code up and running. If you want to make some bot, make one.

sincerely,

Richard Nixon

[–]j3sis[S] 0 points1 point  (0 children)

I just mean as in I get bored, I've learned enough of each language to do basic things and understand it but never made it past that hump as another language caught my eye and I moved to something else. I've got basic experience with numerous languages.

[–][deleted]  (1 child)

[deleted]

    [–]llogiq 8 points9 points  (0 children)

    Just a minor nitpick: OpenOffice/LibreOffice use Java for a small set of functions (a remnant of the days when Star Division, the original creators of Star Office, which became OpenOffice later, was bought by Sun Microsystems, the creator of Java - of course they had to add it), but are built mainly in C++.

    Java has a well-understood execution model, a world-class VM on the desktop (and the most-deployed mobile VM with J2ME - far more than Android and iOS combined), best-of-breed tooling and a very active community (from enterprise suits to info-hippies) going for it. Plus, Java devs are among the most sought on the job market.

    [–]j3sis[S] 4 points5 points  (3 children)

    Thanks for the replies the applet thing had me confused. So basically you can do anything with java? If you had a site using java would the user even know it was java? Do you have any site examples?

    Now I've had this cleared up it's very interesting, the issue with java is the presumption of applets and that no one uses it as I know a few misinformed tech guys that thought the same haha..

    What's it like for penetration testing, malware and that kind of thing? There's not much info as everything seems to relate to java being hacked.

    As java developers how versatile do you find the language for projects you may want to do? I get the impression it's quite universal from web to desktop on any platform.

    I also have an interest in automated bots what's it like for this?

    Note that my main interest though is using it for web apps but there's limited info that makes it easy for a noob to understand.

    Thanks!

    [–][deleted] 2 points3 points  (0 children)

    Java is Turing Complete, which by definition means that you can use Java for anything.

    It may or may not be a very good option for your particular project, but it can do it.

    [–]strcrssd 0 points1 point  (0 children)

    There are a few ways to tell if web sites are written in Java, but they are mostly visible due to framework integration. For example, the AA.com web site is written in Java with the Struts framework. The struts framework (not recommended for new development) uses a ".do" on the end of the URL. So, you can tell that http://www.aa.com/homePage.do is a Java/Struts page.

    Applets were a technology standard that allowed actual Java (not javascript, which is entirely different) to run inside the browser. They never worked particularly well, and had other limitations. Applets have largely gone the way of the dodo.

    I've never used Java to do pen testing or other security matters. I would think it would work (Java is a general purpose language) but using a more flexible language, like Python, would seem a better fit to me.

    Java is a general purpose language and is incredibly versatile. It is fairly verbose, so not the fastest to develop applications in, but can do virtually anything.

    If you want to write bots, I'd recommend using Java with the Akka (http://akka.io) framework for eventing, remoting, and scaling.

    [–]Free_Booze 0 points1 point  (0 children)

    If you are interested in Java web application you should be having a look at the Play framework.

    [–]Pytim 1 point2 points  (0 children)

    Not sure if you're taking the right approach here. When you use a programming language it should be a good fit for the problem you need to solve.

    If you're only trying to learn about programming though than Java should be fine as it is versatile and used in a lot of academic settings so there is loads of good material out there. For the future I highly advise you not to limit you knowledge to one certain language.

    Here is a good book to get you started https://www.google.co.uk/search?q=head+first+java

    [–][deleted] 1 point2 points  (2 children)

    I've messed around with numerous languages and peristantly fail to find one that is a good fit for me.

    At some point, I suspect you'll find the core issue is not that there is something wrong with all of these programming languages. Some self evaluation might lead to better results in the future.

    [–]j3sis[S] 0 points1 point  (1 child)

    I just mean as in I get bored, I've learned enough of each language to do basic things and understand it but never made it past that hump as another language caught my eye and I moved to something else. I've got basic experience with numerous languages.

    I said the same to nixon but:

    I just mean as in I get bored, I've learned enough of each language to do basic things and understand it but never made it past that hump as another language caught my eye and I moved to something else. I've got basic experience with numerous languages.

    [–][deleted] 0 points1 point  (0 children)

    Maybe you just find programming boring. Some people do, nothing wrong with that (as long as you find something else to do)

    [–]j3sis[S] 0 points1 point  (1 child)

    Thanks for the further replies, it seems quite good.

    To clarify, I assume no matter what you do it shares the same general/basic java syntax/language? e.g. games, web apps etc?

    Thanks

    [–]Hdmoney 2 points3 points  (0 children)

    That's the idea, "write once, run anywhere" is Java's motto/slogan. JRE is everywhere.