Learning Java EE, jboss, etc - java

I've been doing "plain old java objects" programming for 10 years now, with Swing and JDBC, and I consider myself pretty good at it. But I start a new job in two weeks where they use JBoss, and I'd like to get a heads up and start learning all this stuff before I start. What are good resources? On-line tutorials, books, e-books, anything you can suggest, especially ones that don't try to teach you the basics of plain Java first.

For quick getting up to speed, you really need to master EJBs and JSP/Servlets. Those are the fundamentals of Java EE technology. The Head First series on EJBs and JSP/Servlets is a good start for what has usually been a mind-numbingly complex framework. Beware that recent Head First editions have switched to teaching the simpler annotation-based Java EE 1.5 frameworks. While the newer version of Java EE is simpler and better, you probably need to know the previous versions (Java EE 1.4 = EJB 2.1 and Servlets 2.4).
At this point, you've only dipped your foot in the water. I would spend a lot of time over the next year, reading up on Java EE technologies and more generally enterprise application development for client-servers.
a) You absolutely must understand data modeling, and databases. The best I've seen are by Chris Date, Steve Feuerstein (if you're using Oracle) and Joe Celko. The better Java EE developers can keep up with their DBAs in technical discussions about the database.
b) You do need to understand how JDBC works, and why ORM tools like iBatis, Hibernate and Toplink came about. Assuming you know how to write a JDBC DAO, then be sure to understand how Hibernate works.
c) You should understand how the layered architecture of a Java EE application. Core Java EE Design Patterns has prescribed typical practice, and it's highly likely that your upcoming project will stick to those patterns. That said, you should also understand alternative points of view on architecture. I've found Martin Fowler's Patterns of Enterprise Application Architecture and Rod Johnson's Expert One-On-One Java EE Design and Development to be valuable. The ideas in the latter became the Spring framework, and has settled into mainstream for how many J2EE developers prefer to develop their apps.
d) Then learn some of the frameworks that have sprouted up around the Java EEE ecosystem. While it's a philosophical question why there are so many frameworks, and which one is better, focusing on the frameworks your employer is specifically using is more than enough.

