views:

1339

answers:

20

Hello Stackoverfellows,

I graduated in December in Computer Science and have acquired a Software Engineering position. I have been banging my head up against the wall for 2 months trying to learn Hibernate, Spring and everything else that has been thrown at me in my first project. Prior to accepting this job I had experience only in programming. Application architecture and engineering tools have been very difficult to grasp. I was hoping that someone would be able to tell me a good place to start understanding how Java based web applications work. There are so many components and I can't figure out how everything goes together. So, my questions are.

  1. How do you go about learning a new technology?
  2. What approach is best for learning multiple technologies at the same time?
+7  A: 

I think Mike Gunderloy's book Coder to Developer may be worth a look.

Regarding learning a new technology, there really is no better way than to just use it and practice with it as much as you can.

Galwegian
+7  A: 

My way of learning is to build something on my own. I usually pick something trivial that can be implemented quickly and then using the enterprise technology XYZ of the moment so that I can poke around and learn the particulars. In fact, I'm doing this very thing as I'm trying to learn ASP.NET MVC.

David in Dakota
+1  A: 
  1. You just have to start working with the tools to get a feel for them.
  2. I would go look on the web and start reading books and web sites on the technologies you are using.
  3. I would start searching the web for which books on software engineering in general you should read. There are questions here surrounding this topic.
  4. Ask the other engineers that you work with questions about how they do things and why they do it that way.
Kevin
+2  A: 

theory & practice

  1. read (i.e. Spring in Action is awesome, blogs, etc)
  2. practice (i.e. write some code, get feedback)
  3. goto 1
dfa
+2  A: 

I really liked this book when moving from asp.net to jsp Head First Servlets & JSP, Second Edition.

Great primer for someone who knows programming and the web but not much about how jsp, servlets and mvc work together.

jms
+21  A: 

Start with the basics.

By this I mean just servlets and a Web container, probably Tomcat. You should understand the servlet lifecycle no matter what frameworks you happen to throw on it afterwards.

Next, if you wish, throw JSPs into the mix. JSPs are just glorified servlets anyway (they're compiled into servlet code and then into bytecode).

After that add an MVC framework. Years ago that used to be Struts (1). Nowadays it's a little more difficult. I like Spring MVC but that is somewhat predicated on Spring too. And I think you'd be better off (for now) bypassing more Ajaxy type frameworks (like Tapestry or Wicket) or the more end to end solutions (like Seam) as overcmpolicating the issue. The point you're trying to comprehend here is just what the MVC concept is, how it works and why you're doing it.

After that add Spring. The point here is to learn the principle of Dependency Injection / Inversion of Control (IoC). This is an extremely important concept in modern Java development and software development in general.

The above actually follows how these technologies evolved, in the order they evolved. They did so for a reason and following that path will help you understand that.

Don't listen to anyone who tells you that you don't need to understand low level concepts and technologies like the pure servlet API. It's nonsense.

cletus
+1. As a computer scientist turned software engineer myself, I concur: an awareness of the structure and operation of the whole stack, top to bottom, is invaluable.
Jeffrey Hantin
+2  A: 

By the time you are an expert at your tools and the languages/tech that you are using, a new crop of kids will be using newer better tools and the languages/tech. You will then have to learn those to get a job. So get used to this process

KM
25+ years of exactly what you said! +1
Optimal Solutions
+2  A: 

Just keep going. It's not unusual to spend 2 months on a new job as a programmer and still feel like you're sinking into quicksand. I've had cases where it's taken me up to 6 months on a new job to get to a stage where I feel like I'm finally turning the corner and that's after 10 years experience as a porgrammer. Although in that case getting to grips with the code base was like trying to decipher Egyptian Hieroglyphics.

sipwiz
+1  A: 

Reality check: as a new grad entering the workforce, you are going through the same process that the rest of us did. You're entering an ecology that's totally different from the one that you learned over a period of years. There's going to be a learning curve no matter what job you take and the good employers understand it.

To address your questions quickly:

How do you go about learning a new technology?

Read, practice, make mistakes, repeat. The most valuable product of this process will be specific questions that you can ask your new coworkers (and on Stack Overflow). Remember, asking good questions actually makes you look more intelligent. Asking general sweeping questions or "I don't get it" just makes you annoying....

What approach is best for learning multiple technologies at the same time?

Make a prioritized list of things you need to learn and then work the list. You can't learn all of web-commerce in one weekend. However, you can learn about specific aspects of Hibernate in an afternoon. Read your new code base with an IDE in hand and start exploring the APIs that are actually used. If you can focus on only the relevant points of all these new tools, you might actually find yourself making progress faster than you expected.

Bob Cross
+1  A: 

RTFM!! Seriously, READ and READ and READ. Then apply, READ, make mistakes, READ, backtrack to figure out what you did wrong, READ, fix, READ, apply again and over and over.

Did I say READ? :-) I am serious. Read everything you can get your hands on. Google is your friend. StackOverflow is your friend. There are great books out there and posts like this one describe them, and more! Good Luck!!

