Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I have learned that the best way to learn a language is by finding a good project to start on, and working out how you would create it. I've been programming for 4 years as a hobby, and it's only been in PHP, so I decided that I should learn a "real" programming language. I have tried C++ in the past, however I was never able to find a project that I could apply it to, and therefore I never really learned much.
Now, though, I'm checking out Java, and so far I really like it. My question for you is: What would be a good project or projects for a beginner to learn the main features of Java? I understand basic OOP practices and such. What I really want to learn is all the little libraries and functions inside of it. For example, in PHP you learn to use many array manipulations and other functions built-in to do work for you. I would like to learn what these are in Java.
As I said, I don't really want just documentation, I'd like a project that I can apply Java to.
Whenever I learn a new language I start with a Mandelbrot. Just to get the hang of loops, variables and drawing.
Many other simple learning progs are possible. For basic screen/key/mouse i/o and timers, try a Tetris, Breakout, or Clock/alarm clock. To learn audio interface make an Electric piano/synth. To learn maths/recursion/string manipulation i often write a quick expression parser + graphing prog. To learn sockets, you could try a simple p2p chat.
Java is a good choice, good luck!
My advice, take a project based course some university puts up. Something past COMP 101, but not too theory heavy.
This one's how my university breaks sophomores. Its fun, and requires you to think about design and (a little) about data structures. Good "salt of the earth" programming: consoles, file IO, parsing, collections, etc. No GUI, though there's another project for that and threading.
dont rush urself, get a good java book and study from the chapter 1st and make sure you solve all the exercises of each chapter. First get ur basic / foundation strong, then u can think about how to apply that knowledge in project. And make sure u also get a good book about algorithm. If you had an experiences in php for 4 years, you must developed something with php i can assume, so try to develop same application with Java now, it will give you good insight about Java. And one thing... try to focus on how you can write good quality code! Anybody can write code but good quality code is rare, focus there.
while general, I would say find a web application that interests you. If you are familiar with PHP, you are probably familiar with many web technologies. Java on the server is a nice alternative to PHP, and deploying a Java web application is pretty simple.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I would like if there is some project developed in Java to learn Swing best practices. I mean an open source project hosted on the Internet through SVN or similar. I've been reading some questions in Stackoverflow about this topic but I would see some projects. Thanks.
The way I learned Swing best practices was reading the Swing source code in the JDK and practice. Follow Sun's practices and you'll be on the right path.
Read the implementations of JTable, JTree, JScrollPane, the various LookAndFeels, SwingWorker, SwingUtilities. Their event handling and MVC patterns are extremely complex but very readable, maintainable, and extensible. Essentailly, every time you use a component, go read the source code and understand what and why they do it. Eventually, you'll start doing the same thing.
And most importantly, code. Write some large programs, and you'll start seeing things that don't seem right or optimal. Come on to Stack and find out what you're doing wrong or could do better. Write something else, and do the same.
That said, the following projects have (or probably have) good code:
SwingX - The maintainers of SwingX were Sun/ex-Sun people, and I've always thought of it as unofficial incubator for future Swing features.
Squirrel (A JDBC client) - I haven't actually looked at their source, but I've used the program for years and it doesn't show any of the common flaws in badly written Swing programs. With how powerful it is, and how well it works, I would put money that's its extremely well written.
InfoNode (A powerful docking framework) - I've gone through quite a bit of their code, and its pretty solid.
JFreeChart (A powerful charting library) - Not the greatest code, but much better than average, especially taking into account its an old project that was never really intended to do everything people are using it for. That said, it is very extensible, and I've never had a problem molding it to my needs (which are much, much more than its original intentions).
GlazedLists (A highly performant event-based list library) - Not exactly Swing, but it's event handling is similar to Swing. They also have implementations of Swing models and some custom components that are extremely fast.
JIDE Common Layer: A massive collection of custom components that serves as the basis for their commercial components. I haven't gone through their code, but their components are beautiful, and since their primary focus is commercial Swing components, once again, I'd put money that their code is solid.
I found it very interesting to see a professional-quality application written in Swing, such as IntelliJ IDEA Community Edition. Now that it's open-sourced, you can check out the code and start digging in. Be forewarned though, there are no comments!
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Knowing how Java works in initializing objects and how it bind methods and fields to an object , abstract , final methods to an object and some other issues take a lot of time to guess myself , and i needed to ensure that every guess i made was correct by asking here and there .
I need some recommendations to read or watch (books-tutorials-articles-videos) , thanks in advance
What better source than Sun's Java Language Specification?
You can read any java book out there, there is a ton. But you won't know how java works until you actually start programming. Find a project and start coding!
I do like the Head First series for beginners. There is a Java book they publish. http://headfirstlabs.com/
Go through the article in http://www.javaworld.com/ and such sites.
if you want to understand how java works i would recommend Inside Java Virtual Machine by Bill Veeners
If you want low-level knowledge, perhaps studying the JVM itself would be appropriate.
Effective Java by Joshua Block http://astore.amazon.com/techncafe-20/detail/0321356683
Java Concurrency in Practice by Brian Goetz http://astore.amazon.com/techncafe-20/detail/0321349601
I'm currently waiting for Beginning Java Objects: From Concepts to Code to arrive on my doorstep. I hope it will be what you are looking for. I am purchasing this book because I too need help understanding objects in the Java language. I think it would be best to understand how objects are used in the language, then continue studying the language itself.
After that book, I'll go onto (or read at the same time) Beginning Java 2 by Ivor Horton. Both books received really good reviews on Amazon, so hopefully they are good for both you and I.
What I think you are getting at is how java really works under the hood. To that end, I think you would do well to understand byte-code, what java is interpreted to, and what the byte-code instructions mean to the jvm. By understanding what all of the Java language features convert to on a more raw level, you'll walk away with a much deeper understanding that, honestly, few people I've met have on the subject.
To this end, I'm going to suggest something that is a bit of a deviation from the norm and tell you to look at this book, Expert .NET 2.0 IL Assembler . That book is on the .NET intermediate language, the analogue to java's byte-code. I'm suggesting that simply because no good book exists on this for Java byte-code, and this is book gave me the understanding to easily tackle Java.
I would recommend SCJP preparation book:
''SCJP Sun Certified Programmer for Java 6 Study Guide''.
It has good overview over all java components. It speaks about neat areas, that you might get surprised with.
You need to go back to basics and read a good Java introduction (just skip the parts you know), as these are realy basic Java questions you have. Most popular text is:
Head First Java (2nd edition)
Or for a more down to earth advanced text:
Core Java, Volume I - Fundementals (8th edition)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Basically I am java developer and exploring ruby and ruby related framework right now. I am mostly working on web based projects. I had heard about RoR and Merb for web development in ruby. I am looking for good tutorial/books for Merb.
Start with rails because:
Rails is the most popular web framework on Ruby, and one of the most popular frameworks of the past years.
Also Merb is merging with RAILS:
http://yehudakatz.com/2008/12/23/rails-and-merb-merge/
So you are better off starting with Rails:
http://rubyonrails.org/download
Sinatra is another Ruby web framework. I've heard that it's geared more towards smaller size applications.
Tough call, but I'd start with Merb. Rails 3 will be Merb 2. The Merb core guys are taking over Rails development to make it more Merb-like (h ttp://yehudakatz.com/ et al.).
The drawback is that Merb is a moving target and documentation is somewhat lacking, whereas Rails has extensive beginner's documentation available.
There are h ttp://book.merbist.com/ and h ttp://wiki.merbivore.com/, but both are very incomplete and not infrequently out of date. There are the autogenerated API docs at h ttp://www.merbivore.com/documentation/current/doc/rdoc/stack/index.html , but those are also horrendously incomplete (most methods have grossly incomplete or nonexistent documentation that doesn't, for example, list what options are available in an options hash.) There are tons of blog posts on various Merb features, but the vast majority are horrendously out of date and no longer applicable to current Merb.
If you do go with Merb, resign yourself to spending hours reading the (minimally commented) test suite and source code yourself to figure out how to get things done. (You'll get a deeper understanding of the library that way anyway, at the cost of some upfront screen time reading code.)
Rails, by contrast, is a relatively stable target with extensive tutorials and documentation, but it's all going to be obsolete in Rails 3 when it's Merbified. You'll have to learn Merb anyway at that point, rendering all your work learning classic Rails useless. So I'd go with Merb from the outset.
(sorry about the lack of hyperlinks, but "new users can only post a maximum of one hyperlink")
Start with Rails ... rumor has it merb will be assimilated http://weblog.rubyonrails.org/2008/12/23/merb-gets-merged-into-rails-3
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I write applications in Java, and I'm looking for ways to speedup GUI programming. Binding frameworks help, but the particular application I'm working on now wouldn't benefit too much from that (it doesn't display a lot of data, just a lot of ways to manipulate the data). I feel like I spend way too much time writing boiler-plate GUI code, like adding action listeners, laying out components, etc. While I'm not a C# developer, I've heard XAML works very well and have seen JAXX, which appears to be similar to XAML. I'm also looking at the Groovy Swing Builder. It just seems like there are so many options, maybe even too many.
Can anyone share their thoughts on alternatives to hand writing simple Java UI code?
Also, I'd be interested in discussing how to migrate existing Java Swing code to use some of these options.
thanks,
Jeff
How about using MiGLayout?
It is extremely simple to learn and use.
I strongly recommend it to you. In my last project, it helped me to reduce much time to implement lots of GUI.
Layouts:
For layouts, I have abandoned the JDK Layout Managers in favor of the JGoodies Forms tool. I find it much more effective. It reads at a higher level, and reduces significantly the amount of code related to layouts.
I recommend using Clojure
It allows you to write Java GUIs quickly without the boilerplate.
Griffon is a Groovy framework for creating Java desktop applications. Admittedly, if you don't already know Groovy, you'll need to learn (some parts of) a new language to use it effectively, but the enhanced productivity is worth the effort in my opinion.
You should definitely use an IDE with GUI builder.
IntelliJ IDEA and NetBeans have very good GUI builders, they allow you to automatically bind objects and would reduce tremendously the amount of effort needed to create a GUI as opposed of doing it completely by hand.
I agree with others that tying down to NetBeans seems dangerous - especially when working with other developers. I've used the (commercial) Swing Designer (by "instantiations") plugin for Eclipse with quite a lot of success - the thing I like about it is that it round-trips, generating code that you are free to alter by hand. Not perfect, but a good time-saver.
But the biggest difference in my Swing programming came with the discovery of better layout managers. I went from FormLayout (good), to TableLayout (better), but now I don't use anything but MiGLayout (incredible).
You can try ZK(the best open source Java framework for building enterprise web and mobile apps).
http://www.zkoss.org/
I'm no expert in GUI programming, but have you tried using NetBeans as a platform for your app?
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
I have a good understanding of object oriented programming but it's been a while since I programmed. I want to learn it again. What are the most important aspects of Java programming that are important to learn so I can identify myself as a programmer. I had trouble learning Swing before and I gave up but I want to try it again to learn it. How many years does it takes to be a good programmer?
Some things may have changed since you left the language, here some personal proposals:
Servlets and JSP, you should take the dust off to this and include some EL (Expression Language)
A build tool (Maven or Ant), most of Java application are now built with the help of them.
Any Web Framework (Spring MVC, Struts2 or JSF are good choices)
IoC and ORM (Spring and Hibernate are good choices)
Take a look to Apache Commons and use them when possible
Also some features from Java 5+ like:
Annotations
Generics
One very important aspect is to learn the best practices of the language. One way to get up to speed about that quickly is to read Joshua Blochs book "Effective Java". I cannot recommend it enough.
Being a good programmer isn't an issue of time so much as it is an issue of being able to perform certain tasks. Swing is certainly something you want to know if you want to make a graphics application. If you want other things to know about Java, learn how to use the collections framework, which defines different data structure interfaces in Java. Of course, learning how the data structures work and making them from scratch is nice. Other than that, it really depends on what you're going to be developing. I have found java.sun.com's API to be invaluable
I believe that practice is the most important aspect. Books give you "a map", and it's difficult to start without a map, but until you explore the territory on your own, you can't really understand it. So, pick any project that interests you, and just go ahead and implement it.
Regarding how many years does it take - see Teach Yourself Programming in Ten Years by Peter Norvig.
I wouldn't say it takes years to learn it. You just have to write code, and learn from your mistakes.
Learn the core language well and then learn about best practices.
Understand the limitations of the language and look for ways to improve on this. Apache Commons is a good source of knowledge for this.
After that, understand and learn concurrency with Java and the underlying memory model.
If you need to learn a GUI framework then look at Swing or Eclipse SWT.
If you need to learn a web application framework then pick one of the hundreds out there. I suggest looking at SpringMVC or Struts 2.
Pointers. Go back to C and learn pointers.
(almost) Everything in Java is a pointer, so if you don't understand them, there's no use in any of those fancy frameworks.
In my experience the Java Tutorial is a good online resource for entry level programmers, as it is very clear in what it wants to say.
The "Head First Java" book is also really good (even though it doesn't look like it). The colloquial style is just a facade - there is hard core knowledge in there.
Of course you need to learn the basic features of Java before learning anything else.
Of the "advanced" language features, I would pick reflection.
For the GUI, there are several options. I would still pick Swing, since it is the most common tool.
For the web, learn servlets and JSP (so you know the basics), then learn a framework (struts, JSF, etc.).
There is no clear cut favorite in my opinion.
I'd get a good beginners java book and go through it. A good free one is Thinking in Java http://www.mindview.net/Books/TIJ/. I'd also recommend getting a good IDE like Eclipse or Netbeans. If you want to do web development you can find some good tutorials on struts2 or JSF.
I would start with other APIs besides Swing, unless you have a real nead for it. Apache Commons has several components, like daemon starting, logging, IO, application launching, db connection pools... And the best part is, the source is there for you to read.
Some other things to learn: how some of Java itself works. Hunt down souce code (Suns, an opn source, it doesn't matter), look at classes like StringBuffer, and see how they work.
Good luck space cowboy!