Re: Struts-faces and conversion errors
On Tuesday 31 May 2005 22:45, Craig McClanahan wrote: > It would be technically feasible to make display the JSF > conversion and validation messages (stored in FacesContext) as well as > the Struts-specific ones. Could you please file an enhancement > request in our issue tracking system? > > http://issues.apache.org/bugzilla/ Thanks for your quick reply. I've filed the enhancement request: http://issues.apache.org/bugzilla/show_bug.cgi?id=35179 Best regards, Emond Papegaaij - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts with spring 1.2
Hi Rodolfo, We are using Spring 1.2 with Struts 1.2.6 . At least with our setup, we found that if we wanted to use Dependency Injection with Spring into our actions, we would not be able to use our wildcard mappings. So instead we just let our actions inherit from DispatchActionSupport, get the ApplicationContext and do lookup of the beans in the code. Not an optimal solution but at least it brings IoC to everything below your view, and lets you use Springs features there. Anders, On Thu, 2 Jun 2005, Rodolfo García Esteban/CYII wrote: > Hi, > > I´m testing spring framework and it uses struts 1.1, is it posible upgrade > to struts 1.2.7 changing struts.jar, what new posibilities of struts 1.2.7 > will not be possible to use? > > Thanks > > Rodolfo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts with spring 1.2
Hi, I´m testing spring framework and it uses struts 1.1, is it posible upgrade to struts 1.2.7 changing struts.jar, what new posibilities of struts 1.2.7 will not be possible to use? Thanks Rodolfo
Re: [OT] Business Layer Ideas
My high school had mostly reformed teachers. One once said, with pride, that there had been no one in the trunk of his car for quite a while. On 6/1/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > > (yes, my school actually had Fortran, COBOL and Pascal classes!) > > Your *high school* had multiple courses on different programming > languages? My high school ('secondary school' actually, I'm originally > from England) had exactly one 'O'-level computer course and one > 'A'-level course. There might bave been a pre--'O'-level required course > too... > > Any which way, my first computer related course in school was so basic I > walked away and never looked back until I got to university and realised > that I was skipping too many physics classes to play around in the > computer labs :-) > > I'm guessing (from other posts in this thread) you're a little older > than I am. That would make your high school pretty impressively > forard-looking...! > > L. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
> (yes, my school actually had Fortran, COBOL and Pascal classes!) Your *high school* had multiple courses on different programming languages? My high school ('secondary school' actually, I'm originally from England) had exactly one 'O'-level computer course and one 'A'-level course. There might bave been a pre--'O'-level required course too... Any which way, my first computer related course in school was so basic I walked away and never looked back until I got to university and realised that I was skipping too many physics classes to play around in the computer labs :-) I'm guessing (from other posts in this thread) you're a little older than I am. That would make your high school pretty impressively forard-looking...! L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
Simon Chappell wrote: Back when I was a young programmer we used to have to think. THINK! Oh the humanity. No patterns for us. Just endless cups of tea, a pad of paper (or the back of long listings on greenbar) and your flowchart Too funny; I remember when my 'IDE' was a sheaf of butcher's paper and a pencil. I could debug a program by writing a list of variables down the left side of the page, and enumerating their values in columns as I single stepped through (i.e. 'read') the souce code on an adjacent page. The 'edit' phase was where I transcribed the code from paper into the computer or editted the progam interactively (imagine!) in an editor. I was working in BASIC back then, so I didn't have to worry about compiling or linking -- I cut my teath on a 'dynamic programming language', bet you never thought of BASIC that way before! I have to admit that refactoring on butcher paper was a bitch though! :-) L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [W3OT][OT] Business Layer Ideas
Thanks Frank, you made my entire evening brighter. :-) Larry On 6/1/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > Wow, so *this* is what it's like being the parent of Rosemary's baby! > > I wonder if there has ever been a more OT thread? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help with messages using bean on jsp
Tony- More specifically you will need a ApplicationMessageResources_en_US.property which would be located in web-inf\classes\tonyapp folder where the property key value would display something like userid=some_username password=some_password HTH, Martin- - Original Message - From: "Michael Jouravlev" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Wednesday, June 01, 2005 9:28 PM Subject: Re: help with messages using bean on jsp Do you have ApplicationMessageResources.properties property file, which is located in WEB-INF\classes\tonyapp ? On 6/1/05, Tony Dahbura <[EMAIL PROTECTED]> wrote: I have a peculiar problem cropping up with Struts 1.2.7... When I add an actionError to using my form bean and then go to display it in the html jsp page I get the following: * ???en_US.userid is a required value.??? * ???en_US.password is a required value.??? My struts-config.xml file looks like this for the message resources: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help with messages using bean on jsp
This does look strange - its almost as if the message has been resolved twice and the second time it can't find "userid is a required value" as a key and so formatting it in the standard "???localeKey.messageKey???" format I don't have time to help you - I'm away now for a few days, but the only thing I can suggest is to turn logging on in "TRACE" mode for PropertyMessagesResources - it outputs quite a bit of debugging info, which might shed more light on this. On your bean:write problem, it would be helpful to include any exception from the logs. Also was your app working OK in the same environment using Struts 1.2.6 or Struts 1.2.4? Niall - Original Message - From: "Tony Dahbura" <[EMAIL PROTECTED]> Sent: Thursday, June 02, 2005 2:08 AM > I have a peculiar problem cropping up with Struts 1.2.7... > > When I add an actionError to using my form bean and then go to display > it in the html jsp page I get the following: > > * ???en_US.userid is a required value.??? > * ???en_US.password is a required value.??? > > My struts-config.xml file looks like this for the message resources: > parameter="tonyapp.ApplicationMessageResources"/> > > If I turn the null to true I get nothing rendered-the > ApplicationMessageResources file is in the proper location and moving it > results in the message not being displayed (as a test). The HTML > elements that are attempting to output the values are: > > > > > > > > > And finally the loginForm java code that is doing this is at: > if (getUsername() == null || getUsername().length() < 1) { > errors.add( ActionMessages.GLOBAL_MESSAGE, new > ActionMessage("global.required", "userid" ) ); > } > if (getPassword() == null || getPassword().length() < 1) { > errors.add( ActionMessages.GLOBAL_MESSAGE, new > ActionMessage("global.required", "password") ); > } > > The properties file looks like this: > global.required={0} is a required value. > > I am developing with Eclipse and using tomcat 5.5 with jdk 1.5. This is > baffling to me as to why it is prepending the en_US to the value of the > key after it looks it up. I actually get the message and the > substitution but somehow the en_US gets put in and it flags an error > that it cannot find the message (indicated by the ???). > > On another note I have had quite a bit of difficulty using the > bean:write tags with bean properties that do not return Strings...Some > of my beans return integers and the bean:write tag just fails and causes > the rest of the page after the failure to not even renderNot sure if > it is something with this particular library or not.. > > Any help would be very appreciated. I looked through the release notes > on the new struts 1.2.7 and did not see any fixes - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help with messages using bean on jsp
Do you have ApplicationMessageResources.properties property file, which is located in WEB-INF\classes\tonyapp ? On 6/1/05, Tony Dahbura <[EMAIL PROTECTED]> wrote: > I have a peculiar problem cropping up with Struts 1.2.7... > > When I add an actionError to using my form bean and then go to display > it in the html jsp page I get the following: > > * ???en_US.userid is a required value.??? > * ???en_US.password is a required value.??? > > My struts-config.xml file looks like this for the message resources: > parameter="tonyapp.ApplicationMessageResources"/> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
help with messages using bean on jsp
I have a peculiar problem cropping up with Struts 1.2.7... When I add an actionError to using my form bean and then go to display it in the html jsp page I get the following: * ???en_US.userid is a required value.??? * ???en_US.password is a required value.??? My struts-config.xml file looks like this for the message resources: parameter="tonyapp.ApplicationMessageResources"/> If I turn the null to true I get nothing rendered-the ApplicationMessageResources file is in the proper location and moving it results in the message not being displayed (as a test). The HTML elements that are attempting to output the values are: And finally the loginForm java code that is doing this is at: if (getUsername() == null || getUsername().length() < 1) { errors.add( ActionMessages.GLOBAL_MESSAGE, new ActionMessage("global.required", "userid" ) ); } if (getPassword() == null || getPassword().length() < 1) { errors.add( ActionMessages.GLOBAL_MESSAGE, new ActionMessage("global.required", "password") ); } The properties file looks like this: global.required={0} is a required value. I am developing with Eclipse and using tomcat 5.5 with jdk 1.5. This is baffling to me as to why it is prepending the en_US to the value of the key after it looks it up. I actually get the message and the substitution but somehow the en_US gets put in and it flags an error that it cannot find the message (indicated by the ???). On another note I have had quite a bit of difficulty using the bean:write tags with bean properties that do not return Strings...Some of my beans return integers and the bean:write tag just fails and causes the rest of the page after the failure to not even renderNot sure if it is something with this particular library or not.. Any help would be very appreciated. I looked through the release notes on the new struts 1.2.7 and did not see any fixes Thanks, Tony
Re: AW: AW: [OT] Business Layer Ideas
Leon Rosenberg wrote: I think Java is acceptable for Pretty Large Projects, with Large Numbers of developers, especially if they're Geographically Distant. I'm struggling to come up with a 10x20 program that would benefit from being written in Java that wouldn't suck, and I _like_ many parts of OO! I think I said Swing, but I didn't mean it. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: AW: [OT] Business Layer Ideas
Leon Rosenberg wrote: I'm struggling to come up with a 10x20 program that would benefit from being written in Java that wouldn't suck, and I _like_ many parts of OO! http://vip8prod.messe-berlin.de/messe/execute/enShow?unit=Hall+5.1&prj= That's pretty neat; I like it. I'm skeptical it's 10 classes with 20 lines each, but I'm wrong a lot, thank goodness. I've had issus writing anything with Swing anywhere near that small a line count. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [W3OT][OT] Business Layer Ideas
Frank W. Zammetti wrote: Wow, so *this* is what it's like being the parent of Rosemary's baby! I wonder if there has ever been a more OT thread? Allow me to summarize all the salient points, and perhaps this thread can die peacefully... *rotfl* I think that sums it up pretty neatly, and better than I could have done! Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [W3OT][OT] Business Layer Ideas
On 6/1/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > Wow, so *this* is what it's like being the parent of Rosemary's baby! > > I wonder if there has ever been a more OT thread? > > Allow me to summarize all the salient points, and perhaps this thread > can die peacefully... Not that fast ;) > (8) The German version of Outlook is stupid because to us Americans it > looks like everyone is talking about Root Beer all the time (Review the > thread... review the thread...) The Russian version of Oulook Express 3.0... no, it was MS Mail then, had the same icons as American version. And a lot of people were staring at this red half-sliced read can on a stick without any idea what that was. Some even thought this was a yellow-haired red postal parrot, sitting on a pole. I wonder what did Swedes, Germans and other Europeans think about that image. Why? Because in many european countries including Russia, the mailbox is a rectangular box, usually blue or yellow or white, with a mailslot and words "POST" (sometimes "Royal Post") on it. What were they drinking in Redmond, drawing a red bird on a toolbutton? > (11) Most of you apparently went to school in the Alps because it seems > to have snowed a lot and been very uneven ground. And you did funny > things with news periodicals. And with abacus too. http://en.wikipedia.org/wiki/Abacus#Russian_abacus > (12) Struts 1.3 uses the CoR pattern. Or maybe it's the IoC pattern. > Or maybe it's the RTFM pattern. Could be the WtF pattern. No one > knows. (That's another joke... geez, if I have to tell you that I'm > really not doing a good job, am I?!?) Hey Frank, the jokes are funny enough without "it is a joke" note :) If someone cannot get it and get offended, well... maybe he gets it next time :) > (14) C is such a lousy language that NOBODY would EVER use it. Sorry > Linus, I guess that whole kernel thing of yours was a big mistake. > Ditto for Windows. Windows was actually written in Pascal first. Should stay that way. > (15) Everyone has an opinion, No one is afraid to use it. This, > interestingly enough, is the exact opposite of nuclear weapons: few have > them, everyone is afraid to use them! There is one sacred use: against aliens (not from Mexico or Canada, but from outer space). Just watched "Independence Day" yesterday. For the first time. Big mistake of me, but aliens made a bigger one. "Er... honey... take care of yourself, will you?" Caboom! The Earth is saved, radioactive meteors make a colourful fireworks. Is it not Friday yet? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action vs. Servlet
hi, if ur entire application is struts based then u did the right thing but if not then probably servlet would be a better alternate if u don't need the facilities struts offer. > On 6/1/05, e-denton Java Programmer <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I recently wrote an Action which in conjunction with an ActiveX object > > returns a table from the server to update the DOM in the browser. My > > question is: Is this a proper use of an Action, here essentially just a > > subroutine I am calling from the client, with no forwarding action? Or > > should I have used a servlet for this purpose? > > > > Thanks. > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > "You can lead a horse to water but you cannot make it float on its back." > ~Dakota Jack~ > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- Rokibul Islam Khan = Software Programmer Spectrum Engineering Consortium Ltd. Chandrashila Shuvastu Tower Panth Path, Dhaka - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [W3OT][OT] Business Layer Ideas
Thanks for reviewing that thread, Frank. I really didn't want to read all those posts. :) On 01/06/05 23:53 Frank W. Zammetti wrote: Wow, so *this* is what it's like being the parent of Rosemary's baby! I wonder if there has ever been a more OT thread? Allow me to summarize all the salient points, and perhaps this thread can die peacefully... (1) Patterns are good, but don't cram'em in everywhere you have any problem to solve. And if you DO feel the need to cram'em in everywhere, I can suggest one other place you should be cramming them. (2) OOP is great, but don't give me a 500-class hierarchy to walk. I can comprehend the geometry of a tesseract, but not some of the convoluted messes some people spew out just because they read the terms inheritance, polymorphism, composition and overloading in some "Teach Yourself To Take Someone's Job That Actual Knows Their Ass From Their Elbow In 24 Hours" books. (2a) Don't give me 5 classes with 5,000 lines of code a piece either! Your someone that would use a damned goto if it was implemented! (3) If you never did Assembly, you suck (Laugh, damn it! That's a joke! Ooo is it??) (4) IDEs are fine, but if you can't do yourself what those 3 buttons you just clicked did for you, get outta my shop. Look, I use a lathe rather than widdle the decorative legs on my kitchen chairs, but the point is I COULD widdle them if I wanted to. Using modern development tools is much like that. (4a) If you can't debug your own damned code without a bouncing ball leading you through line-by-line, you have no business writing that code in the first place. I'm not suggesting you HAVE to put a System.out after each line of code, but if your relying on the IDE to hold your hand to understand what's going on in your own code, hit yourself with a hammer, please. (5) Much like the Red Sox until their World Series win, LISP proponents are never going to stop whining about how great their language of choice is until it's king of the hill. In other words, they're never going to stop whining. (6) C/C++ creates unmaintainable nightmare code. If you suck at it. Same for Java. Same for LISP. Same for Pascal. Same for ADA. Same for f'ing BASIC. Anyone see a pattern here?!? (Let me be the first to name it: it's Frank Zammetti's "ProgrammersSuckNotLanguages" pattern). (7) The Timex Sinclait 1000/ZX81 is the PC we should all have on our desktops. If you want to "multitask", buy two. (8) The German version of Outlook is stupid because to us Americans it looks like everyone is talking about Root Beer all the time (Review the thread... review the thread...) (9) Nothing is complex. There's your Zen moment for the day. (10) Corollary to #9: Everything is complex. Buddhist moment for the day. (Zen. Buddhist. Zen-Buddhist. I admit, I don't know what I'm talking about!) (11) Most of you apparently went to school in the Alps because it seems to have snowed a lot and been very uneven ground. And you did funny things with news periodicals. (12) Struts 1.3 uses the CoR pattern. Or maybe it's the IoC pattern. Or maybe it's the RTFM pattern. Could be the WtF pattern. No one knows. (That's another joke... geez, if I have to tell you that I'm really not doing a good job, am I?!?) (13) Wednesday is the new Friday apparently. (14) C is such a lousy language that NOBODY would EVER use it. Sorry Linus, I guess that whole kernel thing of yours was a big mistake. Ditto for Windows. Ditto for Halo. Ditto for piece of software here more than likely>. C++ is C with MORE chances to blow your foot off. Again, if you suck. Conclusion: everything should be written in Logo. I dare say no one has ever written a buggy, insecure piece of software in Logo. Better Logo than actually knowing what your doing. God forbid. (15) Everyone has an opinion, No one is afraid to use it. This, interestingly enough, is the exact opposite of nuclear weapons: few have them, everyone is afraid to use them! (16) If you ever have a philosophy final where the assignment is simply to prove that the chair in the middle of the room exists, write "What chair??" in the middle of the paper, hand it in and walk out. Rejoice in your 5-seconds A+. Ok, I'm done. I got a kid bugging me to play Area 51. Time to get my butt kicked. Frank Rahul Akolkar wrote: Allow me to define a new marker (Way, ) times 3 OT. I have left OT in for existing filters. -Rahul P.S.- 1) I suspect this is how DJ went to programming school [ http://www.bedlam.syol.com/ascendin.jpg ]* 2) You can convince the peasant Leon, given gas prices [ http://www.answersingenesis.org/creation/images/v22/i4/p53_tractor.jpg ]* *[All images copyright respective websites ] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --
Re: [W3OT][OT] Business Layer Ideas
Did anyone else notice that when Rosemary's baby was born a group of Japanese tourists went through the apartment where the Little Devil was laying and took photos? I almost fell out of my seat laughing at that one. On 6/1/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > Wow, so *this* is what it's like being the parent of Rosemary's baby! > > I wonder if there has ever been a more OT thread? > > Allow me to summarize all the salient points, and perhaps this thread > can die peacefully... > > (1) Patterns are good, but don't cram'em in everywhere you have any > problem to solve. And if you DO feel the need to cram'em in everywhere, > I can suggest one other place you should be cramming them. > > (2) OOP is great, but don't give me a 500-class hierarchy to walk. I > can comprehend the geometry of a tesseract, but not some of the > convoluted messes some people spew out just because they read the terms > inheritance, polymorphism, composition and overloading in some "Teach > Yourself To Take Someone's Job That Actual Knows Their Ass From Their > Elbow In 24 Hours" books. > > (2a) Don't give me 5 classes with 5,000 lines of code a piece either! > Your someone that would use a damned goto if it was implemented! > > (3) If you never did Assembly, you suck (Laugh, damn it! That's a joke! > Ooo is it??) > > (4) IDEs are fine, but if you can't do yourself what those 3 buttons you > just clicked did for you, get outta my shop. Look, I use a lathe rather > than widdle the decorative legs on my kitchen chairs, but the point is I > COULD widdle them if I wanted to. Using modern development tools is > much like that. > > (4a) If you can't debug your own damned code without a bouncing ball > leading you through line-by-line, you have no business writing that code > in the first place. I'm not suggesting you HAVE to put a System.out > after each line of code, but if your relying on the IDE to hold your > hand to understand what's going on in your own code, hit yourself with a > hammer, please. > > (5) Much like the Red Sox until their World Series win, LISP proponents > are never going to stop whining about how great their language of choice > is until it's king of the hill. In other words, they're never going to > stop whining. > > (6) C/C++ creates unmaintainable nightmare code. If you suck at it. > Same for Java. Same for LISP. Same for Pascal. Same for ADA. Same > for f'ing BASIC. Anyone see a pattern here?!? (Let me be the first to > name it: it's Frank Zammetti's "ProgrammersSuckNotLanguages" pattern). > > (7) The Timex Sinclait 1000/ZX81 is the PC we should all have on our > desktops. If you want to "multitask", buy two. > > (8) The German version of Outlook is stupid because to us Americans it > looks like everyone is talking about Root Beer all the time (Review the > thread... review the thread...) > > (9) Nothing is complex. There's your Zen moment for the day. > > (10) Corollary to #9: Everything is complex. Buddhist moment for the day. > > (Zen. Buddhist. Zen-Buddhist. I admit, I don't know what I'm talking > about!) > > (11) Most of you apparently went to school in the Alps because it seems > to have snowed a lot and been very uneven ground. And you did funny > things with news periodicals. > > (12) Struts 1.3 uses the CoR pattern. Or maybe it's the IoC pattern. > Or maybe it's the RTFM pattern. Could be the WtF pattern. No one > knows. (That's another joke... geez, if I have to tell you that I'm > really not doing a good job, am I?!?) > > (13) Wednesday is the new Friday apparently. > > (14) C is such a lousy language that NOBODY would EVER use it. Sorry > Linus, I guess that whole kernel thing of yours was a big mistake. > Ditto for Windows. Ditto for Halo. Ditto for COTS piece of software here more than likely>. C++ is C with MORE > chances to blow your foot off. Again, if you suck. Conclusion: > everything should be written in Logo. I dare say no one has ever > written a buggy, insecure piece of software in Logo. Better Logo than > actually knowing what your doing. God forbid. > > (15) Everyone has an opinion, No one is afraid to use it. This, > interestingly enough, is the exact opposite of nuclear weapons: few have > them, everyone is afraid to use them! > > (16) If you ever have a philosophy final where the assignment is simply > to prove that the chair in the middle of the room exists, write "What > chair??" in the middle of the paper, hand it in and walk out. Rejoice > in your 5-seconds A+. > > Ok, I'm done. I got a kid bugging me to play Area 51. Time to get my > butt kicked. > > Frank > > > Rahul Akolkar wrote: > > Allow me to define a new marker (Way, ) times 3 OT. I have left OT in > > for existing filters. > > > > -Rahul > > > > P.S.- > > 1) I suspect this is how DJ went to programming school [ > > http://www.bedlam.syol.com/ascendin.jpg ]* > > 2) You can convince the peasant Leon, given gas prices [ > > http://www.ans
Re: [W3OT][OT] Business Layer Ideas
Wow, so *this* is what it's like being the parent of Rosemary's baby! I wonder if there has ever been a more OT thread? Allow me to summarize all the salient points, and perhaps this thread can die peacefully... (1) Patterns are good, but don't cram'em in everywhere you have any problem to solve. And if you DO feel the need to cram'em in everywhere, I can suggest one other place you should be cramming them. (2) OOP is great, but don't give me a 500-class hierarchy to walk. I can comprehend the geometry of a tesseract, but not some of the convoluted messes some people spew out just because they read the terms inheritance, polymorphism, composition and overloading in some "Teach Yourself To Take Someone's Job That Actual Knows Their Ass From Their Elbow In 24 Hours" books. (2a) Don't give me 5 classes with 5,000 lines of code a piece either! Your someone that would use a damned goto if it was implemented! (3) If you never did Assembly, you suck (Laugh, damn it! That's a joke! Ooo is it??) (4) IDEs are fine, but if you can't do yourself what those 3 buttons you just clicked did for you, get outta my shop. Look, I use a lathe rather than widdle the decorative legs on my kitchen chairs, but the point is I COULD widdle them if I wanted to. Using modern development tools is much like that. (4a) If you can't debug your own damned code without a bouncing ball leading you through line-by-line, you have no business writing that code in the first place. I'm not suggesting you HAVE to put a System.out after each line of code, but if your relying on the IDE to hold your hand to understand what's going on in your own code, hit yourself with a hammer, please. (5) Much like the Red Sox until their World Series win, LISP proponents are never going to stop whining about how great their language of choice is until it's king of the hill. In other words, they're never going to stop whining. (6) C/C++ creates unmaintainable nightmare code. If you suck at it. Same for Java. Same for LISP. Same for Pascal. Same for ADA. Same for f'ing BASIC. Anyone see a pattern here?!? (Let me be the first to name it: it's Frank Zammetti's "ProgrammersSuckNotLanguages" pattern). (7) The Timex Sinclait 1000/ZX81 is the PC we should all have on our desktops. If you want to "multitask", buy two. (8) The German version of Outlook is stupid because to us Americans it looks like everyone is talking about Root Beer all the time (Review the thread... review the thread...) (9) Nothing is complex. There's your Zen moment for the day. (10) Corollary to #9: Everything is complex. Buddhist moment for the day. (Zen. Buddhist. Zen-Buddhist. I admit, I don't know what I'm talking about!) (11) Most of you apparently went to school in the Alps because it seems to have snowed a lot and been very uneven ground. And you did funny things with news periodicals. (12) Struts 1.3 uses the CoR pattern. Or maybe it's the IoC pattern. Or maybe it's the RTFM pattern. Could be the WtF pattern. No one knows. (That's another joke... geez, if I have to tell you that I'm really not doing a good job, am I?!?) (13) Wednesday is the new Friday apparently. (14) C is such a lousy language that NOBODY would EVER use it. Sorry Linus, I guess that whole kernel thing of yours was a big mistake. Ditto for Windows. Ditto for Halo. Ditto for COTS piece of software here more than likely>. C++ is C with MORE chances to blow your foot off. Again, if you suck. Conclusion: everything should be written in Logo. I dare say no one has ever written a buggy, insecure piece of software in Logo. Better Logo than actually knowing what your doing. God forbid. (15) Everyone has an opinion, No one is afraid to use it. This, interestingly enough, is the exact opposite of nuclear weapons: few have them, everyone is afraid to use them! (16) If you ever have a philosophy final where the assignment is simply to prove that the chair in the middle of the room exists, write "What chair??" in the middle of the paper, hand it in and walk out. Rejoice in your 5-seconds A+. Ok, I'm done. I got a kid bugging me to play Area 51. Time to get my butt kicked. Frank Rahul Akolkar wrote: Allow me to define a new marker (Way, ) times 3 OT. I have left OT in for existing filters. -Rahul P.S.- 1) I suspect this is how DJ went to programming school [ http://www.bedlam.syol.com/ascendin.jpg ]* 2) You can convince the peasant Leon, given gas prices [ http://www.answersingenesis.org/creation/images/v22/i4/p53_tractor.jpg ]* *[All images copyright respective websites ] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com -
Re: [OT] Business Layer Ideas
On 6/1/05, Pilgrim, Peter <[EMAIL PROTECTED]> wrote: > > > > > -Original Message- > > From: Dakota Jack [mailto:[EMAIL PROTECTED] > ==== > > > > "Strategy (315) Define a family of algorithms encapsulate each > > one, and make them > > interchangeable. Strategy lets the algorithm vary independently > > from clients that use > > it." > > > > This is exactly I always thought it was too. The point is that whatever you thought it was you code was merely three implementations of an interface having nothing to do with the Strategy Pattern. This is not mere nitpicking or picnicing. If you look at some of the patterns without a careful eye you will miss everything. For example, you can do a UML diagram of a State Pattern and a Strategy Pattern and get the exact same diagram. Indeed, the GoF book does just that. This does not mean at all, however, that those two patterns are the same. They could not be more different. Also, I am of the opinion that commons chain is not a Chain of Responsibility Pattern even if it is interesting and helpful. I will say more about on a rainy day. ///;-) Pace Vobiscum and Capre Diem -- No one ever went blind looking at the bright side of life. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
Fortran | | | Pascal Algol | | -- CPL | || Ada Modula-2 BCPL | || Ada 95 Modula-3 B | C Simula || | -- C++ | | | Eiffel Smalltalk Java Here are the object -oriented programming languages of note: Ada 95, Modula-3, C++, Eiffel, Smalltalk and Java. Right? I think Lisp along with Prolog, Scheme, Guile and CLOS (Common Lisp) as children of Logic and Fortran is considered to be "Functional and Logic Programming Languages". On 6/1/05, Dave Newton <[EMAIL PROTECTED]> wrote: > Leon Rosenberg wrote: > > >Actually smalltalk was a very good candidate, and java sells some > >technologies as modern, which were developed in/for smalltalk decades ago... > > > > > And Lisp, don't forget Lisp. > > >Ok, let's say: java is the first component-oriented language accepted by > >masses (or powered by a huge company)? > > > > > "Accepted by masses" might work for me. > > Not that this is necessarily a Good Thing, of course, and might, in > fact, be just the opposite. > > Dave > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [W3OT][OT] Business Layer Ideas
Rahul, that is the main administration building. Memories are made of this. On 6/1/05, Rahul Akolkar <[EMAIL PROTECTED]> wrote: > Allow me to define a new marker (Way, ) times 3 OT. I have left OT in > for existing filters. > > -Rahul > > P.S.- > 1) I suspect this is how DJ went to programming school [ > http://www.bedlam.syol.com/ascendin.jpg ]* > 2) You can convince the peasant Leon, given gas prices [ > http://www.answersingenesis.org/creation/images/v22/i4/p53_tractor.jpg > ]* > > *[All images copyright respective websites ] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: [OT] Business Layer Ideas
I think Java is acceptable for Pretty Large Projects, with > Large Numbers > of developers, especially if they're Geographically Distant. I'm > struggling to come up with a 10x20 program that would benefit > from being > written in Java that wouldn't suck, and I _like_ many parts of OO! http://vip8prod.messe-berlin.de/messe/execute/enShow?unit=Hall+5.1&prj= Just a small pretty application... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: [OT] Business Layer Ideas
I think Java is acceptable for Pretty Large Projects, with > Large Numbers > of developers, especially if they're Geographically Distant. I'm > struggling to come up with a 10x20 program that would benefit > from being > written in Java that wouldn't suck, and I _like_ many parts of OO! http://vip8prod.messe-berlin.de/messe/execute/enShow?unit=Hall+5.1&prj= Just a small pretty application... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
At least you had FEET! :) Leon Rosenberg wrote: At least you had newspapers!!! -Ursprüngliche Nachricht- Von: Scott Piker [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 1. Juni 2005 22:59 An: Struts Users Mailing List; Dakota Jack Betreff: RE: [OT] Business Layer Ideas We had to walk in the snow. And we couldn't afford snow boots, so we had to wrap newspapers around our feet! ...and they made us use Macs!!! ;-) -Original Message- From: Dakota Jack [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 01, 2005 4:54 PM To: Struts Users Mailing List Subject: Re: [OT] Business Layer Ideas When I was going to "programming school" we had to walk to school and back and it was uphill both ways. On 6/1/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: On Wed, June 1, 2005 12:15 pm, Simon Chappell said: Back when I was a young programmer we used to have to think. THINK! Hey, I'm the resident bemoaner of how rough we used to have it! How dare you take my job?!? :) LOL Oh the humanity. No patterns for us. Just endless cups of tea, a pad of paper (or the back of long listings on greenbar) and your flowchart stencil. Stencils?!? I laugh at your stencils! It was only freehand drawings for us, and that was when we took the time to actually PLAN anything! We had it rough I tell you, but I think that we wrote better code back in those days. And those of us that came through them, still have a tendency to do so. I have said on numerous occassions that programmers that have never touched Assembly are, with few exceptions, not as good. And although the overall tone of my reply here is a joking one, this is a point I am serious about. I have actually rejected resumes because they had no Assembly experience. I'm not saying you have to be able to hand-code a 3D game engine, but at least have had some exposure. I spent a number of years doing absolutely nothing BUT Assembly, and while I honestly haven't done anything beyond some very simple subfunctions in the past 5-7 years or so, I wouldn't trade that experience for all the algorithm classes and patterns knowledge in the world. There is NOTHING like understanding, at least at a conceptual level, what's going on down there in the lower layers of your machine. Assembly gives you this. Like I said, there are exceptions to this rule, but I haven't met too many. My first computer had 1K, yes, that's 1024 bytes. Timex Sinclair 1000 by any chance? I loved that little thing! So much so that I spend $200 on one off eBay last year (three of them actually, with a lot of extras). The best thing about it was that if you could manage anything decent on it you were learning... I crammed the entire catalog of movie times for a week for Long Island in it... invented my own rudimentary compression scheme (although I had no clue what "compression" or "algorithms" were back then... never even heard the words... I was like 9 or so!). And I didn't have the 16K expansion module because my dad tried to solder it on because we could never get a good contact, but he fried it in the process, so I was stuck with the 1K (actually, now that I think about it, it might have been 2K. I'm not sure). We can only hope. Perhaps the prophesied return of Lisp will finally happen and people will discover REAL programming, not this Teach Yourself The Latest Junk in 24 Hours stuff. Real, worthwhile, programming is hard, so if your going to do it, study for it, and learn (LEARN I say) to do it well. I}hate}}}LISP. LISP... ugh. I can't stand any language that contains more parenthesis per 1,000 lines of code than ACTUAL CODE! :) Well done, Craig, with restrospect. A simpler designed framework like Struts is exactly the example, the proof, which Simon espouses above. Yes. Yes. Yes. Thank you Craig. I agree... There are probably architecural decisions in Struts I could complain about, but I think it would quickly become nothing but nitpicking. Craig did a rather good job IMHO of straddling the line between a good architecure that is flexible and extensible without making it too complex. Good job indeed, thank you! Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To u
Re: AW: [OT] Business Layer Ideas
Leon Rosenberg wrote: As I wrote in the answer to dave: c is not c++. The main problem of c++ was actually, that they kept all the c-shit (yes powerful, but absolutely unmaintenable stuff ) in the language. I don't know where you're getting that "unmaintainable" bit from. A printer company I worked at had an approx. 1 million line codebase in C and I was productive in under a week; that doesn't sound unmaintainable to me. If you had a bad experience with C I'm sorry, but I really don't understand some of the assumptions you're making: my experiences have been with well-coded and documented systems, some quite large. I can make ANYTHING un-maintainable. Similiarly, I can make ANYTHING maintainable. Ok... What do you guess, what is the number of use cases for an average "pissy" web-portal? What's the number of usecases for a bloody spreasheet?! Each function is a usecase. Combinations of functions might be individual usecases. Macros. GUI. Reporting. Spreasheets are far more complicated than a portal, and are, in fact, more complicated than most websites. I don't know it either, but there were some studies back in the 96, 97 that an average java developer produces 10-15% more locs a day, then an average c developer. And by "produces" I mean, tested, working and documented code. I think to remember that it was about 45 loc a day for a c developer, and 55 for a java developer. And the numbers for Lisp vs. Java productivity are on the order of 2-10x of a Java developer. I don't judge productivity on LOC, though, since I can accomplish a lot more in Lisp with the same number of lines of code in Java. Heck, I could produce many more times the LOC in assembly, tested, documented, etc. than I could in Java :D As a technical lead, if you show me ten classes each containing only 20 lines of code, then you'd better be prepared to explain yourself. There are as many opinions as there are architects/leads/senior developers. Next time you have someone with 10x20 send him to me, we are always looking for good people. I'll do that--10x20 reeks of over-objectification. Heck, I tend to think a method is too long if it has over 40-50 LOC. Anything 10x20 probably shouldn't have been written in Java to begin with. I think Java is acceptable for Pretty Large Projects, with Large Numbers of developers, especially if they're Geographically Distant. I'm struggling to come up with a 10x20 program that would benefit from being written in Java that wouldn't suck, and I _like_ many parts of OO! Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
Leon Rosenberg wrote: Actually smalltalk was a very good candidate, and java sells some technologies as modern, which were developed in/for smalltalk decades ago... And Lisp, don't forget Lisp. Ok, let's say: java is the first component-oriented language accepted by masses (or powered by a huge company)? "Accepted by masses" might work for me. Not that this is necessarily a Good Thing, of course, and might, in fact, be just the opposite. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [W3OT][OT] Business Layer Ideas
Allow me to define a new marker (Way, ) times 3 OT. I have left OT in for existing filters. -Rahul P.S.- 1) I suspect this is how DJ went to programming school [ http://www.bedlam.syol.com/ascendin.jpg ]* 2) You can convince the peasant Leon, given gas prices [ http://www.answersingenesis.org/creation/images/v22/i4/p53_tractor.jpg ]* *[All images copyright respective websites ] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
Actually smalltalk was a very good candidate, and java sells some technologies as modern, which were developed in/for smalltalk decades ago... Ok, let's say: java is the first component-oriented language accepted by masses (or powered by a huge company)? Regards Leon > -Ursprüngliche Nachricht- > Von: Dakota Jack [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 1. Juni 2005 23:43 > An: Struts Users Mailing List > Betreff: Re: [OT] Business Layer Ideas > > On 6/1/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote: > > Java is actually the first component-oriented language. > > SmallTalk? My "Smalltalk/V 32-Bit Object-Oriented Programming System" > book circa 1994 has a Smalltalk link library (.sll) full of > components called "components" which you could dynamically > bind and unbind. > > -- > "You can lead a horse to water but you cannot make it float > on its back." > ~Dakota Jack~ > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
Actually smalltalk was a very good candidate, and java sells some technologies as modern, which were developed in/for smalltalk decades ago... Ok, let's say: java is the first component-oriented language accepted by masses (or powered by a huge company)? Regards Leon > -Ursprüngliche Nachricht- > Von: Dakota Jack [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 1. Juni 2005 23:43 > An: Struts Users Mailing List > Betreff: Re: [OT] Business Layer Ideas > > On 6/1/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote: > > Java is actually the first component-oriented language. > > SmallTalk? My "Smalltalk/V 32-Bit Object-Oriented Programming System" > book circa 1994 has a Smalltalk link library (.sll) full of > components called "components" which you could dynamically > bind and unbind. > > -- > "You can lead a horse to water but you cannot make it float > on its back." > ~Dakota Jack~ > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action vs. Servlet
Also if this is really just a subroutine you might want to write a Runnable to dump into your thread pool queue, if you have one, or a Thread itself, if you don't have one. There is no reason to tie up the server thread if the action is unrelated to your request return. On 6/1/05, e-denton Java Programmer <[EMAIL PROTECTED]> wrote: > Hi, > > I recently wrote an Action which in conjunction with an ActiveX object > returns a table from the server to update the DOM in the browser. My > question is: Is this a proper use of an Action, here essentially just a > subroutine I am calling from the client, with no forwarding action? Or > should I have used a servlet for this purpose? > > Thanks. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: [OT] Business Layer Ideas
> On 6/1/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote: > *snip* > > Would you be able to code them with c? Forget it. > > Actually, I suspect that alot of these have been coded with C/C++. As I wrote in the answer to dave: c is not c++. The main problem of c++ was actually, that they kept all the c-shit (yes powerful, but absolutely unmaintenable stuff ) in the language. > > > What we have had was mostly alpha-numeric based terminals (remember > > borlands > > gdi?) with maybe 10-20 business functions. > > Now, a pissy web-portal has more functionallity then the whole > > supercalc suite. > > I think that I doubt this assertion. Ok... What do you guess, what is the number of use cases for an average "pissy" web-portal? > > And talking about "complicated" and "simplicity"... What is > simplier > > to read, 10 classes a 20 lines java code, or 5000 lines of > assembler > > code doing the same? > > Now, I don't know what the accepted conversion factor is for > Java to assembler, but I think that this question/comparison > is flawed. > I don't know it either, but there were some studies back in the 96, 97 that an average java developer produces 10-15% more locs a day, then an average c developer. And by "produces" I mean, tested, working and documented code. I think to remember that it was about 45 loc a day for a c developer, and 55 for a java developer. > As a technical lead, if you show me ten classes each > containing only 20 lines of code, then you'd better be > prepared to explain yourself. There are as many opinions as there are architects/leads/senior developers. Next time you have someone with 10x20 send him to me, we are always looking for good people. > I'm all for using the OO aspects of Java, but not at the > expense of clear, concise code. Most less-experienced Java > developers have too many objects, especially for their logic. > I hate crawling around a million objects with short methods > where the thread bounces around between them and leaves you > feeling cross-eyed by the time you get it figured out. Well... Let's say, i have developed a very selective reading, i only read books, which tells me, that i'm right... Like (recently) j2ee development without ejb :-) Regards Leon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: [OT] Business Layer Ideas
> On 6/1/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote: > *snip* > > Would you be able to code them with c? Forget it. > > Actually, I suspect that alot of these have been coded with C/C++. As I wrote in the answer to dave: c is not c++. The main problem of c++ was actually, that they kept all the c-shit (yes powerful, but absolutely unmaintenable stuff ) in the language. > > > What we have had was mostly alpha-numeric based terminals (remember > > borlands > > gdi?) with maybe 10-20 business functions. > > Now, a pissy web-portal has more functionallity then the whole > > supercalc suite. > > I think that I doubt this assertion. Ok... What do you guess, what is the number of use cases for an average "pissy" web-portal? > > And talking about "complicated" and "simplicity"... What is > simplier > > to read, 10 classes a 20 lines java code, or 5000 lines of > assembler > > code doing the same? > > Now, I don't know what the accepted conversion factor is for > Java to assembler, but I think that this question/comparison > is flawed. > I don't know it either, but there were some studies back in the 96, 97 that an average java developer produces 10-15% more locs a day, then an average c developer. And by "produces" I mean, tested, working and documented code. I think to remember that it was about 45 loc a day for a c developer, and 55 for a java developer. > As a technical lead, if you show me ten classes each > containing only 20 lines of code, then you'd better be > prepared to explain yourself. There are as many opinions as there are architects/leads/senior developers. Next time you have someone with 10x20 send him to me, we are always looking for good people. > I'm all for using the OO aspects of Java, but not at the > expense of clear, concise code. Most less-experienced Java > developers have too many objects, especially for their logic. > I hate crawling around a million objects with short methods > where the thread bounces around between them and leaves you > feeling cross-eyed by the time you get it figured out. Well... Let's say, i have developed a very selective reading, i only read books, which tells me, that i'm right... Like (recently) j2ee development without ejb :-) Regards Leon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: [OT] Business Layer Ideas
Leon Rosenberg wrote: * What's a "modern" language, anyway? What features does a "modern" language have? I don't think Java is as widely used as it is because it's interesting or powerful, it was just a better C++ with marketing. Java is actually the first component-oriented language. *thud* What's a component?! SmallTalk was around a LONG time before Java, no? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
On 6/1/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote: > Java is actually the first component-oriented language. SmallTalk? My "Smalltalk/V 32-Bit Object-Oriented Programming System" book circa 1994 has a Smalltalk link library (.sll) full of components called "components" which you could dynamically bind and unbind. -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Introduction to JavaServer Faces
Sorry for the [OT] post.but this is important! The 2nd monthly meeting of the Atlanta-based JBoss Users Group is scheduled for tomorrow evening. Details can be found at the following URL: http://www.edgetechservices.net/jbug-atlanta/ -- James Mitchell Software Engineer / Open Source Evangelist Consulting / Mentoring / Freelance EdgeTech, Inc. http://www.edgetechservices.net/ 678.910.8017 AIM: jmitchtx Yahoo: jmitchtx MSN: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
target attribute from server in html:link tag please Help!
Hi guys! i have a problem I need to configurate de "target" attribute of my form, but i have to do it from mi action Any idea? Thanks Lucas __ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ¡gratis! ¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
AW: [OT] Business Layer Ideas
> > >Modern OSes, office suites or business software. > >Modern guis, with integrated media support, integrated audio/video > >broad- and unicasts, animations, sounds, and so on... > > > >Would you be able to code them with c? Forget it. > > > > > Why wouldn't I? We used to code most anything of importance > in C, yanno, including some pretty fancy stuff. C++ is not C! Really not! C++ to C is like C to assembler, like java to C++, like modern military jet to ww2 messerschmidt... > > * What's a "modern" language, anyway? What features does a "modern" > language have? I don't think Java is as widely used as it is > because it's interesting or powerful, it was just a better > C++ with marketing. Java is actually the first component-oriented language. But I think we should cut this branch off. It sounds like selling a tractor to a peasant, who just wants to keep his horse, and I'm not that good at selling :-) Regards Leon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: [OT] Business Layer Ideas
> > >Modern OSes, office suites or business software. > >Modern guis, with integrated media support, integrated audio/video > >broad- and unicasts, animations, sounds, and so on... > > > >Would you be able to code them with c? Forget it. > > > > > Why wouldn't I? We used to code most anything of importance > in C, yanno, including some pretty fancy stuff. C++ is not C! Really not! C++ to C is like C to assembler, like java to C++, like modern military jet to ww2 messerschmidt... > > * What's a "modern" language, anyway? What features does a "modern" > language have? I don't think Java is as widely used as it is > because it's interesting or powerful, it was just a better > C++ with marketing. Java is actually the first component-oriented language. But I think we should cut this branch off. It sounds like selling a tractor to a peasant, who just wants to keep his horse, and I'm not that good at selling :-) Regards Leon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
Leon Rosenberg wrote: Modern OSes, office suites or business software. Modern guis, with integrated media support, integrated audio/video broad- and unicasts, animations, sounds, and so on... Would you be able to code them with c? Forget it. Why wouldn't I? We used to code most anything of importance in C, yanno, including some pretty fancy stuff. BeOS was written in C/C++, and that was pretty nifty. Plato and Lotus Notes was all or mostly C, at least at the beginning, wasn't it? Now, a pissy web-portal has more functionallity then the whole supercalc suite. Really? Depends on what you mean by functionality, I suppose. Supercalc could (and did) run businesses. I can't run a business with a portal. And talking about "complicated" and "simplicity"... What is simplier to read, 10 classes a 20 lines java code, or 5000 lines of assembler code doing the same? Guess that depends on what you know. Just like I'd avoid reading 5000 lines of assembly, I'd avoid reading 200 lines of Java, and read the documentation. A lot of the assembly coding I did ended up being mini-languages that would assemble to the actual code (sort of like a JVM, I suppose) so I didn't have to read 5000 lines, I just read the 200 lines that actually solved the problem, just like in the Java: I only read the code that's important. That said, the majority of low-level programming I did on bare-metal systems was in Forth, so I rarely had to look at my assembly code once it was written and tested. Nobody has said that "modern"* languages don't give you anything. All I said was that _I_ think patterns can be over-used, that _I_ was more productive using 15-year old SmallTalk and Lisp environments, and that I have yet to be convinced that much of what people think is so great about today's languages, platforms, tools, etc. is necessarily a Good Thing: I am consistently more impressed by programmers that learned to program in my era than today. Relax, it's okay. Dave * What's a "modern" language, anyway? What features does a "modern" language have? I don't think Java is as widely used as it is because it's interesting or powerful, it was just a better C++ with marketing. (And I'm only partially playing devil's advocate here.) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
On 6/1/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote: *snip* > Would you be able to code them with c? Forget it. Actually, I suspect that alot of these have been coded with C/C++. > What we have had was mostly alpha-numeric based terminals (remember borlands > gdi?) with maybe 10-20 business functions. > Now, a pissy web-portal has more functionallity then the whole supercalc > suite. I think that I doubt this assertion. > Nostalgic talking about old times is ok, but you shouldn't forget reality... I work with reality every day. > And talking about "complicated" and "simplicity"... What is simplier to > read, 10 classes a 20 lines java code, or 5000 lines of assembler code doing > the same? Now, I don't know what the accepted conversion factor is for Java to assembler, but I think that this question/comparison is flawed. As a technical lead, if you show me ten classes each containing only 20 lines of code, then you'd better be prepared to explain yourself. I'm all for using the OO aspects of Java, but not at the expense of clear, concise code. Most less-experienced Java developers have too many objects, especially for their logic. I hate crawling around a million objects with short methods where the thread bounces around between them and leaves you feeling cross-eyed by the time you get it figured out. Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
At least you had newspapers!!! > -Ursprüngliche Nachricht- > Von: Scott Piker [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 1. Juni 2005 22:59 > An: Struts Users Mailing List; Dakota Jack > Betreff: RE: [OT] Business Layer Ideas > > We had to walk in the snow. And we couldn't afford snow > boots, so we had to wrap newspapers around our feet! > > ...and they made us use Macs!!! ;-) > > -Original Message- > From: Dakota Jack [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 01, 2005 4:54 PM > To: Struts Users Mailing List > Subject: Re: [OT] Business Layer Ideas > > When I was going to "programming school" we had to walk to > school and back and it was uphill both ways. > > On 6/1/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > > On Wed, June 1, 2005 12:15 pm, Simon Chappell said: > > > Back when I was a young programmer we used to have to > think. THINK! > > > > Hey, I'm the resident bemoaner of how rough we used to have > it! How > > dare you take my job?!? :) LOL > > > > > Oh > > > the humanity. No patterns for us. Just endless cups of > tea, a pad of > > > > paper (or the back of long listings on greenbar) and your > flowchart > > > stencil. > > > > Stencils?!? I laugh at your stencils! It was only > freehand drawings > > for us, and that was when we took the time to actually PLAN > anything! > > > > > We had it rough I tell you, but I think that we wrote better code > > > back in those days. And those of us that came through them, still > > > have a tendency to do so. > > > > I have said on numerous occassions that programmers that have never > > touched Assembly are, with few exceptions, not as good. > And although > > the overall tone of my reply here is a joking one, this is > a point I > > am serious about. > > > > I have actually rejected resumes because they had no Assembly > experience. > > I'm not saying you have to be able to hand-code a 3D game > engine, but > > at least have had some exposure. > > > > I spent a number of years doing absolutely nothing BUT > Assembly, and > > while I honestly haven't done anything beyond some very simple > > subfunctions in the past 5-7 years or so, I wouldn't trade that > > experience for all the algorithm classes and patterns > knowledge in the > > > world. There is NOTHING like understanding, at least at a > conceptual > > level, what's going on down there in the lower layers of > your machine. > Assembly gives you this. > > > > Like I said, there are exceptions to this rule, but I > haven't met too > many. > > > > > My first computer had 1K, yes, that's 1024 bytes. > > > > Timex Sinclair 1000 by any chance? I loved that little thing! So > > much so that I spend $200 on one off eBay last year (three of them > > actually, with a lot of extras). The best thing about it > was that if > > you could manage anything decent on it you were learning... > I crammed > > the entire catalog of movie times for a week for Long > Island in it... > > invented my own rudimentary compression scheme (although I > had no clue > what "compression" > > or "algorithms" were back then... never even heard the > words... I was > > like > > 9 or so!). And I didn't have the 16K expansion module > because my dad > > tried to solder it on because we could never get a good > contact, but > > he fried it in the process, so I was stuck with the 1K > (actually, now > > that I think about it, it might have been 2K. I'm not sure). > > > > > We can only hope. Perhaps the prophesied return of Lisp > will finally > > > > happen and people will discover REAL programming, not this Teach > > > Yourself The Latest Junk in 24 Hours stuff. Real, worthwhile, > > > programming is hard, so if your going to do it, study for it, and > > > learn (LEARN I say) to do it well. > > > > I}hate}}}LISP. > > > > LISP... ugh. I can't stand any language that contains more > > parenthesis per 1,000 lines of code than ACTUAL CODE! :) > > > > >> Well done, Craig, with restrospect. A simpler designed framework > > >> like Struts is exactly the example, the proof, which > Simon espouses > > > >> above. > > > > > > Yes. Yes. Yes. Thank you Craig. > > > > I agree... There are probably architecural decisions in > Struts I could > > > complain about, but I think it would quickly become nothing but > > nitpicking. Craig did a rather good job IMHO of straddling > the line > > between a good architecure that is flexible and extensible without > > making it too complex. Good job indeed, thank you! > > > > Frank > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > "You can lead a horse to water but you cannot make it float > on its back." > ~Dakota Jack~ > > - > To uns
Re: [OT] Business Layer Ideas
At least you had newspapers!!! > -Ursprüngliche Nachricht- > Von: Scott Piker [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 1. Juni 2005 22:59 > An: Struts Users Mailing List; Dakota Jack > Betreff: RE: [OT] Business Layer Ideas > > We had to walk in the snow. And we couldn't afford snow > boots, so we had to wrap newspapers around our feet! > > ...and they made us use Macs!!! ;-) > > -Original Message- > From: Dakota Jack [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 01, 2005 4:54 PM > To: Struts Users Mailing List > Subject: Re: [OT] Business Layer Ideas > > When I was going to "programming school" we had to walk to > school and back and it was uphill both ways. > > On 6/1/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > > On Wed, June 1, 2005 12:15 pm, Simon Chappell said: > > > Back when I was a young programmer we used to have to > think. THINK! > > > > Hey, I'm the resident bemoaner of how rough we used to have > it! How > > dare you take my job?!? :) LOL > > > > > Oh > > > the humanity. No patterns for us. Just endless cups of > tea, a pad of > > > > paper (or the back of long listings on greenbar) and your > flowchart > > > stencil. > > > > Stencils?!? I laugh at your stencils! It was only > freehand drawings > > for us, and that was when we took the time to actually PLAN > anything! > > > > > We had it rough I tell you, but I think that we wrote better code > > > back in those days. And those of us that came through them, still > > > have a tendency to do so. > > > > I have said on numerous occassions that programmers that have never > > touched Assembly are, with few exceptions, not as good. > And although > > the overall tone of my reply here is a joking one, this is > a point I > > am serious about. > > > > I have actually rejected resumes because they had no Assembly > experience. > > I'm not saying you have to be able to hand-code a 3D game > engine, but > > at least have had some exposure. > > > > I spent a number of years doing absolutely nothing BUT > Assembly, and > > while I honestly haven't done anything beyond some very simple > > subfunctions in the past 5-7 years or so, I wouldn't trade that > > experience for all the algorithm classes and patterns > knowledge in the > > > world. There is NOTHING like understanding, at least at a > conceptual > > level, what's going on down there in the lower layers of > your machine. > Assembly gives you this. > > > > Like I said, there are exceptions to this rule, but I > haven't met too > many. > > > > > My first computer had 1K, yes, that's 1024 bytes. > > > > Timex Sinclair 1000 by any chance? I loved that little thing! So > > much so that I spend $200 on one off eBay last year (three of them > > actually, with a lot of extras). The best thing about it > was that if > > you could manage anything decent on it you were learning... > I crammed > > the entire catalog of movie times for a week for Long > Island in it... > > invented my own rudimentary compression scheme (although I > had no clue > what "compression" > > or "algorithms" were back then... never even heard the > words... I was > > like > > 9 or so!). And I didn't have the 16K expansion module > because my dad > > tried to solder it on because we could never get a good > contact, but > > he fried it in the process, so I was stuck with the 1K > (actually, now > > that I think about it, it might have been 2K. I'm not sure). > > > > > We can only hope. Perhaps the prophesied return of Lisp > will finally > > > > happen and people will discover REAL programming, not this Teach > > > Yourself The Latest Junk in 24 Hours stuff. Real, worthwhile, > > > programming is hard, so if your going to do it, study for it, and > > > learn (LEARN I say) to do it well. > > > > I}hate}}}LISP. > > > > LISP... ugh. I can't stand any language that contains more > > parenthesis per 1,000 lines of code than ACTUAL CODE! :) > > > > >> Well done, Craig, with restrospect. A simpler designed framework > > >> like Struts is exactly the example, the proof, which > Simon espouses > > > >> above. > > > > > > Yes. Yes. Yes. Thank you Craig. > > > > I agree... There are probably architecural decisions in > Struts I could > > > complain about, but I think it would quickly become nothing but > > nitpicking. Craig did a rather good job IMHO of straddling > the line > > between a good architecure that is flexible and extensible without > > making it too complex. Good job indeed, thank you! > > > > Frank > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > "You can lead a horse to water but you cannot make it float > on its back." > ~Dakota Jack~ > > - > To uns
RE: [OT] Business Layer Ideas
We had to walk in the snow. And we couldn't afford snow boots, so we had to wrap newspapers around our feet! ...and they made us use Macs!!! ;-) -Original Message- From: Dakota Jack [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 01, 2005 4:54 PM To: Struts Users Mailing List Subject: Re: [OT] Business Layer Ideas When I was going to "programming school" we had to walk to school and back and it was uphill both ways. On 6/1/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > On Wed, June 1, 2005 12:15 pm, Simon Chappell said: > > Back when I was a young programmer we used to have to think. THINK! > > Hey, I'm the resident bemoaner of how rough we used to have it! How > dare you take my job?!? :) LOL > > > Oh > > the humanity. No patterns for us. Just endless cups of tea, a pad of > > paper (or the back of long listings on greenbar) and your flowchart > > stencil. > > Stencils?!? I laugh at your stencils! It was only freehand drawings > for us, and that was when we took the time to actually PLAN anything! > > > We had it rough I tell you, but I think that we wrote better code > > back in those days. And those of us that came through them, still > > have a tendency to do so. > > I have said on numerous occassions that programmers that have never > touched Assembly are, with few exceptions, not as good. And although > the overall tone of my reply here is a joking one, this is a point I > am serious about. > > I have actually rejected resumes because they had no Assembly experience. > I'm not saying you have to be able to hand-code a 3D game engine, but > at least have had some exposure. > > I spent a number of years doing absolutely nothing BUT Assembly, and > while I honestly haven't done anything beyond some very simple > subfunctions in the past 5-7 years or so, I wouldn't trade that > experience for all the algorithm classes and patterns knowledge in the > world. There is NOTHING like understanding, at least at a conceptual > level, what's going on down there in the lower layers of your machine. Assembly gives you this. > > Like I said, there are exceptions to this rule, but I haven't met too many. > > > My first computer had 1K, yes, that's 1024 bytes. > > Timex Sinclair 1000 by any chance? I loved that little thing! So > much so that I spend $200 on one off eBay last year (three of them > actually, with a lot of extras). The best thing about it was that if > you could manage anything decent on it you were learning... I crammed > the entire catalog of movie times for a week for Long Island in it... > invented my own rudimentary compression scheme (although I had no clue what "compression" > or "algorithms" were back then... never even heard the words... I was > like > 9 or so!). And I didn't have the 16K expansion module because my dad > tried to solder it on because we could never get a good contact, but > he fried it in the process, so I was stuck with the 1K (actually, now > that I think about it, it might have been 2K. I'm not sure). > > > We can only hope. Perhaps the prophesied return of Lisp will finally > > happen and people will discover REAL programming, not this Teach > > Yourself The Latest Junk in 24 Hours stuff. Real, worthwhile, > > programming is hard, so if your going to do it, study for it, and > > learn (LEARN I say) to do it well. > > I}hate}}}LISP. > > LISP... ugh. I can't stand any language that contains more > parenthesis per 1,000 lines of code than ACTUAL CODE! :) > > >> Well done, Craig, with restrospect. A simpler designed framework > >> like Struts is exactly the example, the proof, which Simon espouses > >> above. > > > > Yes. Yes. Yes. Thank you Craig. > > I agree... There are probably architecural decisions in Struts I could > complain about, but I think it would quickly become nothing but > nitpicking. Craig did a rather good job IMHO of straddling the line > between a good architecure that is flexible and extensible without > making it too complex. Good job indeed, thank you! > > Frank > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
I had to use an abacus with only one bead per string for binarry. Flippity, flip, flip, flip. Gates were hell. I had to have an "assembly" of 12 abaci around my neck. On 6/1/05, Tom Dimock <[EMAIL PROTECTED]> wrote: > > On Jun 1, 2005, at 12:39 PM, Frank W. Zammetti wrote: > > > Timex Sinclair 1000 by any chance? > > Agh, you youngsters... My first program ran on a Burroughs 220 that > was a vacuum tube based computer! But seriously, I agree fully that > having learned on machines that had very limited memory, and having > spent a lot of time writing assembler made me a much better > programmer. But what I think contributed the most was that all of my > early programming was done on mainframes where one compile and run > (actually compile, link and run; remember link editors and overlay > structures?) per day was considered pretty good turnaround. If you > were going to get your programming assignments done on time, you > learned to debug code by reading it and thinking until you found the > errors. I still make very little use of debuggers to this day, and > find the younger programmers completely mystified as to how I ever > get code to work. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
Getting the patterns wrong is typical. Is everyone SURE (?) that Struts 1.3 is actually using the CoR pattern or is it just called that? On 6/1/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote: > > > > One major problem lies with how programmers are educated > > today. A lot of schools teach a language or a design > > philosophy but rarely are in-depth enough to actually breed > > the abstract skills necessary for the programmer to become > > useful. It's a shame, really. I went to college in > > 1986 (and had been programming since 1978) and within a few > > years of my graduation in 1990 the curriculum at most schools > > had been watered down to the point of near uselessness. > > > > Well, make a stop... You can't compare things programmed back in the Dark > Ages with nowerdays programming. > We make far more complicated programms in far less time and for lesser cost. > > You can critisize overusage of patterns, but under-usage of patterns is > clearly at least as bad. > Patterns make code understanding simplier, because everyone (should) know > them, and > simplicity is the goal as many of us stated before. > You can't reinvent the wheel each time you write a piece of code, it's > simply waste of your time and customers/companies money. > > Regards > Leon > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
When I was going to "programming school" we had to walk to school and back and it was uphill both ways. On 6/1/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > On Wed, June 1, 2005 12:15 pm, Simon Chappell said: > > Back when I was a young programmer we used to have to think. THINK! > > Hey, I'm the resident bemoaner of how rough we used to have it! How dare > you take my job?!? :) LOL > > > Oh > > the humanity. No patterns for us. Just endless cups of tea, a pad of > > paper (or the back of long listings on greenbar) and your flowchart > > stencil. > > Stencils?!? I laugh at your stencils! It was only freehand drawings for > us, and that was when we took the time to actually PLAN anything! > > > We had it rough I tell you, but I think that we wrote better > > code back in those days. And those of us that came through them, still > > have a tendency to do so. > > I have said on numerous occassions that programmers that have never > touched Assembly are, with few exceptions, not as good. And although the > overall tone of my reply here is a joking one, this is a point I am > serious about. > > I have actually rejected resumes because they had no Assembly experience. > I'm not saying you have to be able to hand-code a 3D game engine, but at > least have had some exposure. > > I spent a number of years doing absolutely nothing BUT Assembly, and while > I honestly haven't done anything beyond some very simple subfunctions in > the past 5-7 years or so, I wouldn't trade that experience for all the > algorithm classes and patterns knowledge in the world. There is NOTHING > like understanding, at least at a conceptual level, what's going on down > there in the lower layers of your machine. Assembly gives you this. > > Like I said, there are exceptions to this rule, but I haven't met too many. > > > My first computer had 1K, yes, that's 1024 bytes. > > Timex Sinclair 1000 by any chance? I loved that little thing! So much so > that I spend $200 on one off eBay last year (three of them actually, with > a lot of extras). The best thing about it was that if you could manage > anything decent on it you were learning... I crammed the entire catalog of > movie times for a week for Long Island in it... invented my own > rudimentary compression scheme (although I had no clue what "compression" > or "algorithms" were back then... never even heard the words... I was like > 9 or so!). And I didn't have the 16K expansion module because my dad > tried to solder it on because we could never get a good contact, but he > fried it in the process, so I was stuck with the 1K (actually, now that I > think about it, it might have been 2K. I'm not sure). > > > We can only hope. Perhaps the prophesied return of Lisp will finally > > happen and people will discover REAL programming, not this Teach > > Yourself The Latest Junk in 24 Hours stuff. Real, worthwhile, > > programming is hard, so if your going to do it, study for it, and > > learn (LEARN I say) to do it well. > > I}hate}}}LISP. > > LISP... ugh. I can't stand any language that contains more parenthesis > per 1,000 lines of code than ACTUAL CODE! :) > > >> Well done, Craig, with restrospect. A simpler designed framework > >> like Struts is exactly the example, the proof, which Simon espouses > >> above. > > > > Yes. Yes. Yes. Thank you Craig. > > I agree... There are probably architecural decisions in Struts I could > complain about, but I think it would quickly become nothing but > nitpicking. Craig did a rather good job IMHO of straddling the line > between a good architecure that is flexible and extensible without making > it too complex. Good job indeed, thank you! > > Frank > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
> -Ursprüngliche Nachricht- > Von: Dave Newton [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 1. Juni 2005 21:37 > An: Struts Users Mailing List > Betreff: Re: AW: [OT] Business Layer Ideas > > Leon Rosenberg wrote: > > >We make far more complicated programms in far less time and > for lesser cost. > > > > > "Complicated" is a pretty loaded term... I don't see much > complication in the majority of web apps. Big, sure. > Complicated? Sometimes. The most complicated stuff I've > worked on lately is rules engines, for which I used Jess, > which looked suspiciously like a combination of Lisp and > Prolog. Interaction between existing systems can get hairy > fairly quickly as well. > By complicated I mean following: Modern OSes, office suites or business software. Modern guis, with integrated media support, integrated audio/video broad- and unicasts, animations, sounds, and so on... Would you be able to code them with c? Forget it. What we have had was mostly alpha-numeric based terminals (remember borlands gdi?) with maybe 10-20 business functions. Now, a pissy web-portal has more functionallity then the whole supercalc suite. Nostalgic talking about old times is ok, but you shouldn't forget reality... And talking about "complicated" and "simplicity"... What is simplier to read, 10 classes a 20 lines java code, or 5000 lines of assembler code doing the same? Regards Leon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
> -Ursprüngliche Nachricht- > Von: Dave Newton [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 1. Juni 2005 21:37 > An: Struts Users Mailing List > Betreff: Re: AW: [OT] Business Layer Ideas > > Leon Rosenberg wrote: > > >We make far more complicated programms in far less time and > for lesser cost. > > > > > "Complicated" is a pretty loaded term... I don't see much > complication in the majority of web apps. Big, sure. > Complicated? Sometimes. The most complicated stuff I've > worked on lately is rules engines, for which I used Jess, > which looked suspiciously like a combination of Lisp and > Prolog. Interaction between existing systems can get hairy > fairly quickly as well. > By complicated I mean following: Modern OSes, office suites or business software. Modern guis, with integrated media support, integrated audio/video broad- and unicasts, animations, sounds, and so on... Would you be able to code them with c? Forget it. What we have had was mostly alpha-numeric based terminals (remember borlands gdi?) with maybe 10-20 business functions. Now, a pissy web-portal has more functionallity then the whole supercalc suite. Nostalgic talking about old times is ok, but you shouldn't forget reality... And talking about "complicated" and "simplicity"... What is simplier to read, 10 classes a 20 lines java code, or 5000 lines of assembler code doing the same? Regards Leon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
AW = RE in german :-) It's standart by outlook... > -Ursprüngliche Nachricht- > Von: Frank W. Zammetti [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 1. Juni 2005 21:55 > An: Martin Gainty > Cc: Struts Users Mailing List > Betreff: Re: [OT] Business Layer Ideas > > Leon, I meant to ask, what does the AW prefix on messages > signify? I've seen it plenty of times but never really > thought to ask until now. > > Oh yeah... IDE button-clickers... I HATE THEE! I have no > problem with a person that uses convenience tools so long as > they can do without them. I have no problem with using a > tool to generate getters and setters for a bean class, but if > you can't do it by hand then you have no business coding. I > actually know people that have no business coding, sorry as that is. > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnytex Technologies > http://www.omnytex.com > > On Wed, June 1, 2005 3:43 pm, Martin Gainty said: > > There is always a cost As Leon pointed IDE button clickers are now > > called Software Engineers What happens when a requirement > comes along > > which is not acomodated by clicking 2 buttons? > > The entire project comes to an immediate HALT..the child prodigy > > sheepishly walks into his bosses office and cries he cannot do it > > since the IDE does not accomodate this feature..it is time > to call the > > 'dreaded consultant' > > The forgotten rule of Extensibility means that however you > build your > > app you must always be able to take on any features and > functionality > > that the client may desire Always best to Read/update and > understand > > the caveats of the requirements doc carefully before pushing *any* > > limited scoped solution into production.. > > Those who remember rolling your own customised solution > know this is a > > lost artform > > Martin- > > - Original Message - > > From: "Leon Rosenberg" <[EMAIL PROTECTED]> > > To: "'Struts Users Mailing List'" > > Sent: Wednesday, June 01, 2005 2:44 PM > > Subject: AW: [OT] Business Layer Ideas > > > > > >>> > >>> One major problem lies with how programmers are educated today. A > >>> lot of schools teach a language or a design philosophy but rarely > >>> are in-depth enough to actually breed the abstract skills > necessary > >>> for the programmer to become useful. It's a shame, > really. I went to > >>> college in > >>> 1986 (and had been programming since 1978) and within a > few years of > >>> my graduation in 1990 the curriculum at most schools had been > >>> watered down to the point of near uselessness. > >>> > >> > >> Well, make a stop... You can't compare things programmed > back in the > >> Dark Ages with nowerdays programming. > >> We make far more complicated programms in far less time and for > >> lesser cost. > >> > >> You can critisize overusage of patterns, but under-usage > of patterns > >> is clearly at least as bad. > >> Patterns make code understanding simplier, because > everyone (should) > >> know them, and simplicity is the goal as many of us stated before. > >> You can't reinvent the wheel each time you write a piece of code, > >> it's simply waste of your time and customers/companies money. > >> > >> Regards > >> Leon > >> > >> > >> > >> > - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
AW = RE in german :-) It's standart by outlook... > -Ursprüngliche Nachricht- > Von: Frank W. Zammetti [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 1. Juni 2005 21:55 > An: Martin Gainty > Cc: Struts Users Mailing List > Betreff: Re: [OT] Business Layer Ideas > > Leon, I meant to ask, what does the AW prefix on messages > signify? I've seen it plenty of times but never really > thought to ask until now. > > Oh yeah... IDE button-clickers... I HATE THEE! I have no > problem with a person that uses convenience tools so long as > they can do without them. I have no problem with using a > tool to generate getters and setters for a bean class, but if > you can't do it by hand then you have no business coding. I > actually know people that have no business coding, sorry as that is. > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnytex Technologies > http://www.omnytex.com > > On Wed, June 1, 2005 3:43 pm, Martin Gainty said: > > There is always a cost As Leon pointed IDE button clickers are now > > called Software Engineers What happens when a requirement > comes along > > which is not acomodated by clicking 2 buttons? > > The entire project comes to an immediate HALT..the child prodigy > > sheepishly walks into his bosses office and cries he cannot do it > > since the IDE does not accomodate this feature..it is time > to call the > > 'dreaded consultant' > > The forgotten rule of Extensibility means that however you > build your > > app you must always be able to take on any features and > functionality > > that the client may desire Always best to Read/update and > understand > > the caveats of the requirements doc carefully before pushing *any* > > limited scoped solution into production.. > > Those who remember rolling your own customised solution > know this is a > > lost artform > > Martin- > > - Original Message - > > From: "Leon Rosenberg" <[EMAIL PROTECTED]> > > To: "'Struts Users Mailing List'" > > Sent: Wednesday, June 01, 2005 2:44 PM > > Subject: AW: [OT] Business Layer Ideas > > > > > >>> > >>> One major problem lies with how programmers are educated today. A > >>> lot of schools teach a language or a design philosophy but rarely > >>> are in-depth enough to actually breed the abstract skills > necessary > >>> for the programmer to become useful. It's a shame, > really. I went to > >>> college in > >>> 1986 (and had been programming since 1978) and within a > few years of > >>> my graduation in 1990 the curriculum at most schools had been > >>> watered down to the point of near uselessness. > >>> > >> > >> Well, make a stop... You can't compare things programmed > back in the > >> Dark Ages with nowerdays programming. > >> We make far more complicated programms in far less time and for > >> lesser cost. > >> > >> You can critisize overusage of patterns, but under-usage > of patterns > >> is clearly at least as bad. > >> Patterns make code understanding simplier, because > everyone (should) > >> know them, and simplicity is the goal as many of us stated before. > >> You can't reinvent the wheel each time you write a piece of code, > >> it's simply waste of your time and customers/companies money. > >> > >> Regards > >> Leon > >> > >> > >> > >> > - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RES: Problem with struts in Sun One 8.1 integrated with NetBeans 4.1
The problem was resolved. The ActionServlet was trying validate tiles-defs.xml and tiles point to a public dtd and time-out ocurred. Then we put tiles-config_1_1.dtd in a specific folder in Sun1 (C:\Sun\AppServer\lib\dtds). But unfortunatelly we have other problem: bean:message tag is not working. Follow stacktrace: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:830) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:763) org.apache.jsp.pages.login.login_jsp._jspService(login_jsp.java:132) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105) javax.servlet.http.HttpServlet.service(HttpServlet.java:860) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251) javax.servlet.http.HttpServlet.service(HttpServlet.java:860) sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:517) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165) root cause javax.servlet.jsp.JspException: Cannot find message resources under key org.apache.struts.action.MESSAGE org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:1233) org.apache.struts.taglib.TagUtils.message(TagUtils.java:1082) org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:226) org.apache.jsp.pages.login.login_jsp._jspx_meth_bean_message_0(login_jsp.java:235) org.apache.jsp.pages.login.login_jsp._jspx_meth_html_form_0(login_jsp.java:159) org.apache.jsp.pages.login.login_jsp._jspService(login_jsp.java:117) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105) javax.servlet.http.HttpServlet.service(HttpServlet.java:860) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251) javax.servlet.http.HttpServlet.service(HttpServlet.java:860) sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:517) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165) Our login.jsp: : . . . And our struts-config.xml part: Thanks for any help -Mensagem original- De: Martin Gainty [mailto:[EMAIL PROTECTED] Enviada em: Wednesday, 1 June 2005 11:18 AM Para: Eduardo Ribeiro da Silva Cc: Struts Users Mailing List Assunto: Re: Problem with struts in Sun One 8.1 integrated with NetBeans 4.1 Eduardo- It looks as if you never closed down the Tomcat instance that is using that socket so make sure tomcat is shutdown 'properly' The second is that your struts-config.xml has an action-mapping action type="FormBeanPackage.FormBeanClass" Make sure you have FormBeanPackage.FormBeanClass compiled and deployed in web-inf/classes or jar'ed and placed in web-inf/lib folder(s) In the case of DynaActionForm use the ClassName specifier to identify the FormBeanPackage.FormBeanClass and compiled and deployed in web-inf/classes or jar'ed and placed in web-inf/lib folder(s) HTH- Martin- Original Message - From: "Eduardo Ribeiro da Silva" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Wednesday, June 01, 2005 9:17 AM Subject: Problem with struts in Sun One 8.1 integrated with NetBeans 4.1 Hi people, I'm trying deploy an application w
Re: [OT] Business Layer Ideas
Leon, I meant to ask, what does the AW prefix on messages signify? I've seen it plenty of times but never really thought to ask until now. Oh yeah... IDE button-clickers... I HATE THEE! I have no problem with a person that uses convenience tools so long as they can do without them. I have no problem with using a tool to generate getters and setters for a bean class, but if you can't do it by hand then you have no business coding. I actually know people that have no business coding, sorry as that is. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, June 1, 2005 3:43 pm, Martin Gainty said: > There is always a cost As Leon pointed IDE button clickers are now called > Software Engineers > What happens when a requirement comes along which is not acomodated by > clicking 2 buttons? > The entire project comes to an immediate HALT..the child prodigy > sheepishly > walks into his bosses office > and cries he cannot do it since the IDE does not accomodate this > feature..it > is time to call the 'dreaded consultant' > The forgotten rule of Extensibility means that however you build your app > you must always be able to take on any features and functionality that the > client may desire > Always best to Read/update and understand the caveats of the requirements > doc carefully before pushing *any* limited scoped solution into > production.. > Those who remember rolling your own customised solution know this is a > lost > artform > Martin- > - Original Message - > From: "Leon Rosenberg" <[EMAIL PROTECTED]> > To: "'Struts Users Mailing List'" > Sent: Wednesday, June 01, 2005 2:44 PM > Subject: AW: [OT] Business Layer Ideas > > >>> >>> One major problem lies with how programmers are educated >>> today. A lot of schools teach a language or a design >>> philosophy but rarely are in-depth enough to actually breed >>> the abstract skills necessary for the programmer to become >>> useful. It's a shame, really. I went to college in >>> 1986 (and had been programming since 1978) and within a few >>> years of my graduation in 1990 the curriculum at most schools >>> had been watered down to the point of near uselessness. >>> >> >> Well, make a stop... You can't compare things programmed back in the >> Dark >> Ages with nowerdays programming. >> We make far more complicated programms in far less time and for lesser >> cost. >> >> You can critisize overusage of patterns, but under-usage of patterns is >> clearly at least as bad. >> Patterns make code understanding simplier, because everyone (should) >> know >> them, and >> simplicity is the goal as many of us stated before. >> You can't reinvent the wheel each time you write a piece of code, it's >> simply waste of your time and customers/companies money. >> >> Regards >> Leon >> >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
On Wed, June 1, 2005 3:42 pm, Dave Newton said: > (Although I have to admit, when game programming or the Sega GameGear I > would have had to pull off my own hea if I hadn't had the ICE.) That's a good point... I do PocketPC game development, and I'd hate to think about doing it without a good debugger at the ready. Especially for those "gee, I just switched to release mode and now this stupid array bounds is being overflowed because the optimzation switches are a bit too aggressive by default" problems. Ugh. >>(except for those damned Websphere-specific files!) >> > Weblogic, too :( I suppose it's true of any app server, save Tomcat :) The ironic thing about the Websphere files is that I am now the only one around here that can understand and edit them by hand! I let RAD generate them to begin with, then hacked the hell out of them to trim them down to the basics that I could easily understand, now I don't need RAD any more. Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
There is always a cost As Leon pointed IDE button clickers are now called Software Engineers What happens when a requirement comes along which is not acomodated by clicking 2 buttons? The entire project comes to an immediate HALT..the child prodigy sheepishly walks into his bosses office and cries he cannot do it since the IDE does not accomodate this feature..it is time to call the 'dreaded consultant' The forgotten rule of Extensibility means that however you build your app you must always be able to take on any features and functionality that the client may desire Always best to Read/update and understand the caveats of the requirements doc carefully before pushing *any* limited scoped solution into production.. Those who remember rolling your own customised solution know this is a lost artform Martin- - Original Message - From: "Leon Rosenberg" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" Sent: Wednesday, June 01, 2005 2:44 PM Subject: AW: [OT] Business Layer Ideas One major problem lies with how programmers are educated today. A lot of schools teach a language or a design philosophy but rarely are in-depth enough to actually breed the abstract skills necessary for the programmer to become useful. It's a shame, really. I went to college in 1986 (and had been programming since 1978) and within a few years of my graduation in 1990 the curriculum at most schools had been watered down to the point of near uselessness. Well, make a stop... You can't compare things programmed back in the Dark Ages with nowerdays programming. We make far more complicated programms in far less time and for lesser cost. You can critisize overusage of patterns, but under-usage of patterns is clearly at least as bad. Patterns make code understanding simplier, because everyone (should) know them, and simplicity is the goal as many of us stated before. You can't reinvent the wheel each time you write a piece of code, it's simply waste of your time and customers/companies money. Regards Leon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
Frank W. Zammetti wrote: On Wed, June 1, 2005 2:55 pm, Tom Dimock said: I still make very little use of debuggers to this day, and find the younger programmers completely mystified as to how I ever get code to work. I frequently get the same reaction... I rarely use a debugger either, yet I seem to have very little trouble tracking down problems. In fact, I dare say I am a more efficient bug hunter than many people I know who DO use them. Debuggers seem useful for only a small range of bug types. When you need one, they're awesome, but generally a good reading and understanding is more than enough. Or some simple logging :) (Although I have to admit, when game programming or the Sega GameGear I would have had to pull off my own hea if I hadn't had the ICE.) (except for those damned Websphere-specific files!) Weblogic, too :( I'm still not sure why it needs .JSPF files; if anybody knows, tell me, because it's causing me a headache right now. The thing is, I had never to that point even SEEN Pascal code! I did the same thing with COBOL once. And immediately swore I'd never learn COBOL. *shudder* Of course, I did the same thing with Java, and just look at me now... :/ Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Automatic validation question...
> -Original Message- > From: N G [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 31, 2005 3:37 PM > To: Struts-user > Subject: Automatic validation question... > > If I have set up validation as follows: > > > > > test > (radioButton = "firstNameSearch")var-value> > > > > If "validwhen" failts, will it try to validate the "required"? I'm pretty sure it will go through all of the "depends" so that it can display *all* of the validation errors. Try it and see. - Dave > In other words, when using automatic validation, the validator goes > through the list in "depends" and quits as soon as something is not > valid or does it keep going? > > Also, does my "validwhen" look right? I have different types of > searches on my form and depending on which search (radio button) > the user clicks, different fields are required. So, if the user > clicks on "First Name Search", the first name field will be required. > Did I set it up correctly? Why not use requiredif? - Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: [OT] Business Layer Ideas
Leon Rosenberg wrote: We make far more complicated programms in far less time and for lesser cost. "Complicated" is a pretty loaded term... I don't see much complication in the majority of web apps. Big, sure. Complicated? Sometimes. The most complicated stuff I've worked on lately is rules engines, for which I used Jess, which looked suspiciously like a combination of Lisp and Prolog. Interaction between existing systems can get hairy fairly quickly as well. We definitely have better _tools_ for making big, complicated systems, although the tools I use today (things like Eclipse, IdeaJ, etc.) shine (for me) because they reduce some of the tedium of programming in Java. I was able to generate more agile, complicated, and functional systems using SmallTalk or Lisp environments fifteen years ago, and they've held up extremely well for today's needs, AFAICT. Patterns make code understanding simplier, because everyone (should) know them, and simplicity is the goal as many of us stated before. I think patterns _can_ make code comprehension easier. I definitely agree that simplicity is a Very Important Goal, but abstraction isn't always the right path to reach it, that's all I'm saying. You can't reinvent the wheel each time you write a piece of code, it's simply waste of your time and customers/companies money. I've found that the wheels invented (by me, anyway) are generally different enough that it's very tricky, and not terribly cost-effective, to over-generalize. There are, of course, places where a good, generalized model works perfectly and covers enough bases that the pathological cases can be worked around easily. I should point out that in the world of web applications I've found quite a bit of use for several of the more popular patterns, and am very impressed with how they've helped me out, and I desperately wish I had more time to use more of the Really Good Frameworks that exist. But I do a lot of other types of programming as well (embedded systems, device drivers, AI, and other miscellaneous junk) an only a few patterns have really made much of a difference to me there (things like decorators, facades, and IoC seem to be almost universally helpful). I could just be a sucky programmer, too :D Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
On Wed, June 1, 2005 2:55 pm, Tom Dimock said: > I still make very little use of debuggers to this day, and > find the younger programmers completely mystified as to how I ever > get code to work. I frequently get the same reaction... I rarely use a debugger either, yet I seem to have very little trouble tracking down problems. In fact, I dare say I am a more efficient bug hunter than many people I know who DO use them. I don't bemoan anyone using a debugger by the way, or any other advanced tool. Maybe at one point I would have, but no longer. I realize that each person works at peak efficiency in their own way, with their own preferred tools. That's one of the reasons I am a big believer in not forcing any given IDE on anyone and in fact I'll buy my guys virtually any tool they tell me they need (as long as they are convincing!)... especially in the Java world where it's relatively simple to make applications agnostic about development environments (except for those damned Websphere-specific files!), let each work in the way they are most comfortable and will be most efficient. As long as it all boils down to an Ant script and each can reproduce a build in their environment, I'm cool with it. For me, it's UltraEdit and a command line, for some it's WSAD or Eclipse or IntelliJ or whatever else. Here's a cool story (which illustrates just how pitiful my life is, but I digress)... back in high school one day a fellow student came to me... he was taking a Pascal class (yes, my school actually had Fortran, COBOL and Pascal classes!)... he was having endless trouble getting a program of his to work. He showed me the listing, and it took me about 10 minutes of looking at it, just reading the code, but I finally pointed out the problem. I don't remember exactly what the problem was, but it wasn't a simple syntactic error, it was a logic/flow issue. The thing is, I had never to that point even SEEN Pascal code! But, I knew enough about the structure of programming languages in general and about program construction in general and about logic in general that I could figure it out. Now bow before me! Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
On Jun 1, 2005, at 12:39 PM, Frank W. Zammetti wrote: Timex Sinclair 1000 by any chance? Agh, you youngsters... My first program ran on a Burroughs 220 that was a vacuum tube based computer! But seriously, I agree fully that having learned on machines that had very limited memory, and having spent a lot of time writing assembler made me a much better programmer. But what I think contributed the most was that all of my early programming was done on mainframes where one compile and run (actually compile, link and run; remember link editors and overlay structures?) per day was considered pretty good turnaround. If you were going to get your programming assignments done on time, you learned to debug code by reading it and thinking until you found the errors. I still make very little use of debuggers to this day, and find the younger programmers completely mystified as to how I ever get code to work. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: [OT] Business Layer Ideas
> > One major problem lies with how programmers are educated > today. A lot of schools teach a language or a design > philosophy but rarely are in-depth enough to actually breed > the abstract skills necessary for the programmer to become > useful. It's a shame, really. I went to college in > 1986 (and had been programming since 1978) and within a few > years of my graduation in 1990 the curriculum at most schools > had been watered down to the point of near uselessness. > Well, make a stop... You can't compare things programmed back in the Dark Ages with nowerdays programming. We make far more complicated programms in far less time and for lesser cost. You can critisize overusage of patterns, but under-usage of patterns is clearly at least as bad. Patterns make code understanding simplier, because everyone (should) know them, and simplicity is the goal as many of us stated before. You can't reinvent the wheel each time you write a piece of code, it's simply waste of your time and customers/companies money. Regards Leon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: [OT] Business Layer Ideas
> > One major problem lies with how programmers are educated > today. A lot of schools teach a language or a design > philosophy but rarely are in-depth enough to actually breed > the abstract skills necessary for the programmer to become > useful. It's a shame, really. I went to college in > 1986 (and had been programming since 1978) and within a few > years of my graduation in 1990 the curriculum at most schools > had been watered down to the point of near uselessness. > Well, make a stop... You can't compare things programmed back in the Dark Ages with nowerdays programming. We make far more complicated programms in far less time and for lesser cost. You can critisize overusage of patterns, but under-usage of patterns is clearly at least as bad. Patterns make code understanding simplier, because everyone (should) know them, and simplicity is the goal as many of us stated before. You can't reinvent the wheel each time you write a piece of code, it's simply waste of your time and customers/companies money. Regards Leon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Dynamically adding components to pages (using struts and custom tags)
> >In my opinion, using custom tags for this purpose is not the best > >way to go. Custom tags are meant to decouple code from markup. > > I tend to agree with you. I agree as well, but I'll add that you could put a StringBuffer in one of the scopes-- pageContext or request to share it across tags. Or you could nest all of your tags in a tag, and store the stringbuffer as an instance variable in that tag. > >I would (A) either use a controller/navigation switch for this (B) > >or use some logic on the page for this, e.g. , etc. > > What do you mean by (A)? I'm sure he meant some checking in an Action to determine the forward. This could lead to a lot of duplication, though. - Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Action vs. Servlet
Is the rest of your application on the server-side Struts-based? If so I would consider that reason enough to implement it as an Action. If your saying this is the extent of your server-side processing and asking whether you should use Struts for it or not, I would tend to say no... There's probably no especially good reason to do anything but a straight servlet, unless you know you need internationalization perhaps, or something else Struts offers and you don't want to build it yourself. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, June 1, 2005 2:36 pm, Durham David R Jr Ctr 805 CSPTS/SCE said: >> I recently wrote an Action which in conjunction with an ActiveX >> object returns a table from the server to update the DOM in the >> browser. My question is: Is this a proper use of an Action, here >> essentially just a subroutine I am calling from the client, with >> no forwarding action? Or should I have used a servlet for this >> purpose? > > That's a good question. My general recommendation is to use Actions > even though you may not return a Forward. My reasoning is that you > still have whatever hooks you may have added (or may add later) to > Struts' request processing. > > > - Dave > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Action vs. Servlet
> I recently wrote an Action which in conjunction with an ActiveX > object returns a table from the server to update the DOM in the > browser. My question is: Is this a proper use of an Action, here > essentially just a subroutine I am calling from the client, with > no forwarding action? Or should I have used a servlet for this > purpose? That's a good question. My general recommendation is to use Actions even though you may not return a Forward. My reasoning is that you still have whatever hooks you may have added (or may add later) to Struts' request processing. - Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
Frank W. Zammetti wrote: And I didn't have the 16K expansion module because my dad tried to solder it on because we could never get a good contact No no, you wanted it a little loose, for paging :D I}hate}}}LISP. LISP... ugh. I can't stand any language that contains more parenthesis per 1,000 lines of code than ACTUAL CODE! :) Sounds like why I hate Java; I dislike having more boilerplate than actual problem-solving material. I agree... There are probably architecural decisions in Struts I could complain about, but I think it would quickly become nothing but nitpicking. Craig did a rather good job IMHO of straddling the line between a good architecure that is flexible and extensible without making it too complex. Good job indeed, thank you! +1 Pretty lean and mean, all things considered. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
Simon Chappell wrote: Back when I was a young programmer we used to have to think. THINK! Ah, a man after my own heart. In those days, if we wanted the computer to do _anything_, we generally had to write it ourselves, and nobody had ever done it before, so we couldn't even cheat. And like you say, we were not blessed with an abundance of memory (although I had a luxurious 4K, giving me 3K of bloat over you ;) When was the last time you had to worry about memory efficiency? I actually still get to worry sometimes, as I work from time to time with small embedded systems, but even those are pretty extreme compared to stuff I was programming on even ten years ago. The game machine I programmed on rarely had more than 16K, into which we would cram (limited) AI, sound, voice, and graphics. We can only hope. Perhaps the prophesied return of Lisp will finally happen and people will discover REAL programming, not this Teach Yourself The Latest Junk in 24 Hours stuff. Mmmm, Creamy Lisp Goodness. One major problem lies with how programmers are educated today. A lot of schools teach a language or a design philosophy but rarely are in-depth enough to actually breed the abstract skills necessary for the programmer to become useful. It's a shame, really. I went to college in 1986 (and had been programming since 1978) and within a few years of my graduation in 1990 the curriculum at most schools had been watered down to the point of near uselessness. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
Dave- could you give us an example of over-using a weak abstraction ? Martin- - Original Message - From: "Dave Newton" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Wednesday, June 01, 2005 2:19 PM Subject: Re: [OT] Business Layer Ideas Frank W. Zammetti wrote: Related to this, patterns are a wonderful invention, but I see day in and day out people trying to find a pattern for every single situation. People seem to think that they have to solve every problem by finding a suitable pattern. The problem is, everyone seems to be so "pattern-gung-ho" nowadays that they simply want to apply a pattern and if it actually makes things more complex, too bad. If it doesn't really fit the problem but does happen to solve it, that's fine too. A pattern mismatch, or a pattern where none was truly needed, is just as bad as no pattern at all in my experience. "This practice is not only common, but institutionalized. For example, in the OO world you hear a good deal about "patterns". I wonder if these patterns are not sometimes evidence of case (c), the human compiler, at work. When I see patterns in my programs, I consider it a sign of trouble. The shape of a program should reflect only the problem it needs to solve. Any other regularity in the code is a sign, to me at least, that I'm using abstractions that aren't powerful enough-- often that I'm generating by hand the expansions of some macro that I need to write." -- Paul Graham Dave "No, really, he's not a cult" Newton - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
Frank W. Zammetti wrote: Related to this, patterns are a wonderful invention, but I see day in and day out people trying to find a pattern for every single situation. People seem to think that they have to solve every problem by finding a suitable pattern. The problem is, everyone seems to be so "pattern-gung-ho" nowadays that they simply want to apply a pattern and if it actually makes things more complex, too bad. If it doesn't really fit the problem but does happen to solve it, that's fine too. A pattern mismatch, or a pattern where none was truly needed, is just as bad as no pattern at all in my experience. "This practice is not only common, but institutionalized. For example, in the OO world you hear a good deal about "patterns". I wonder if these patterns are not sometimes evidence of case (c), the human compiler, at work. When I see patterns in my programs, I consider it a sign of trouble. The shape of a program should reflect only the problem it needs to solve. Any other regularity in the code is a sign, to me at least, that I'm using abstractions that aren't powerful enough-- often that I'm generating by hand the expansions of some macro that I need to write." -- Paul Graham Dave "No, really, he's not a cult" Newton - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
Come on guys... it is much tougher today than back when you and I were young! Programming is programming: things haven't changed that much. ;) I started out doing Assembler. Then moved on to Cobol and CICS. I remember the excitement when Cobol II came out wow 4 new instructions... learnt it in 15 seconds flat. Followed the fashion to Client/Server applications in VB & C++ Moved on to Internet/Intranet/Extranet fashions... with Microsoft Technologies. All of the tiers, architectures & infrastructures. Now I'm on the Java side of things. Think of all of the stuff happening today... APIs, Frameworks, Patterns, etc. And the responsibility of being competent today is a never ending task. I am smiling... knowing that I could probably go back to CICS/Cobol and be productive in half a day. Walk out of the office and forget about my job... which is something I cannot do anymore. But I am having a blast... and wouldn't change anything ah perhaps somethings that this is for another time! My little trip down memory lane. :) - Glenn "Frank W. Zammetti" <[EMAIL PROTECTED]> 01/06/2005 12:39 PM Please respond to "Struts Users Mailing List" To "Simon Chappell" <[EMAIL PROTECTED]> cc "Struts Users Mailing List" Subject Re: [OT] Business Layer Ideas On Wed, June 1, 2005 12:15 pm, Simon Chappell said: > Back when I was a young programmer we used to have to think. THINK! Hey, I'm the resident bemoaner of how rough we used to have it! How dare you take my job?!? :) LOL > Oh > the humanity. No patterns for us. Just endless cups of tea, a pad of > paper (or the back of long listings on greenbar) and your flowchart > stencil. Stencils?!? I laugh at your stencils! It was only freehand drawings for us, and that was when we took the time to actually PLAN anything! > We had it rough I tell you, but I think that we wrote better > code back in those days. And those of us that came through them, still > have a tendency to do so. I have said on numerous occassions that programmers that have never touched Assembly are, with few exceptions, not as good. And although the overall tone of my reply here is a joking one, this is a point I am serious about. I have actually rejected resumes because they had no Assembly experience. I'm not saying you have to be able to hand-code a 3D game engine, but at least have had some exposure. I spent a number of years doing absolutely nothing BUT Assembly, and while I honestly haven't done anything beyond some very simple subfunctions in the past 5-7 years or so, I wouldn't trade that experience for all the algorithm classes and patterns knowledge in the world. There is NOTHING like understanding, at least at a conceptual level, what's going on down there in the lower layers of your machine. Assembly gives you this. Like I said, there are exceptions to this rule, but I haven't met too many. > My first computer had 1K, yes, that's 1024 bytes. Timex Sinclair 1000 by any chance? I loved that little thing! So much so that I spend $200 on one off eBay last year (three of them actually, with a lot of extras). The best thing about it was that if you could manage anything decent on it you were learning... I crammed the entire catalog of movie times for a week for Long Island in it... invented my own rudimentary compression scheme (although I had no clue what "compression" or "algorithms" were back then... never even heard the words... I was like 9 or so!). And I didn't have the 16K expansion module because my dad tried to solder it on because we could never get a good contact, but he fried it in the process, so I was stuck with the 1K (actually, now that I think about it, it might have been 2K. I'm not sure). > We can only hope. Perhaps the prophesied return of Lisp will finally > happen and people will discover REAL programming, not this Teach > Yourself The Latest Junk in 24 Hours stuff. Real, worthwhile, > programming is hard, so if your going to do it, study for it, and > learn (LEARN I say) to do it well. I}hate}}}LISP. LISP... ugh. I can't stand any language that contains more parenthesis per 1,000 lines of code than ACTUAL CODE! :) >> Well done, Craig, with restrospect. A simpler designed framework >> like Struts is exactly the example, the proof, which Simon espouses >> above. > > Yes. Yes. Yes. Thank you Craig. I agree... There are probably architecural decisions in Struts I could complain about, but I think it would quickly become nothing but nitpicking. Craig did a rather good job IMHO of straddling the line between a good architecure that is flexible and extensible without making it too complex. Good job indeed, thank you! Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
On Wed, June 1, 2005 12:15 pm, Simon Chappell said: > Back when I was a young programmer we used to have to think. THINK! Hey, I'm the resident bemoaner of how rough we used to have it! How dare you take my job?!? :) LOL > Oh > the humanity. No patterns for us. Just endless cups of tea, a pad of > paper (or the back of long listings on greenbar) and your flowchart > stencil. Stencils?!? I laugh at your stencils! It was only freehand drawings for us, and that was when we took the time to actually PLAN anything! > We had it rough I tell you, but I think that we wrote better > code back in those days. And those of us that came through them, still > have a tendency to do so. I have said on numerous occassions that programmers that have never touched Assembly are, with few exceptions, not as good. And although the overall tone of my reply here is a joking one, this is a point I am serious about. I have actually rejected resumes because they had no Assembly experience. I'm not saying you have to be able to hand-code a 3D game engine, but at least have had some exposure. I spent a number of years doing absolutely nothing BUT Assembly, and while I honestly haven't done anything beyond some very simple subfunctions in the past 5-7 years or so, I wouldn't trade that experience for all the algorithm classes and patterns knowledge in the world. There is NOTHING like understanding, at least at a conceptual level, what's going on down there in the lower layers of your machine. Assembly gives you this. Like I said, there are exceptions to this rule, but I haven't met too many. > My first computer had 1K, yes, that's 1024 bytes. Timex Sinclair 1000 by any chance? I loved that little thing! So much so that I spend $200 on one off eBay last year (three of them actually, with a lot of extras). The best thing about it was that if you could manage anything decent on it you were learning... I crammed the entire catalog of movie times for a week for Long Island in it... invented my own rudimentary compression scheme (although I had no clue what "compression" or "algorithms" were back then... never even heard the words... I was like 9 or so!). And I didn't have the 16K expansion module because my dad tried to solder it on because we could never get a good contact, but he fried it in the process, so I was stuck with the 1K (actually, now that I think about it, it might have been 2K. I'm not sure). > We can only hope. Perhaps the prophesied return of Lisp will finally > happen and people will discover REAL programming, not this Teach > Yourself The Latest Junk in 24 Hours stuff. Real, worthwhile, > programming is hard, so if your going to do it, study for it, and > learn (LEARN I say) to do it well. I}hate}}}LISP. LISP... ugh. I can't stand any language that contains more parenthesis per 1,000 lines of code than ACTUAL CODE! :) >> Well done, Craig, with restrospect. A simpler designed framework >> like Struts is exactly the example, the proof, which Simon espouses >> above. > > Yes. Yes. Yes. Thank you Craig. I agree... There are probably architecural decisions in Struts I could complain about, but I think it would quickly become nothing but nitpicking. Craig did a rather good job IMHO of straddling the line between a good architecure that is flexible and extensible without making it too complex. Good job indeed, thank you! Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
I have these 2 phrases posted in my office as a reminder... " Simplicity is the ultimate sophistication " - Leonardo da Vinci " The ability to simplify means to eliminate the unnecessary so that the necessary may speak" - Hans Hofmann - Glenn Leon Rosenberg <[EMAIL PROTECTED]> 01/06/2005 11:42 AM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc Subject Re: [OT] Business Layer Ideas On Wed, 2005-06-01 at 10:31 -0400, Frank W. Zammetti wrote: > ... > Simplicity is a beautiful thing. That is always my underlying design goal > for two reasons... Now this is really a perfect statement on architectures! Thanx Frank Leon. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
> Patterns came from the recognition of common idioms, practices in the > industry. Religously following and applying patterns could condemn > you not to discovering future oversights and other intuitions. Back when I was a young programmer we used to have to think. THINK! Oh the humanity. No patterns for us. Just endless cups of tea, a pad of paper (or the back of long listings on greenbar) and your flowchart stencil. We had it rough I tell you, but I think that we wrote better code back in those days. And those of us that came through them, still have a tendency to do so. When was the last time you had to worry about memory efficiency? I have 1.5 Gb of RAM on my machine at home. Goodness, how do you use all of that up? (Photoshop is the only thing that comes close to using that much memory) My first computer had 1K, yes, that's 1024 bytes. To get anything worthwhile to work in that, you had to think hard and squeeze harder. It made us think. Many programmers today don't even know that computers used to be that small. > I wonder, if they will get over the dessert dunes onto > lambda functions and tuples next? We can only hope. Perhaps the prophesied return of Lisp will finally happen and people will discover REAL programming, not this Teach Yourself The Latest Junk in 24 Hours stuff. Real, worthwhile, programming is hard, so if your going to do it, study for it, and learn (LEARN I say) to do it well. > Well done, Craig, with restrospect. A simpler designed framework > like Struts is exactly the example, the proof, which Simon espouses > above. Yes. Yes. Yes. Thank you Craig. Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to validate
Hi I would like to validate roles in in validation.xml i have given like this But I am not getting any error message when I submitted the page without selecting any role from list box PS: I am using struts1.1 Can some body throw some light on this Thanks in advance --Venkat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
On Wed, 2005-06-01 at 10:31 -0400, Frank W. Zammetti wrote: > ... > Simplicity is a beautiful thing. That is always my underlying design goal > for two reasons... Now this is really a perfect statement on architectures! Thanx Frank Leon. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Business Layer Ideas
> -Original Message- > From: Simon Chappell [mailto:[EMAIL PROTECTED] > Sent: 01 June 2005 16:29 > To: Struts Users Mailing List > Subject: Re: [OT] Business Layer Ideas > > > Good stuff Frank. Your point is a good one and well made. > > I just spoke at a Java User Group here in Wisconsin on a similar > issue, about how most people don't need to improve their Java > programming skills, rather they need to improve their programming > skills! > > I think that pattern use falls in the same area. There are folks that > use patterns religiously, thinking that they're being good > programmers. All the while not realising that they're reducing > themselves down to the level of a coding monkey. > Patterns came from the recognition of common idioms, practices in the industry. Religously following and applying patterns could condemn you not to discovering future oversights and other intuitions. > Too much of the Java code that I see is not object-oriented, it's > object-obsessed. Objects defined for any small silly thing. Wrappers > upon wrappers, calls to super in multiple levels of inheritance. > Arrgh. It's like trying to follow the plot of one of Frank Herbert's > Dune novels. (Good for novels, bad for programs though!) I wonder, if they will get over the dessert dunes onto lambda functions and tuples next? > > Simon Well done, Craig, with restrospect. A simpler designed framework like Struts is exactly the example, the proof, which Simon espouses above. > > On 6/1/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > > On Wed, June 1, 2005 9:47 am, Dakota Jack said: > > > This is what our > > > fellow traveler Frank Zammettie finds inherently > suspicious about the > > > *OOP nuts*. > > > > Woah, leave me out of this. I've purposely stayed away > from this thread > > all this time, now I have to get in... > > > > I don't want anyone thinking I'm anti-OOP or anything > remotely like that. > > I am very much an OOP proponent. While I almost certainly > have used the > > term "OOP nuts" at some point because I think some people > could probably > > be described that way, that really sounds a lot more harsh > than my opinion > > actually is, so let me clarify... > > > > What I have said is that I have seen many instances where > people take the > > OOP exercise so far in trying to get a perfect > architectural structure in > > place that they wind up writing code that is actually > harder to understand > > than it otherwise could be. There is great benefit to > writing code that > > is composed of smaller, largely interchangeable pieces > rather than large > > monolithic pieces. We all know this. However, I have seen > this taken so > > far that it takes forever to grasp how all the pieces fit > together to form > > the larger whole, and this is just as bad as writing one > larger whole > > would have been. > > > > Related to this, patterns are a wonderful invention, but I > see day in and > > day out people trying to find a pattern for every single situation. > > People seem to think that they have to solve every problem > by finding a > > suitable pattern. The problem is, everyone seems to be so > > "pattern-gung-ho" nowadays that they simply want to apply a > pattern and if > > it actually makes things more complex, too bad. If it > doesn't really fit > > the problem but does happen to solve it, that's fine too. A pattern > > mismatch, or a pattern where none was truly needed, is just > as bad as no > > pattern at all in my experience. > > > > Simplicity is a beautiful thing. That is always my > underlying design goal > > for two reasons... > > > > One, in a corporate environment as I work in, you never > know when someone > > else is going to have to come along and maintain your code. > You aren't > > doing them any favors by writing code that, while > architecturally sound, > > is more complex to grasp. If after three months they say > "wow, this guy > > architected this code perfectly!", that's great, but if > those three months > > are spent not being especially productive while they try > and understand > > what you built, then the code wasn't well-written in the end. > > > > Two, when you jump around between many different projects, > you tend to > > forget your own work quickly. I sometimes look at code I > wrote just last > > year and go "I don't remember how or why I did this". Fortunately I > > comment the hell out of everything I do, but more > importantly I try to > > code in straight-forward ways. Sometimes that means *NOT* > creating that > > helper class to encapsulate 10 lines of code, even though that might > > architecturally be better and fit some pattern, but instead > just inline it > > (assuming I don't expect it to be shared of course). > > > > In a nuthshell, my point is absolutely *USE* OOP and > patterns, and other > > related techniques, think in those ways all the time, but don't > > over-engineer things!! Don
RE: [OT] Business Layer Ideas
> -Original Message- > From: Dakota Jack [mailto:[EMAIL PROTECTED] ==== > > "Strategy (315) Define a family of algorithms encapsulate each > one, and make them > interchangeable. Strategy lets the algorithm vary independently > from clients that use > it." > This is exactly I always thought it was too. > So, your point about the Strategy Pattern, of course, does not work > and is a non-starter. > > Yes I missed the ``StrategyContext'' the actual POJO or entity that encapsulates the ``Strategy'' and de-couples from the POJO. Because of this decoupling you can thus change the strategy and therefore write a __crazy_frog__ implementation that calls chain if you found a worthy cause for it. > A Strategy Pattern most importantly introduces some Helper utility > interface for the various implementations of an algorithm. Thus, you > could have either > > A. > > interface IFormatDatabaseColumnWidth { > public void setHelper(Helper helper); > public void doWork(); > } > > or > > B. > > Inteface IFormatDatabaseColumnWidth { > public void doWork(); > } > > But the implementations would have to be something like: > > public class IFormatDatabaseColumnWidthImpl { > private Helper helper; > > public void setHelper(Helper helper) { > this.helper = helper; > } > > public void doWork() { > // Do business logic > int value = helper.calcColumnWidth(data,metaData[]),columnNo); > // Do more business logic > } > } > > Thus, there would be a Helper interface: > > interface Helper { > int calcColumnWidth(Object [][] data, MetaData > metaData[]) int columnNo); > } > > The differing calculations, then, would go into the Helper interface > implementations and not into the IFormatDatabaseColumnWidth interface > implementations. So, you might have > > public class AllRowsFDCW implements Helper { > public int calcColumnWidth(Object [][] data, MetaData metaData[]) > int columnNo) { > // Slowest and most accurate algorithm iterates all rows in > the result set > } > } > > and > > public class First100FDCW implements Helper { > public int calcColumnWidth(Object [][] data, MetaData metaData[]) > int columnNo) { > // Algorithm based on the first 100 rows > } > } > > and > > public class class StepwiseFDCW implements Helper { > public int calcColumnWidth(Object [][] data, MetaData metaData[]) > int columnNo) { > // Algorithm that calculates the column width for every N rows > } > } > > Please note that the pattern essentially uses polymorphism and late > binding not through implementations of an interface but through a > composite pattern. > > Thus, when inversion of control (IoC) is used with the Strategy > Pattern, whether you are doing Dependency Injection (DI) or Dependency > Lookup (DL), the Helper is what is the subject of the lookup or > injection. (IoC, including DL, cannot be identified as DI merely.) > > Your explanation of the Strategy Pattern leaves out what is essential > to the pattern. Consequently, your explanation is merely how Chain of > Responsibiltiy (CoR) can be used instead of differing implementations > of an interface. See below for a short note on your CoR example. > Dependency injection can be used anywhere where there is a public constructor or JavaBean setters. If you are using strategy pattern that you are right you can inject the ``strategy'' into the ``StrategyContext'' at run-time. And in this case if you want to use CoR inside the ``StrategyContext'' of course you need to write an adaptor for your algorithm interface to call the first command of the Chain. > > On 6/1/05, Pilgrim, Peter <[EMAIL PROTECTED]> wrote: > > Consider a GUI algorithm that displays rows from the database. > > The typical problem is to work out the best column width for > > rendering the screen. > > > > interface IFormatDatabaseColumnWidth { > > public int calcColumnWidth( Object[][] data, > MetaData metaData[], int > > columnNo ); > > } > > > > // Slowest and most accurate algorithm iterates all rows in > the result set > > class AllRowsFDCW implements IFrameDatabaseColumnWidth { ... } > > // Algorithm based on the first 100 rows > > class First100FDCW implements IFrameDatabaseColumnWidth { ... } > > // Algorithm that calculates the column width for every N rows > > class StepwiseFDCW implements IFrameDatabaseColumnWidth { ... } > > > > This is the classic strategy pattern, as I remember writing > it in a Swing/JDBC > > five years ago. (In fact Xenon-SQL is still out there > somewhere, but it > > is broken against JDK 1.3 and 24/7/365 the time to fix it! ) > > SECOND PART: Ugh! > > In my opinion, by the way, as an aside, using the CoR to replace mere > implementations of an interface would be rather *nuts*. This would > merely obfuscate and provide no benefit at all. This is what our > fellow traveler Frank Zammettie finds in
Re: [OT] Business Layer Ideas
Good stuff Frank. Your point is a good one and well made. I just spoke at a Java User Group here in Wisconsin on a similar issue, about how most people don't need to improve their Java programming skills, rather they need to improve their programming skills! I think that pattern use falls in the same area. There are folks that use patterns religiously, thinking that they're being good programmers. All the while not realising that they're reducing themselves down to the level of a coding monkey. Too much of the Java code that I see is not object-oriented, it's object-obsessed. Objects defined for any small silly thing. Wrappers upon wrappers, calls to super in multiple levels of inheritance. Arrgh. It's like trying to follow the plot of one of Frank Herbert's Dune novels. (Good for novels, bad for programs though!) Simon On 6/1/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > On Wed, June 1, 2005 9:47 am, Dakota Jack said: > > This is what our > > fellow traveler Frank Zammettie finds inherently suspicious about the > > *OOP nuts*. > > Woah, leave me out of this. I've purposely stayed away from this thread > all this time, now I have to get in... > > I don't want anyone thinking I'm anti-OOP or anything remotely like that. > I am very much an OOP proponent. While I almost certainly have used the > term "OOP nuts" at some point because I think some people could probably > be described that way, that really sounds a lot more harsh than my opinion > actually is, so let me clarify... > > What I have said is that I have seen many instances where people take the > OOP exercise so far in trying to get a perfect architectural structure in > place that they wind up writing code that is actually harder to understand > than it otherwise could be. There is great benefit to writing code that > is composed of smaller, largely interchangeable pieces rather than large > monolithic pieces. We all know this. However, I have seen this taken so > far that it takes forever to grasp how all the pieces fit together to form > the larger whole, and this is just as bad as writing one larger whole > would have been. > > Related to this, patterns are a wonderful invention, but I see day in and > day out people trying to find a pattern for every single situation. > People seem to think that they have to solve every problem by finding a > suitable pattern. The problem is, everyone seems to be so > "pattern-gung-ho" nowadays that they simply want to apply a pattern and if > it actually makes things more complex, too bad. If it doesn't really fit > the problem but does happen to solve it, that's fine too. A pattern > mismatch, or a pattern where none was truly needed, is just as bad as no > pattern at all in my experience. > > Simplicity is a beautiful thing. That is always my underlying design goal > for two reasons... > > One, in a corporate environment as I work in, you never know when someone > else is going to have to come along and maintain your code. You aren't > doing them any favors by writing code that, while architecturally sound, > is more complex to grasp. If after three months they say "wow, this guy > architected this code perfectly!", that's great, but if those three months > are spent not being especially productive while they try and understand > what you built, then the code wasn't well-written in the end. > > Two, when you jump around between many different projects, you tend to > forget your own work quickly. I sometimes look at code I wrote just last > year and go "I don't remember how or why I did this". Fortunately I > comment the hell out of everything I do, but more importantly I try to > code in straight-forward ways. Sometimes that means *NOT* creating that > helper class to encapsulate 10 lines of code, even though that might > architecturally be better and fit some pattern, but instead just inline it > (assuming I don't expect it to be shared of course). > > In a nuthshell, my point is absolutely *USE* OOP and patterns, and other > related techniques, think in those ways all the time, but don't > over-engineer things!! Don't make design decisions because you CAN do > something, make them because it is the RIGHT thing to do. And don't > over-complicate things for the sake of achieving some theoretical design > utopia. Make your code easy to understand, even if sometimes at the cost > of design trade-offs. Naturally there is a balance to be struck... > architecture *IS* after all important! > > Frank > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Seeking Advice Error Handling
From: "Scott Purcell" <[EMAIL PROTECTED]> > I have created a site with a mysql database back-end, and full struts front end. I have a filter to > ensure the creation of some session app objects, and the site is pretty clean. > > But over the weekend, I found a problem that I am seeking advice from. > For some reason, the mysql database went down, causing the site to be all screwed up. > I have extended the RequestProcessor but can not figure out how to handle errors from the database. First, are you saying that you had database problems in the Filter code? If so, if it throws an exception that request will never make it to Struts. You can configure some error handling in web.xml, but the location has to be 'a resource within the webapp' which IME seems to mean a JSP or HTML page. (I have not tried sending them to an Action, but a Tiles def doesn't work in web.xml.) I don't know about extending the RequestProcessor, but you can "catch" exceptions by using the tag in struts-config.xml. Google for 'struts declarative exception handling' for more info. I use it very simply, with an tag nested in the mapping: (den.exception is a Tiles definition.) You can write your own ExceptionHandler if you need to do more than send them to a page. HTH, Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Seeking Advice Error Handling
Vote +1 Scott if you want to know if your database is down and then turn it off as a service you can do this via an inner TimerTask. I implement somthing along the lines of if the database is down, set its status as down with my service manager. Then you can write code to check the service manager before displaying database functionality if you really want to. Original Message Follows From: Dakota Jack <[EMAIL PROTECTED]> Reply-To: Dakota Jack <[EMAIL PROTECTED]> To: Struts Users Mailing List Subject: Re: Seeking Advice Error Handling Date: Wed, 1 Jun 2005 07:33:31 -0700 Hi, Scott, Wherever you access the database and encounter the error is where the error should be handled. A rule-of-thumb I employ is to handle all errors as soon as possible and as near to the actual error as possible. I think that testing to see if your database is working is not a good idea. You have to assume that your database is working and then handle what to do if it is not. Depending on some subclass of RequestProcessor really weds your code to Struts in a way that is not good in my opinion. If you handle the error where it happens, then that should cover you completely. Your response to an error should be, I think, with a different ActionForward and not with a different (chained) Action. Thus, the sequence would be: (1) use Action, (2) hand off to business logic, (3) access to database, (4) FAILURE and consequent handling of error back to the Action which then uses a (5) "failure" ActionForward with an ActionMessage or ActionError delineating what happened to the client. On 6/1/05, Scott Purcell <[EMAIL PROTECTED]> wrote: > Hello, > > I have created a site with a mysql database back-end, and full struts front end. I have a filter to ensure the creation of some session app objects, and the site is pretty clean. > > But over the weekend, I found a problem that I am seeking advice from. For some reason, the mysql database went down, causing the site to be all screwed up. I have extended the RequestProcessor but can not figure out how to handle errors from the database. > > I would like to in the requestProcessor extended class, possibly do a simple query against a known table, and if the result is null, switch them to a site down action class. > > Can this be done in the requestProcessor area? > > Any advice would be appreciated. > > Scott > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Seeking Advice Error Handling
Scott- /*courtesy of W.L. daSilva http://www.informit.com/articles/article.asp?p=23734&redir=1*/ Using this sample for your struts-config.xml Confirm the mySQL information from my.cnf is represented accurately in your data-sources is correct Confirm that mysql database listener is indeed listening on the port idenitified by my.cnf (netstat -a) verify struts-config.xml data-sources information is correct for your installation (see above) and log everything that is happening within your ActionServlet InitModuleDataSources HTH, Martin- - Original Message - From: "Scott Purcell" <[EMAIL PROTECTED]> To: Sent: Wednesday, June 01, 2005 10:05 AM Subject: Seeking Advice Error Handling Hello, I have created a site with a mysql database back-end, and full struts front end. I have a filter to ensure the creation of some session app objects, and the site is pretty clean. But over the weekend, I found a problem that I am seeking advice from. For some reason, the mysql database went down, causing the site to be all screwed up. I have extended the RequestProcessor but can not figure out how to handle errors from the database. I would like to in the requestProcessor extended class, possibly do a simple query against a known table, and if the result is null, switch them to a site down action class. Can this be done in the requestProcessor area? Any advice would be appreciated. Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
Not a problem. Just didn't want anyone else to get the wrong impression. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, June 1, 2005 10:35 am, Dakota Jack said: > Sorry, Frank. I did not mean to misrepresent you in any way but > merely to use a jocular reference out of good nature. I know you are > into OOP. > > On 6/1/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: >> On Wed, June 1, 2005 9:47 am, Dakota Jack said: >> > This is what our >> > fellow traveler Frank Zammettie finds inherently suspicious about the >> > *OOP nuts*. >> >> Woah, leave me out of this. I've purposely stayed away from this thread >> all this time, now I have to get in... >> >> I don't want anyone thinking I'm anti-OOP or anything remotely like >> that. >> I am very much an OOP proponent. While I almost certainly have used the >> term "OOP nuts" at some point because I think some people could probably >> be described that way, that really sounds a lot more harsh than my >> opinion >> actually is, so let me clarify... >> >> What I have said is that I have seen many instances where people take >> the >> OOP exercise so far in trying to get a perfect architectural structure >> in >> place that they wind up writing code that is actually harder to >> understand >> than it otherwise could be. There is great benefit to writing code that >> is composed of smaller, largely interchangeable pieces rather than large >> monolithic pieces. We all know this. However, I have seen this taken >> so >> far that it takes forever to grasp how all the pieces fit together to >> form >> the larger whole, and this is just as bad as writing one larger whole >> would have been. >> >> Related to this, patterns are a wonderful invention, but I see day in >> and >> day out people trying to find a pattern for every single situation. >> People seem to think that they have to solve every problem by finding a >> suitable pattern. The problem is, everyone seems to be so >> "pattern-gung-ho" nowadays that they simply want to apply a pattern and >> if >> it actually makes things more complex, too bad. If it doesn't really >> fit >> the problem but does happen to solve it, that's fine too. A pattern >> mismatch, or a pattern where none was truly needed, is just as bad as no >> pattern at all in my experience. >> >> Simplicity is a beautiful thing. That is always my underlying design >> goal >> for two reasons... >> >> One, in a corporate environment as I work in, you never know when >> someone >> else is going to have to come along and maintain your code. You aren't >> doing them any favors by writing code that, while architecturally sound, >> is more complex to grasp. If after three months they say "wow, this guy >> architected this code perfectly!", that's great, but if those three >> months >> are spent not being especially productive while they try and understand >> what you built, then the code wasn't well-written in the end. >> >> Two, when you jump around between many different projects, you tend to >> forget your own work quickly. I sometimes look at code I wrote just >> last >> year and go "I don't remember how or why I did this". Fortunately I >> comment the hell out of everything I do, but more importantly I try to >> code in straight-forward ways. Sometimes that means *NOT* creating that >> helper class to encapsulate 10 lines of code, even though that might >> architecturally be better and fit some pattern, but instead just inline >> it >> (assuming I don't expect it to be shared of course). >> >> In a nuthshell, my point is absolutely *USE* OOP and patterns, and other >> related techniques, think in those ways all the time, but don't >> over-engineer things!! Don't make design decisions because you CAN do >> something, make them because it is the RIGHT thing to do. And don't >> over-complicate things for the sake of achieving some theoretical design >> utopia. Make your code easy to understand, even if sometimes at the >> cost >> of design trade-offs. Naturally there is a balance to be struck... >> architecture *IS* after all important! >> >> Frank >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > "You can lead a horse to water but you cannot make it float on its back." > ~Dakota Jack~ > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Seeking Advice Error Handling
Umh... I have seen in the past that at times the connection pool believes that the DB is still there even when it is not. I'm not a Tomcat user... at least not yet ! In my case... the infrastructure has a gateway between the application server and the database server. The web application is session based... so the DB errors occur at the log in only and for the first user of the day. So in the case that the DB is not there... the application loops n times until the DB connections that are cached are flushed and new ones are obtained. HTH, Glenn "Scott Purcell" <[EMAIL PROTECTED]> 01/06/2005 10:21 AM Please respond to "Struts Users Mailing List" To "Struts Users Mailing List" cc Subject RE: Seeking Advice Error Handling I am running Tomcat 5.5, and I am using a roll-your-own database pooling solution. Scott -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 01, 2005 9:18 AM To: Struts Users Mailing List Subject: Re: Seeking Advice Error Handling In what application server is your application running? Do you have any connection pooling? - Glenn "Scott Purcell" <[EMAIL PROTECTED]> 01/06/2005 10:05 AM Please respond to "Struts Users Mailing List" To cc Subject Seeking Advice Error Handling Hello, I have created a site with a mysql database back-end, and full struts front end. I have a filter to ensure the creation of some session app objects, and the site is pretty clean. But over the weekend, I found a problem that I am seeking advice from. For some reason, the mysql database went down, causing the site to be all screwed up. I have extended the RequestProcessor but can not figure out how to handle errors from the database. I would like to in the requestProcessor extended class, possibly do a simple query against a known table, and if the result is null, switch them to a site down action class. Can this be done in the requestProcessor area? Any advice would be appreciated. Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
Sorry, Frank. I did not mean to misrepresent you in any way but merely to use a jocular reference out of good nature. I know you are into OOP. On 6/1/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > On Wed, June 1, 2005 9:47 am, Dakota Jack said: > > This is what our > > fellow traveler Frank Zammettie finds inherently suspicious about the > > *OOP nuts*. > > Woah, leave me out of this. I've purposely stayed away from this thread > all this time, now I have to get in... > > I don't want anyone thinking I'm anti-OOP or anything remotely like that. > I am very much an OOP proponent. While I almost certainly have used the > term "OOP nuts" at some point because I think some people could probably > be described that way, that really sounds a lot more harsh than my opinion > actually is, so let me clarify... > > What I have said is that I have seen many instances where people take the > OOP exercise so far in trying to get a perfect architectural structure in > place that they wind up writing code that is actually harder to understand > than it otherwise could be. There is great benefit to writing code that > is composed of smaller, largely interchangeable pieces rather than large > monolithic pieces. We all know this. However, I have seen this taken so > far that it takes forever to grasp how all the pieces fit together to form > the larger whole, and this is just as bad as writing one larger whole > would have been. > > Related to this, patterns are a wonderful invention, but I see day in and > day out people trying to find a pattern for every single situation. > People seem to think that they have to solve every problem by finding a > suitable pattern. The problem is, everyone seems to be so > "pattern-gung-ho" nowadays that they simply want to apply a pattern and if > it actually makes things more complex, too bad. If it doesn't really fit > the problem but does happen to solve it, that's fine too. A pattern > mismatch, or a pattern where none was truly needed, is just as bad as no > pattern at all in my experience. > > Simplicity is a beautiful thing. That is always my underlying design goal > for two reasons... > > One, in a corporate environment as I work in, you never know when someone > else is going to have to come along and maintain your code. You aren't > doing them any favors by writing code that, while architecturally sound, > is more complex to grasp. If after three months they say "wow, this guy > architected this code perfectly!", that's great, but if those three months > are spent not being especially productive while they try and understand > what you built, then the code wasn't well-written in the end. > > Two, when you jump around between many different projects, you tend to > forget your own work quickly. I sometimes look at code I wrote just last > year and go "I don't remember how or why I did this". Fortunately I > comment the hell out of everything I do, but more importantly I try to > code in straight-forward ways. Sometimes that means *NOT* creating that > helper class to encapsulate 10 lines of code, even though that might > architecturally be better and fit some pattern, but instead just inline it > (assuming I don't expect it to be shared of course). > > In a nuthshell, my point is absolutely *USE* OOP and patterns, and other > related techniques, think in those ways all the time, but don't > over-engineer things!! Don't make design decisions because you CAN do > something, make them because it is the RIGHT thing to do. And don't > over-complicate things for the sake of achieving some theoretical design > utopia. Make your code easy to understand, even if sometimes at the cost > of design trade-offs. Naturally there is a balance to be struck... > architecture *IS* after all important! > > Frank > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Seeking Advice Error Handling
Hi, Scott, Wherever you access the database and encounter the error is where the error should be handled. A rule-of-thumb I employ is to handle all errors as soon as possible and as near to the actual error as possible. I think that testing to see if your database is working is not a good idea. You have to assume that your database is working and then handle what to do if it is not. Depending on some subclass of RequestProcessor really weds your code to Struts in a way that is not good in my opinion. If you handle the error where it happens, then that should cover you completely. Your response to an error should be, I think, with a different ActionForward and not with a different (chained) Action. Thus, the sequence would be: (1) use Action, (2) hand off to business logic, (3) access to database, (4) FAILURE and consequent handling of error back to the Action which then uses a (5) "failure" ActionForward with an ActionMessage or ActionError delineating what happened to the client. On 6/1/05, Scott Purcell <[EMAIL PROTECTED]> wrote: > Hello, > > I have created a site with a mysql database back-end, and full struts front > end. I have a filter to ensure the creation of some session app objects, and > the site is pretty clean. > > But over the weekend, I found a problem that I am seeking advice from. For > some reason, the mysql database went down, causing the site to be all screwed > up. I have extended the RequestProcessor but can not figure out how to handle > errors from the database. > > I would like to in the requestProcessor extended class, possibly do a simple > query against a known table, and if the result is null, switch them to a site > down action class. > > Can this be done in the requestProcessor area? > > Any advice would be appreciated. > > Scott > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
On Wed, June 1, 2005 9:47 am, Dakota Jack said: > This is what our > fellow traveler Frank Zammettie finds inherently suspicious about the > *OOP nuts*. Woah, leave me out of this. I've purposely stayed away from this thread all this time, now I have to get in... I don't want anyone thinking I'm anti-OOP or anything remotely like that. I am very much an OOP proponent. While I almost certainly have used the term "OOP nuts" at some point because I think some people could probably be described that way, that really sounds a lot more harsh than my opinion actually is, so let me clarify... What I have said is that I have seen many instances where people take the OOP exercise so far in trying to get a perfect architectural structure in place that they wind up writing code that is actually harder to understand than it otherwise could be. There is great benefit to writing code that is composed of smaller, largely interchangeable pieces rather than large monolithic pieces. We all know this. However, I have seen this taken so far that it takes forever to grasp how all the pieces fit together to form the larger whole, and this is just as bad as writing one larger whole would have been. Related to this, patterns are a wonderful invention, but I see day in and day out people trying to find a pattern for every single situation. People seem to think that they have to solve every problem by finding a suitable pattern. The problem is, everyone seems to be so "pattern-gung-ho" nowadays that they simply want to apply a pattern and if it actually makes things more complex, too bad. If it doesn't really fit the problem but does happen to solve it, that's fine too. A pattern mismatch, or a pattern where none was truly needed, is just as bad as no pattern at all in my experience. Simplicity is a beautiful thing. That is always my underlying design goal for two reasons... One, in a corporate environment as I work in, you never know when someone else is going to have to come along and maintain your code. You aren't doing them any favors by writing code that, while architecturally sound, is more complex to grasp. If after three months they say "wow, this guy architected this code perfectly!", that's great, but if those three months are spent not being especially productive while they try and understand what you built, then the code wasn't well-written in the end. Two, when you jump around between many different projects, you tend to forget your own work quickly. I sometimes look at code I wrote just last year and go "I don't remember how or why I did this". Fortunately I comment the hell out of everything I do, but more importantly I try to code in straight-forward ways. Sometimes that means *NOT* creating that helper class to encapsulate 10 lines of code, even though that might architecturally be better and fit some pattern, but instead just inline it (assuming I don't expect it to be shared of course). In a nuthshell, my point is absolutely *USE* OOP and patterns, and other related techniques, think in those ways all the time, but don't over-engineer things!! Don't make design decisions because you CAN do something, make them because it is the RIGHT thing to do. And don't over-complicate things for the sake of achieving some theoretical design utopia. Make your code easy to understand, even if sometimes at the cost of design trade-offs. Naturally there is a balance to be struck... architecture *IS* after all important! Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Seeking Advice Error Handling
I am running Tomcat 5.5, and I am using a roll-your-own database pooling solution. Scott -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 01, 2005 9:18 AM To: Struts Users Mailing List Subject: Re: Seeking Advice Error Handling In what application server is your application running? Do you have any connection pooling? - Glenn "Scott Purcell" <[EMAIL PROTECTED]> 01/06/2005 10:05 AM Please respond to "Struts Users Mailing List" To cc Subject Seeking Advice Error Handling Hello, I have created a site with a mysql database back-end, and full struts front end. I have a filter to ensure the creation of some session app objects, and the site is pretty clean. But over the weekend, I found a problem that I am seeking advice from. For some reason, the mysql database went down, causing the site to be all screwed up. I have extended the RequestProcessor but can not figure out how to handle errors from the database. I would like to in the requestProcessor extended class, possibly do a simple query against a known table, and if the result is null, switch them to a site down action class. Can this be done in the requestProcessor area? Any advice would be appreciated. Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Seeking Advice Error Handling
In what application server is your application running? Do you have any connection pooling? - Glenn "Scott Purcell" <[EMAIL PROTECTED]> 01/06/2005 10:05 AM Please respond to "Struts Users Mailing List" To cc Subject Seeking Advice Error Handling Hello, I have created a site with a mysql database back-end, and full struts front end. I have a filter to ensure the creation of some session app objects, and the site is pretty clean. But over the weekend, I found a problem that I am seeking advice from. For some reason, the mysql database went down, causing the site to be all screwed up. I have extended the RequestProcessor but can not figure out how to handle errors from the database. I would like to in the requestProcessor extended class, possibly do a simple query against a known table, and if the result is null, switch them to a site down action class. Can this be done in the requestProcessor area? Any advice would be appreciated. Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with struts in Sun One 8.1 integrated with NetBeans 4.1
Eduardo- It looks as if you never closed down the Tomcat instance that is using that socket so make sure tomcat is shutdown 'properly' The second is that your struts-config.xml has an action-mapping action type="FormBeanPackage.FormBeanClass" Make sure you have FormBeanPackage.FormBeanClass compiled and deployed in web-inf/classes or jar'ed and placed in web-inf/lib folder(s) In the case of DynaActionForm use the ClassName specifier to identify the FormBeanPackage.FormBeanClass and compiled and deployed in web-inf/classes or jar'ed and placed in web-inf/lib folder(s) HTH- Martin- Original Message - From: "Eduardo Ribeiro da Silva" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Wednesday, June 01, 2005 9:17 AM Subject: Problem with struts in Sun One 8.1 integrated with NetBeans 4.1 Hi people, I'm trying deploy an application with Struts in Sun1 8.1 integrated with NetBeans 4.1. This application is working fine in TomCat. I'm receiving this stack trace in my browse: javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:830) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:763) org.apache.jsp.pages.login.login_jsp._jspService(login_jsp.java:129) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105) javax.servlet.http.HttpServlet.service(HttpServlet.java:860) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251) javax.servlet.http.HttpServlet.service(HttpServlet.java:860) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:517) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165) root cause javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:798) org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506) org.apache.jsp.pages.login.login_jsp._jspx_meth_html_form_0(login_jsp.java:146) org.apache.jsp.pages.login.login_jsp._jspService(login_jsp.java:114) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105) javax.servlet.http.HttpServlet.service(HttpServlet.java:860) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251) javax.servlet.http.HttpServlet.service(HttpServlet.java:860) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:517) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165) And checking the server logs I founded this stack trace: Error commiting response java.io.IOException: An existing connection was forcibly closed by the remote host at sun.nio.ch.SocketDispatcher.write0(Native Method) at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:33) at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:104) at sun.nio.ch.IOUtil.write(IOUtil.java:75) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:302) at java.nio.channels.Channels.write(Channels.java:60) at java.nio.channels.Channels.access$000(Channels.java:47) at java.nio.channels.Channels$1.write(Channels.java:134) at org.apache.coyote.http11.InternalOutputBuffer.commit(InternalOutputBuffer.java:602) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.action(ProcessorTask.java:749) at org.apache.coyote.Response.action(Response.java:186) at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:570) at org.apache.coyote.Response.doWrite(Response.java:548) at org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:404) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:294) at org.apache.tomcat.util.
Seeking Advice Error Handling
Hello, I have created a site with a mysql database back-end, and full struts front end. I have a filter to ensure the creation of some session app objects, and the site is pretty clean. But over the weekend, I found a problem that I am seeking advice from. For some reason, the mysql database went down, causing the site to be all screwed up. I have extended the RequestProcessor but can not figure out how to handle errors from the database. I would like to in the requestProcessor extended class, possibly do a simple query against a known table, and if the result is null, switch them to a site down action class. Can this be done in the requestProcessor area? Any advice would be appreciated. Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
access to dataSource configured in struts-config.xml in a Plugin
hi, i'd like to access to dataSource configured in struts-config.xml in the Plugin init method. But i don't have a clue how to do that. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action vs. Servlet
The servlet for an Action is the ActionServlet. In the Action, you probably should have used some utility class defined outside the Action to decouple the business logic from the Action itself. On 6/1/05, e-denton Java Programmer <[EMAIL PROTECTED]> wrote: > Hi, > > I recently wrote an Action which in conjunction with an ActiveX object > returns a table from the server to update the DOM in the browser. My > question is: Is this a proper use of an Action, here essentially just a > subroutine I am calling from the client, with no forwarding action? Or > should I have used a servlet for this purpose? > > Thanks. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Business Layer Ideas
Thanks, Peter, This reply is in three parts: Oops, Ugh and GoF. FIRST PART: Oops! I am afraid there is a fatal flaw in your reasoning. Your example of the Strategy Pattern is *not* the Strategy Pattern. It is merely two differing implmentations of an interface. The Strategy Pattern is a client based pattern. As the Gang of Four (GoF) in "Design Patterns: Elements of Reusable Object-Oriented Software" said on the inside of the cover: "Strategy (315) Define a family of algorithms encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it." So, your point about the Strategy Pattern, of course, does not work and is a non-starter. A Strategy Pattern most importantly introduces some Helper utility interface for the various implementations of an algorithm. Thus, you could have either A. interface IFormatDatabaseColumnWidth { public void setHelper(Helper helper); public void doWork(); } or B. Inteface IFormatDatabaseColumnWidth { public void doWork(); } But the implementations would have to be something like: public class IFormatDatabaseColumnWidthImpl { private Helper helper; public void setHelper(Helper helper) { this.helper = helper; } public void doWork() { // Do business logic int value = helper.calcColumnWidth(data,metaData[]),columnNo); // Do more business logic } } Thus, there would be a Helper interface: interface Helper { int calcColumnWidth(Object [][] data, MetaData metaData[]) int columnNo); } The differing calculations, then, would go into the Helper interface implementations and not into the IFormatDatabaseColumnWidth interface implementations. So, you might have public class AllRowsFDCW implements Helper { public int calcColumnWidth(Object [][] data, MetaData metaData[]) int columnNo) { // Slowest and most accurate algorithm iterates all rows in the result set } } and public class First100FDCW implements Helper { public int calcColumnWidth(Object [][] data, MetaData metaData[]) int columnNo) { // Algorithm based on the first 100 rows } } and public class class StepwiseFDCW implements Helper { public int calcColumnWidth(Object [][] data, MetaData metaData[]) int columnNo) { // Algorithm that calculates the column width for every N rows } } Please note that the pattern essentially uses polymorphism and late binding not through implementations of an interface but through a composite pattern. Thus, when inversion of control (IoC) is used with the Strategy Pattern, whether you are doing Dependency Injection (DI) or Dependency Lookup (DL), the Helper is what is the subject of the lookup or injection. (IoC, including DL, cannot be identified as DI merely.) Your explanation of the Strategy Pattern leaves out what is essential to the pattern. Consequently, your explanation is merely how Chain of Responsibiltiy (CoR) can be used instead of differing implementations of an interface. See below for a short note on your CoR example. On 6/1/05, Pilgrim, Peter <[EMAIL PROTECTED]> wrote: > Consider a GUI algorithm that displays rows from the database. > The typical problem is to work out the best column width for > rendering the screen. > > interface IFormatDatabaseColumnWidth { > public int calcColumnWidth( Object[][] data, MetaData metaData[], int > columnNo ); > } > > // Slowest and most accurate algorithm iterates all rows in the result set > class AllRowsFDCW implements IFrameDatabaseColumnWidth { ... } > // Algorithm based on the first 100 rows > class First100FDCW implements IFrameDatabaseColumnWidth { ... } > // Algorithm that calculates the column width for every N rows > class StepwiseFDCW implements IFrameDatabaseColumnWidth { ... } > > This is the classic strategy pattern, as I remember writing it in a Swing/JDBC > five years ago. (In fact Xenon-SQL is still out there somewhere, but it > is broken against JDK 1.3 and 24/7/365 the time to fix it! ) SECOND PART: Ugh! In my opinion, by the way, as an aside, using the CoR to replace mere implementations of an interface would be rather *nuts*. This would merely obfuscate and provide no benefit at all. This is what our fellow traveler Frank Zammettie finds inherently suspicious about the *OOP nuts*. This is, I am afraid, similar to some of the rather *knee jerk* uses of CoR floating around. How does that old saw go? A boy with a new hammer sees the whole world as a nail? THIRD PART: GoF The GoF used as their signal example a Composition class which traversed and repaired (traverse(), repair()) and, much like your algorithms with result sets, employed a field utility class Compositor with the method compose() to implement various linebreaking strategies (SimpleCompositor, TeXCompositor, and ArrayCompositor). According to the GoF, who defined these things, the Strategy Pattern must contain: A Contex
Action vs. Servlet
Hi, I recently wrote an Action which in conjunction with an ActiveX object returns a table from the server to update the DOM in the browser. My question is: Is this a proper use of an Action, here essentially just a subroutine I am calling from the client, with no forwarding action? Or should I have used a servlet for this purpose? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Action vs. Servlet
Hi, I recently wrote an Action which in conjunction with an ActiveX object returns a table from the server to update the DOM in the browser. My question is: Is this a proper use of an Action, here essentially just a subroutine I am calling from the client, with no forwarding action? Or should I have used a servlet for this purpose? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with struts in Sun One 8.1 integrated with NetBeans 4.1
Hi people, I'm trying deploy an application with Struts in Sun1 8.1 integrated with NetBeans 4.1. This application is working fine in TomCat. I'm receiving this stack trace in my browse: javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:830) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:763) org.apache.jsp.pages.login.login_jsp._jspService(login_jsp.java:129) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105) javax.servlet.http.HttpServlet.service(HttpServlet.java:860) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251) javax.servlet.http.HttpServlet.service(HttpServlet.java:860) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:517) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165) root cause javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:798) org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506) org.apache.jsp.pages.login.login_jsp._jspx_meth_html_form_0(login_jsp.java:146) org.apache.jsp.pages.login.login_jsp._jspService(login_jsp.java:114) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105) javax.servlet.http.HttpServlet.service(HttpServlet.java:860) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251) javax.servlet.http.HttpServlet.service(HttpServlet.java:860) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:517) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165) And checking the server logs I founded this stack trace: Error commiting response java.io.IOException: An existing connection was forcibly closed by the remote host at sun.nio.ch.SocketDispatcher.write0(Native Method)at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:33) at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:104) at sun.nio.ch.IOUtil.write(IOUtil.java:75) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:302) at java.nio.channels.Channels.write(Channels.java:60) at java.nio.channels.Channels.access$000(Channels.java:47) at java.nio.channels.Channels$1.write(Channels.java:134)at org.apache.coyote.http11.InternalOutputBuffer.commit(InternalOutputBuffer.java:602) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.action(ProcessorTask.java:749) at org.apache.coyote.Response.action(Response.java:186) at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:570) at org.apache.coyote.Response.doWrite(Response.java:548)at org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:404) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:294) at org.apache.tomcat.util.buf.IntermediateOutputStream.write(C2BConverter.java:241) at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336) at sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(StreamEncoder.java:404) at sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:408) at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:152) at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)at org.apache.tomcat.util.buf.WriteConvertor.flus
RE: [OT] Business Layer Ideas
> -Original Message- > From: Dakota Jack [mailto:[EMAIL PROTECTED] ====== > > Hi, Peter, > > I am not sure what you are saying here. I had trouble > following you. > > The Strategy Pattern is roughly the following: > > public class DefaultStrategyInterface implements StrategyInterface { > private Helper helper; > > public void setHelper(Helper helper) { > this.helper = helper; > } > > public void doWork() { > // Do business logic > int value = hleper.calculateSomething(params); > // Do more business logic > } > } > > The Template Method Pattern used in Struts which necessitates the use > of the Chain of Responsibility Pattern, cf. > http://www.onjava.com/pub/a/onjava/2005/03/02/commonchains.html, is > roughly the following: > > public abstract class AbstractMethodInterface implements > MethodInterface { > public void doWork() { > // Do some business logic > int value = calculateSomething(params); > // Do more business logic > } > > protected abstract int calculateSomething(params); > } > > So, in a real sense, the Strategy Pattern advocates, in comparison to > the Template Method Pattern, composition over inheritance allowing for > ease of testing and a host of other good results. > > Struts is based on the Template Method Pattern which Sigglelow rightly > sees is rescued by the Chain of Responsibility Pattern. This is the > context in which I was addressing the Strategy Pattern. Can you give > a little demo of how CoR "metamorphasis's into this? I find your not > interesting but cannot see what it means. > > Thanks > Consider a GUI algorithm that displays rows from the database. The typical problem is to work out the best column width for rendering the screen. interface IFormatDatabaseColumnWidth { public int calcColumnWidth( Object[][] data, MetaData metaData[], int columnNo ); } // Slowest and most accurate algorithm iterates all rows in the result set class AllRowsFDCW implements IFrameDatabaseColumnWidth { ... } // Algorithm based on the first 100 rows class First100FDCW implements IFrameDatabaseColumnWidth { ... } // Algorithm that calculates the column width for every N rows class StepwiseFDCW implements IFrameDatabaseColumnWidth { ... } This is the classic strategy pattern, as I remember writing it in a Swing/JDBC five years ago. (In fact Xenon-SQL is still out there somewhere, but it is broken against JDK 1.3 and 24/7/365 the time to fix it! ) You can rewrite the above strategy with Chain of Responsibility pedantically. If you have a very functional requirement for it. class ChainFDCW implements IFrameDatabaseColumnWidth { Catalog catalog; String commandName; // IoC container friendly public void setCatalog( catalog ) { ... } public void setCommandName( name ) { ... } public int calcColumnWidth( Object[][] data, MetaData metaData[], int columnNo ) { Context context = new FDCWContext( data, metaData, columnNo ); Command command = catalog.getCommand( commandName ); command.execute( context ); if ( context.isCalculatedOk() ) return context.getColumnWidth(); else throw new StrategyRuntimeException( "Failed to calculate column width" ); } } Ok writing a CoR for calculating data width takes a bit of stretching the imagination, but of course you can do it, which is the point. > On 5/31/05, Pilgrim, Peter <[EMAIL PROTECTED]> wrote: > > > -Original Message- > > > From: Dakota Jack [mailto:[EMAIL PROTECTED] > > ==== > > > > > > > > > I should have added that Rod (Johnson) in the book cited pointedly > > > advocates extensive use of the Strategy Pattern, see pp. > 421 ff. The > > > use of CoR in Struts 1.3 for the extensible > RequestProcessor is not a > > > feature but is a way of solving the problem created by > the original > > > use of the Template Method Pattern in that context. Had > the Strategy > > > Pattern been used in the first instance, everything would > have worked > > > better, in my opinion. In many ways, I think in the future the > > > Template Method Pattern may be seen as an Anti-Pattern. > > > > > > Just to forestall flamethrowers, I want to emphasize that others > > > probably think differently and even the "majority", i.e. > by definition > > > the members ipsa facto of the "meritocracy", may think > differently. > > > But, Rod Johnson is no slouch on these matters. He > thinks the use of > > > Strategy Pattern is "one of the reasons [Spring] is such > a flexible > > > and extensible framework". > > > > > > > Hello Jack > > > > It can be shown that ``Chain of Responsibility'' pattern can be > > metamorphed into the ``Strategy'' pattern. The first > proviso is that one > > of your commnds b
Re: Can't not reference to property of object which is property of Bean
Hi all, I got the answer for my problem. Because I don't initialize properties which are objects :D - Original Message - From: "Pham Anh Tuan" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Wednesday, June 01, 2005 4:31 PM Subject: Re: Can't not reference to property of object which is property of Bean I got problem when I submit my form like what I described before. "javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) " "java.lang.IllegalArgumentException: No bean specified" what's wrong ??? help me! Anh Tuan - Original Message - From: "Pham Anh Tuan" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" ; <[EMAIL PROTECTED]> Sent: Wednesday, June 01, 2005 2:07 PM Subject: Re: Can't not reference to property of object which is property of Bean Thank you, my problem is solved by your solution, Rokibul Islam Khan :) - Original Message - From: "Rokibul Islam Khan" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Wednesday, June 01, 2005 12:52 PM Subject: Re: Can't not reference to property of object which is property of Bean hi, U r getting that because of null property of privateMessage. As u r using nested bean i.e. privateMessage.subject will be interpreted as formBean.getPrivateMessage.getSubject() where as getPrivateMessage() is returning null in ur case which cause Null pointer exception. To avoid this u have two option. first u can make an object explicityly from action and set it to formbean everytime before the call to the page by setPrivateMessage() or initialize the privateMessage from the constructor of ur form bean and overriden reset method. Remember u have to override reset method and initialize privateMessage again if u follow second option. On 6/1/05, Pham Anh Tuan <[EMAIL PROTECTED]> wrote: Hi all, I have 1 problem: I tried to do something like below: test.jsp includes: I've already defined privateMessage in my userBean like below: /** * Comment for privateMessage * This property is Private Message object */ private PrivateMessage privateMessage = null; /** * TODO: This will get value of privateMessage * * @return PrivateMessage the privateMessage. */ public PrivateMessage getPrivateMessage() { return privateMessage; } /** * TODO: This will set value to privateMessage * * @param PrivateMessage The privateMessage to set. */ public void setPrivateMessage(PrivateMessage privateMessage) { this.privateMessage = privateMessage; } But when I action mapping to test.jsp page, I have errors with message : org.apache.jasper.JasperException: Null property value for 'privateMessage' Plz, help me! Thanks for ur reading Anh Tuan -- -- Rokibul Islam Khan = Software Programmer Spectrum Engineering Consortium Ltd. Chandrashila Shuvastu Tower Panth Path, Dhaka - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't not reference to property of object which is property of Bean
I got problem when I submit my form like what I described before. "javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) " "java.lang.IllegalArgumentException: No bean specified" what's wrong ??? help me! Anh Tuan - Original Message - From: "Pham Anh Tuan" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" ; <[EMAIL PROTECTED]> Sent: Wednesday, June 01, 2005 2:07 PM Subject: Re: Can't not reference to property of object which is property of Bean Thank you, my problem is solved by your solution, Rokibul Islam Khan :) - Original Message - From: "Rokibul Islam Khan" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Wednesday, June 01, 2005 12:52 PM Subject: Re: Can't not reference to property of object which is property of Bean hi, U r getting that because of null property of privateMessage. As u r using nested bean i.e. privateMessage.subject will be interpreted as formBean.getPrivateMessage.getSubject() where as getPrivateMessage() is returning null in ur case which cause Null pointer exception. To avoid this u have two option. first u can make an object explicityly from action and set it to formbean everytime before the call to the page by setPrivateMessage() or initialize the privateMessage from the constructor of ur form bean and overriden reset method. Remember u have to override reset method and initialize privateMessage again if u follow second option. On 6/1/05, Pham Anh Tuan <[EMAIL PROTECTED]> wrote: Hi all, I have 1 problem: I tried to do something like below: test.jsp includes: I've already defined privateMessage in my userBean like below: /** * Comment for privateMessage * This property is Private Message object */ private PrivateMessage privateMessage = null; /** * TODO: This will get value of privateMessage * * @return PrivateMessage the privateMessage. */ public PrivateMessage getPrivateMessage() { return privateMessage; } /** * TODO: This will set value to privateMessage * * @param PrivateMessage The privateMessage to set. */ public void setPrivateMessage(PrivateMessage privateMessage) { this.privateMessage = privateMessage; } But when I action mapping to test.jsp page, I have errors with message : org.apache.jasper.JasperException: Null property value for 'privateMessage' Plz, help me! Thanks for ur reading Anh Tuan -- -- Rokibul Islam Khan = Software Programmer Spectrum Engineering Consortium Ltd. Chandrashila Shuvastu Tower Panth Path, Dhaka - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't not reference to property of object which is property of Bean
Thank you, my problem is solved by your solution, Rokibul Islam Khan :) - Original Message - From: "Rokibul Islam Khan" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Wednesday, June 01, 2005 12:52 PM Subject: Re: Can't not reference to property of object which is property of Bean hi, U r getting that because of null property of privateMessage. As u r using nested bean i.e. privateMessage.subject will be interpreted as formBean.getPrivateMessage.getSubject() where as getPrivateMessage() is returning null in ur case which cause Null pointer exception. To avoid this u have two option. first u can make an object explicityly from action and set it to formbean everytime before the call to the page by setPrivateMessage() or initialize the privateMessage from the constructor of ur form bean and overriden reset method. Remember u have to override reset method and initialize privateMessage again if u follow second option. On 6/1/05, Pham Anh Tuan <[EMAIL PROTECTED]> wrote: Hi all, I have 1 problem: I tried to do something like below: test.jsp includes: I've already defined privateMessage in my userBean like below: /** * Comment for privateMessage * This property is Private Message object */ private PrivateMessage privateMessage = null; /** * TODO: This will get value of privateMessage * * @return PrivateMessage the privateMessage. */ public PrivateMessage getPrivateMessage() { return privateMessage; } /** * TODO: This will set value to privateMessage * * @param PrivateMessage The privateMessage to set. */ public void setPrivateMessage(PrivateMessage privateMessage) { this.privateMessage = privateMessage; } But when I action mapping to test.jsp page, I have errors with message : org.apache.jasper.JasperException: Null property value for 'privateMessage' Plz, help me! Thanks for ur reading Anh Tuan -- -- Rokibul Islam Khan = Software Programmer Spectrum Engineering Consortium Ltd. Chandrashila Shuvastu Tower Panth Path, Dhaka - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]