Java Frameworks and Components
The book works through a logical progression, starting with a discussion of what a framework is (and, of course, what it isn't) before moving on to an examination of the benefits that they bring to development efforts. The meat of the book is in the next couple of chapters where a framework (no pun intended) is explored to select and compare frameworks. A list of current frameworks is given, each being described, with strengths and weaknesses highlighted.
The trailing chapters cover aspects of development that are affected by the use of frameworks, including the obvious ones like IDE support and methodologies.
What's To Like The aspect that most impressed me was the depth of research that has obviously gone into this book. I think most of us know that frameworks are good, and a reasonable number of us could list several reasons why they are good, but I suspect that very few of us could generate such a comprehensive and cogent rationale for using a framework.The information density in this book is quite high. Normally, I read technical books quite quickly, but this one took a while, because every good point prompted much thought and consideration. This was impressive to me after seeing so many books coming to the market that have simplification as their rationale for existence. The selection of an appropriate framework for web application development is not a simple task and this book takes it very seriously.
While non-free frameworks might be a non-issue for some of the Slashdot crowd, those of us working in corporate I.S. have to be very aware of the differences and our local management's attitudes concerning it. The book does come out strongly in favour of open-source and free software, but does not let this bind the discussion in any way. Commercial and free software are judged equally and fairly throughout.
Pragmatic is a much over-used word these days, but I would describe this book as pragmatic. The advice given concerning framework selection, urged people to consider many factors, including existing frameworks used in-house, the type of project, the degree of accordance between the services provided by the framework and the requirements for the system being written. I have seen many a framework selected because it was buzzword compliant, so this advice was a refreshing change.
What's To ConsiderAfter enjoying the book, to reach the case studies and be disappointed was, well, disappointing. The case studies seemed rushed and lacking in substance. The idea of comparing and contrasting the four leading frameworks to solve the same problem was a good one, but somehow it didn't quite come off. The Struts case study got to me the most: I have conniptions everytime I see business logic in actions! Perhaps the case studies could be dropped in a future edition?
SummaryA tour de force! With only one quibble, this is the definitive work on Web application frameworks.
Table Of Contents1. Components and Application Frameworks
2. Components: The Future of Web-Application Development
3. Application Frameworks: What Do They Provide and What Are the Benefits?
4. Choosing an Application Framework
5. A Catalog of Application Frameworks
6. Comparing Frameworks
7. Open Source and Components/Frameworks
8. Development Methodologies and Design Patterns
9. Integrated Development Environments
10. Strategies for Using Frameworks: Best Practices
11. Conclusions: The Future of Frameworks and Components
Appendix. Case Studies
You can purchase Java Frameworks and Components: Accelerate Your Web Application 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.
it's no longer necessary to even think about writing low-level code (except as a technical exercise, or to express your inner geek :-)
Obviously, the guy that submitted this story doesn't know about handheld devices and embedded software. We are still writing A LOT of low-level code on this little planet. And it seems we will still need it for a couple decades.
Frameworks are certainly excellent for high level programming (my end of studies memoir is about them) but they are still way too slow, too bug-gy and too bulky for our little devices... And the thing is that we gonna have more and more little devices in the near future.
Also, your framework works on top of what ? Yes, low-level code...
Iraq: war to save the U
Case Studies (as in this case) always seem to come at the end of the book. If they were really analyzed they'd be earlier. Too often this is the author's response to the publisher's request for 80 more pages.
Arent' there as many frameworks as there are coffee types in Starbucks? I wonder which java framework i woudl like to choose.. IT's a daunting task for me already to pick a right flavor @ coffee shop... :)
buffering...
True, but most frameworks are used on the server-side were slow, bulky, and buggy can be dealt with, and the client is were the low-level code is being used.
(Raises hand)
I think I understand the term, but does that mean it's a given that any application is built around a "framework"?
All well-constructed software is sliced into coherently-discrete layers that are solved as individual problems, but I believe the "framework" concept is largely a commercial concept designed by certain vendors to enable them to sell large, complex toolkits.
Are we not in danger of taking this commercial model and turning it into dogma, in which your application shall be built around a framework and the only choice is "which one?"
Ceci n'est pas une signature
Who writes the frameworks? HAL 9000? Nanomachines?
Conformity is the jailer of freedom and enemy of growth. -JFK
At least try to provide a disclaimer. Otherwise, an excellent review of a technical book published on probably the largest technical web site on the internet. Smells like fish, tastes like fish to me.
My 2c.
Simply put, our group wrote our own struts type framework. This was around 4 years ago when struts wasn't quite as hyped, and we wanted something that did exactly what we wanted, without extra baggage or cost. Four members in our group, it took us around a week to write the basic components.
Other groups (sitting a few feet away from us), have gone through a couple framework tools, ending up with struts.
I really don't see a difference in either approach. So many times writing your own tools is frowned upon, but when you're talking about small scale projects, why not? Do you really need every feature of struts to display a fairly simple website? A few forms, polls, etc.. why install such a massive package?
For my home machine, I wanted a couple forms, a photo album, and fairly simple navigation. I wrote it in a night. It would have taken me just as long to download the tools, install them, and set them up.
I think the problem is that it's a very "in thing" to use the latest tools. The technology lead for the other team was pushing for one open source solution before, then was pushing for struts, now is pushing for some other "cool" tool. I would rather focus on writing for what is needed, rather than for what is a cool solution.
Am I the only one who thinks that sometimes its simpler, not to mention more fun, to write my own low-level/framework code? Before you flame me, I DO understand the value of using a framework (reuse, time, integration, other developers, blahdiblah). When you write your own framework, you get to be Da Man.
If so I can't really tell. The review seems pretty empty and doesn't really contain any hard info that couldn't be found on amazon.com.
That being said. Java's frameworks tend to be very high quality and easy to work with in my experience.
Not everything is analogous to cars. Car analogies rarely work.
Excuse me, but what frameworks are compared and covered?
Are we talking GUI frameworks, JSP Engines, Web application frameworks, what?
This "review" told me nothing.
Avoiding frameworks and middleware can be just as important on much larger systems.
Often these frameworks ("always" in the case of middleware) will add not just overhead (latency or burnt CPU cycles) to your system, it can add complexity. When given the choice of incorporating some already existing framework, or re-inventing the wheel, I often (but not always) choose to re-invent the wheel.
See, I will end up with a wheel that I know. A wheel that spins like it should, and doesn't spontaneously start brewing coffee, because someone thought that would be a great idea.
Some are religiously against re-inventing the wheel. But hey, the wheel is a well known technology, it is not necessarily very difficult to re-invent it. This amount of work, compared to the long-term implications of being dependent on something that you do not "own", make a little re-invention here and there well worth it.
Earlier on slashdot today you saw ATMs being hit by an RPC worm. Why is an ATM vulnerable to an RPC worm? Because it runs RPC. Why does it run RPC? Well, because nobody re-invented the little wheel it would have been to do a simple data transfer over a TCP connection. No, they chose either to use RPC, or to use a significant amount of middleware which did not allow them to disable RPC (otherwise, why would it have been enabled?).
If people feared re-invention a little less, and once in a while re-wrote that darn wheel instead of relying on frameworks and middleware that they cannot possibly hope to fully comprehend, you would not have ATMs being hit by RPC worms. Ximian Evolution would not take up hundreds of megabytes of memory. Web sites would not mysteriously hang if the MS ASPX interpreter got stuck. My PHP sites would not start giving load errors on every 5% of the hits after a bad call to a file load routine half a decade ago.
The world would be a better place.
Now go re-invent, please.
Coming from the Perl world, I've seen too many religious wars over Mason vs. Template Toolkit vs. MVC to take framework debates seriously. You probably don't need a framework, anyway. You just need some reusable code for the more mundane functions (db connections, parameter processing, etc.) The rest is just programming.
That depends. What you described is a basic portal, of which there are plenty in all kinds of languages.
Easier to download a premade one and modify that.
Usually you only have to edit a file or two.
"You'll hear people argue that using an open source framework (and most are) will allow you to modify the code, but once you down the path of making changes, forget about upgrading as new versions are released..."
And how's that argument any different for using the Linux kernel? Or any other Open Source software for that matter? Reality and your argument don't agree.
And lately, I have started looking at Java as a corporate-hep buzzword too, not to mention .NET, and a hoarde of other ones.
Whatever happened to the concise, well-written, to the point books of a few years ago. Kernigan/Ritchie's C book comes to mind, though it was a C Reference Manual.
An Indian-American Hindu committed to non-violent thought/speech/action alarmed by the global explosion of radical Islam
Life is busy enough without writing your own infrastructure code.
No, life is busy enough without having to learn anything else about java, ever, thanks.
Halfway kidding.
====
Crudely Drawn Games
Its almost impossible to keep track of all the frameworks that have sprung up around Java. It seems hardly a day goes by by without someone announcing either a new framework to address issues the rest of us were not aware existed or a new release of release of one of the plethora in existence.
I find myself in a rather ironic position now. A few years ago I was a strong proponent of frameworks. I saw no reason why essentially the same code should be rehashed slightly differently when a framework could be made of the core material and the rest customised as required. Now I have to press the pause button when a framework is put forward to determine if it suits our requirements or is complete overkill for what we need or forces us into an excessively complex architecture to facilitate it.
While still in favour of frameworks I believe you can have too much of a good thing. I think many frameworks available today ignore the "frame" part of the concept and actually try and fill in all the code for you.
Do not try to read the dupe, thats impossible. Instead, only try to realize the truth
What truth?
There is no dupe
Now just think of how far engineering would have advanced if had taken the same path? Don't build using standard girders, and fastners. Re-invent your own kind of girders and fastners.
Computer Science will never mature as a discipline as long as is NIH is so prevalent. It's not a cool, but then building anything has "not cool" elements.
Bittorrent is written in Python. This means that if you download the source code, you'll actually be able to read it -- Python code can be understood by more than the person who originally wrote it.
-- Help Digitise the Public Domain at DP.
So we rolled our own. Since java has interfaces, built in rpc, threading, and db-independant DB accesss, and most IDEs support some refactoring, it was pretty easy. Except for that classloader stuff. Ugh.
You probably disagree. Flame away!
-- ac at work
Traditional frameworks are fine - but the productivity benefits come at a cost - flexibility.
What I've found that often works far better is:
- divide system into major business-oriented (vertical) sub-systems (assemblies, whatever). Examples of these sub-sytems would include 'party', 'inventory', 'order', etc.
- if possible build these sub-systems using highly adaptable code or based upon well-conceived patterns
- glue the assembles together using a highly productive / adaptable language - python, etc.
If I end up using a framework within one of these classic sub-systems, fine. I can always chuck it out the window when we hit its limits...
Yes there's a bit of corporatespeak in the mix, but CS is growing up. And like all things that growup, it becomes more "complicated". The language is naturally going to evolve to accomodate this growth.
With all of the high-quality frameworks available today, it's no longer necessary to even think about writing low-level code.
And all this time i've been writing all my bytecode with a hex editor, like a sucker.
I'll say it again: Web Apps Suck. Since this statement confused some people last time I said it, allow me to clarify. For a blog-type-system like Slashdot, webapps are cool. For a simple log-in to your bank and check your account balance, web apps are cool. In fact, right up until you find yourself implementing kludgy work-arounds to get around limitations in HTML, web-apps are cool. The minute you have to resort to Javascript, 1-pixel spacer GIFs or back-end session management databases to get around the fact that your user could be talking to any machine on your cluster, web-apps are no longer cool.
If your web-app is so complex as to need a framework, your web-app probably sucks. It is probably a bloated, complex, nearly unmanagable piece of code that would have been a lot better off implemented as a stand-alone Java program or a lower-level language portable back-end attached to a UI written in either Java or one of the portable UI libraries that are available. But no, your manager wanted to avoid all that because (pick one) 1) everyone's talking about webapps and he went "ooo" and started drooling or 2) You thought it'd look good on your resume so you suggested generating all your applications from XML files using Java and struts.
I expect to see a backlash soon as more people run up against the limitations and unique problems associated with the crappy HTML protocol. The workarounds will become more and more atrocious until eventually the whole thing implodes. I can't imagine it taking more than 4 or 5 years for this to take place.
I'm trying to teach myself to set people on fire with my mind... Is it hot in here?
thanks.
i'm trying to give up sigs.
You can read the first chapter here.
Unfortunately, like the 'review' - it doesn't mention which frameworks the book covers though.
The problem is that technologies change over time. Tech-oriented frameworks make writing the app easier in the short run, but they don't consider the long-term life of the app. Applications that are tightly coupled to any given tech become a liability as that tech ages, and quite often migration to a new tech involves a ground-up rewrite of the application. Instead of tying the app to a framework like Struts or a tech like EJB, write the app to stand on its own, using interfaces to the various techs it needs. Particular technologies like Struts (for a web UI) or EJB (for persistence) can be swapped in + out of the application as necessary without changing the function of the application itself.
There are a number of benefits to a technology-agnostic approach like this. The technology implementations can be upgraded: find out that EJB is a dud? Switch to Hibernate! Perhaps more interestingly, the technology implementations can be supplemented: Have a web UI, but need to ship a desktop application too? Plug in the desktop app tech implementation and presto! You now have both a web UI and a Swing/SWT/etc UI for the same app. Testing becomes far easier too, because you have clearly defined boundaries between the different components of the app (so it's easy to figure out which part isn't behaving).
There are drawbacks, of course. To work as advertised you need to invest a fair amount of architecture to get such a system off the ground. Someone has to write the tech implementations, as well - an SWT UI for your app won't just fall out of the sky when you want it.
Everyone has their pet project. Mine is Sandboss, an approach to enterprise application development that's application-centric, not technology centric. It concentrates on the app itself - you don't wind up with a "Struts application" or an "EJB app". Instead you wind up with an application that can use Struts and EJB, but can also work with Hibernate and WebWork. It's not for everyone - it requires a fair amount of committment to the methodology - but it works well in practice. The time savings are pretty incredible, and the components really are reusable.
*There are many places where a front end for a database is all you need. Of course, once the requirements for that project start to grow you'll wish you had something more powerful.
Just curious...
Personally I prefer the Framework provided by J2EE. It seems most frameworks just add a redundant layer on top of that, repeating the same functionality.
It's been a while that I took a look at Struts, but what's the main advantage of a Struts Action over a Java Servlet? I think they are actually both meant to do the same thing. As far as I remember, the Struts Actions even get the HttpServletRequest passed as a parameter.
I am currently involved with major Java project at big big government agency.
Every new body on the team gets to sit and read the Struts book - it takes govnt weeks to get you a PC and months to hook it up.
But the application they eventually get to work on is a terrible mess of logic-laden JSPs, clueless beans and stored procedures doing String manipulation.
I guess I should give up programming now since I apparently have to compete with such amazing skills. I am still stuck dealing with unrealistic deadlines, shifting requirements, existing systems, temmates with different skill sets, etc.
Maybe if I go back to school, or meditate to find my inner programmer I can learn to right beautiful code which scales well and also extends nicely without the pesky problems of new bugs, regression bugs, the need to refactor, extend, etc. on my first try.
Until then I guess I will just struggle along trying to learn from the experience of others, reuse solutions which are known by a large number of people and are recognized by employers and perrs. For us mere mortals it would seem these frameworks are a necessary evil.
-E
p.s. When are the afore mentioned geniuses going to extoll the virtues of writing your own operating system, text editors and media players? It must be really nice to not have to deal with the complexities and unexpected behaviors of such complicated systems when you can just roll your own! In fact, why should we even bother with web browsers and servers when we can just go the pure path with custom client applications and servers for every conveyor of data on the internet?
Slashdot needs a new Java icon. The one they have seems to be a cup of coffee with a piece of poop floating in it -- which, come to think of it, may actually be an accurate depiction of Java. Hmmm... forget I said anything. The icon is fine as it is.
If it doesn't include Open for Business it is already out of date and missing the best piece of code going. The problem with the open source community today is that we don't mind using a few tools like Linux, Apache, etc. but when it comes to doing something that really would make business applications less expensive and of higher quality - like agree to standardize of a select few frameworks - we don't!
The book covers Java frameworks, primarily web-application frameworks, and discusses how to compare in general, and goes into detail on:
:-)
Avalon, Cocoon, Expresso, Arch4j,
ArsDigita ACSJ, Turbine,
Wakesoft Architecture Server, Niggle
Systinet's WASP, realMethods, Brazil
OpenSymphony,
JSF (not quite a framework per se, but covered),
Struts, Maverick, Scope, WebMacro,
Velocity, Tapestry, Barracuda, HyperQbs,
Tea, Freemarker, Echo, Xerces, Xalan,
Axis, Slide, Roaming Wireless Framework,
JADE, Openadaptor, JUnit, Anteater,
Jetspeed, OpenPortal, uPortal, Simper,
Object/Relational Bridge, Castor,
jRelational, Batik and Keel,
along with mentioning more briefly a lot of others.
(disclosure: I'm the author - of the book, not the review - so opinions may be biased
Mike
When I cook pasta, and I am in a hurry, or I don't care if it tastes a little different to how I want it to, I buy a jar of premade pasta sauce.
When I am cooking for a special occasion, I wouldn't even dream of it. I know how to make a killer sauce, so I can make my own from scratch. The taste is always tailored to the occasion when I do so. The only other consideration is that it takes longer.
CurryOn the other hand, I do not know how to make curry from scratch. Thus, no matter what the situation calls for, I must use the premade pastes that come in the jars. However, I have become good at choosing which jar to use for a particular theme, and how to add various ingredients to push the flavour this way and that. It's not perfect, but most of the time it's quite good.
ChoiceIf you know how to roll your own killer data persistence layer, and you think that for a particular case it is warranted, then why not do it ?
However, if you don't know how to do it, or you need to save time ( other reasons can apply ) or you know that this particular library is just right for the job, then why not use an existing framework ?
I think it's silly to get religious on an issue like choosing the ingredients. It depends on the skill of the developers and the situation they are designing/developing for.
I am sorry but a comparison of frameworks with very rushed case studies means a bad book on frameworks..
Don't Tread on OpenSource
WUI or (Web User Interface) is a component based framework for developing complex web user interfaces using a single language: Java. Write web apps with widgets and events, not JSPs. Runs in any servlet 2.3 container. Alternative to Model 2/Struts.
p _id=89760
http://sourceforge.net/project/showfiles.php?grou
unzip, ant -f run.xml, browse port 8080 and you're on your way...
VeryGeekyBooks has more reviews of this book.
The problem with general frameworks is that they are often too general. The wave of the future is going to be business specific application / database servers that are stitched together with open messaging schemes.
So, instead of having one general framework with a middle tier in some webish / code combination talking to a SQL server, you'll have a messaging bus that stitches together various domain specific database servers.
This is my sig.
Everyone should take a look at: http://www.jbanana.org Java Framework better then struts.
http://www.noticiaslinux.com.br
i dont like to read. at all. i dont like this site either. at all.
=my ideas be more important than urs=