News: Best Practice with the Expresso Framework
An article by Peter Pilgrim that looks at the best practices of using one popular web application toolkit, Expresso Framework. The idea of using custom tags, JSP, and the MVC paradigm are suitable for such frameworks. He illustrates the best of practice through an on-line stock trading program example.
- Posted by: Ed Saikali
- Posted on: September 11 2001 01:53 EDT
Read Article Here
- Best Practice with the Expresso Framework by Sandra Cann on September 11 2001 16:36 EDT
- Best Practice with the Expresso Framework by Magesh Lakshmi on September 12 2001 14:04 EDT
Best Practice with the Expresso Framework by Jonathan Gibbons on September 13 2001 06:24 EDT
- Best Practice with the Expresso Framework by Christian Rauh on September 13 2001 11:15 EDT
- Best Practice with the Expresso Framework by Sandra Cann on September 14 2001 03:30 EDT
- Best Practice with the Expresso Framework by Peter Pilgrim on September 17 2001 08:44 EDT
- Making Apple Pie by Tyrex Johnson on November 25 2001 10:49 EST
- Best Practice with the Expresso Framework by mike someone on December 31 2001 02:39 EST
- The Value of Frameworks by Howard Lewis Ship on September 13 2001 12:42 EDT
- Best Practice with the Expresso Framework by Jonathan Gibbons on September 13 2001 06:24 EDT
- Best Practice with the Expresso Framework by Luis Amat on May 07 2002 15:04 EDT
- Best Practice with the Expresso Framework by Magesh Lakshmi on September 12 2001 14:04 EDT
- Best Practice with the Expresso Framework by hal arnold on September 12 2001 12:25 EDT
- Best Practice with the Expresso Framework by Peter Pilgrim on September 14 2001 05:35 EDT
- SOURCE CODE BUNDLE FOR THE ARTICLE by Peter Pilgrim on September 14 2001 05:41 EDT
Expresso release 4.0ea (early access version) now includes integration with Struts, one of several shared standards Expresso builds on. Struts is a thin MVC light weight framework and Expresso 4.0 a full application development framework which complements Struts with additional components for developing database-driven web applications. The early access version is available freely to registered users at: http://www.jcorporate.com/
In this fast paced arena of technonology, where we have a less time of noticing the inception of a new technology then overridden by another one, there is no need of a framework. These are the following reasons that I could come up with.
1. If developers follow frameworks, its tough for backward compatibility if the scope of the s/w is extended.
2. The underlying base technologies over which the frameworks have been built , if changes or taken a detour, the frameworks is of no use.
3. Moreover the arena of Client/Server is over, wherein you use the frameworks to achieve the most common stuff. But in this Web-Based comuting, applications designed are versatile in nature and they are really targeted for different purposes.
4. Already we have a numerous quotes about performance issues regarding the usage of "Java" at server side, so the framework library (which sits on top of the traditional JAVA API's) is going to create much more performance problems, if the library is not properly designed.
Penultimate because there are 4 or 5 competing ones, and only 1 will rise to be the ultimate. Kind of like Schlear Mellor, OMT, Booch all becoming UML.
As for the worth of these frameworks, I agree they are way too much. They softcode everything you do, and they change too rapidly. Every project I have worked on does not require this, and the use of the framework would have extended the project timescales and added complexity (rather than hiding it).
However, there are many folks out there who have never developed real projects, and these guys need some guides as to a good approach. Choose any framework and learn from it is often a good approach. By project 2 or 3 the framework will drop away as the team realise how to correctly approach the issues.
My problem is I know how to develop code from the ground up, and all these frameworks add nothing.
Why would one built the system from ground up if you can use a framework that implements 30% of your application while facilitating the conding of the rest?
I agree that the technology is changing so fast that one needs another framework for each project. But that is another reason for using one. Would you code every one of your projects from scratch? Guess not, you use libraries and frameworks to move faster.
The problem of changing versions and project directions over a framework is easily solved: use open source frameworks. If the framework goes in another direction, take it in your hands and THEN code it all. But at that time you will be much ahead that if you started from nothing.
Would you bear coding binary search another time?
Penultimate because there are 4 or 5 competing ones, and only 1 will rise to be the ultimate.
Using relative size of listservs as a measure: Expresso and Struts are by FAR the most popular frameworks comprising an estimated 87%! And with Expresso 4.0 release due out in the next week (4.0ea is available now) - Expresso now integrates with Struts - so we think the combination of the two is the winning choice :). The idea is building on shared standards and working together.
I would say that the pure Struts framework
adds value to many web application projects.
Sure you can implement your own MODEL VIEW
CONTROLLER framework for each project.
But this is what I disliked about C/C++
originally circa 1991 they did not come
with a free open source linked list library.
Frameworks are sort of libraries of olde.
You do not have to use them. But then
you would be missing out, and why would
would want to recreate a doubly linked list
implementation in C++. Struts is successful
because it is lightweight. Ties in
the MVC idea and the COMMAND pattern
from Gang of Four's book ( Gamma et al )
brillaintly. It uses the VIEW HELP object
design pattern through the use of
custom action tags and JavaBeans to
help you build a more lateral web application.
Most importantly for developer. It actually
works and cover many of the bases for most
requirement rather than being too thin or
narrow in its focus. It is also open source
too which does help and has a popular
socioligically friendly community.
You also want to design and code at a
higher abstraction level rather
than the lower level Java Servlet level
Once, I came across a quote from some philosopher ( I don't remember who) which can justify the use of frameworks
" If we were to make apple pie from scratch,
we must invent the universe first "
What is a framework? A framework is nothing more than a collection of classes. What is a object? Nothing more than a collection of functions?
Since you're a real geek, why not elimnate frameworks and classes. You can do better right?
So, you could do a better job of writing the java String class, so let's not use it. Why not throw out java.lang while your at it.
Whats the operating system, nothing more than a collection of procedural librarys or object based frameworks. You could write a better one so, lets write a new os while were at it.
The point is not could you write it better. The point is to take an existing tool that already works make a few changes to get to your first cut. Then find the 20% of the code that not sutied for whan you want and rewrite it.
"Good programmers know what to write. Great ones know what to rewrite and reuse"
I'm somewhat astounded by this sentiment ... that frameworks are useless? Wow. Taken to extremes, that means we should still be programming in assembly code, or by flicking switches on the front panel.
Designing a good, powerful, flexible framework is very hard, but doable. Frameworks can capture best practices and make them pervasive.
Here's an example: Ever write a database driven application. All over that application will be code that pulls data from a database and writes into into the HTML.
Now ... what goes into that database? Columns that include characters like '<', '>' and '&'? If you just used <%= %> or <% out.print(...) %> then your application is broken.
You need a filter class, and you need to filter all your output through that class. That's your best practice. If you use a framework, such as Tapestry, then you get that for free.
I don't know of an application so versatile that Tapestry, Expresso, Struts or any other framework is a *burden*. The only real question should be whether the benefits outweigh the burdens. Those burdens include studying documentation, coping with a learning curve, licensing issues (well, not for open-source!), etc.
Sorry, but Struts is not a standard. Just my $0.02.
If Expresso is the "penultimate" framework, which is the ultimate? Not interested in second best.
As the author of this article.
The publisher did not include the URL where you can
download the complete source code bundle that goes
with the article.
The article is based on the Expresso Framework V3.11
I can be reached by electronic-mail at
"peterp at xenonsoft dot demon dot co dot uk"
"peter dot pilgrim at db dot com"
I apologise for the anti-spam format of these mailing addresses.
And finally ...
WTC Diasaster, Tuesday 11th September 2001
I consider many Americans, Canadian to be great friends
especially their musical influences on this world
has been great is the last one hundred years.
My thoughts go out to all families who lost their
loved-ones in this outrageous attack on innocent
human beings. You have my condolence from me
and my family. My heart goes out to you all. Peace.
Senior Systems Analysts
OTC Derivatives IT
Deutsche Bank AG (UK)
London EC3A 7DX
14 Sept 2001
Source code bundle for the article can be found here:
<b> http://www.xenonsoft.demon.co.uk/products/java.html </b>
This is almost completely irrelevant but since people are making an issue of it and using the word incorrectly.
The definition of penultimate
pe·nul·ti·mate (p-nlt-mt)\ adj.
1) Next to last.