Home > Articles > Programming > .NET and Windows Programming

Software Plasticity with Aspect-Oriented Programming

Stephen B. Morris
  • PrintPrint
  • Share ThisShare This
  • DiscussDiscuss
Close WindowStephen B. Morris

Stephen B. Morris

Learn more…

Nonlinear Code Management in EJB3
Jul 30, 2009
Database Access via C# ADO.NET
Jul 2, 2009
C# Reflection
Jun 29, 2009
Object Relational Mapping and Java Persistence: Data Modeling and Legacy Schemas
Jun 23, 2009
C# GUI Programming
Jun 16, 2009
C# Assembly Programming
Jun 11, 2009
Using the C# system.io Namespace
Jun 2, 2009
Using C# Generics
May 13, 2009
An Introduction to Concurrent Java Programming
May 12, 2009
Using C# Interfaces
Apr 22, 2009
Getting Your Software onto Linux
Apr 13, 2009
What’s Wrong with Modern Software Development?
Mar 9, 2009
Building a Solid Foundation for JPA and Hibernate
Feb 16, 2009
Java Patterns for MPLS Network Management, Part 2
Dec 15, 2008
Java Patterns for MPLS Network Management, Part 1
Dec 8, 2008
Getting Started with Spring Web Flow
Sep 26, 2008
Application Contexts for Spring Web Services
Sep 16, 2008
Spring Web Services with SOAPUI
Aug 15, 2008
Hit the Ground Running with the Spring Framework
Aug 8, 2008
Building Multithreaded C# Applications
Jun 6, 2008
Hosting an LDAP Server in VMWare
May 30, 2008
Integrating Linux Into Your Windows Environment
May 21, 2008
Understanding C# Object Serialization and Object Graphs
May 19, 2008
Further Subversion Steps: Get Motoring with TortoiseSVN
Apr 22, 2008
Further Steps with the Java Sound API
Apr 7, 2008
5 Easy Steps to Using Virtualization Technology
Apr 4, 2008
Five Steps to Getting Started Server-Side with PHP
Mar 7, 2008
Targeted Client Upgrades: Creating a Flexible, Low-cost Application Upgrade Mechanism
Feb 15, 2008
Java DMK and Legacy IT Management
Feb 8, 2008
Aspect-Oriented Programming: A Tool for Internationalization
Feb 1, 2008
Achieving Separation of Concerns Using BPEL
Jan 25, 2008
Mobile Java with J2ME
Jan 18, 2008
Graph Algorithms in Java
Dec 28, 2007
Design Patterns in Java: The Observer
Dec 21, 2007
Five Steps to Managing Unstructured Data with Derby
Dec 14, 2007
Using the Java Sound API
Nov 9, 2007
Moving C++ and Java Programmers Up the Value Chain
Nov 2, 2007
Java Nuts and Bolts: Copy Constructors, Cloning, and Linked Structures
Oct 19, 2007
Further Steps with Derby: Derby Embedded in a Browser
Oct 5, 2007
Further Steps with Derby: Defining and Accessing Your Data
Sep 28, 2007
IT Management Using C# with WMI
Sep 21, 2007
Using Derby as a Network Database Server Engine
Sep 21, 2007
Five Steps to Further Success with Subversion
Sep 14, 2007
Improve Software Installation with AntInstaller
Sep 7, 2007
Multithreaded Java GUI Programming
Aug 10, 2007
The C++ Strategy Pattern for Multiple Network Events
Aug 4, 2007
Java Collections and Iterators
Aug 3, 2007
The C++ State Pattern for Network Operations
Jun 15, 2007
C++ Nuts and Bolts: Casts, Call-by-Reference, and Inheritance
Jun 8, 2007
Getting Started with Subversion on Windows
May 25, 2007
Getting Started with Derby
May 11, 2007
C# Callback and Event Mechanisms
Mar 23, 2007
Some Rules for Safer Java Programming
Mar 16, 2007
Inheritance and Polymorphism in C++ and C#
Mar 2, 2007
IT Management: Dipping into the Platform with C#
Feb 2, 2007
C# and IT Management Infrastructure
Jan 26, 2007
C++ to C# Migration
Dec 29, 2006
Service Oriented Architecture with Apache Axis
Nov 22, 2006
Speech-Enable Your Java Software
Sep 1, 2006
Generic C++ for Networks
Apr 21, 2006
C++ Inheritance and Polymorphism
Apr 7, 2006
Thinking Recursively with C++
Mar 24, 2006
Aspect-Oriented Programming for Production Code
Mar 10, 2006
C++ Modularity with Namespaces and Exception Handling
Mar 3, 2006
C++ Chain of Responsibility Pattern: Network Events
Feb 10, 2006
The Web Services Distributed Management (WSDM) Standard
Feb 3, 2006
MPLS Network Design Nuts and Bolts
Jan 6, 2006
BPEL: The Next Big Thing in Software?
Nov 18, 2005
On-Demand Computing: A New Paradigm
Oct 6, 2005
Software Plasticity with Aspect-Oriented Programming
Sep 16, 2005
Parser Configuration in JAXP
Aug 26, 2005
Publish and Subscribe Using C++ and the Observer Pattern
May 27, 2005
Java Application Servers: Seven Things You Should Know
Apr 29, 2005
Legacy IT Management using C++
Apr 29, 2005
Software Futures: Architecture
Mar 25, 2005
Saving Money with Legacy Data
Mar 11, 2005
Saving Money with Legacy Source Code
Feb 4, 2005
MPLS and Ethernet: Seven Things You Need To Know
Dec 17, 2004
Quality of Service, Part 2 of 2: Managing Enterprise QoS
Oct 15, 2004
Quality of Service, Part 1 of 2: Elements of Enterprise QoS for Voice Over IP
Oct 8, 2004
The Need for Autonomic Computing
Oct 8, 2004
A Blade Server Primer
Aug 27, 2004
Workflow-Based Network Management
Jul 30, 2004
SNMP Versus Command-Line Interface (CLI) for Network Management
Jul 23, 2004
Security and the Management Plane, Part 2
Jul 2, 2004
Security and the Management Plane, Part 1
Jun 25, 2004
Network Management and MPLS
Nov 13, 2003
Managing Large Networks: Problems and Solutions
Oct 17, 2003
Getting off the ground with your first iPhone app
By on January 13, 20102 Comments

