As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
When I use Java applets, they tend to be slow, don't integrate very well with the browser environment and often require a few click throughs ("No, I don't want to give this unsigned application free reign of my hard disk").
So, I'm curious.
Are these problems insurmountable? Are there Java applets out there which integrate well with the browser experience (in, for example, the way a well-designed Flash application does?) Can you point out any examples of really "nice" Java applets?
I'm asking this because I want to know if I should be taking a more serious look at Java-in-the-browser, or if Flash will remain dominant for the foreseeable future.
Edit: Unintentional flame bait has been removed. Sorry for any offence caused.
The Facebook asynchronous image uploader is a Java applet.
Update: Apparently not developed in house at Facebook. This seems to be the product.
Amendment:
Now that the question has been updated to be a bit more concise, I thought I'd add more to this answer.
This kind of problem, a mass image uploader (in this case), is the kind perfectly solved by a Java applet. Why?
It uses native UI elements, so users are not confused, or have to learn a new interface.
It can save massive amounts of bandwidth and overhead, because image transformations, such as resizing and cropping, can take place on the client side, rather than the server.
Write once, deploy everywhere (almost, sorta).
Visual Thesaurus is the coolest / best applet I know of.
Check out PulpCore. A really awesome Java applet framework:
http://www.interactivepulp.com/
Performance for it seems pretty amazing too if you check it out on bubblemark.com
Some of Ken Perlin's applets are beautiful.
see http://mrl.nyu.edu/~perlin/
eg:
http://mrl.nyu.edu/~perlin/experiments/unicycle/
http://mrl.nyu.edu/~perlin/homepage2006/simplex_noise/index.html
http://mrl.nyu.edu/~perlin/experiments/orange/
(...)
Simple floor plan designing with java applet here. Works much faster than dragonfly.autodesk.com or floorplanner.com (both are flash applications).
A few things...
Some game sites, like popcap.com, use Java applets for their games, and they look pretty good and are very usable.
As far as "why is that button cropped?" - that's probably a layout manager issue. See my article on layout managers, in particular:
http://java.sun.com/developer/onlineTraining/GUI/AWTLayoutMgr/shortcourse.html#whyNeed
There are many nice looking applets created with Processing (which is basically Java with some fancy graphics libraries included).
Just take a look at this visualization.
(source: zumkuckuck.com)
In high school I used to play a ton of Yahoo Games and I'm pretty sure those are all java applets. It looks like Yahoo have updated their site since I went there last but you can still find all of the old games here.
The MMORPG Runescape uses a Java applet as a client, and works very nicely, although the graphics aren't nearly as good as other games of the type I've seen. Jagex, the publishers, also have a game site called Funorb.
Another game which is in Java (though not an applet) is Puzzle Pirates. It's not exactly beautiful but it's cute and it's very addictive. Also, it's very speedy and smooth (which has been a knock against Java applets).
Java applets are like flash scripts - They can be used for good, but are often used for evil (e.g., annoying banners). IMHO the main reason that they didn't catch on is that they require tended to require too much skill and used AWT/Swing which produces worse UIs than what a designer with little programming skills could achieve with flash.
I would say that yes, they still exist, but more for business goals that don't require pretty UIs. For example, A lot of web-based statistics calculation tools are based on nice applets.
It's certainly possible. Java2D (the standard graphics component in Java) is capable of rendering beautiful stuff. A big problem is that the default Swing Look and Feel is ugly. I believe Java 7 will have a better one, but there are also very beautiful third party ones such as Substance. I've personally developed a small Java applet game which, apart from the jagged text in the intro screen (which is a bitmap, not rendered text) is visually indistinguishable from a Flash game.
My mom is addicted to the casual gaming at pogo.com, and I've gotta say, they've done an amazing job at fun, easy to learn, nontraditional games that look perfect. I'd love to see their code, honestly.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm a developer familiar with Ada, C, Obj.C (iOS), and C#. I would like to create an application to show some data about a robot I'm building. However I have never done graphics with either Mac libraries or OpenGL before.
What I'm trying to achieve is shown in the image below. I have tested Processing to create some stuff. But it's too complicated and Processing is far from powerful for this kind of application. It can't even rotate a line around its center without writing some nasty code.
Requirements:
Graphing capabilities (e.g. voltage drawn in respect to time), Google maps API, gradients, 2D animations, masks.
Questions:
What should I learn? Is this possible to implement using only the Mac libraries/frameworks or should I use OpenGL?
Is it best to do it using Obj c? Or is java worth the learning? How good is Java with graphics like this? This thing is that if I program this using Obj C then its not cross platform.
Any other tips you can give?
Later on, I´d like to add a google maps to show the position of the plane. All data is transmitted through Wifi. 10Hz.
Here is a thread of someone doing this with opengl and js: http://www.jpct.net/forum2/index.php?topic=3076.0
Yes you can do this in opengl, but you may consider Cairo which is 2d rendering and may be simpler. It certainly depends on if you need 3d rendering or not. In case of 3d rendering OpenGL may be a better bet, then trying to fit it into the Cairo system.
If you want it to be cross platform, I'd personally do it in Java or Python, but there are opengl and cairo bindings for most languages. If java I recommend trying LWJGL.
You'll also need to consider what UI framework to use, since you may need buttons and all that jazz. I personally like Qt, but WPF is also quite good.
See here for Cairo Docs: http://cairographics.org/documentation/
In addition this question came up here and there are more suggestions in the comment threads: http://www.gamedev.net/topic/479476-how-would-you-program-a-pfd-primary-flight-display/
I'm not sure how great animation with cairo is, but here is a tutorial demonstrating that: http://cairographics.org/threaded_animation_with_cairo/
I dont think that some specific library will accomplish all the requirements. Probably you will need to use a mix of them.
If you ask me, Id go for a combination of web ui frameworks. Based on the image you have shared, im sure that most of that graphical components can be constructed using ExtJs framework (see these examples: http://www.sencha.com/products/extjs/examples/, http://docs.sencha.com/ext-js/4-2/extjs-build/examples/charts/Gauge.html, http://docs.sencha.com/ext-js/4-2/extjs-build/examples/sandbox/sandbox.html).
For the central panel, maybe there is no library that provides a generic widget like that, and so I would go for a custom HTML5 Canvas implementation (http://en.wikipedia.org/wiki/Canvas_element).
Just want to add that I woudl go for the web way simply because:
Community is BIG for almost any library
Cross platform issues would not be a problem
Most of Web UI frameworks are mature, and have out of the box widgets ready to be used.
Communicating with external APIs (like Google Maps as you mentioned) is a piece of cake using web.
Ah, this is personal experience I've had while I built my final year engineering project(which was incidentally a robot that could fly) - And I've built something like this before.
I used Java for graphing and telemetry data tool with flight display system like that(and it was sufficient).
But if you are good with a programming language, then you can do it in any language of your choice. Yes, Mac + OpenGL + ObjC is good combination too. My aim was to keep the code as portable as possible.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Ok, so I've decided that I want to learn Java. It's my first more hardcore coding language, because the only other coding I've done is javascript (And I'm still relatively new to that). What I need is a good tutorial, that will assume you have no previous experience in java. I figured that I would take some web tutorials before I bought a book. This is the tutorial I found. It's a kids one, and I'm only 12, so I figured this would be good for me. My only concern about this tutorial is that it's assuming i'm in older software like windows '98. I'm not sure if I should be concerned that this is outdated or not. Additionally, I would love any other suggestions for java tutorials on windows, as I have to admit that it currently seems quite intimidating :P. I appreciate any feedback. Thanks.
I'm not sure if I should be concerned that this is outdated or not...
The age of the tutorial would be my first concern, and Java Programming for Kids, Parents, and Grandparents is copyright 2004. That's a decent year for a starter Java tutorial, since it will be compatible with the latest version of Java (it just won't cover anything brand new, but you won't need any of that when you're just starting out).
Also, the references to Windows 98 in the document make it sound like they expect the reader to have a newer operating system. Case in point, on page 18 of the PDF we see this:
If you have an old Windows 98 computer...
So the document is good for anyone with Windows 98, but they assume that Windows 98 is an old computer (the author gives special advice for Win98 users that nobody else needs). The document also references Windows XP, e.g. when the author provides a screenshot from his Windows XP laptop, so the author isn't assuming all readers are using Windows 98.
Ultimately, I wouldn't worry about the age of the document you're reading or references to Windows 98. If it's helping you, keep reading. :)
As for other Java tutorials, I'll defer to the other answers here. Good luck.
When I learned java I used Central Connecticut University's introductory course. It tends to go slow enough for you to understand but also fast enough to where you don't get bored.
Be sure to do the exercises at the end of the chapters!
Personally, I like the Oracle/Sun tutorials.
Just stay away from the enterprise stuff for now.
*edit: I would like to add that one of the best ways of learning a new language is to try and recreate something simple in that language. This could be a little server which just tells you the current time, a simple tic-tac-toe game, etc.
I learn't most of the basics though TheNewBoston. It was clear and was separated into multiple sections. They are video tutorials, I did use more resources to supplement it later on.
Link: http://thenewboston.org/list.php?cat=31
It's a pretty good kid's tutorial, even if it is a little outdated. If you get bored with that book and are feeling a little adventurous, I recommend trying Building Skills in Object-Oriented Design. The book goes through a complete design of Roulette, Craps and Blackjack. Three games that are complex enough that they can't be trivially designed. Oracle/Sun tutorials are also good, like Steven suggested.
Oracle actually has a pretty good tutorial on their site (for starting out). I haven't completely gone through their graphics tutorials yet, but it does a pretty good job at covering all the basics, including beginner programming fundamentals for anyone who might be learning it as a first language.
http://docs.oracle.com/javase/tutorial/
If you do decide to purchase a book, I have heard good things about the following:
http://www.amazon.com/Java-How-to-Program/dp/0273759760/
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I'd like to port my Zuma-like game to browsers. It's not really complex 2D arcade game, just some animations and particle systems - really similar in complexity to the one I linked to.
I'm wondering what technology should I use. I'm thinking about Java, Flash or maybe some solution working without a plugin (SVG, Canvas?). The cost of the technology is also really important to me (I'd prefer a free solution of course, but don't know if it's possible).
It's really probable that I'll also port the game to Android and iPhone. Maybe if I picked Java, I could write one version that would work on both: browsers and Android phones?
Sorry for my lack of knowledge, my situation is pretty weird now, since I got an interesting offer from a producer.
If you really want to port game to the web (e.g. it is not a weekend project of yours), it is a real project which is supposed to be used by many users, and you are not paid specifically by Google or Microsoft to make this game using JS+canvas, you should choose flash. Making professional games with HTML5, which works on every browser is very time consuming task. Also I'm not really sure it is possible to make HTML5 game without Flash, as far as I know web versions Angry Birds and Cut the Rope are using flash player for sounds (since there is no low latency sound api in browser).
So this is one of the reasons why to use Flash. Another reason is that Flash is used for creating games for very long time, there are lot of resources, game engines , tutorials, user groups and etc.
Also you don't need to buy anything from Adobe to start building games, there free editors (like FlashDevelop) or more advanced commercial IDEs(f.e. Astella from JetBrains).
HTML5, javascript and CSS3 will make your game run anywhere, its free and its the future.
HTML, CSS, JQuery seems to be the emerging way of creating anything on the web. This includes games. Yes, this technology hasn't been "perfected" yet, but I would at least spend sometime with it. Hey it's free, portable, and is always improving.
I found the following link on Google by "searching HTML5 game engine". http://impactjs.com/
Someone posted an all CSS game on YCombinator a few days ago. It's amazing what you can do nowadays!
http://news.ycombinator.com/item?id=3483662
http://jsrun.it/GeckoTang/4rXg/
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I will be making a cross-platform, graphical mathematical modeling application, for example, a user can drop a bunch of nodes on a canvas, specify some mathematical relationships between them, and run a simulation. I'm also interested in seeing in this being a web app.
I have had some programming experience in Java, MATLAB, Python, but I have never made a large application, thus I know very little about software architecture, and how multiple languages work together.
I am trying to figure out the best IDE, language(s), etc., to work in. The previous work done by my group has a lot of C/C++ libraries to draw from for back-end work, like simulation. I was told by my boss that Java is an "island" for development, meaning the Java app has difficulty using libraries from other languages and making its own libraries usable to other languages.
Is this true? Can someone shed some light on this topic?
Also, then what tools should I be using? I am ready to learn anything, but I'm trying to go for what would be the most productive route. Learning and then programming everything in C/C++ does not seem like a very productive route to me currently.
Things I've looked at so far include WindowBuilder/GWT Designer (this seems like a way to make both desktop and web apps), Mono/GTK+/MonoDevelop, and Delphi
Please feel free to be as verbose as you can, thanks!
I fear this post may get closed as off-topic. But it seems a little too specific to toss, IMHO.
Java interoperates with a lot of non-Java projects, products, etc. However, a major feature of it is portability, so you'll find that folks go out of their way to stay within the JVM environment. In that sense it's an "island".
I suggest you think about exactly what you want to interoperate with and get specific - see whether the hooks are there or not.
For your back-end C/C++ libraries, you'll need to implement JNI interfaces. I'd describe this as having a small but moderately steep learning curve - not a lot to learn, but it takes a little thought - especially if the amount of data passed back and forth is so large that performance is an issue.
You may find that you don't have what you need with GWT for the graphical aspects of what you're doing.
I'd think hard about how much you need the web aspect. If you do, consider skipping a desktop-only solution (and maybe Java/GWT) altogether, and just going to the web. This is especially viable if you don't need to support older browsers.
I'm not going to touch the "what tools" question - it's too broad.
Considering Jython, Groovy, Clojure, and a whole host of other language adaptations for Java, I would firmly suggest that your boss does not know what he is talking about. Java also has the ability to execute native code if necessary, so it is not terribly difficult to incorporate other, non-JVM toolkits. But even if he were right and there was no cross-linguistic work with Java, the language has been around long enough, and it is verbose enough, that you can generally find libraries which will supply the inter-operability you're looking for.
Without knowing more about your specifics it will be hard to give a precise answer, but the general rule is that the language you know is better than the language you don't, so unless your language goes completely against the idioms required, use it. Eg. if you have in-house expertise in C/C++, those languages are perfectly adequate for building applications. JavaScript significantly less so.
You do not want bugs which are caused by faulty assumptions about the language. Those are nearly impossible to track, especially since you won't know where to look.
Well, if cross platform is an issue, I would suggest developing in Java, it makes everything very easy in that regard. As far as loading C/C++ libraries, I don't have much experience with it, but I would recommend taking a look at something like Java Native Access.
As far as tools go, they are wide and varied. I personally use Netbeans or Eclipse, but untimely that sort of choice comes down to what plugins you may need and what you personally prefer.
All in all, I would say program out a little stub of the application in different environments and different languages and see what you like. You really need to know the details of the application to make an informed decision, and it varies in most cases. Best of luck!
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I know it's a hot question that need anwsers ^^
From my viewpoint, using Java vs PHP, is nowadays a problem of system resources (Hardware, Software, etc.).
For Java, you have to deploy J2EE Stack (JDK, AppServer, etc.) (~200M) on your server, for PHP you need to deploy a LAMP system (~100M).
Using Java was in my opinion due to object oriented programming in web application, but today we have a lot of Object Oriented Web Language (Ruby, Python, PHP).
So the question when to choose between Java or PHP for new projects ? Maybe the community difference ?
I know that stackoverflow is not made for discussion, but it's a (good?) question that need answers (for me and for others maybe) ^^.
What are you guys talking about....
Okay JAVA has some pros, but it also has some cons. Now with PHP it is exactly the same, it has some pros, but it also has some cons.
People who say PHP doesn't have a good OO environment, well either does javascript! And really that is the heart of all web 2.0 projects; javascript. The back end today is becoming more of a resource for the front end. What you can do in JAVA now days you can do in PHP 5.3 - to some degree. If you are a good developer you will be clever enough to abstract your design to make it maintainable and if you are brillant you can match and even improve object sharing in PHP, which majority of web "designers" don't know about - or dare I say, comprehend. Check this article out by O'Reilly ON JAVA!.
I develop both in Java and PHP. I'll always use PHP for my server side and I'll use Java for Android Development, and desktop development. (By the way I have developed in java for backend development, but it take twice as long to do something in JAVA then to do it in PHP. That is why I stick to PHP.
I hear this spagetti code problem with PHP all the time. Yeah. Maybe 5 years ago! If you project ends up like this then the person, or you, is a poor programer, and you should stick to drawing pretty pictures. It is easy to separate your logic from presentation, and it is also simple to separate your business logic from you data layer. Think before you code. Don't just open up a note pad and start typing. Plan! People who fail to plan, plan to fail! Jacco you're on the money!
I see uni students all the time building code where I think, "The person who is going to end up with this guy is going to regret it". If the student just planed and documented what he was going to do then every thing would be organised and ready for scaling - again if he was good enough.
Both technologies are great and you should use what is more comfortable to you or your developers. If you go down the road where you think one is better than the other and you know nothing about that technology, well guess what? No matter what you do your projects outcome will be missed, and you'll end up having to do it again.
Other constraints are usually taken into account. Things like
development time,
maintainance cost of the codebase
availability of qualified programmers
salary cost for available qualified programmers
to name a few.
Hardware and software are cheap if you compare them to the above so they tend to be less important.
I did a non-scientific performance comparison of J2EE and PHP. The comparision was to see the user experience of each system under various load conditions.
I found that PHP's response time was very slow and CPU maxed out very quickly. I understand there are some compilers that will probably help, but I wanted to make an out of the box comparison of performance of rapid development systems.
You can read the full details here: PHP vs J2EE: a Practical Approach
It depends on what you're doing. Choosing a language/framework without analyzing your project requirements is a bad idea.
Choosing a language depends on what you want to do, But I am very sure that the different hard disk space requirement will be the least important aspect of your decision.
Here is a possible hint: If you want to reuse your work (or parts of it) in a desktop application, Use Java. PHP is virtually non-existent for everything except web programming.
I really don't think that it is a question that can objectively be answered. In the end it is about people and what they feel more comfortable with. That is why e.g. Facebook developed a PHP to C++ compiler (with which the performance benefit that Java has might become smaller, too) instead of just hiring C++ developers for doing the Job.
On the other hand, the Java platform offers some interesting new approaches like Grails (which is basically a Groovy Wrapper around Spring) and Lift, as well. That makes Frontend development faster and easier (I still find that this is a real pain with plain Java) and you can combine the benefits that other languages have with your existing Java codebase and expertise (btw. most of the Frameworks mentioned don't need a J2EE runtime environment a simple Tomcat installation with around 5M and an installed JRE should be enough). So it is not really about the Java programming language alone anymore.
And if you really can't decide at all you just run PHP in Java (works as well for Ruby, Python, Javascript ...).
PHP wins in front end in web development. Because it has much smaller development time which make things cheaper and cheaper.
PHP will lose in mobile app development. There is no way to develop a mobile app front end with PHP. And Because its performance gap with java and other static languages, PHP will lose the back end battle. Java is old, but it has a pretty young and professional community. Check out those names: lucene, weka, hadoop,scala,cassandra, hbase, what does php provide us in back end service???????
I do not really agree on the fact that the choice of a language is related to system resources.
Hardware is cheap and we are not in a time where we need to closely look at the system resources as we used to have. Don't misunderstand me: we still do need to pay attention, but the time where people were xoring their pointers to save some space is over (luckilly).
And if your main concern is performance, then either running a JVM or an interpreted language is probably not the best option.
I do not think it is related to the orientation of the language per se either. Ok, I know, PHP is not object oriented but still, you can now code OO with it. You will find descent web frameworks for almost any language.
I agree with Jacco on his list.
Another aspect is indeed the culture the language refers to.
PHP is for script kiddies. Java is for serious, wearing suits business developers. Of course, we all have many counter examples but still. Java was largely adopted by big companies, now competited by .Net. There are good reasons for this, among which the fact that it a lot easier to write poor code in PHP than in Java (and almost any other language). On the other hand, Java is not exactly freedom oriented.
If your project is strictly personal, you can choose whatever suits your tastes better. If you plan to develop as a team, the choice of the language will impact its general mood/way of thinking.
I would finally add some important parameters to me: fun and elegance
This may be a matter of taste here again, but I have much more fun coding in python than in C# for instance.