From struts-user-return-85052-qmlist-jakarta-archive-struts-user=nagoya.apache.org@jakarta.apache.org Wed Jul 09 15:48:44 2003 Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@apache.org Received: (qmail 20694 invoked from network); 9 Jul 2003 15:48:43 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 9 Jul 2003 15:48:43 -0000 Received: (qmail 24237 invoked by uid 97); 9 Jul 2003 15:51:11 -0000 Delivered-To: qmlist-jakarta-archive-struts-user@nagoya.betaversion.org Received: (qmail 24230 invoked from network); 9 Jul 2003 15:51:11 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 9 Jul 2003 15:51:11 -0000 Received: (qmail 18662 invoked by uid 500); 9 Jul 2003 15:48:18 -0000 Mailing-List: contact struts-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list struts-user@jakarta.apache.org Received: (qmail 18646 invoked from network); 9 Jul 2003 15:48:17 -0000 Received: from popscan.net4india.com (HELO intmail.net4india.com) (202.71.129.41) by daedalus.apache.org with SMTP; 9 Jul 2003 15:48:17 -0000 Received: from [202.71.135.216] (helo=navjot) by intmail.net4india.com with asmtp (Exim 4.10) id 19aHIB-0003lR-00 for struts-user@jakarta.apache.org; Wed, 09 Jul 2003 21:25:39 +0530 From: "Navjot Singh" To: "Struts Users Mailing List" Subject: RE: [OT] Use of Static Methods Date: Wed, 9 Jul 2003 21:16:30 +0530 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 In-Reply-To: <7851AE957357D611A8EB000347961E770E65A03F@mail.1.24.172.in-addr.arpa> X-Scanner: Exiscan, Net4India Ltd. *19aHIB-0003lR-00*YTAtjuF89zk* X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N There is nothing taboo about writing static methods. They are good in solving purpose. But there is an option -- Singleton. That will keep you safe. As there is only 1 object of the class for which you wish to invoke methods. so it's same as calling static methods. (well, syntax is diff ;-) You may change the behaviour of class in NO time if you wish there should be more objects of that class. makes sense? -navjot |-----Original Message----- |From: Jerry Jalenak [mailto:Jerry.Jalenak@LABONE.com] |Sent: Wednesday, July 09, 2003 8:59 PM |To: 'struts-user@jakarta.apache.org' |Subject: [OT] Use of Static Methods | | |One of my programmers asked me whether or not it is OK to define helper |methods as 'static' - and I realized that I didn't know the answer. So I |guess the question is, in a web application, can common code be |factored out |to a helper class and marked as 'static'? Are there any major |problems with |doing this? I should know the answer, but just can't put my thumb on it |right now.... 8) | |TIA! | |Jerry Jalenak |Team Lead, Web Publishing |LabOne, Inc. |10101 Renner Blvd. |Lenexa, KS 66219 |(913) 577-1496 | |jerry.jalenak@labone.com | | |This transmission (and any information attached to it) may be |confidential and is intended solely for the use of the individual |or entity to which it is addressed. If you are not the intended |recipient or the person responsible for delivering the |transmission to the intended recipient, be advised that you have |received this transmission in error and that any use, |dissemination, forwarding, printing, or copying of this |information is strictly prohibited. If you have received this |transmission in error, please immediately notify LabOne at the |following email address: securityincidentreporting@labone.com | | | |--------------------------------------------------------------------- |To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org |For additional commands, e-mail: struts-user-help@jakarta.apache.org | | --------------------------------------------------------------------- To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-user-help@jakarta.apache.org