Access COM Via Java -- A Tutorial
The author builds an application that can access a COM object and then call this COM-server object via a pure Java client.
Access COM Via Java -- A Tutorial
The author builds an application that can access a COM object created using VC++6.0 ATL and then call this COM-server object via a pure Java client.
Automate dependency tracking, Part 1
Automatically discover dependencies in interactive
object-oriented applications. Interactive applications are
typically subdivided into information model and user interface
subsystems. In the past, keeping the user interface up to date
meant manually applying an update mechanism like the Observer
pattern. However, automatic dependency tracking can discover
dependencies within the system and keep the user interface
current. Michael L. Perry shows you how in this three-part
series.
Build your own ObjectPool in Java to boost app speed
Object pooling allows the sharing of instantiated objects. Since different processes don't need to reinstantiate certain objects, there is no load time. And since the objects are returned to the pool, there is a reduction in garbage collection. Read on to learn, via the author's own example object pool design, how to employ this approach to boost performance and minimize memory use.
Canonical Object Idiom
In this installment of the Design Techniques column, I propose
"the canonical object" as a Java idiom. The article discusses
the fundamental services that all objects in general should
offer, shows how objects can offer these services, and names
such objects "canonical."
Composition versus Inheritance
Although the compiler and Java virtual machine (JVM) will do a lot of work for you when you use inheritance, you can also get at the functionality of inheritance when you use composition. This article will compare these two approaches to relating classes and will provide guidelines on their use.
Creating Custom Generic Collections with J2SE 5.0
J2SE 5.0 introduced many additions to the collections API that you need to be aware of to properly implement generic custom collections that work seamlessly with multiple types and the new "for each" construct.
Designing Object Initialization
This installment of the Design Techniques column begins with a
quick look at object-design fundamentals, then goes on to
discuss various approaches to designing initializers and
constructors so as to facilitate the proper initialization of
objects.
Designing with Interfaces
In this installment of my Design Techniques column, I describe the process I went through to understand Java's interface. I talk about multiple inheritance and the diamond problem, polymorphism and dynamic binding, separation of interface and implementation as the spirit of Java, and my ultimate epiphany on how we should think about and use interfaces when we design
Designing with Static Members
In this installment of his Design Techniques column, I discuss
the ways in which static fields and methods, which exist
outside of objects, fit into object-oriented design.
Dynamically extend Java applications
Do you want to write programs that can be extended without source code changes? The techniques described in this article show you how to use interfaces and dynamic class loading to create highly extensible systems.
Encapsulation is not information hiding
The principles of information hiding go beyond the Java
language facility for encapsulation . The term encapsulation is
often considered to be interchangeable with information hiding.
However, not differentiating between these two important
concepts deprives Java developers of a full appreciation of
either. Encapsulation is a language facility, whereas
information hiding is a design principle. This article
investigates strengthening class design through careful
consideration of each of these concepts.
Flatten your objects
The Java Serialization API is used by many other Java APIs (like RMI and JavaBeans) to persist objects beyond the duration of a running virtual machine. You can also use the Java Serialization API manually for your own persistence strategies. Though the basics of Java Serialization are quite simple, some of the more intricate portions of the API can often seem a mystery. In this article, Todd Greanier will demystify the secrets of the Java Serialization API.
Generics and Method Objects
In this article, I'll introduce you to the new Generics Specification (which came out of the Java Community Process) and then rebuild the command object framework using it. This won't actually change the performance of the application or add any new functionality. It will, however, add a substantial amount of compile-time type checking to the framework, thereby making the code easier to maintain and extend.
Improve the robustness and performance of your ObjectPool
In our previous object-pooling article Thomas E. Davis presented an example object pool design and described how to employ this approach to boost performance and minimize memory use. This month, after providing a quick recap of object pooling, Thomas will show you how to enhance the example pooling utility to include exception propagation and the clean-up thread. Thomas finishes by addressing some reader comments about the first article.
Inherited annotations in Java
Despite the fact that the fully operational annotation mechanism appeared in Java not so long ago, many developers have appreciated this new possibility of Java API and use it in their programs. Annotations have lots of advantages but have some restrictions too. One of them is inability to inherit annotations to subclasses. To solve this problem, Fusionsoft Company developed the library of inherited annotations which is considered in this article.
Inside Constructors
This series is intended for anyone who needs to understand fundamental object-oriented concepts before jumping into the code. It can also be used by those who are already coding in an OOP language but do not fully understand the nuances behind the code. Fully understanding the infrustructure of the concepts may improve your coding. These concepts are part of the foundation that any programmer will need to make the paradigm shift from procedural programming to object-oriented programming.
It's in the contract! Object versions for JavaBeans
As we've seen in the past two months of the JavaBeans column,
object persistence lets a Java developer convert a Java object
into a bytestream that can be saved to disk or transported
across a network and recreated in another time and place. But
what if the class changes somehow between storage and retrieval
of the stream? Or if different versions of the same class were
used to write and read the stream? In this month's column,
we'll discuss how to use object versioning to safely change or
update existing Java classes without compromising compatibility
with previously-written serialized files.
Java Tip 113: Identify subclasses at runtime
Java Reflection provides a lot of information about a given class at runtime; you can easily know all its super classes, implemented interfaces, methods, constructors, fields, and so on. But in some cases, you may want to know all the classes implementing a given interface, or subclassing a given class. This tip, based on lessons learned from Java Tip 105, shows you how to retrieve all the classes from a package inheriting or implementing a given class or interface.
Learning Polymorphism and Object Serialization
While most textbooks teach polymorphism by drawing UML diagrams, the Brainy Draw project encourages you to draw. While others make up hypothetical objects to use as examples for object serialization, we'll discuss the real need to persist your objects. The Brainy Draw project in this article is a fun way to learn polymorphism and object serialization.
Magic with Merlin: Maintaining insertion order
Follow along with the author as he demonstrates how to iterate through the elements of a hashed collection in insertion order, and maintain elements in access order with the new Collections Framework implementations in J2SE, version 1.4.
Memoization in Java Using Dynamic Proxy Classes
Memoization is a technique borrowed from functional programming
languages like Lisp, Python, and Perl for giving functions a
memory of previously computed values. Memoizing a function adds
a transparent caching wrapper to the function, so that function
values that have already been calculated are returned from a
cache rather than being recomputed each time. Memoization can
provide significant performance gains for computing-intensive
calls. It is also a reusable solution to adding caching to
arbitrary routines.
Object Finalization and Cleanup
This installment of the Design Techniques column discusses the
design guidelines that pertain to the end of an object's life.
I give an overview of the rules of garbage collection, discuss
finalizers, and suggest ways to design objects such that finite
resources aren't monopolized.
Object Initialization in Java
This article describes the process of object initialization in
Java programs. It discusses constructors, initializers,
instance initialization (<init>) methods, initialization and
inheritance, object images on the heap, and the order in which
an object's variables get initialized.
Object persistence and Java
Understanding the difference between persistence as a general issue and persistence as part of a larger collection of database services is quite important -- the former being much simpler to implement than the latter. In this article, we'll call attention to some of the prominent issues surrounding persistence in object-oriented languages, including the relationship between persistence and type, persistence and platform/language independence, and navigational versus query-based access to object data. We'll also take a close-up look at how Java itself handles object persistence and how one object database enhances Java persistence by offering transaction support
Object-oriented language basics, Part 1
Learn how to declare classes and create objects. Geoff Friesen continues his tour of the Java language with a series that focuses on Java's object-oriented features. This month, he introduces object-oriented programming and shows how to declare classes and create objects from those classes.
Object-oriented language basics, Part 2
In this article, you'll gain an understanding about fields, parameters, and local variables and learn to declare and access fields and methods.
Object-oriented language basics, Part 3
In this Java 101 article, Jeff Friesen explores composition and
demonstrates its value in object-oriented programming. Although
he originally planned to discuss inheritance, Jeff has decided
to focus on composition because both object-oriented design
concepts are related in a manner similar to both sides of the
same coin, and an understanding of composition helps to make
inheritance easier to grasp.
Object-oriented language basics, Part 4
This article shows how to use inheritance to create layered objects, and compares and contrasts inheritance with composition.
Object-oriented language basics, Part 5
Every Java class has a superclass. In the absence of an extends keyword, Object is that superclass. This month, Object takes center stage as the author presents its 11 methods.
Object-oriented language basics, Part 6
In this article you learn why Java's standard class library contains empty interfaces (such as Cloneable and Serializable). Also, you examine the power of interfaces and learn why they provide more than a workaround for Java's lack of multiple implementation inheritance support.
Persist data with Java Data Objects, Part 1
The Java Data Objects (JDO) standard provides a unified, simple, and transparent persistence interface between Java application objects and data stores, and can significantly affect how we deal with persistent data. In this article, Jacek Kruszelnicki discusses the issues encountered with persistence, presents traits for an ideal persistence layer, and reviews available JDO solutions.
Serialization and the JavaBeans Specification
Last month we talked about how and why to "freeze-dry" JavaBeans by serializing them. The JavaBeans Specification gives you all the serialization control you need for your application. This month, we'll look at serializing whole structures of related objects, we'll check out an interface that gives you complete control of serialization format, and we'll discuss ways of preventing serialization when necessary.
Stopping Your Class from Being Inherited in Java, the Official Way and the Unofficial Way
In the Object-Oriented theory, there come situations that
demand that you should declare your class in such a way that it
should not be inherited. Typically, it occurs if the
functionality that is provided by the class should not be
changed, or more appropriately, overridden. In this article, I
discuss two ways to implement this behavior in the Java
language, the official way and the unofficial way.
The Essence of OOP using Java, Local Classes
This series of lessons is designed to teach you about the
essence of Object-Oriented Programming (OOP) using Java. it
covers the class definition including restrctions and etc.
Track class file versions
Sometimes even the most carefully controlled environments can get corrupted. With jar files being pushed prematurely and source files being updated constantly, determining which version of the compiled source file was pushed to the now-corrupt environment can be difficult. Source control labels are intended to mitigate the confusion, but for absolute certainty, it's best to get the information straight from the horse's mouth -- the jar file itself. Two proposed solutions highlight some of the more interesting features of the Java API, namely reflection, doclets, and runtime jar file support from within the JVM.
User interfaces for object-oriented systems, Part 5: Useful stuff
This article begins putting the object-oriented principles
discussed in this series to practical use. The author builds a
small but nontrivial application: a Reverse Polish Notation
calculator that can display a user interface either like a tape
calculator or a keypad, depending on a user's runtime
selection. The program is a bit large for a single column,
though. So this month, Allen covers a set of small tools used
for the main program. Next month, he'll build the calculator
itself.
What's a Method to Do?
In this installment of the Design Techniques column, brush up
on how -- and why -- to divide a class's functionality among
its methods. I demonstrate how to maximize method cohesion
while keeping the total number of methods to a manageable
level.
Computerworld The most comprehensive source of news and analysis on the technologies and management issues of information technology. ...
subscribe now