How does Java affect the client-side? [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 9 years ago.
Improve this question
I seem to be confused on a few levels of understanding Java, here is what I am curious about:
Is Java a client-side and server-side language?
Is it more a client-side or server-side, if both are applicable?
I don't know if this is the correct way to put this, if it isn't, please kindly me inform me of where this question would do better.
Thank you so much!

Is Java a client-side and server-side language?
It is a language. It is not specifically client side or server side and it can be used in Blu-ray players and many other devices where there is no client or server.
Is it more a client-side or server-side, if both are applicable?
It is use more widely on the server side.
Why does it perform so poorly either way?
It doesn't perform so poorly. It is less popular on the client as it can require a large download and has suffered some security concerns lately. It also doesn't run on every device whereas Javascript is more widely supported.
JavaScript is a client-side language.
Not true, Javascript can be used in Java and is used on the server side stand alone. see Node.js

Java can be used as either. You can write thick client applications, server applications (web or other), or applets that get embedded in browsers, webstart which is initialized via a browser but launches more like a client-side java application.
Java in the browser is generally a bad idea, there have been many security issues, and, imo (and this is very subjective) it sucks for ui (not the code, but the user experience).
Java has huge market share for server side business applications (web or otherwise) especially in the enterprise space.
Java doesn't perform poorly at all. It often performs on par with compiled code (such as C++). The only challenge with Java is that because it is cross-plaform it will sometimes be challenging to work with platform specific things (e.g. directx).

There is a big difference between Java and Javascript.
You might want to look up both.
Javascript is mostly used as client-side language, and Java is most used for applications and or websites.
It's unclear what you mean with poorly performance, you might want to update your question for that part.

Related

Can Java Applets be dangerous? [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
So I'm currently reading the "Java A Beginners Guide 7th Edition" book. And the following sentences seemed to me that Applets could be used as virusis. Was this done?
An Applet is a special kind of Java program that is designed to be transmitted over the Internet and automatically executed inside a Java-compatible web browser.
The key feature of applets is that they execute locally...
To me it sounds like it wouldn't be hard to build in a virus into an Applet.
The problem with applets is that they run automatically when you load the page. They're also so complex (compared to html or javascript) it was just to complicated to be able to meaningfully secure them. Run Automatically + Complicated to Secure + Doesn't Update Automatically = impossible to completely secure.
Regular apps are far far more dangerous to your machine than applets were. But, they don't run automatically when you visit a web page.
Desktop apps written in languages (like C or C++) where you manipulate the memory with pointers and don't automatically bounds check arrays, are much harder to write securely. Languages (like Java or C#) that don't have pointers and do automatically bounds check arrays are easier to write secure apps in.
Java includes many safewards to prevent any ill behavior, but time after time, those security features were not enough because of different bugs or design problems.
As standalone apps they are as safe or risky as any other app. Just make sure to download your app from trusted sources.

Linux Deamon in C++ or 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 6 years ago.
Improve this question
I have a Windows service written by another developer who no longer works with me. It was written in C# with .NET 4.5 requirements. Our solution is making the move to Linux and the daemon naturally needs to be converted.
My dilemma is what to rewrite it in? C++ or Java? The daemon is not complicated. It's simply a controller for our other applications to ensure if they crash or are killed they are restarted. Aside from that it performs health checks through a named pipe and is controlled via a password protected web socket via a separate management Tomcat web interface and writes all of it to logs.
Please put aside any suggestions of "write in what you're most comfortable with" I have a fair amount of experience and knowledge in both languages, and I'll learn whatever else I need to as I go. My concern is the feasibility and effort to accomplish everything I need. I don't have any particular time constraints, but if one language is a fraction of the time of the other then maybe that's a better solution.
Writing it in Java looks like the easiest solution currently, but writing it in C++ has the advantage of being native no-frills code. However, I haven't ever written any web interface or socket code in C++ before, so I do not know the effort involved with that.
To break down my requirements:
Linux
Web interface for control
Named pipe for communicating with client applications
Existing code needs to be heavily refactored
Is C++ or Java more appropriate?
Edit: added more info
Edit2: I guess I should have mentioned that the code needs to be heavily refactored anyways. It was originally written in such a way that renders it difficult to make changes and additions. So rewriting is a cleaner solution at this point. As I mentioned, it's not a large program. Just a controller service.
Porting the solution to .Net Core may the way to go. It will run on Linux (and Mac for all intents and purposes...) and most of your codebase may need minimal refactoring. The only concern is if .Net Core currently has the features you would need supported in the app. And, .Net Core is still in preview.

Why java applets/javafx aren't widely used? (why I shouldn't use them for RIA) [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 8 years ago.
Improve this question
Java is one of the best managed runtime technologies we have. It has very high performance VM which allows to achieve performance close to C. The amount of high quality open source libraries is incomparable to any other platform.
However, despite it was the first dynamic client side technology to appear in browsers (Applets), it isn't used widely now.
What are disadvantages of Java which make people use JavaScript + HTML5 or Flash/Flex instead of Java for RIA? Why should I use them despite they are not as pleasant for a programmer as Java?
"it isn't used widely now"
I disagree with this perception... some examples:
Mindterm is a Java based ssh freeware client supporting ssh2 can be run embedded as applet google for it
Mizu web phone is a Java and open standards based SIP VOIP client which can be embedded as an Applet -google for it-
OpenSignX is an opensource Java based document and form signing Java applet for PKI X.509 certificates. google for it
Coolsmile is a Java based IRC client that can be run as app or embedded Applet
-google for it-
JFTerm is a Java telnet client. Can be run as desktop app or applet. Supports telnet (23), ssl and ssh -google for it-
J3Dworkbench is a Java 3D game-design authoring tool. delivery via Webstart or as Applets
-google for it-
There´s also thevirtualheart dot org a Java based heart simulator
also an applet
or Geocaching browser (JavaFX) at canoo dot com
You cannot do everything in HTML5... for instance take a look at complex apps like JITSI (videocomerencing, voip app) or MuCommander -google it- or Sweet Home 3D, or Art of Illusion... all java-based. Java serves a purpose... and Microsoft and its friends have been trying to discredit it, replace it with something else, and it continues being relevant. ask yourself why. it´s because it serves a purpose and its level playing field software ecosystem is HUGE.
Do a seach of code dot google.com for Java-related projects... and see.
Plus, to the commenter above who says JavaFX has limited appeal let me remind you that Java is NOT ONLY a programming language but actually 3 things: a programming language, a runtime environment, and a level playing field software ecosystem. You can use Java libs without writing a single code of Java language ... using Jython (Python for Java), JRuby (Ruby on Java), NetRexx (open source Rexx on Java, see www.netrexx.org), xRuby (ruby to Java bytecode compiler) or Jabaco (Basic to java bytecode compiler)... just to name a few of the many JVM languages... http://en.wikipedia.org/wiki/List_of_JVM_languages
It can take a lot of work to create a high quality applet compared to the amount of time it takes someone to create a high quality flash application. Building a presentation layer can be tedious without the right tools.
Furthermore, Oracle/Sun gave up on applets a while ago. They still support them but are not actively trying to improve them. Oracle is currently putting all of its weight behind JavaFX. JavaFX is a technically viable solution and has the advantage of allowing you to leverage your Java knowledge. The problem is most web designers don't have much Java knowledge and don't want to bother with it so JavaFX has never been very popular. If a web language isn't popular it can annoy your users when they have to download plugins to use it.
Another thing to keep in mind is that Flash itself is also on the way out. If you're going to be developing and maintaining this project yourself then feel free to pick up JavaFX.
If you plan on hiring a web designer or you want to learn web design skills allowing you to get hired somewhere then your best bet these days seems to be learning a good javascript framework (e.g. JQuery) and picking up some solid HTML5 and CSS3 skills.
Google maps for mobile is a java applet "http://en.wikipedia.org/wiki/Google_Maps#cite_note-20"
I should think that says alot, the question is sort of a truism this prevents a constructive answer the question I'd try to answer is this "is java applets and javaFX widely used" as your question is based on a premise which we cant be sure of how you arrived at it. Java applets work on the web JavaFX on the other hand is more than just for building applets, a GUI isn't just an applet
I can just hope to add to your knowledge and help you re-assess your opinion
the below is from:
http://www.ibm.com/developerworks/web/library/wa-appmozx/
HTML is great for displaying hypertext documents, but terrible for displaying GUIs. Traditional Web-based applications use endless amounts of effort trying to shoehorn HTML into the look-and-feel of a traditional forms-and-menus application. That was never a purpose for which it was intended.
The addition of form elements to HTML (FORM) did little more than create a new way to implement thin-client block-mode applications in the style of the venerable 3270 terminal. Like the 3270, HTML provides batched-up form submission. Character-based applications ultimately gained efficient user-navigation systems, but that was all lost when GUI applications came along. Subsequently GUI applications added back their own navigation structures, using the mouse and widget feedback.
When HTML forms came on the scene, they copied the design of block-mode terminals, but without the tight navigation and without replacing it with a proper GUI equivalent. Under HTML, the user is left to guess which visual elements on a given page might be user controls and which are just decorations. Therefore, for GUI-driven applications, HTML isn't that great a starting point. That's the reason why Java applets were met with such positive market hysteria when they first appeared -- they presented an opportunity to provide a real GUI.

Starting to develop a backend for my Flash game, Java or PHP? [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 8 years ago.
Improve this question
quick question, Im starting to develop the backend for a Flash game, and Im very used to AS3 sintax, and I know that Java has a very similar sintaxis, in the other hand I heard that it could be a little more complex to do than with php.
So, Im kind of new to php, and I could get used very quickly to Java, whats my best option?
(I need to do things like: user login, highscore table, etc)
It depends on the complexity that you have in the server side. Usually a Flash game do not need a complex business logic in the server side, I would use PHP in this case, Java otherwise.
If you are going to host this application, Java hosts are way more expensive than PHP ones also.
From what I understand here, Actionscript is more like JavaScript, not Java.
PHP and Java are both very suitable for a back-end to your game. I prefer PHP, but I am biased.
However, you are looking to stay within familiar territory, you should look at using Node.js, which is basically server-side JavaScript.
Yeah, I jumped from java to AS3 without any problem:D The one big advantage of php is that almost every server has it and with java is harder to find some reliable hostings. PHP could be also easier and little faster to develop some simple backend.
In terms of a similar programming experience one will find more comfort in Java than PHP. The main difference is that PHP is dynamic and the other two are compiled. The consequence is that debugging of Java and AS3 happens when it is being compiled, and in PHP when it runs. You also do not deal with predefining types in PHP for that matter and can totally ignore Object Orientation in it. Java and AS3 are more strict and require all these things. So in terms of choosing a language, Java will be more familiar (and easier) to pick up for a AS3 developer.
In terms of support for web based hosting and development, you'll find PHP more suitable since a majority of cheap hosting companies will have those installed by default. In addition, PHP was developed especially with the web in mind where precompiled web applications are not the best option in most cases. PHP in this regard deploys extremely easy (you just move the files onto your server). In terms of support for webdevelopment and specific examples for web based problems in combination with the support for PHP and deployment, you'll be better off with PHP.
Both have integration libraries, BlazeDS for Java, and AMFPHP for PHP, I haven't tried out the PHP integration I know from experience that Blaze is INCREDIBLY faster than XML or JSON for moving data back and forth. Assuming they're fairly equal then the question is where is it easier to find hosting, and which is better for you to develop and maintain.

How to transition from OO development to Web-Development? [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 5 months ago.
Improve this question
I just graduated last year and I landed a job in the CRM space, specifically with Salesforce.com and its respective platform. My problem is that there are 2 languages used to do things on this platform one is relatively similar to java and is OO the other is a web-development language similar to js, but not quite. I come from a java background.
I have had limited practice with web development in the past and was always interested in it but found it difficult.
Now that I have been thrust into this world I'm finding it hard to complete tasks simply because things do not function the way I am used to in the OO world. I'd write code that would compile, test and get aggravated when things simply do not function as expected!
What do you guys suggest would be best for me to read and comprehend in order to transition my OO thinking into web-development thinking.... I'm thinking I should learn things such as 'states, MVC etc etc.' but just don't know where to begin...
Thanks for all the help!
If you mean Object Oriented with the shortcut OO I have to disagree, because most web development languages are in fact object oriented (and you really shouldn't switch from a object oriented to a procedural server sided programming language). So what you of course need is understanding of your server sided language, be it PHP, Java, Ruby or whatever and that all of them in the end just generate some form of String output (which usually HTML). So you should be aware of all the technologies and how they interact (e.g. HTML, CSS, JavaScript/AJAX, your server sided language framework and so on) and have a understanding of how the transport protocol (meaning mainly HTTP) works and what the disadvantages/advantages are.
If you already did more OO development you should at least have heard about MVC which is (with some adaptions to HTTP being a stateless protocol) probably one of the more important patterns to transfer into and use in the web dev world.
It sounds like you are having trouble getting started with Apex and Visualforce, the two technologies used for development on the Force.com platform.
I'd recommend reading through the developer.force.com site. In particular check out the tutorials.
As far as object oriented development with Apex goes, start by reading Object Oriented Apex - Practical Usage.
It might also be worthwhile to cruise through the message boards and see what questions other people are asking. The community is pretty active. If you have specific questions, you can ask them or stackoverflow.
In my experience, working on web projects instantly reduces my productivity by 50%. It takes me twice as long to get something working in a web project compared with a compiled executable program.
You're working in mutliple languages that interact in ways that you need to control in a very specific way. Your mindset changes depending on if you're writing code for the client-side, or server-side. (Some of this goes away if you're doing Google's Web Toolkit coding).
I won't even go into the added difficulties of debugging web based products when compared with debugging a typical executable.
Most of the langauges do support some form of Object Orientation, and when they don't, typically developers will separate functionality into different files based on Object Oriented techniques. I think you'll find that knowledge will still apply.
Web development fully embraces OO if used with frameworks like .NET and JSF.
You need to start thinking in terms of web application logic and behavior. The OO concepts are there to help you and be your tools.
If you mean client side languages like Javascript/action scripts. Try Dojo framework for javascript development, it has a great model using an OO approach.

Categories

Resources