My first iPhone app – “The Day Was…” has now been through two updates. I want to talk a little about how to get started with this interesting technology. As with any software, the first step is having an idea, i.e., one or more requirements.

On Updating my first iPhone app
By on December 24, 2009 No Comments

I recently applied my first update to my iPhone app – “The Day Was…”. As with many things in the technology world, an update is easier than getting the app into the store – the blank slate problem! Just a little bit of wrestling with the app binary is required and you use the same distribution profile as for the first submission.

Getting my first iPhone app into the App Store
By on September 25, 20092 Comments

Having just posted my first iPhone to the App store, I wanted to briefly describe the experience and at the same time to debunk some myths I’ve heard about since I started.

SOA and IT Strategy
By on April 27, 2009 No Comments

It's a rare organization that has a comprehensive IT strategy. Why does a strategy matter? For one thing, IT is now part of the DNA of all organizations. So, an effective strategy is a key business element.

IT staff and contractors - why they matter
By on April 21, 2009 1 Comment

IT salaries and contract rates in free fall

A day in the life of a software contractor - Forming good relationships
By on April 9, 20082 Comments

I wanted to share a few findings with you about my recent forays into the world of software contracting.

The path to programming excellence ? C++ to Java from C, Pascal and others
By on September 28, 2007 No Comments

I’ve probably used more programming languages down the years than is good for me. And like many other programmers, I mostly use Java nowadays. During my most recent product development, I made a foray back into C in order to do some Ethernet protocol analysis. Some languages are just better than others for such tasks - remember C is a system language so you can use it to dig right into the platform. Java is more constrained because of the JVM boundary. In the end, I integrated the down-to-the-metal C code right back into Java using JNI.

Moving up the value chain
By on September 14, 2007 No Comments

Following on from my previous posting on decision-making quality, I wanted to talk a little about the related subject of the value chain.

Decision-making Quality
By on August 7, 20073 Comments

The need for forward momentum is perhaps one of the negative consequences of the fast pace of modern life. This issue is discussed in ex-world chess champion, Garry Kasparov’s latest book “How life imitates chess”. Kasparov feels that decision-making suffers if insufficient time is taken. He’s not alone. Edward de Bono – the inventor of lateral thinking once said that apart from extreme emergencies there is rarely a need to think quickly. Warren Buffett moved his offices out of New York City to Omaha because he wanted not one good idea every day but one good idea every year. Excessive and unnecessary speed takes a heavy toll on the quality of decision-making.

Aspect-Oriented Software Development

Like this article? We recommend
Aspect-Oriented Software Development

Most software is rigid in nature, making it difficult to reconfigure and modify without costly upgrades. Can software be made more plastic or malleable? Stephen Morris demonstrates how aspect-oriented programming provides an important tool in the race to achieve plastic software. If IBM's on-demand computing spreads across the industry, this requirement will become the rule rather than the exception. Will you be ready?

Just about all objects in nature are flexible—it's part of survival! Excessive rigidity and hardness tend to contribute to breakability: Concrete is strong in compression but pulls apart. The present generation of software tends to be brittle and difficult to change. Because this lack of plasticity is at odds with the need to safely maintain and extend complex software products, we need to improve the plasticity of software.

