Hi,
I'm a newbie to Struts and trying to fit it into an application
that's modeled after Blueprints. I feel frustrated at many
places...It could be just that I don't understand Struts properly
yet.I feel like just using the classes that I like and leaving those
features I don't prefer.
I agree that it provides a nice working framework, but I find too
many limitations...
1.Struts automatically read your form data into request/session scope
as specified in struts-config.xml.
My problems with this are
Firstly, I need to transform the data types other than Strings.
And then it gets funny when using arrays...
If you have a 'String[] str', you don't have to initialize it in your
form bean.
But if you have an object array like 'Monkey[] monkeys', you need to
initilize it in the form bean, or else it throws NullPointerException.
How am I supposed to know the number of 'monkeys' the user wants to
key in?
One more thing is, for 'String[] str', the HTML parameter names
should be just 'str'. All the parameters with the same name will
be read into 'str[]'.
But with 'Monkey[] monkeys', the parameter names should have the index
like 'monkey[0].name','monkey[1].name' etc.
Why is it so? And this indexed naming makes the javascript difficult
to code and read.
With such problems with transformation and nested bean arrays, I feel
like reading the HTML data on my own. I fail to see how this feature
adds much value.
2.Provides form validation.
This is a good feature to have, but anyway, generally we push as much
validation as we can into Javascript and if there are any real
business validation to be done, I'd prefer doing it in business tier
rather than in Form bean.
Again it adds value, but in a large application, I don't feel it is
that much.
3.Internationalization - again good, but it's not that difficult to
implement on our own.
4.Tag libraries - I never really used tag libraries in JSPs, so
cannot comment on the usefulness of them. Do people find the tag
libraries so useful? I want to know where this feature stands the
list of good things about struts.
There seem to be many experienced Struts users on this list. Could
you please tell me the features you find very useful and the kind of
applications you are building using them? And if I'm missing
something badly in my understanding?
Regards,
Choudary.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>