Optimal Solutions
RTFM seems not appropriate here. A lot of the Open Source projects that are production ready have poor(incomplete/nonfriendly) documentation(I'm not meaning anything in particular here). In fact if he is banging his head against the wall, it probably means he has read the docs.
+1  A: 

I was in your same position 2 years ago. You really can't be expected to learn the popular frameworks and architecture while you are in school - you are there to learn computer science theories and how to program. Hopefully, during work you can spend time to learn Spring, Hibernate, etc, but if not, you are going to need to spend some time on your own.

If these frameworks are new to you, I suggest getting a book for methodical and "tutorial like" learning as opposed to random googling or trying to read reference documentation. I would definitely do this for Hibernate. This is how I learned the popular J2EE stack at first, but now I can just read the documentation that comes with the frameworks.

Anyways, you will start finding that all J2EE technologies are somewhat related, and that you will pick up small bits of other related technologies while learning a specific one. For example, learning JSF goes hand-in-hand with JSP.

GreenieMeanie
+2  A: 

I had to go through something like this about a year ago when I started my job. My solution was to read every bit of our codebase that I could get my hands on. If you have trouble with spring this is especially helpful. Trace through all the config files whats happening and where it relates to the code, where stuff changes and why. As for hibernate, play around with it and read the annotation documentation (that was the hardest part for me).

Lastly volunteer for any random projects that come up, especially if you've never worked with those technologies. I've worked on many projects over the last year that have nothing to do with my day to day work and have learned more from those projects than my four years in college.

Good luck

Laughingman234
Be careful with that reply... Apparently reading is not a recommended course of action.
Optimal Solutions
+1  A: 

The first thing to grok is the Servlet Specification as it describes all the basic features that java web applications essentially adhere to. It is not light reading, but just a general grasp will get you QUITE far.

Thorbjørn Ravn Andersen
+3  A: 

All good answers, and while you're struggling with it, maybe you could send a little feedback to your professors:

  • The real world would really appreciate it if they paid a little more attention to what the real world needs.
Mike Dunlavey
+1  A: 

Don't use Hibernate until you know JDBC thoroughly.

You don't say whether or not you have any background in relational databases or SQL. Both are essential.

I love Spring, but you should realize that you don't need to swallow the whole thing to get benefit from it. For example, you can get a lot of mileage out of a Spring web UI using JSPs and the JDBC module. Leave Hibernate out for now until you feel comfortable with Spring.

Problem solving, especially in computer science, is about decomposing large problems into smaller ones. Shrink the size of your problem and concentrate on one thing. Web apps with JDBC, then Spring, then Hibernate would be my recommended progression.

duffymo
+2  A: 

Honestly though man, if you could get through computer science at uni, the work force is honestly easier, just different. You should never have to crunch your brain as hard as you had to at uni, well this has been my experience anyway. There's not much difference between a computer scientist and software engineer anyway, very subtle differences but pretty interchangeable.

My advice would be make sure you're fluent with XHTML/CSS/Javascript/SQL before you move to learning frameworks and fancy script libraries such as hibernate, jQuery etc. You probably already are because of your background, but if not, these core foundations will allow you to understand what's really happening when your fancy frameworks are auto generating code all over the place and so forth.

I know people that have gone straight to ORM without knowing SQL in depth. They love ORM, but they don't really understand what's going on underneath and they struggle when the fancy little ORM generates some really inefficient SQL, because they don't have a clue how to override that and write their own.

Also be aware that hibernate and some frameworks like that can be lots of bloat and not always the best way of achieving simple tasks. They can be extreme overkill for a lot of things. Again, go back to your bread and butter languages first. Build something without a framework. If you then learn that you experienced lots of repetitive coding, doubling up, grunt-cutting and pasting, high maintenance, then take the lessons from this and then move to a framework that suits your needs.

But once you get familiar with this crap, your computer science brain will kick into turbo and you'll find it pretty easy.

Aaron
A: 

Find a mentor you respect and do as they do.

As a youngling CS graduate I was lucky enough to get hooked up with a very experienced architect. Now, here's the thing you need to know about experienced architects, they (we) are lazy. They (we) will let you take lots of stuff off their plates, let you do it and then tell you why it's wrong. Take advantage of that process if you can.

JP Alioto
A: 

One thing that I do when learning new technologies or techniques is to write a small example application. There are a number of good tutorials for Hibernate, Spring MVC, and Maven. The key is to limit the number of things you attempt at a time -- it'll be easier to figure out Maven, for example, if you concentrate on Maven without throwing Spring and Hibernate into the mix. Once you get comfortable with one thing, you can start another micro-project.

Having a mentor also helps. You're going to find yourself in situations (technical and non-technical) that you need someone to talk to. Don't be afraid to ask for advice from more experienced folks that you work with.

Paul Morie
+1  A: 

I came from a Computer Science & Engineering degree to software engineering. I have a technique that I use when trying to learn new technologies. It usually goes like this.

  1. I usually try to read through some of the documentation on the technology and make note of the key points.
  2. I try to get my hands on a tutorial and implement it.
  3. Once the tutorial is running like it should, I make modifications to it until I feel comfortable.

I can't guarantee that it will work for you, but it helps me a lot.

Mr. Will