Title: Best Practices for WebSphere and Domino
1Best Practices for WebSphere and Domino
- Tony Higham
- RareMedium Inc
2What Well Cover
- Understanding Java
- Using Java with Domino
- Understanding WebSphere
- Useful Resources
3What is Java?
- Object-oriented programming language
- Developed by Sun Microsystems in 1993
- Made for household appliances (VCRs etc.)
- Small memory footprint (PalmPilots, etc)
- Easy to use (automatic memory mgmt)
- Platform-independent source / binary code
- Became very popular with browser applets
- Easy way to add client-side functionality
- Majority of browsers support Java
4The Java Language
- Object-oriented programming language
- Software models the way the world works
- Flexible programs with reusable objects
- Less time spent reinventing the wheel!
- Syntax is similar to the C/C languages
- Memory handling is automatic (mostly)
- Part of Sun's Java Development Kit (JDK)
- Language versions match JDK versions
- Java language also known as Java API
5Java Built-in Capabilities
- Basic and complex data types
- Input / output functions
- Files and data streams
- Multi-threading
- Run parallel tasks with 2 or more CPUs
- Network and common Internet protocols
- IP sockets for client-server, peer-to-peer
- FTP for transferring files
- Key mechanism for B2B integration
6Java Virtual Machine (JVM)
7Java Virtual Machine (JVM) (cont.)
- You write Java source code with an editor
- Save as a text file with a .java extension
- Java source code compiles to bytecodes
- Processor / operating system independent
- Compiler creates file with .class extension
- Java Virtual Machine executes bytecodes
- Platform-specific part of Java
- Each JVM supports a specific JDK version
- Use JDK features supported by target JVM
8Java Virtual Machine (JVM) (cont.)
- JVM version support within browsers
- JDK 1.02 - Netscape 3.01, Explorer 3.02
- JDK 1.1 - Netscape 4.0, Explorer 4.0
- Domino R5.x JVM supports JDK 1.1.8
- The JDK 1.2 and later rebranded by Sun
- Java 2 Standard Edition (J2SE)
- J2SE is JDK 1.2 or later and vice versa
- Most application servers (WebSphere, Weblogic
etc), support JDK 1.2 or later
9What Can I Do with Java?
- Java applets that run in Web browsers
- Offers client-server functionality
- Not a widely used Java technology
- Fully functional stand-alone applications
- Graphical user interfaces (C or VB-like)
- Slow and funky-looking interfaces, many failed
projects - If you need a VB or C like interface, use VB or
C - Tools that run in command windows
- Server-side data processing tools are very common
10What Can I Do with Java? (cont.)
- Reusable Java components (JavaBeans)
- Componentizing is a key Java concept
- Server-side Web applications
- Most widely accepted use of Java
- Supported by extensions to core Java
- Sun creates specifications for Java technologies
- Examples, Java servlets, JavaServer Pages (JSPs)
- Web applications run on any product that
implements the Java specifications (Domino,
WebSphere, Weblogic etc)
11Why Use Java with Domino?
- LotusScript, _at_formulas not going away!
- But neither of these run in Web browser
- Good reasons to use Java
- Functionality not available in LotusScript
- Know, or want to learn, how to use Java
- Because it's the right tool for the job
- Standard in Java, but not in LotusScript
- Multi-threading for batch processing etc
- Networking for Internet connectivity
12Java Applications and Domino
- Completely stand-alone applications
- Run on same system as Domino server
- Run on remote system without Domino
- Can implement a user interface (C-like)
- But not highly recommended to do so!
- Requires machine-by-machine installation
- Back to the old client deployment issue
- Great for server-side batch processing
- For example, B2B Integration
13Java Applets and Domino
- Java applets can be used to improve the user
experience on a web browser - You get full control over the user interface like
using a Notes client - With the introduction of CORBA in R5, you can use
applets to provide a true client-server scenario
to Web browsers - Cool, you get to do client-server again!
- The trade-off is that your Java applet gets a 1.5
Mbyte .JAR file sent with it
14Domino Java Agents
- Work like LotusScript and _at_formula agents
- Same trigger document selection options
- Define your reason for using Java agents
- More familiar with Java than LotusScript
- Need multi-threading capabilities
- Need network capabilities
- Multi-threading can improve performance
- Updates to 500 DBs in 2 mins 41 secs
- Don't multithread CPU-bound processes
15Java Servlets and Domino
- Servlet is an extension to the Web server
- Like an applet is an extension to browser
- Functionally similar to Domino Web agents
- Perform actions, return HTML to browser
- Performance is far better than Web agents
- Max. agents is /- 1,250 concurrent users
- High-volume Web apps require servlets
- Servlets can also talk to other servlets
- Very appropriate use of XML over HTTP
16Java Servlets and Domino (cont.)
- Have built-in session management
- Remembers state over multiple calls
- No need for cookies or profile documents
- Shopping carts, personalization, etc.
- Reside in filesystem, not in a database
- Do not get replicated to other systems
- You can attach the Servlet code to a Domino
document and use agents to deploy the code to the
filesystem!
17Domino Release Specific Options
- Domino R4.6 - supports JDK 1.1.1
- Agents written in external tool, imported
- Applications running on a Domino server
- Servlets (tricky to configure)
- Domino R5 - supports JDK 1.1.8
- Applets with remote access (CORBA)
- Applications on Domino server or remote
- Agents written in the Domino Designer
- Servlets (simple configuration)
18Reality Check
- Ok, Domino provides Java support
- But it's at least 2 releases out of date!
- Present released version of JDK is 1.3
- Many new technologies not supported
- To use Java for prime-time applications you need
Java 2 (JDK 1.2 or later) - RNext has much better Java support
- But it aint there yet
- Simple solution - Just add WebSphere!
19 20What is WebSphere?
- WebSphere is not a product, it's a brand
- WebSphere Application Server (WAS) is often
referred to as WebSphere - The WebSphere software platform is an e-Business
product framework - Defines application services (WAS)
- Defines collaboration services (Domino)
- Defines wireless and other services
21WebSphere Software Platform
22WebSphere Application Server (WAS)
- Application server written 100 in Java
- Provides Java Web application runtime
- Java servlets
- Java Server Pages (JSPs)
- Enterprise JavaBeans (EJBs)
- And many other Java APIs
- Provides high-availability and scalability
- Load-balancing, failover, transactions
- Single point domain administration
23Why Combine Domino WebSphere?
- Domino enhances WebSphere
- Domino is designed for collaboration
- Domino is designed for workflow
- Java does neither of these natively
- WebSphere enhances Domino
- Provides a full Java programming model
- Dynamic Web pages, transactions, messaging, mail,
etc. - Offers enhanced scalability over Domino
24Why Combine Domino WebSphere? (cont.)
- Using Java Web applications you can
- Meet the performance and scalability requirements
of enterprise-level applications with thousands
of users - Build truly portable Web applications that run
on any platform or product that supports the
Java standards - That makes your skillset more marketable!
- WebSphere extends your Domino apps to take
advantage of full-blown Java
25Anatomy of a Java Web Application
- Java Web applications typically use
- Java Servlets (supported by Domino)
- JavaServer Pages (JSPs)
- JavaBeans (supported by Domino)
- Enterprise JavaBeans (EJBs), sometimes
- Domino does not support JSPs or EJBs
- The reality of being 2 releases behind
- WebSphere supports all of the above Java
technologies
26Domino and WebSphere Together
27JavaServer Pages (JSPs)
- Servlet-based dynamic Web pages
- Easy entry point to Java technologies
- No need to compile and deploy servlets!
- Unrestricted access to Java features
- JSPs are files with HTML and Java code
- Files must have the .JSP extension
- JSP engine compiles and deploys servlets
- If a JSP changes, servlet is recompiled
28JavaBeans
- Java platform application components
- Similar in nature to Component Object Model (COM)
objects - Can be business logic or UI components
- Applications and applets UI components
- Servlets and JSPs logic components
- Logic components, like "black boxes"
- Developers need to know JavaBean inputs and
outputs, not how they work
29Enterprise JavaBeans (EJBs)
- EJBs are JavaBeans for the enterprise
- Should contain data or business logic that is
used at the enterprise level - Provide cross-application data and logic
- Two basic types of EJBs
- Entity beans represent business data
- Session beans represent business logic
- Think very carefully before using EJBs
- There are many hidden gotchas
30Summary
- Java can be used to extend your Domino
applications - Networking, multi-threading!
- Domino and WebSphere are complimentary
technologies - WebSphere can be used with Java to extend your
applications even further!
31Useful Resources
- Java tutorial
- java.sun.com/docs/books/tutorial
- The View Domino Developers Conference
- October 3-5 in New Orleans!
- Domino 5 Web Programming with XML, Java, and
JavaScript by Randy Tamura - WebSphere Advisor magazine
- www.advisor.com/Websphere
- searchDomino.com, a Domino/Notes Web portal
- www.searchDomino.com
- tony.higham_at_raremedium.com