Title: InterSystemsClubJava
1InterSystems_at_ClubJava
Sylvain Guilbaud, Sales EngineerInterSystems
Francesylvain_at_intersystems.com
2Flexible, high-performance persistence for Java
applications
3Agenda
- Introduction
- Multidimensional Flexibility Unified Data
Architecture - Treating Data as Relational Tables SQL and JDBC
- Treating Data as Objects Java Binding
- Working with Application Servers Enterprise
Java Beans - Conclusion
- Demo
- Next steps
4Les produits InterSystems
Base de données hautes performances Développement
rapide dapplication
Intégration extrêmement rapide Développement
rapide dapplications composites
5Introduction
- Java is indisputably one of the workhorse
technologies for application development.
Its write once, deploy anywhere nature makes
the Java environment a natural choice for
creating Web-based and integrated applications
and, as an object-oriented language, Java enables
rapid development.
But it is Javas object orientation that has
historically made providing data persistence to
Java applications a challenging task.
6Two Basic approaches for Data Persistence
- Model information as Relational tables, with JDBC
- Avantage Java app. compatible with RDBMS
- Drawback mapping required between complex
objects and 2 dimensional tables cost in
development productivity and in performance
execution - Store and retrieve data as Objects
- Avantage no mapping
- Drawback assume an ODBMS many organizations
dont currently use Object DB
7Data Persistence for EJB
- Same choices store tables or store objects
-
- Container Managed Persistence CMP
- Historically been quicker and easier to implement
- Bean Managed Persistence BMP
- Better application performance
8CACHÉ and Java
- Data can be accessed as both relational tables
and objects - 3 ways
- JDBC
- Java Binding J2SE
- EJB Binding J2EE
9Multidimensional Flexibility Unified Data
Architecture
10Unified Data Architecture
- With Caché, Java developers are not locked into
modeling data either as relational tables or as
objects. Thats because Caché is neither a
relational nor a pure object database. Rather,
its underlying data engine stores information as
sparse multidimensional arrays. Multidimensional
structures are rich enough to represent the
complexity of data objects, but they are also
easily projected as twodimensional (i.e.
tabular) structures. - Thus, Cachés efficient multidimensional arrays
can be simultaneously presented to developers as
relational table or as objects. - This dual nature is referred to as Cachés
Unified Data Architecture. It allows Java
developers to choose how they prefer to provide
persistence for their applications.
11Architecture Post-relationnelle de Caché
12Caché convergence des interfaces
Objets
SQL
Classes Architecture Unifiée
EnterpriseCache Protocol
13Treating Data as Relational TablesSQL and JDBC
14When to Use JDBC
- When you already know JDBC
- When you are happy with a relational data model
- When you want to make your application compatible
with relational databases - Existing Java Applications with calls to RDBMS
15JDBC with CACHÉ
- Changes on the Java client side
- CLASSPATH include the CacheDB.jar
- Required import com.intersys.objects.
- Optional import java.sql.
- Java Developers standard
- JDK 1.4 or higher
- Type 4 JDBC Driver
- JDBC 2.0 compliant with extensions
16Advantages of using JDBC with CACHÉ
- Better performance
- System Management
- The unified architecture eliminates joins and
table hopping - Faster response to SQL queries (5 times faster
than RDBMS) - Database independence
- ... but if Java developers are given the choice,
they will store and manipulate information as
objects.
17Treating Data as Objects Java Binding
18When to use the Java Binding
- When you want the full power of Objects
- When you want to use an Object data model
- When you want CACHÉ/Ensemble to encapsulate the
business logic. - When developers have a choice of they want to
model data
19CACHÉ full object modeling concepts
- Encapsulation
- Multiple inheritance
- Polymorphism
- Referenced and Embedded objects
- Collections
- Relationships
20CACHÉ Java Binding
- CACHÉ classes easily defined and edited in CACHÉ
Studio - Graphical IDE including wizards for common
development tasks - Projection Wizard quick way to project CACHÉ
classes as - Java classes
- Enterprise Java Beans
- C
21How do CACHÉ Objects support J2SE?
- Pure java binding
- CacheDB.jar has com.intersys. packages.
- Native object access
- Proxy Java classes generated by CACHÉ
22Advantages of using Java Binding with CACHÉ
- Better development productivity
- Better performances
- Much better distribution of work between Java and
CACHÉ - Any method that needs to access the DB will run
faster on the CACHÉ server - Currently, no JVM in the CACHÉ run-time
environment - CACHÉ server side methods written in Object
Script/Basic - 2 ways to add client-side business logic
- New class that inherits from the Java proxy
generated by CACHÉ - Java code in CACHÉ class definitions (not
compiled but included in the Java Proxy classes)
23Working with Application ServersEnterprise Java
Beans
24EJB
- Enterprise Java Beans are Java classes designed
to run on any EJB-compliant application server as
part of an n-tier, distributed application. - Application servers provide system-level services
such as transaction monitoring, security,
threading, connection pooling and an interface
to a persistence engine. - Usually accessed using a web page, with servlet,
to the EJB in a J2EE application server.
25How does CACHÉ support J2EE?
- Object-Relational mapping not needed
- Improved performance and scalability
26Types of Beans
- CACHÉ/Ensemble support 2 types of Java Beans
- Session beans
- Entity beans
27Session Beans
- No persistence or state.
- Can be used to access persistence layer
(database) - Implements business logic.
- Usually as a wrapper to entity beans.
- CACHÉ supports this type of bean, using the
- PARAMETER Sessionbean1
- statement in the CACHÉ database class
28Entity Beans
- Has persistence and state
- Must interact with a database
- As with any Java class, Entity beans can access
CACHÉ using JDBC or Java Binding - Persistence management by container or bean
29Entity Beans Persistence CMP or BMP
- Container Managed Persistence (CMP)
- DB interaction handled by the application server
for all entity beans - Bean Managed Persistence (BMP)
- native persistence calls for each bean knows how
to store itself in the most efficient way - Better when bean is complex
30Entity Beans Persistence
- BMP
- The bean developer is responsible for the update
code - The bean developer is responsible for the DB
calls - Advantage high performance
- Drawback requires a lot a hand coding if not
using CACHÉ EJB Binding
- CMP
- Automatically generates the SQL statements for
persistence - INSERT, UPDATE, DELETE
- Requires an RDBMS (could be CACHÉ)
- Doesnt cope too well with complex data
structures - Advantage developers dont have to write
persistence methods for each entity bean - Drawback poor performance
- Uses JDBC driver, container manages persistence
of the bean - Uses standard SQL calls to DB
31How do CACHÉ Objects support J2EE?
Deployer/XML
- Pure J2EE compliant binding
- Proxy J2EE classes generated by CACHÉ
- META-INF
- Test Client/Servlet
- Deployer files
- XML files
Client/Servlet
J2EE
Classes
Class
CACHÉ
Class
32J2EE, EJBs and CACHÉ
33CACHÉ EJB Projection
- For CMP, any JDBC compliant database can be used.
- For BMP, the following methods required by the
bean are implemented natively by CACHÉ - ejbCreate( ) //writes new object to CACHÉ
- ejbLoad() //reads data from CACHÉ
- ejbStore() //writes data object to CACHÉ
- ejbRemove() //removes object from CACHÉ
- ejbFindByPrimaryKey(String key) //finds object
based on primary key, returns PK
34Advantages of using EJB Binding with CACHÉ
- J2EE developers can quickly and easily implement
BMP - Better performances whitout long developement
cycles that are typical of BMP - CACHÉ further shortens development cycles by
automatically gererating all the files needed to
test and deploy each bean
35Conclusion
36Java developers are not locked by the DB
- There is not a single correct way to provide
data persistence to Java applications - Java developers may decide to model data as
simple tabular structures or as complex data
objects - J2EE developers may choose either CMP or BMP
- CACHÉ Unified Architecture allows data to be
accessed simultaneously as relational tables and
as rich data objects, without mapping - No tedious coding for J2EE/BMP
- Highest possible performance for the least
possible developement effort
37Demo
38Next steps
39CACHÉ download
- www.InterSystems.fr
- Version dévaluation mono-utilisateur gratuite et
sans date limite
40Tutorials
41Learning Services Web Page
- http//www.intersystems.com/education/index.html
42Other Available Training
- Caché Core Server Side Programming.
- Teaches developers how to use Caché development
environment to build high-performance
applications. - Five days.
- Caché Server Pages.
- Teaches developers how to build web applications
using CSP. - Four days.
- Caché Core pre-requisite.
43Other Available Training (cont.)
- Ensemble Training
- Teaches integrators how to build integration
solutions using Ensemble. - Building Productions with Ensemble (5 Days).
- For those new to InterSystems technology.
- Building Productions with Ensemble (3 Days).
- For those familiar with InterSystems technology.
44Prochain cours à Sophia Antipolis
- CACHÉ Déveppement noyau (2 jours)
- lundi 23 et mardi 24 mai 2005
- Inscription par email à france_at_intersystems.com
- Participation gratuite
- Autres cours calendrier en ligne sur
www.InterSystems.fr
45Caché Professional Certification
- On-line exams for two major disciplines
- Administrator.
- Developer.
- Professional Caché Administrator Certification.
- Configuration, Operations, Backup and Restore,
and Database Structure exams. - Professional Caché Application Developer
Certification. - Caché ObjectScript, Objects, and Database
Structure exams. - http//www.cachecertification.com
46Caché e-Learning
- Provides interactive training using live webcast.
- http//www.cachelearning.com
47Caché Campus Program
- Aids academics, researchers and students in
teaching and learning Caché. - Free software licenses, technical support and
training. - Provides Caché opportunities to students.
- World-wide internships, world-wide job
opportunities, and part-time paid projects. - http//www.cachecampus.com
200 members in 32 countries
48CACHÉ Campus
- 200 Université et écoles dingénieurs dans le
monde - MIT
- Harvard
- (see www.cachecampus.com)
- En France
- Université de Franche-Comté
- Université de Nice Sophia-Antipolis
- MBDS (Sophia Antipolis)
- Université de Perpignan
49Livre du LIFC
- Marie-France LASALLE et Claire GROSSIN du
Laboratoire Informatique de Franche Comté ont
publié un livre - Système de gestion de bases de données CACHÉ
édité par Hermès/Science - Lavoisier
50Symposium à Sophia Antipolis
- mercredi 8 et jeudi 9 juin 2005 au Sophia Country
Club - 4ème Symposium dInterSystems France
- 6 témoignages clients/partenaires ALCADE, CIGES,
GEAC, SQLI, STERCIS, Texas Instruments - Keynotes Strategy by John McCormick, COO
- Inscription en ligne sur www.intersystems.fr ou
mailtofrance_at_intersystems.com
51Merci à tous,et plus particulèrement à Annick
FRON