I've Inheritted a large Java Web project which I've got to make some modifications to, I'm a fairly competent Java Programmer when it comes the the basics but I've never done any JSP programming or EJB programming before. I remember vauguely doing some servlet programming 5 or so years ago in university, but I'm assuming that everything has changed since then.
I'd planned on getting myself up to speed this weekend, but I don't know where to start.
What would be a good learning trail to get me from Zero to proverbial Hero? or at least to a level of competency which will let me be able to read the JSP servlet and EJB code and understand how it works well enough to modify it and deploy it?
Ofcaurse it depends a lot on what project you inherited and when it was written.
Also what technologies are used?
The best resource on starting J2EE development I think it's the Java Passion site.
The online tutorial on netbeans.org are very good. I recommend to download the NetBeans 6.5 IDE (free) and walk through the J2EE tutorials.
The tutorials are very well written, and introduce the basic elements of enterprise and web development. They also require very little time to complete.
http://www.netbeans.org/kb/
Find out how complex it is. There is a vast difference between a web application without EJB's and one with.
Is it running in JBoss/Tomcat/Jetty/Resin/BEA/WebSphere?
Related
I am decent (or so I like to think) when it comes to making java swing applications, but I want to make the jump to web applications.
The problem lies with the fact that there's so much going on and so much different terminology being thrown around. I have no idea where to begin and it seems very daunting.
I've read up on a few things such as JSP and GWT, but I still can't seem to be able to make the jump. My question is: is there a specific flow used when making a web application to make everything seem to connect better, and if possible, could you recommend a good starting point for someone like me that comes from a solely desktop gui environment and wants to start developing web apps? Thanks for the help!
Both Swing and Web application still rely upon java keywords and terminology. java web technology work better when you use a framework . I suggest you start with Spring. It has MVC library that you can use, plus spring mvc has a large community online. However, Java Servlet is quite similar with what you have learn in 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 8 years ago.
Improve this question
I am a .NET developer (and have been for a while now). I work for an organization that was just recently acquired by a larger company whose primary development language is Java. There are a few .NET developers, but the ratio of .NET to Java has decreased substantially now that the teams have merged.
That being said, I've decided it would be best for me to start Java development. However, most of the books I've seen so far for "learning Java" all take a very basic approach (what is a class, OOP principles, etc etc). I am comfortable with this part of development and don't need a primer (unless there are differences so profound that someone recommends the fundamentals from a Java perspective...).
Anyway, I'm looking for a book recommendation for Java development from a software developer's perspective that discusses today's techniques. For example, MVC architecture, application best practices (I am a web developer, this includes web services), is it worthwhile to work with JSPs or consider Ruby instead, etc etc.
A HUGE bonus would be "learning through doing". Something like Murachs, where I can step through a project from start to finish, and is light enough on fundamentals that I don't get bored. I'm hoping to walk away with enough basic knowledge to volunteer for some internal projects and grow from there.
I'm sorry if my question is needlessly broad, but I'm struggling to find a starting point aside from my Eclipse installation (I am doing this on Ubuntu, deliberately avoiding Windows).
Thanks for any direction or insight you can offer.
EDIT - After discussing with a co-worker, and reading Bert's great suggestion (all of them have been excellent, thank you all very much), it turns out the main focus is on EE, and Glassfish. They use NetBeans for development, since it is tightly bound to Glassfish.
This doesn't mean much to me, except that I think the parallel drawn is IIS/Web apps to Win32 apps. But perhaps it will help clarify some of the more open-ended questions in my OP.
Effective Java By Josh Bloch
It may not be "learning by doing" but it gets into the details of how to use the Java language effectively.
I would then complement it with Java Puzzlers by Josh Bloch and Neal Gafter
My best bet is to learn Spring based on your requirements:
MVC architecture, application best
practices (I am a web developer, this
includes web services), is it
worthwhile to work with JSPs or
consider Ruby instead, etc etc.
You can start by visiting SpringSource at http://www.springsource.org/
There are a few points I would like to make to you:
The basic Java language is rather small and C-ish. To my understanding C# and Java works almost identically here.
The Java runtime library is VERY, VERY BIG, and rather unlike C#. Very few people know all of the Java 6 runtime library well.
There are several IDE's in common use for Java. You will want to learn the one used by the rest of the team.
I would suggest having a brisk walk through the Oracle Java Tutorial, just to get the hang of the spirit and do some of the exercises, and then look at the common "Java for C# programmer" cheat sheets on the internet. Then do a lot of code, and then read Effective Java.
(For those who think they know Java 6 runtime well, please consider if you are familiar with RMI, the Rhino Javascript engine, and XPath in the XSLT implementation and all the rest)
Please look at the following thread:
https://stackoverflow.com/questions/75102/best-java-book-you-have-read-so-far
Ruby makes no sense unless you're writing JRuby on the JVM.
If you're writing web apps, you'll need to know JSPs written using JSTL (JSP standard tag library), servlets, HTML, CSS, and JavaScript. Download Tomcat from Apache - it's a servlet/JSP engine that will let you deploy web apps locally for learning. It has an HTTP listener built in, so you don't need IIS or Apache.
You'll need to know how to create and deploy a web archive (WAR) file. That's a ZIP file that contains the standard format for a web application.
I'd have a look at the Tomcat "first web app" docs to get a feel for it.
Once you have that, come back and talk about frameworks. (When you do, I'll recommend Spring.)
Here are some references I like. I'm sure there are better, but there are the ones I have read and can vouch for:
Java in a Nutshell is a classic summary of the core language. If you need more, there are books like Java for Programmers for programmers transitioning to Java (I have not read it).
Sun's Core Servlets and JavaServer Pages was a good book for Java servlets and JSPs. But consider that a lot of web tech is built on top of this (e.g. Spring), so this may be giving you foundation but not direct knowledge of the specific framework you will be using. Also a lot of web tech these days are client-side/JavaScript/AJAX-based, e.g. jQuery.
As for MVC, consider focusing on MVP instead. I been playing around with Google Web Toolkit to leverage my Java background to create client-side apps, but it is also a good way to get some idea of MVP - read Large scale application development and MVP Part I and Part II, and the GWT MVP Development with Activities and Places. However, GWT keeps evolving.
My last suggestion is that you narrow your focus - try to figure out what frameworks are popular at work and decide if you want to focus on a tier: front (e.g. HTML/CSS/jQuery), middle (e.g. Spring), or back-end (e.g. Hibernate). Once you figure this out, then post a more specific question(s) (e.g. what are the best resources for learning XYZ).
Just from my experiences with java (limited but I took a Web Dev course teaching JSP's) Any decent technology for it is usually 3rd party. However, from what I can tell when doing web dev I would use Netbeans, Netbeans has Tomcat built in especially in Ubuntu for easy debugging.
More on similar lines you can find answers from this post
https://stackoverflow.com/questions/3820437/life-after-head-first-java/3820449#3820449
The Java landscape is quite wide as you probably have already figured out.
There are hundreds of frameworks and tools that can be used for basically doing the same thing. To get an idea, you can take a look at this presentation written by Matt Raible, where he compares a number of Java web frameworks.
As someone else suggested, you should definitively take a look at the Spring Framework. It is widely used in the enterprise world. There are several good books about Spring.
If you want to get the basics of Spring MVC in a "tutorialized" style, you can take a look at this book. It doesn't cover the latest Spring version (3.0) and it is not a "perfect" book, but it should allow you to get the basics while running some examples.
Also, there are literally thousand of Spring-MVC tutorials on the web.
For instance, you can take a look at:
http://www.adobocode.com/spring/a-spring-web-mvc-tutorial
RESTful services are also quite popular these days. I have been working with the Resteasy framework from JBoss and I found it very easy to setup and work with. This book explains the REST architecture and uses Resteasy as framework for the examples.
I also recommended "Head First Design Patterns" from O'Reilly. It covers the most important patterns using Java and it will help you to see how the language can be used for patterns you may be already familiar with.
One more suggestion: you may considering "tuning in" on Java TV. It's a great resource with hundreds of Java tutorial videos. It covers a wide spectrum of technologies so you should be able to find something for you.
I've been introduced to this wonderful project, xhtmlrenderer; the flying saucer project. Problem is, is that where I work, it's strictly a microsoft shop and I haven't done any java development since college, and a smidge of WebSphere a few years back.
I was wondering what it takes these days to do java development? I set up a quick proof of concept to see if I could do what I wanted with this project and it works great, however, I used jnbridge whose licenses are a bit on the expensive side but Visual Studio was what I had handy and got the job done with an hour of finagling.
I'm wondering what it take to do java development these days? Are servlets still the norm? Is Apache where I should start looking to get a small web server up and running? Is Eclipse/Ganymede the IDE to use?
Essentially what I want to do is pass a url to the service and have it spit back out a PDF. Just on vacation right now, and stuck on dial up, but can't stop thinking about this.
Thought I'd post these thoughts now to see if I can get a jump start on next weeks work.
Eclipse is certainly the IDE on no budget, NetBeans is also free. I prefer IDEA from Intellij, but for something that sounds like such a side part of your project, it probably isn't worth the money.
In terms of servlets, etc., it really depends on the archetecture/scalability you are looking for.
If you are looking for something that needs to run as a small web interface, then something like Jetty or Tomcat with a basic servlet should be fine.
You might be looking at something invoked via the command line, although starting a JVM for every conversion is going to be too heavy for all but the most trivial usages, but a little program that monitors a directory and pulls stuff out of it for the conversion may be what you need.
If you give more details about the archetecture and how you are planing to use it you could get some more specific advice.
In general .NET and Java development are quite similar (.NET was started to compete directly with Java, after all), but the real practical difference is that a lot of the .NET environment is kind of provided to you on a silver platter. You need a web container, you have IIS, you need a database, you have MS-SQL, You need an IDE, you have Visual Studio, etc., etc. In Java development, these are all choices to be made, there isn't really a default obvious good choice for a lot of things - there are many competitors. That can create a larger curve for a Microsoft shop than you are expecting.
Java's not all that different, although generics add some excitement; PDF with iText is fairly straightforward; and the IDE world is pretty much the same as ever. Eclipse and Netbeans are common, there are several others, and real programmers still use EMACS.
Apache is pretty generic, but with servlets in mind you might think about Tomcat.
If you want a small enough web server, you can always use an embedded Jetty. If you need the full services of Tomcat, it's also available. For Java development, I use Eclipse for an IDE. Not only is it free, but its support of refactoring is ahead of Visual Studio. Actually, if you used the WebSphere development environment, then Eclipse will be very familiar.
Consider sneaking in IKVM (http://www.ikvm.net/) as it allows you to use Java components in a .NET environment.
I'm fairly new at webapp development in Java and have been looking around for a decent tutorial on this subject. I've found a whole bunch of frameworks from struts to seam. Which framework should I look at considering my level of expertise in this area is fairly low?
Also is there a global tutorial on web application fundamentals?
Java EE tutorial covers the basics of web applications.
As far as frameworks go, take a look at this question
I would suggest to learn Seam as it builds further on JSF, an industry standard.
It is also one of the newer and better web application frameworks available in the Java landscape today.
Furthermore, it has great support for both EJB3 and simple pojo development.
You should also do some background reading about servlets.
I cannot help you with Java, but here is a link to an excellent SO post that will help you with the second question.
If you want something easy for web applications development I would highly recommend grails. Other frameworks are good but learning curve and configuration complexity is high. Most of the time you will find against them.
With Grails you will have application up and running in few minutes.
I'd focus on learning HTTP/HTML first - you need to know the basics of static web development before building dynamic web applications.
Then just do some basic Servlets and JSPs - all other Java web frameworks are built on this - and if you jump right into higher level frameworks, sooner or later you're going to run into an issue you need to debug / develop that's going to require knowledge of how the underlying servlet / JSP APIs work.
After you learn the basics start looking at other frameworks built on top of this to see what they offer.
I am a .NET Developer with about 5 years of web development experience using Microsoft technologies starting with classic ASP to ASP .NET 3.5.
I do have a little background in Java as well and can write/understand Java code very easily. I am looking for resources (online, books) that are compatible with my .NET experience. I am only interested in web development in Java and want to start at intermediate level even if it may require me to look up some details.
What path or resources would you recommend for intermediate .NET web developers to gain equivalent proficiency in Java web development tools?
Get an IDE: IntelliJ (my preference), Eclipse, Netbeans;
Get an application server: Glassfish (my preference; either v2 or v3 Prelude), JBoss or, if you're feeling adventurous, SpringSource dm server;
Get a JDK eg 6u11;
Get a copy of Spring 2.5.6 (or 3.0M2 if you're feeling adventurous);
Get a copy of the Spring reference documentation;
Put the pieces together.
Get yourself a copy of eclipse, and just start reading other people's code, and reading some java docs. The Java website has all the docs online, and they're one of the best language specs I've seen.
Really, if you know C# pretty well, Java should be a cake walk. The languages are pretty similar, so you just need to get to know the different frameworks.
Probably the most helpful book in regards to learning Java's web development framework, Java Server Faces:
Core JSF
- Great examples and explainations throughout on the whole process of using the JSF Framework.
And of course for anyone new to Java I would recommend:
Effective Java
- Covers various design patterns and practices.
In my experience that official Java exams are better than the .Net equivalents, so it may be worth starting there?
Search for a servlet/JSP tutorial (Good, albeit a little old, example here).
You'll get basic knowledge of Java web application development.
Whatever your level is, JSF for Nonbelievers is the best introduction to JSP/JSF.
I'd check out Bitter Java.
It's a book that shows you the wrong way to do things, why it's wrong, and then it shows you the right way.
It pretty much falls in line with the evolution of the j2ee framework. Started with servlets, then moved into jsps, then command pattern, etc.