190 likes | 276 Views
Saeed Khan KL Group www.KLGroup.com. Java’s Growth. Who’s Using Java. Banks: Bank of Boston & Nations Bank Clearing $1,000,000 of electronic checks a day Ecommerce Charles Schwab World’s largest Ecommerce site - $2B per week Retail: Saab Nationwide retail intranet information system
E N D
Saeed Khan KL Group www.KLGroup.com
Who’s Using Java • Banks: Bank of Boston & Nations Bank Clearing $1,000,000 of electronic checks a day • Ecommerce Charles Schwab World’s largest Ecommerce site - $2B per week • Retail: Saab Nationwide retail intranet information system • Scientific: W.M. Keck Observatory Remote browser-based telescope control
Quote “A number of industry studies have found that applications written in Java can be completed in half the time required with C++” Technical White PaperMicrosoft CorporationJanuary 1999
Why Java is More Productive Than C++ • No Pointers • Automatic Memory management • Object-Oriented • Less Complex
Why Java is Strategic • Enterprise JavaBeans • Lower Technical Diversity • Easier to Attract and Retain Developers • Promise of WORA (Write Once, Run Anywhere)
1. Performance • Avoid: • Unnecessary synchronization • String Concatenation • Unbuffered I/O • Slow Library Methods • Profile Regularly What you get if you’re not careful... …what you get if you code carefully for performance
2. Object Explosion • Use: • Object Pooling Techniques • Lazy Instantiation • Primitives where possible • to eliminate worst offences
3. 22nd Day Problem • Use: • Skilled, Experienced O-O • Developers • Design Patterns • Java is not a Panacea
4. Deadlock & Concurrency • Use Threads Judiciously: • For Background Tasks • To Simplify Design • Do: • Understand Your Code • Understand Your Risks (e.g. Swing) • Use higher Abstractions (e.g. EJB) • Remember CNTL-BREAK
5. Memory Leaks • Avoid: • Loitering Objects • Do: • Dereference Objects when Done. - Deregister Listeners • Profile Regularly
6. Black Box Problem • Watch for: • Conflicts between “boxes” • Understand the • threading characteristics • performance characteristics • memory characteristics • of Components/Objects you use
7. Ugly & Grumpy • Use Swing and JFC: • Better User Interface • Clipboard Support • Drag-n-Drop • Localization • MDI AWT - Ugly! Swing - Beautiful!
8. Fat Client Or thin? Fat Client? • Don’t: • Overload the Client • Do: • Architect for n-tier • Use Servlets/JSP • Use EJB
9. IP Protection • For Valuable Algorithms: • Use Obfuscators • OR Native Methods
10. The Browser Challenge ? = WORA • Don’t: • Assume WORA in Browsers • Do: • Use Java2 Plug-in where possible • OR Target JDK 1.1 Browsers • Worst Case: • Target JDK 1.0.2
Summary Yes: • Java is more productive than C++ • Java is the best strategic choice for Enterprises but: • Java also has unique pitfalls so: • Adopt new “best practices” when you switch to Java
Saeed Khan KL Group www.KLGroup.com