B Tate

Author
+ Follow
since Aug 14, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by B Tate

The book builds primarily web based applications, but I hope that the techniques in this book go well beyond web-based development. It's primarily a philosophical book, setting core principles that are important to the lightweight movement in Java.
An alternative is to use Spring+Hibernate until EJB 3 becomes available, and then move to that standard. If you know that you'll want to be on EJB3, then the cleanest migration path is through Spring+Hibernate, or the JBoss group's preview technology.
Good question on pico vs Spring.

- Pico is a lightweight container. Uses dependency injection design pattern. Is very simple, uses primarily constructor based injection (though not exclusively).

- Spring is a lightweight container (with DI also). Uses setter based injection mostly (though supports constructor injection also.) The biggest difference is that Spring has helper classes to let you do things like remoting, declarative transactions, and persistence. You can add these services to POJO (plain old Java objects).

I hope this helps.

-bt
Good questions. I decided to write this book because I was not having much success as an EJB developer. You can read an article called "Don't Make me Eat the Elephant Again" at java.net, and that sums up the experience well for me.

- You can get the toc at the O'Reilly site. We actually have the preface on line there, and there are a few sample chapters at the server side as well. The core principles are simplicity, focus, transparency, foundations, and extensibility. We address each of these, and then measure Hibernate and Spring against those criteria, and then show an application.

- Definitely recommend Spring and Hibernate for enterprise applications. If your relational model is different from your data model and is highly normalized, you may get better milage out of Kodo JDO instead, but Hibernate is ideal for many applications.

- Read "Don't Make me Eat the Elephant Again" on java.net for answer to EJB 3. It's better, but a lightweight container plus, say, Hibernate, is better still for most simpler applications.

- Annotations in EJB 3 are overused. Combines too much metadata into the code that should be broken out, and also couples container with annotations.

- New API is very good move. See elephant article at java.net.
I'm guessing that you're talking about Better, Faster, Lighter Java. Our book introduces the lightweight development movement. We talk about process, team organization, and development practices. Rod's book talks more about the founding principles for Spring, a framework that's designed to build J2EE applications without EJB.

Both are important, though if you're already doing Spring and Hibernate, you should probably skip my book. Likewise, if you're doing EJB with a more traditional process, my book would be the better choice.

Thanks for your question.
-bt
Amazon actually has a pretty good cross section of reviews. People either love it or hate it. Lots of 5s, no 2s or 3s, and a couple of 1s. Most of the people who reviewed it as a 1 were either expert developers who already practice the principles in the book, or were looking for more of a Spring reference manual. But the reviews actually capture the spirit of the book well, both strengths and weaknesses.
We actually wanted to show the core values and principles behind the lightweight development models. We talk about principles like simplicity and transparency, and then show how some open source projects like Spring put those ideas into practice.

Often, people find that BFLJ talks about the process, goals, principles and buying habits of people who support lightweight development. Other books, like Rod Johnson's excellent J2EE without EJB, talk more about implementation. Many people buy both, and you'll find that Amazon frequently packages both together.

If you want to understand why Spring, agile processes, and automated unit testing are important, and if you want to understand ways to put those ideas into practice, then BFLJ is for you. If instead you're looking for more of a reference manual, you're probably looking for another book.

Take care.
-bt
Greetings. The JavaRanch book for the day is Better, Faster, Lighter Java. It's got a pretty good overview of Hibernate.

When you build applications, often you want to deal with your data as if it were stored in objects, instead of rows and columns like JDBC. This general strategy is called Transparent Persistence.

I like Hibernate because it's query language is closer to SQL than most other persistence frameworks. That makes it easier to learn, and also made it easier to build. JDO also has some excellent products, like Kodo JDO, and Versant's JDO implementation (used to be JDO Genie.)

The EJB2 model is pretty much supported for compatibility only from EJB3.0 forward. In fact, we're not quite sure what the persistence model will be, but it's likely to be closer to Hibernate or JDO (actually, the JDO expert group and the EJB expert group which has Gavin King, the Hibernate inventor), are working together to form the persistence standard for EJB.

I hope this helps.
EJB entities are better than they used to be, but you have to do a whole lot of implementation to abstract away the shortcomings:
- Transparency
- Query Language bind time (can't build dynamic queries at run time)
- model support (poor support for abstract classes, inheritance, etc)
I could go on and on. But if you're not like Bob, where you're roped into that framework, why go through the trouble? There are just better and simpler persistence frameworks out there in JDO (eg. Kodo), OJB, Hibernate, etc.
Antipatterns provide a faster way to learn. Good programmers know what to do; great programmers know this, and also what not to do. The fastest way to learn is to learn the syntax, then study good code (do both of these with a book like Effective Java or The Pragmatic Programmer), then study bad code (Bitter EJB), and only then, study design patterns. You should not study design patterns too soon, without also accumulating the knowledge about the problem domains that those patterns address.
With that in mind, it would be very much a good idea for Bitter EJB to be one of your first EJB books.
I hope this helps.
So...you've built in a couple of questions into this one.
One, what's the impact of open-source on J2EE technologies? Answer: Huge. Like Apache web server, it's just a matter of time before web application servers are just standard implementations. App server vendors will start to compete higher on the food chain.

Two, how do you see the adoption of J2EE? That's a difficult question. I think that we're starting to see a little backlash against full-blown EJB implementations. People are looking to adopt only the parts of the J2EE specification that provide simplicity and measurable, immediate impact. At the same time, customers are starting to learn how to adopt Java in much simpler ways. You simply don't need EJB, or many of the heavier J2EE extensions, for most applications.
Three, what role will an open J2EE have on J2EE adoption? That's an easier question to answer. J2EE is already everywhere. We're seeing an incredible amount of investment in J2EE.