Aspect-oriented programming (AOP) provides a convenient mechanism for dipping into Java code, taking a look around, and applying a focused fix or upgrade. AOP can help in multiple situations:

  • A problem is located but insufficient logging detail is available in the deployed code.
  • You need to be able to rapidly deploy modifications to operational software.

In this article, we'll review the area of in-field debugging and repair of code that has been operationally deployed. Along the way, we'll also see some concepts from the emerging discipline of software architecture and the highly dynamic IBM initiative of on-demand computing. The latter is a potentially revolutionary change to the way in which software will be deployed.

Software Developers and the Value Chain

Software development metrics are changing; it's no longer enough to know Java or C++, SQL, and some UML. Increasingly, developers have to be able to formulate solutions in completion or component form. Moving up the value chain is not a matter of choice for developers. What to do? One of the best investments a developer can make is gaining a solid knowledge of design patterns. Another beneficial area for study is architectural patterns. Software architecture patterns—just like design patterns—are a powerful tool for creating solid software solutions. One such pattern is used for creating software in layers; this allows for demarcation of special-purpose APIs such as Sun's Java Dynamic Management Kit (Java DMK). The layering pattern facilitates swapping out and replacing this API. You may have been using the layering pattern for years, but many programmers are unaware of the need for some associated architectural quality attributes: scalability, security, and modifiability.

Network-Management Domain Notes

Consider the following excerpt from a generated Java DMK file, called RFC1213_MIBOidTable.java:

//Metadata definitions for managed objects of interest
new SnmpOidRecord("ifInOctets", "1.3.6.1.2.1.2.2.1.10", "C"),
new SnmpOidRecord("ifLastChange", "1.3.6.1.2.1.2.2.1.9", "T"),
new SnmpOidRecord("ifOperStatus", "1.3.6.1.2.1.2.2.1.8", "I"),
new SnmpOidRecord("ifAdminStatus", "1.3.6.1.2.1.2.2.1.7", "I")

Don't worry about the details; we'll focus on the general overview. Basically this file contains a generated Java class that can be used to gain access to network-management data. For example, the entity ifInOctets indicates the number of bytes that have been received at a selected network interface.

Figure 1 illustrates a layered management application that employs Java DMK (in the bottom layer) to access the network data. Typically, the application in Figure 1 is a large, complex beast that has grown over the course of many years. As new devices and technologies such as MPLS are added to the network, the management system software is modified to bring those devices and technologies into the fold. It's not uncommon for the management application to include several programming languages and many millions of lines of code. The network at the bottom of Figure 1 may be that of a service provider or a large enterprise; in any case, it contains lots of devices. The network data access classes in Figure 1 are used to read data from and write data to the network.

Figure 1

Figure 1 A layered network-management application.

Architectural Layering Patterns

Layering has been used for decades in the area of networking, as evidenced by the OSI seven-layer model. This model has enabled networks to mature and develop over the years as new technologies develop. The three boxes in Figure 1 represent architectural layers. The Network Data Access Classes layer is the one we'll look at most closely. Its purpose is to present a generic technology-independent interface into the network for the Management Application layer.

Once a network exceeds a certain size, it becomes necessary to deploy automated network-management software, such as that in Figure 1. But this software ain't cheap! Often, the cost is on the order of $10,000 per managed node—if your network has 100 routers, the price is $100,000+.

The application uses Java DMK to dip into the network elements and retrieve real-time data. This data can then be used to update a GUI or for inclusion in a report.

  • Share ThisShare This
  • Your Account

Discussions

Make a New Comment

You must log in in order to post a comment.

Related Resources

Jennifer  BortelWin FREE iPhone Developer Books and Videos- Introducing @InformIT Giveaways
By Jennifer Bortel on February 5, 2010 No Comments

Apples’s recent iPad announcement made our hearts flutter so we couldn’t resist making an announcement of our own!

Today marks the first ever @InformIT Giveaway!

We’ll regularly post a video like this one profiling spectacular prizes we’re giving away—from books and videos to T-shirts and other exciting stuff. Check out the video below to see the giveaways for today, and then scroll down for more prize details and instructions on how to win them!

Dustin Sullivan"Every OSX developer should have this book on their desk."
By Dustin Sullivan on February 1, 2010 No Comments

That was the sentence Mike Riley ended his recent Dr Dobb's CodeTalk review of Cocoa Programming Developer's Handbook with.

David ChisnallCocoa Tip of the Day, 1/29/10
By David Chisnall on January 29, 2010 No Comments

Don't ignore old versions of OS X.

See All Related Blogs

Informit Network