A couple of answers come to mind:
if "plain old java" is what you're used to, you'll probably need a grounding of plain old j2EE more than JBOSS specific stuff. I'd start with the sun tutorials, but being familiar with the general structure of servlets, the servlet api, is base.
as application servers go, JBoss is (my biased opinion only) insanely large and complicated. Think "launching the space shuttle" and you won't be far off. A million services. It is specifically noted for having an unusual class loader structure (although this may have changed since I used it last, about 1 -2 years ago), among other things. It also has an extensive list of nice services, like a JMX base (management configuration beans) although documentation is likely to be spotty, as support is a paid service.
Best suggestion- familiarize yourself with the J2EE libraries. Next would be to get a basic site running in JBOSS. More specific stuff that you might want to do is likely to be very specific to their installation (e.g. there's a JMS implementation available in there but they may not be using it) as I've seen people use it for nothing but a servlet container.

i would suggest readin a book like Jboss at work
http://oreilly.com/catalog/9780596007348/
We use jboss too at work.. and i read this book and found it useful..

Sounds like me (though definitely not with 10yrs of exp). I started with Head first series for servlet/jsps. I already knew what they were meant for. If you have a good grasp of design patterns and OOPS, Ejbs and other resources would be a piece of cake, Concentrate on why they are, how and what to do can wait. App servers are a different beast, however, going through the admin manuals helped clarify quite a few things. SSL/Certificate stores/Clustering can come at the end of the list. You would also like to learn about ORM tools like Hibernet; alternative view technologies like Wicket, Tapestry etc; Containers like Spring and libraries like struts all can be learnt slowly. The best practices and review posted all over internet definitely help.
The choice of what order to follow, shouldn't be that difficult, as the work place dictates the technologies most of the time.Just remember, J2EE is a bunch of specifications and frameworks are essentially supporting libraries that are targeted to a specific group. It is the designer/developer who holds the key

Learn Enterprise Java Beans

Related

do seam and weld in java 7 obsolete Spring? Is it still worth learning Spring?

Ive heard bits and pieces about Seam and Weld in Java 7, and am trying to figure out how they relate to Spring. Any pointers to good references appreciated.
Spring might some day become obsolete for new projects. Still, in the last X years almost every Java EE project was done with atleast a bit of Spring technology (in my experience), so there is a lot of software out there running Spring ( I am currently on a project which uses Spring 2 ) and that isn't going to change in the near future. Corporation don't change a running system just because the new Y technology is out. (As all the COBOL software laying around painfully demonstrates)
So to directly awnser your question, I believe that Spring knowledge will remain a must for many years to come.
No. As others have said Spring is more than DI and is established.
The reality is there are three entities competing (and in some cases working together) for more users/developers.
VMware aka Springsource
Redhat aka JBoss, Seam and Weld
Oracle aka Glassfish
I would like to believe that each one of these companies doesn't have an agenda but the reality is they do and they want you to use their technology. You'll often see developers (employees) of each project vehemently trash the other project. Avoid this and make your own opinion by trying each.
Spring is much more than dependency injection, although DI is at its core and many people receive no more of it.
I worked with both Seam and Spring and found a surprising number of things possible in one, but not the other. They do not cover entirely the same area. Where they do, they are both viable alternatives. Spring is actively maintained. I cannot see it die anytime soon. That was the answer to your question heading.
To address the body of your question: Sorry. I’d be interested in a succinct but in-depth comparison as well.

recommendation for choosing a new web development stack

I work in a medium to small team ( 10 people ) developing and supporting several web enterprise applications.
We have a dozen of them built with a house-made framework with asp-classic working against ms-sql server.
We are evaluating the migration to a new development stack.
We'd like it to be open (free) and simple.
I've been looking around the java web frameworks, but all of them seem to be extremely overbloated for our needs (with the possible exception of http://www.playframework.org/, which I couldn't study yet...)
We are thinking about porting our own framework to this new stack, rather than adopting a whole new stack that we are unaware of ...
so far now, we though about the following possibilities
plain java - jsp - jsf
groovy - gsp (no grails at all)
jruby (no rails at all)
we feel really comfortable working with dynamic languages (well, as dynamic as classic asp can be) and with a lean and understandable framework...
I see no small and simple web frameworks for java, like there are for php or ruby...
I really like groovy, but I see no web implementations outside of grails... Besides the language documentation doesn't seem to be quite complete (I might be looking in the wrong place, perhaps)
php could be an option, but I think it would be hard to advocate for it in my current work...
any other option, advice, pros and cons?
thanks a lot
--
edit
some related link Can anyone recommend a simple Java web-app framework?
I'd suggest you take another look at Grails. It does use hibernate and spring under the covers, but for most situations, you don't need to know the details of those frameworks. There's a large community and lots of documentation/blogs/mailing lists for support, as well as a thriving plugin community with over 300 plugins solving pretty much any need.
If you're still put off by grails, you could look into the play framework. I don't have any experience with it, but there has been some traffic recently around it on hacker news and the like. I know it uses groovy for the templating language.
I cannot recommend anything, but strongly recommend that you consider these things:
Rapid development. Basically you want to save a page file, and reload it in the browser. Instantly! It can be done, do not settle for long deployment times.
Plain, readable text files!
Convention coding instead of explicit coding - big XML files will eventually drive one or more developers insane. The less, the better.
Good tool support (just having syntax coloring may be a big help)
Consider the long term support of your choice. You are basically remarrying with your software - will it still be maintained in 10 years? By whom? Will you have alternatives (JSR's are great - look at the amount of servlet engines)?
And WHEN you choose - get the source code for it, and ensure that it builds correctly. It will never be easier than now, and some day you WILL need to fix something inside. On short notice! (You may even consider allocating resources for donating documentation/patches/time to the open source project you are building your business on).
EDIT: A few more things:
You want to be able to verify things at compile time. One of the things that make it possible to build cathedrals in Java is that the static typechecking prevents a lot of nasty runtime errors. "Oh, THAT method? Well, it's not here, sorry. Boom!"
You want good error reporting. Built in! Try throwing a NullPointerException deep, deep down and see what 1) the user and 2) the developer is told about it. Anything that requires going to a log file to get the details WILL cause calls at 3 AM eventually.
Look into scalability from the start. Any non-trivial customer will need to and the world goes to multicores, so you might as well think about it already now. What will you do when all the magic pixie performance dust has been used and it just isn't enough: The application requires more than a single box.
And read this: http://www.pragprog.com/titles/mnee/release-it
You're forgetting about the other major player in this field: the LAMP stack (linux, Apache, MySQL and mod_perl). All components are free, there are many books available on LAMP development and each of these components, and there are vast numbers of libraries and components already available.
Apache: the Definitive Guide
Learning Perl: by SO's brian d foy
Practical mod_perl
If you are afraid of Grails and need Java, try Stripes and read the excellent Stripes book (http://www.stripesbook.com/blog/). You can buy the eBook pdf for $23. The book covers the framework in amazing detail. Stripes is a very strong, lightweight MVC framework that deals with all the common problems of web development (templates, url mapping, form validation, security, internationalization, testing) but it won't automagically create the database layer for you unless you want it to by using Stripernate. You can also use Groovy with it. You can use it standalone or with Spring.
I've had great success in simple web projects using Spring MVC with JSTL JSPs. Spring MVC is a framework that can be kept pretty darn simple (1 additional XML file used for configuration). You can eschew all the fancy options and just specify a set of JSPs that you want to associate with view names, then forward to those views by specifying their names in the controller.
Spring MVC can also easily scale up and be as complex as you need, letting you switch from JSTL to JSTL with Tiles, or Struts, or JSF, or Wicket. It can also handle complex web flows using the Spring Web Flow project. But for most projects I just keep it simple -- build a JSTL JSP, create a controller that provides the objects that JSP needs, and associate them by having the controller return that view. Once you get the project set up and you're familiar with the configuration, it takes maybe a couple minutes to wire a new page into place.
If you like Groovy but don't like Grails you could try Gaelyk, which is a lightweight Groovy framework. However, AFAIK you can only use Gaelyk if you're hosting the app on the Google App Engine
If your apps won't be hosted on GAE, and you really don't want to use Grails, another option is to use Groovlets, Groovy template servlet, GSPs.
However, personally I think it's a big mistake to dismiss Grails. It really is a great framework, and you can go a long way without knowing much about Spring and Hibernate. One of your complaints is a lack of Grails documentation. I think you must have been looking in the wrong place, because in addition to all the books available, there's a very extensive reference document and a lot of other documentation available on the website. Finally, there's a very active mailing list.
My platform of choice is JRuby - Rails (3) because of its very rich and powerful ecosystem, but mainly because:
* very easy to use
* many MANY libraries
* fast support via IRC
* deep documentation
You can also check out Scala + Lift Web Framework ( imho best static typed language, nice framework )

.Net vs Java Jobs [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 9 years ago.
Improve this question
When I do a job search for a .Net developer it's all mostly the same stuff .Net, ASP, SQL Server, CSS, Javascript, AJAX, and maybe C#. Whereas with Java you may have to have Java, Sturts, Spring, JSF, EJB, a RDMB, Eclipse RCP, CSS, Javascript, AJAX, Rest, any number of specific Java APIs. Is it easier to be a .Net developer since the technologies are so focused? Or does it just seem that way?
It's different, rather than easier.
The reason the Java jobs are listed against frameworks is becuase Java has tons of frameworks and design patterns ready to be used to make things easier to maintain. The design patterns and frameworks are starting to appear more in .NET now too, so expect to see jobs changing to look more like those Java jobs.
There are just as many patterns and practices in both worlds - but they are more established in the Java community (the Java employer will push them onto you, you will find yourself pushing your .NET employer).
Largely, Java vs .NET is syntax. Do either (do both!). But be aware of the patterns and frameworks as they'll really help you to write better code.
I'm a C# developer, believe me, there are more choices in Java than in .Net. The obvious advantage in .Net, though, is that in any job you land uses the same IDE (Visual Studio) and (in most cases) uses the latest .Net framework (except for maintaining legacy apps). There may be some subtle differences in different employers such as them using Enterprise Libraries, MVC versus Forms, WPF, etc.; But if you're a seasoned C# developer, you can adapt easily depending on your fundamentals.
Some developers in my field who did not learn any other programming languages tend to be lazy and simply drag-n-drop objects to accomplish tasks 80% of the time (some of them even believe that object-oriented programming is simply code with objects). If you are familiar in C++ or any C based language, you will definitely have the upper hand but that is not a requirement.
I'd suggest learn the best programming practices, never put all your eggs in one basket (even though god did that to us men), and be open to other languages other than C#. If you learn one C-based language, learning other major languages won't be as hard rather than starting with VB.Net.
Either way, both of them are well paying jobs and you won't regret if you choose either one.
my 2 cents.
Yes, with Java you have web frameworks like JSF, Struts, Struts2, Wicket, SpringMVC, Stripes, Tepestry, Facelets .. just to name a few. Every company is using different frameworks, so if you change job you will learn new frameworks. And its only web framework, what about persistance ? JDBC, Hibernate, JDO, iBatis. Who can name 5 mocking frameworks for Java? Who have used 5 different application servers? What about databases? Ive even used Informix and Teradata. I think all .NET is using Sql Server and its easier to learn one database well.
Please don't forget about the following .NET technologies: Win.Forms, Silverlight, WCF, WPF, WWF... There are still a lot of learning in .NET outside of web development. It is not easy to be a senior .NET developer, at least not much easier then Java. However, IMHO it is easier to start in .NET when you have no past development experience.
In Java world, you develop with technologies from many communities, in .NET world, you only work on technologies from Microsoft. In my opinion Java developers are more free in terms of choices of technologies, but sometimes it also brings you problems. :)
Java itself has more fields coming into it; I mean, Java developers have now more opportunities than any other technologies in the market. They are being hired at attractive compensations to develop different java-based applications, software and games etc. It will continue to be increased in future as well. Just stick with JAVA :)
Let's line up the technologies you mention (and some you don't). This will necessarily be somewhat imprecise so will be a nitpickers paradise :)
.NET Java The overall encompassing technology
ASP Struts A Web development framework
JSF
(.NET BCL?) Spring An application development framework
EJB
SQL Server an RDBMS A database
(VS) Eclipse An IDE
CSS, Javascript, AJAX, REST are all technologies common to both stacks.
The technology concepts you have to learn are the same whatever stack you choose - it's just the names are different. The .NET ones will all be 'Microsoft Blah Blah Blah', whereas the Java ones will all have funky cool names...
Something else important to consider is that you can get "branded" as a .NET or Java developer midway into your career. At that point, it becomes more difficult to switch, since (understandably) you have less experience in the one you didn't choose. Thus far, I have been alternating, but that comes with its own set of problems where you have gaps in experience with new libraries/frameworks on each side.
Any other thoughts on the pros/cons of developing Java vs. .NET? For instance, what types of companies, cultures, pay, etc?
For me, it seems like .NET tends to be in more established companies whereas Java is used by a lot of startups (given the low cost entry and open source libraries available). The pay is comparable, but .NET seems a little higher. Java development might be a little more fun given that you get to play with new frameworks more often and aren't as restricted to specific paradigms.
In talking with my .Net pals, it seems like getting started on something pretty standard is easier, because most people do things the Microsoft way. Java's large number of choices means you have to pick libraries and toolkits at many different levels. The upside for Java is that when the official or common way doesn't suit you, there are a lot more options available.
In practice, I don't think it makes much difference. Any single Java shop will generally settle on one particular thing. E.g., Struts or Spring or JSF, not all three. Hibernate or Ibatis or pure JDBC, not all three. So I think there's about the same amount of stuff to learn, in that whether you're using a Java stack or a .Net one, you're still solving roughly similar problems.

