Yoav, Ben:
Thanks for the tips - I think I finally have a grasp on how a real project would be run properly. I already use MySQL, cvs(in a manual fashion), ant(still new) so I'm not that far away. Development Box Question: Is it *inadvisable* to do the development using the same tomcat version, ant and a local mysql database on a Windows XP box versus the production server which is a linux box? I'd like to start using an real IDE(Eclipse or Netbeans) and having everything on my XP box sounds doable.
Thanks for all your help. --JW
Ben Souther wrote:
My 2 cents:
If your not already using a revision control system, you might want to look into one, like CVS. There are a few books on CVS here: http://jakarta.apache.org/site/library.html
BTW: Ant integrates nicely with CVS
On Thu, 2004-10-21 at 15:39, Shapira, Yoav wrote:
Hi,
I now understand how ant can help me deploy for different targets, butnotification
how do I develop code and test it(without producing all the
emails, updates to the database, etc) in my development-server and then
"turn this debug code off" in the production-server when it's deployed?
There are several approaches, but the principles tend to be similar:
Have complete separate dev, test, and production servers. Dev is local to each developer, quick/small, unstable. Test is as similar to production as possible in configuration and capacity, and used for integration testing, performance testing, QA. Production is production ;)
Anything that's environment-sensitive goes in a configuration file, never hard-coded.
Ant's filter/token mechanism is great for substituting environment-specific entries when you're creating a WAR of your app and/or deploying to dev/test/production. See the <filter> ant task reference.
For logging, use a real toolkit like log4j instead of System.out or ServletContext#log. Then you can control the logging levels easily at runtime or packaging/deployment time, whatever you feel like. If you configure logging from a file, you can use Ant filter tokens again in this file.
Updates to the database are part of testing: the advice about separate Tomcat instances for dev/test/production applies to databases as well. You're good about portability, right? If so, you can use a tiny and free MySQL or HSQL DB in development.
Yoav
This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.
--------------------------------------------------------------------- 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]
