Rapid J2EE Development 146
Rapid J2EE Development: An Adaptive Foundation for Enterprise Applications | |
author | Alan Monnox |
pages | 395 |
publisher | Prentice Hall PTR |
rating | 8 |
reviewer | Pankaj Kumar |
ISBN | 0131472208 |
summary | A telescopic view of tools, techniques and processes for boosting Java software development productivity |
"Using a Hole-Hawg for the job of a homeowners drill can have deleterious effect on productivity by causing serious harm to the health of the inexperienced operator." Just identifying a tool for a task is not enough. You should also be able to match the demands of the task to the characteristics of the tool and your ability to handle the tool. The good news is that this book passes even this stringent test, suggesting very practical and hands-on approach for choosing the tool with right characteristics for the specific demands of the task.
The ever-growing body of literature on development best practices, the burgeoning ranks of supporting tools and the accompanying debates on their relative merits can easily overwhelm most practitioners. Worst, a large chunk of the developer community may never spend the time and effort and miss the opportunity to take advantage of them altogether. Rapid J2EE Development offers an easy path to such Java developers by bringing together a number development techniques, best practices and description of supporting open source tools in a single book.
Whether you are a confused Java developer, overwhelmed project leader or plain lost manager, this book has something for you. Wondering about how to design complicated class hierarchies to encapsulate the ever-changing business rules? Worry not, follow the advice of Chapter 10, "Working to Rule" and use Jess, an open-source Expert System Shell. Don't have the time or motivation to download and play with it? No problem. The coverage includes not only an overview and discussion on when and where to use it but also presents a sample session and illustrative code snippets.
If you're confused with all the hype around AOP (Aspect Oriented Programming) and uncertain about where to start, start with the chapter "Aspect Oriented Programming," which introduces the notion of crosscutting concerns in any large software project, presents the AOP terminology to nail down these concerns and associated actions, and covers AspectJ and AspectWerkz to apply AOP to your projects. The brief description of these tools may not answer each and every question, but the example- and code-driven approach will certainly make you feel a lot more comfortable and motivate to explore further.
Not able to decide whether to use XP (Extreme Programming) or RUP (Rational Unified Process) for your next project involving four different development teams in three different continents interacting with as many customer groups? The Chapter "Embracing Adaptive Methods" outlines an approach to making such methodology decisions, though it is not very obvious from the chapter title. (Of course, you will have to read the sections that talk about when XP works best and when the rigors of RUP start paying off to make your decision.) And although there is not much discussion around mixing elements of development methodologies or adapting them in the middle of an ongoing project, the author's account of a real case study does exactly this.
These are just a few examples. Other topics covered include use of UML for modeling, code generators, Model-Driven Architectures, Java-based scripting languages, Object Relational mapping, build and test automation, and use of the right IDE plug-ins for J2EE projects. Among the development tools, all the usual suspects are there: Apache Ant, Eclipse, Jython, JUnit, HttpUnit, JMeter. In fact, I also found description of tools that were somewhat new to me: MyEclipse, AndroMDA, Middlegen and few others.
I found the book to be highly readable, insightful and loaded with the right kind of details. For example, the information on debugging with Eclipse explains how to configure a J2EE program for remote debugging, and how to debug a Web application using JSPs, something that is quite hard to do without the right tools and the right methods. Even the UML primer, with its well-chosen examples, is a good refresher.
It is easy to get superficial when covering a lot of ground: a common pitfall for authors of books on new technologies is that they themselves get caught up in the hype and lose perspective, but Alan somehow manages to keep the extraneous stuff out and deliver what a hands-on professional looks for. He tempers his zeal with practical realities and conveys the same to the reader with anecdotes and discussions with colorful stories such as the Cargo Cult Software trap and Christmas Puppy Syndrome.
The book manages to introduce a number of the very best open source Java tools available to boost productivity in a very natural manner and with the appropriate context, and it succeeds in giving a "feel" for the tool by presenting hands-on sessions. Most other such efforts that I am aware of usually end up being a drab list of tools with descriptions taken from home pages.
Given the number of topics and tools covered, it would be unrealistic to expect in-depth coverage of everything. What this book does is to create the right context, introduce the appropriate topics, and generate sufficient motivation to explore further. Fair enough. In fact, I believe this is the best approach for any book in this "Google era" -- the book should tell what you should look for and let Google do the rest.
So, is there anything not to be liked about the book? Well, I was a little disappointed to not find my favorite BeanShell among various Java scripting alternatives. Another thing I noticed is that the coverage of system manageability issues, especially in a book with J2EE in its title, was quite conspicuous by its absence. Also, some of the points, especially those around use of best practices and development techniques, could be made more emphatically with help of focused and concrete anecdotes.
Of course, no book can cover everything, especially on topics that are open-ended by nature. Overall, I think it does justice to the subject matter and is worth reading by anyone even remotely connected to the business of creating, maintaining or operating Java/J2EE software.
You can purchase Rapid J2EE Development from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
What's that humming? (Score:5, Funny)
Re:What's that humming? (Score:2)
Aye, and what's this... the "hole-hawg" example? Now I know I've seen this in some other authors book. Was it Neal Stephenson's "In the Beginning was the Command Line"? I think so!
Re:What's that humming? (Score:2)
I liked playing around with Java and JSP. But I hate J2EE, it makes the simple so damn complex. I think very few people understand it inside and out, and most people just use the buzzwords. When I was studying J2EE, I started with EJB's, moved on to JNDI, and on and on and on. It never ended. My brain finally could take no more, and I went back to HTML programming and database sql contracts. When you learn SQL, you can work just about anywhere
Re:What's that humming? (Score:4, Informative)
HTML and SQL is definitely effective for some jobs, but a total mess for others. I worked with a company whose commerce site consisted of ASPs that really did very little and HUGE SQL stored procs (multiple thousands of lines of spaghetti) that only one guy could really change. Thankfully, they threw it all out for a more rational solution.
It's true, J2EE might be considered totally obsolete tomorrow if something incredibly powerful and useful comes out, but that's true of any technology, including HTML and SQL. Remember, there was DB technology before SQL. But beign obsolete doesn't mean it won't be used of course...I still see a lot of Fortran and COBOL out there.
Re:What's that humming? (Score:5, Interesting)
Where I currently work, EBJ was attempted and 6 months later completely gutted and removed, the performance, complexity, tediousness in deployment, and lack of people who know it well were the biggest problems (and this is a place with almost 1000 java developers). At first it seemed like it would work well, allow separation of business and presentation and allow persistence; that's what you get on paper, in real life it is too cumbersome to work with.
I think EJB is going to go the way of CORBA (into the great code graveyard), nice in concept but not very useful when you take your idea from the lab to the real world.
Re:What's that humming? (Score:3, Interesting)
JSPs are servlets really. All your servlet engine does with them is compile them for you.
3-tier setups work really well for separation of concern. You can clearly do that
Re:What's that humming? (Score:1)
IMO the only EJB worth talking about other than MAYBE statelss session beans.
However, having said that, I also would like to point out that one of your main problems DOES appear that no one knew how to use them, so any project was doomed to failure from the beginning. You and your team should have probably done a few 'toy' applications first, to get a feel for the technology, then once you've built up a bit of experience, tackle a real project. Of course, this is in t
Re:What's that humming? (Score:2)
Re:What's that humming? (Score:2)
Re:What's that humming? (Score:2, Insightful)
This is one thing I don't understand. People believe that J2EE is the be all end all solution for everything and it's not. If you have a basic site that requires minimal dynamicism then J2EE is not always the right solution - I would purely recommend PHP. If you are using messaging, require flexible reusability, modularity for a distributed system then I would recommend J2EE.
A simple e-commerce website needs no more than say 3 base services: database conn
Re:What's that humming? (Score:1)
This sounds like that "Locusts" movie they are airing on television this week.
does not cover Spring I suppose? (Score:4, Informative)
The most important J2EE Bean of all (Score:1, Insightful)
Re:The most important J2EE Bean of all (Score:2)
Simple and fast servlet solution? Seriously, what does that mean?
Re:The most important J2EE Bean of all (Score:1)
Re:The most important J2EE Bean of all (Score:3, Interesting)
Re:The most important J2EE Bean of all (Score:1)
I've wandered around the documentation, and, as far as i've read, it seems to be possible to use hibernate to map object on tables , but also to execute direct sql queries. All queries can be externalized to a xml ressource, so that should meet your nowadays requirements.
Re:The most important J2EE Bean of all (Score:2)
Re:does not cover Spring I suppose? (Score:2)
I'm confused (Score:3, Interesting)
Re:I'm confused (Score:3, Interesting)
I'm confused too (Score:2)
Re:Dear god, the link (Score:2)
http://www.epinions.com/hmgdToolsCordlessDrills AndScrewdrivers9BlackBlackDecker72vVers apakCordlessDrillKitWKeylessChuck
Rapid is a a bit of a misnomer innit (Score:3, Interesting)
RAPID J2EE?! (Score:5, Funny)
Geezuz.
Re:RAPID J2EE?! (Score:1)
1. Get project
2. Offshore work to Indian doctor [washingtonpost.com] for $4/hr
3. Profit!
Re:RAPID J2EE?! (Score:2)
Jess is not open source (Score:3, Informative)
Even though Jess costs less, it is not open source and I'm not sure even if the source is available for the user.
I've used Jess and it's good but if you're looking for open source rule engine, the only real credible rule engine for Java is drools [drools.org]. I don't think that drools is anywhere near Jess (since Jess has been around a while and jess is compatible with CLIPS) but drools is the most promising one.
BR,
~A
Re:Jess is not open source (Score:1)
"Note: Jess is not licensed under the GPL, the LPGL, the BSD license, or any other free software or open source license. Redistribution of the Jess source code under any free software or open source license is prohibited under this agreement."
Nothing new in here (Score:1)
Right now I am the only one from the development team that has not left the company and the only one who dares to enter that damned project.....
ColdFusion? (Score:5, Interesting)
Using CF, you can develop quick & dirty web apps & webservices, talk directly to Java objects, and (starting in CF7) make your own EAR package and deploy it under any J2EE compliant server.
CF can run under most J2EE servers and as such supports advanced clustering, load balancing and the like.
Again, i know CF isn't for everyone, but I've found a real use for it at our shop. It's possible to deploy quickly, perform quick maintenance, etc.
NO, I do not work for Macromedia nor am I a fanboy. I'm just touting.
Gentlemen, start your flame engines.
Re:ColdFusion? (Score:5, Funny)
Suuuure, if we want closed, bloated technology that's controlled at the whims of a single company, as opposed to Java which... is....
Nevermind.
Soko
Re:ColdFusion? (Score:1)
Re:ColdFusion? (Score:2, Interesting)
try.
please.
Re:ColdFusion? (Score:2)
Re:ColdFusion? (Score:1)
It's great when my company pays for the licence.
In all seriousness, my company feels as though the time saved on actual coding is the driving benefit. This offsets the cost of additional developers and as such, the initially high price is cushioned.
It'd be great if someone wrote a CF -> PHP compatibility layer so that firms can migrate from the expensive CF servers. (actually an open CF server ru
Re:ColdFusion? (Score:3, Informative)
Coldfusion is quick to develop in and as capable as anything else on the market today. Have the Java coders do some heavy liftin
Re:ColdFusion? (Score:1)
Re:ColdFusion? (Score:2)
"How does ColdFusion MX 7 run on other J2EE application servers?
The ColdFusion MX runtime environment is a Java application that takes advantage of the many powerful services in the J2EE platform to connect to databases, manage security, and process application requests. When ColdFusion MX 7 Enterprise Edition is installed in the J2EE configuration on top of a Java application server, it uses that server's J2EE infrastructur
Re:ColdFusion? (Score:2)
Re:ColdFusion? (Score:2)
The questions are based on real problems that I had in my work, there may be other aspects to consider.
Re:ColdFusion? (Score:2)
Re:ColdFusion? (Score:1)
Just because
Re:ColdFusion? (Score:2)
Re:ColdFusion? (Score:1)
Re:ColdFusion? (Score:1)
Now that many CMS people and others wanting RAD are using it more and more, Adobe won't mess with it (If they know what's good for em).
Also, CF7 has some wicked pdf exporting & reporting support. I can only hope this will improve once Adobe gets their shitty fingers all over it.
My gut instince is that the biggest victim will be Dreamweaver here. I used to develop with
Re:ColdFusion? (Score:1)
Re:ColdFusion? (Score:1)
yet.
Re:ColdFusion? (Score:3, Informative)
Also, ColdfusionMX _IS_ Java. At version 6, they ditched the old C-based engine and built the new one in Java. You could say it's basically a custom tag library at this point.
Actually, you could say it's the BEST custom tag library for Java on the market right now.
I don't work for MM either, but when you can build a project in 150 hours using CF that was originally estimated at 1500 hours using another language, you tend to be a bit of a
Re:ColdFusion? (Score:2, Funny)
haha
in hex it's #FA6B01
Re:ColdFusion? (Score:2)
Re:ColdFusion? (Score:1)
would this even be possible, or would MM be able to stop it?
Re:ColdFusion? (Score:1)
As for a Java implementation... One of the strengths of CF is its awesome Java support... very cross-platform, very clusterable, very standard, very extensible. This would all have to happen before anyone could take it seriously.
to answer your question... err... i dunno.
ha
"Free" ColdFusion (Score:1)
Thankfully that decision was overturned 8 months later, but by then an Open Source CFML engine was well underway and Struts, the JSTL & their like were proving their worth.
That Open Source CFML engine later became New Atlanta Software's BlueDragon [newatlanta.com].
They have 4 versions:
Server - free even for produciton,
Re:ColdFusion? (Score:1)
ColdFusion MVC Frameworks (Score:1)
Model-Glue [model-glue.com]: MVC for Object Oriented CFMX
MVC with Fusebox [halhelms.com]
MVC with Mach-II [devx.com]
And if you're using CFMX J2EE: Streamlining Application Development Using Struts in ColdFusionMX [macromedia.com]
What kind of problems are you having?
Re:ColdFusion? - MVC options (Score:1)
Re:ColdFusion? (Score:4, Informative)
The only way cold fusion exists today is it's syntax - ultimately your programming JSP's.
Also considreing you can buy the CF syntax T-Shirt which has every tag on the front of the shirt upside down so you can just look down and find what you want.
The right tool? (Score:5, Funny)
Rapid for J2EE (Score:4, Funny)
A "rapid" J2EE project is probably about 8 months long.
A "rabid" J2EE project, on the other hand...
Methodology Schmethodolgy (Score:5, Insightful)
Why why why why why to books on rapid enterprise development cover methodologies rife with process and reading-knowledge experts?
Once upon a time we did something called "rapid prototyping". It worked for most enterprise apps where clients and analysts didn't know their a-holes from their L-bows. Then we were told that "iterative software development is programming by trial and error
Then there is a total rebellion by the artists and untrained IT masses, who instead of blaming middle managers with NO expertise architecting, designing, requirement gathering, that instigate zillions of Death Marches - we get peer programming - that pushes back-seat-driver development coupled with accountability (decrease in hours playing Solitaire.)
Somehow more unrest leads to test driven development where you don't try specify every little detail but have a big picture and manage risk (Agile).
Guess what. We're right back to iterative development! But now we got all kinds of fancy labels to attach and heroes to worship.
Common sense and been-there-done-that became Design Patterns.
CR became Programming by Contract.
And all this while the big companies we work for are hell bent on outsourcing us all because "You IT/IS types consistently screwed up projects for years... so we'll give it to someone who knows better [in 3rd world country of choice.]"
The point of my rant?
The best rapid development process is done by experienced people, not by process.
Process doesn't write programs. People write programs.
Re:Methodology Schmethodolgy (Score:2)
Cheers,
Ian
Re:Methodology Schmethodolgy (Score:2)
To get stuff done projects need Good People. Good People cost lot's money and are in short supply. But, instead of limiting the projects scope and using "Good People" companies try to find ways to use / manage less knowledgeable people. This seems to work for a while until projects stall as the amount of manpower it takes to get anything done increases exponentially. At which point the project either fails, or act's as a somewhat working demo for the next project. See Windows ME > Win
How does Windows XP even get written (Score:2)
I don't mean from a process standpoint and PERT charts and waterfall diagrams and all of that. And I can understand things that at least started out as one-man operations for gifted persons (Cray computers, Linus and Linux, etc). But even if there is a head XP guy who has a roadmap, the dude has to
Re:How does Windows XP even get written (Score:2)
If you REALLY want to know, M$ has a 'provincial model' about pieces of the OS. That means various groups have ownership of some bit of functionality. Each group has a project lead that may or may not be the project manager (usually not tho.) The lead works with the manager to flesh out their bit, and all the managers participate with the sales and marketing groups in a steering committee.
In other words, sales and marketting has an idea of what people wa
I really want to know (Score:2)
I also suppose that the best model for software reuse to date is where features are part of a language or a standard library (STL lists, Python hashlists) rather than some dude in the Visual C++ parser team developing a regular expression tool and supp
Re:I really want to know (Score:2)
Re:How does Windows XP even get written (Score:2)
Compared to what? Mandrake 10 Community Edition comes on 3 CDs. Sure, you get a ton of apps, but that's all part of the distro. Strip it down to just Linux, and KDE or Gnome, etc and I'm betting it'll weigh in at about the same size.
maybe the Windows kernel is pretty compact
ntoskknl.exe on my system is a touch over 2MB in size.
I will concede that Windows is a POS, but how does such a POS even boot?
That would seem to contradict your earlier stat
Re:How does Windows XP even get written (Score:2)
Having said that, I use XP at home and OS X at work and the only reason I use XP at home is it let's me play more games. Now if most people has OS X boxes then most games would be for OS X so I can call windows a POS and still use it.
XDoclet? (Score:5, Informative)
I've worked with most of the other tools mentioned in the review and they're all good. But nothing helped speed my own J2EE work more than XDoclet, particularly with EJB's and all their interface definitions, configuration files and container-specific instruction files.
Re:XDoclet? (Score:2)
Maybe an authoring opportunity here...
keep the basics (Score:1)
Don't focus too much on tools when it comes to planning the development of a J2EE application. I learned some lessons about this the hard way.
A well setup environment is a must in this kind of development and tools like the ones this book evolves around can put the pedal to the metal when it comes to accomplishing your goals.
BUT bear in mind that you ALWAYS need to keep a close eye on the basic structural requirements, especially the services used in the process of the application you're developing.
For
Enterprise Java has already been (Score:1)
To hell with J2EE (Score:5, Interesting)
Let's look at persistence:
Once upon a time there was EJB 1.0 and 1.1, and every change required touching about a dozen files. Along came EJBDoclet (later XDoclet). EJBDoclet helped the world deal with EJBs, reducing the number of files you had to touch to 1. As such, the tool was invaluable. It also teaches a lesson: anytime you come up with an API that requires a new tool to make using that API bearable, your API sucks.
Sun saw that EJB 1.1 sucked rocks. Along comes EJB 2.0, in which they don't fix the configuration nightmare and introduce a half-assed query language to supplement the collosal folly that was the ejb finder method. With 2.0, EJBs were still fucking slow, CMP still didn't work right, and peopl had had enough. It didn't help that EJB 2.0 was about 2 years late.
New persistence tools started to gain traction, such as JDO and Hibernate. JDO was a bit too close to home for Sun though, and it got shit on. Miraculously, Hibernate held on and became bearable.
Now the best-practice persistence mechanism isn't part of the J2EE spec. So much for EJB and JDO. Some crazies (me) still argue that filling out reams of XML config files to create your O/R mapping is bloddy stupid and almost as bad as writing SQL to do the work, and therefore something should come along that hides the entire fucking database from the developer, bullshit or mapping files and all. But that's just me. (Yes, that's not always feasible for attaching to legacy databases. Eat a dick).
Ok, so we're satisfied that the J2EE persistence story is a fucking mess. Next up: UIs.
JSP. Let's embed Java into the HTML. Now the developers and the web weenies can shit all over each other's work. While we're at it, let's not include any way to do common things like pagination, alternating background colors in table rows, etc.
Enter taglibs, which attempt to solve these problems at the cost of having to write zillions of little snippets, put them some place, compile them into the JSP at runtime, and hope your web developer didn't fuck over the page again. Hmmm, no go. Did I mention JSP is slow?
Approximately 92 million tools of one sort of another sprang up to supplement or replace JSP. Most of them sucked, and some of the worst (I'm talking about YOU, Struts) rose to the top to become de-facto standards. So now we have servlets - which work pretty well, thankyouverymuch - mutated into some sort of bastard offspring of Swing that try to and succeed in getting in your way whenever possible. Now the best practice is - no joke - to do everything in servlets, which is the way it should have been done in the first place.
So that's the UI side of things. Notice there's no J2EE solution for thick clients, because God forbid someone want to cache something on the client. Plus Sun knows what a fucking piece of shit Swing is. And I'm not going to mention portlets.
That leaves us with JMS, which works primarily because the architecture + implementation were copied from existing messaging systems. JNDI, which annoys everyone anytime they go near it. JCA, which kind of works assuming the AS/400 is in a good mood that day. Probably a few other minor bits + pieces too. The core of J2EE was EJB though, and that was the fuckup to end all fuckups. You're much better off doing shit on your own, and not listening to Sun.
MOD PARENT UP (Score:1, Redundant)
Re:To hell with J2EE (Score:1)
Why is there a chapter on UML? (Score:5, Insightful)
Re:Why is there a chapter on UML? (Score:5, Informative)
How does this object relate to that object? Have a look at the model.
What tables are affected by changes to this class? Have a look at the model.
Which classes are affected by changes to this table? Have a look at the model.
From the model we generated Java source code, Hibernate mappings, SQL DDL's for tables and used it in correspondence with an overseas branch for clarifications on process flow.
The only committee that the model was blessed by was the development team. Higher business has no understanding of UML so why should they have anything to do with it? Any flow/model diagrams used in requirements gathering should be basic and understandable NOT technical.
So no, our model was not forgotten and we are still updating it today as required for new projects.
Re:Why is there a chapter on UML? (Score:2)
Re:Why is there a chapter on UML? (Score:1)
The core model applies to most if not all our projects as it defines the core requirements of the business.
I do (Score:2)
Ouch, that was cynical. The truth hurts...
Re:Why is there a chapter on UML? (Score:2)
Does anyone on Slashdot really use UML to document a design?
Only after the product is delivered, and only if the customer really insists. Why? For two reasons.
Firstly, and this is not a criticism of UML but of crap management, because the specs for a project are usually non-existant or subject to continual change. I have become accustomed to working on projects where the "design" is a verbal description of the data sources and a photoshopped mockup of the site. Then the requirements change up until th
We Need a Good UML Eclipse Plugin! (Score:2)
We point others (PM's and other dev groups) to it and they seem to have no problem interpreting it.
And we dont' have any committee's blessing it - it is written by development for the development process.
What it does need, is better tools. Then again, my company is too cheap to buy Rational or some other integration tool. A EA -> Eclipse plugin would be ideal.
Accompanied on the menu by.. (Score:2)
Actually... (Score:1)
Actually, it applies to all tool use.
Re:Rapid J2EE development? Oxymoron? (Score:2)
Re:Rapid J2EE development? Oxymoron? (Score:2, Interesting)
For example, a lot of n00bs think that any enterprise app should be using EJBs. The fekn reality is, most enterprise apps are 2-tier screaming out for POJOs and O_R Mapping tools.
So - it goes back to the quote - right tool for the right job.
/., den of thieves (Score:3, Informative)
"This book has a lot of great material in it. The author really shows his experience in the subject matter. The content is excellent. I haven't seen another book that is as comprehensive or contains as many real-world lessons learned."
--Madhu Siddalingaiah, Consultant, SEA Corporation
"I think the book does a good job of presenting a set of processes and technologies that enable rapid development. I think this is an extremely useful book, and I would recommend it to others."
--Satadip Dutta, Software
Re:J2EE has got it all wrong. (Score:5, Informative)
Re:J2EE has got it all wrong. (Score:1, Informative)
Unlike what you have heard, J2EE (i.e. Struts) is not MVC
That doesnt make any sense, Struts has nothing to do with J2EE or MVC. J2EE is a spec. Struts is an implementation.
Re:Pardon my ignorance.... (Score:4, Insightful)
Re:Pardon my ignorance.... (Score:1)
Re:Pardon my ignorance.... (Score:2)
J2EE "container" (application server) implements J2EE spec fully or partially. Struts does not implement any portion of J2EE spec.
Re:J2EE has got it all wrong. (Score:4, Insightful)
Re:J2EE has got it all wrong. (Score:3, Informative)
Re:Hammers drive nails, screwdrivers screw (Score:1)