Switch to Java from PHP/Ajax in 45 days (or so)

Because of the nature of new project we are about to start, I need to get into Java world rather quickly.
I have about 8 years of PHP experience, and about 3 year in Javascript.
(CI, Kohana and my own MVC framework)
I have solid knowledge of OOP (as much as you can get from PHP/JS and little ActionScript & python here and there)
So instead of learning from scratch, i was thinking to grab some web framework (at the end, project will be web based) and learn java along the way. Java code it self don't seam too strange, and i have solid experience with MVC in php so the whole concept makes sense to me.
So I'm looking a list of instructions on how should I learn Java.
(and not to spend too much time on things that are not so important)
Also you can suggest framework, from what i seen, struts looks nice, spring too, but it seam that it have too much XML configuration...
Start with a good book. I always found Thinking in Java pretty good, besides there is a free online version available. Skip the things you already know. Well you probably know what an object is and so on...
Next thing learn to use a good IDE. Have a look at Netbeans, IntelliJ IDEA or Eclipse. Java without a proper IDE is useless.
If you transit from PhP you are probably going to develop some Web applications? This is a steep learning curve. JavaEE is big, complex and it takes a while to dig into all those frameworks. Propably you end up saying "Why is this so complicated, I can do it much easier in PhP". You will be right about that.
Can't give you a good recommendation about the frameworks that are suited best for you. We use Seam + Richfaces. Not that hard.
If you're switching from PHP, and looking at Web frameworks, then I'm assuming that you intend to continue Web development in Java. In that case I would spend a little bit of time on the Java Tutorials, then get into a book on Web programming in Java, like Head First Servlets and JSP. I think it will be a lot more focused on what you need than more general books on the Java language.
(source: oreilly.com)
I also find that once you learn the basics of servlets, JSP, and JSTL, it becomes much easier to understand any of the different Java-based Web frameworks.
None of them required extensive XML configuration anymore, those were the old days.
I will suggest you to grab Java concepts, anyway. Grab a good Java book to learn it along the way, as you said. Thinking in Java is good to go, but its just about core java and concepts. For java web you might want to look into Servlet and JSP basic, which you can learn using official J2EE Tutorial from Sun.
For Java web framework, there are plenty. But I would suggest you something you are already familiar with. You are right MVC based Java framework. Struts and Spring both are MVC frameworks and give you are clear separation of layers. Spring is a giant in itself, it has the answer for almost everything, that might confuse you in the start. Struts 1 is already outdated, and Struts 2 has a very tough competition.
I would suggest you to look into Wicket. It just a web framework, unlike Spring, and a very well written and easy to grasp.
Its a tough task, I must say. Lets see what other has to recommend.
Good point, nooomi. I would suggest Netbeans, its much more intuitive, and sleek.
IntelliJ is amazing, but commercial and not free.
Eclipse is not my type, lot of other folks are quite happy with that. You might find it good too.
So I'm looking a list of instructions
on how should I learn Java. (and not
to spend too much time on things that
are not so important)
I liked Head First Java, but I know some find the format offputting, and experienced programmers probably find it a bit simplistic, the SJCP Study Guide by same author (Kathy Sierra) goes more in-depth while keeping playful tone. There is of course the Java Tutorial online where you can get a quick overview of the main parts of the platform. Effective Java is a good "best practices" book once you have gotten the hang of the basics.
Also you can suggest framework, from
what i seen, struts looks nice, spring
too, but it seam that it have too much
XML configuration...
Another vote from me for Wicket as web framework. For persistence/db part, I recommend you look into iBatis before trying Hibernate. This is a "sql query" oriented framework rather than object-relational mapping, so it will probably feel more familiar to you. I haven't used it yet myself, but from what I have heard it probably has fewer "gotchas" (with regards to caching, performance etc) than Hibernate too.

How Popular is the Seam Framework

I'm using JBoss Seam Framework, but it's seems to me isn't very popular among java developers.
I want to know how many java programmers here are using it, and in what kind of projects.
Is as good as django, or RoR?
In our JBoss Seam in Action presentation at the Javapolis conference last year, my colleague and I said that 'Seam is the next Struts'. This needed some explanation, which I later wrote-up as Seam is the new Struts. Needless to say, we like Seam.
One indication of Seam's popularity is the level of traffic on the Seam Users Forum.
I have used JBoss Seam now for about a year and like it very much over Spring. Unfortunately, I don't use this at work, more for side projects and personal projects. For me, it saves me a lot of time developing new projects for clients. And, one big reason I use it primarily is, the tight integration with each layer and I never get any lazy load errors that I used to get with Spring (even after the filter and other hacks).
An equivalent Spring application would have much more boilerplate code within it to get stuff working. Spring does not integrate each layer very well, it more or less is a wrapper for a lot of different things, but doesn't glue itself together very well.
The other nice thing I like with Seam is they practice what they preach. Take a look at their website. Take a guess what it is running, hmm, a live example of their code. Seam Wiki, Seam Forums, etc. If you truly believe in your code, stand behind it. I would be happy to have their pager 24x7x365, I bet it rarely goes off.
While you write a lot less code, the learning curve is about twice as steep. The further I get in, the more I understand how to write good code. I would like to see more comments, but as far as coding style, it is well written.
On the negative side, just as any product you try to market, Seam was years after Spring had already become popular so Spring is by far still more popular. Search on Indeed and Seam only has a few hits. If you look on Spring, there are roughly 40k registered users, while Seam has about 7k.
Depends on what is important to you, as a Java developer/engineer/programmer, you should be able to work with both technologies and chances are, you will most likely encounter a Spring application before a Seam one. Learn both and how to leverage both. If you use both properly and know the nuances and quirks of each, development becomes much easier whether you're using Spring or Seam.
I don't agree with the statement, "Seam is the next Struts". Struts was a view technology whereas Seam integrates all layers. I will agree that it is a new concept like Struts and will bring the same impact to the Java community that Struts did. I don't think we'll see that until Java EE 6 and CDI become more popular, and of course Seam 3 is released.
Walter
Seam is fixed JSF based on annotations. No more crappy XML. I used it at work.
Hope this helps a little, but at my college our web applications course just got revamped. So now we are going the jsp, servlet, hibernate route with the second part of the course on mostly JBoss Seam. So who knows, it probably just needs time to grow in the community.
It really works for us....JSF+EJB3.0 with the help of seam framework is really fantastic.But i have a question...why this is not becoming more popular for developing large scale application.I have seen that many are using other frameworks for developing large scale j2ee application.It seems to me that seam really helps the developers to build a j2ee application...but still ...why this but coming in?
I like Seam, have been using it for the past year professionally.
However, the question concerns its popularity. I can see the following indications that it is not very popular (at least in comparison to plain JSF or Spring):
Its forum is very inactive (at least at this point, they are working hard on Seam 3). http://seamframework.org/Community/SeamCommunityForumSlightlyInactive
You can also take a look at its comparison with Spring in Google insights for search: http://www.google.com/insights/search/?hl=en-US#cat=732&q=seam%2Cspring&cmpt=q
I only know one other company here in Athens where they use it, and I know a handful of companies that use plain JSF, Struts or Spring (of course, Athens is not representative for all the world).
I would say that seam is a rather popular framework, it has great documentation, a great and helpful community and a forum with many many questions and problems answered.
It should be popular among developers who use jsf beacuse it works great with jsf, but not only that... it fixes jsf in many ways (s:convertEntity tag, and unified component model are my favourite examples).
We have been using Seam for a while in huge projects.
Easy to kick-off a new project, reverse engineering is very handy.
I have used JBoss Seam on two commercial projects for two different clients. Yet JBoss Seam is still a new approach to developing JSF Web Applications. One measure is the results from a Indeed Job Search.
Indeed Job Search
When Java was introduced in the 90s as oak the community did not embrace it because it was too powerful for its time and was appreciated later on and is now running the show. Seam will get popular soon. if not it can be rebranded just as oak to java.
I have been using Seam from Seam 1.2 since 2007 in mid-size and large projects, sometimes in small projects no more than 200 users. My main concern is the productivity. Although my team has already gained obvious productivity from Spring since 2005, for some tricky clients developers have to code javascripts which is time consuming and error-prone. Seam was really helpful in this scenario because at that time most developers in my team had no experience with JSF. Happy to see Seam being more popular.
Seam has been discontinued in 2012. However, Apache DeltaSpike is the modern version of Seam, and this project is actively maintained, and it even won the 2014 Duke's Choice Award.

Categories