Archive for the ‘Uncategorized’ Category

MSN Messenger: Gotta love it

Posted by on April 4th, 2007

You know, regardless of your personal religious feelings and whether or not you believe in Microsoft, you’ve got to admit that they make a pretty good product.  I’m an Apple fanboy, but I do live in reality, and I can see that Windows helps make the world move along.  I can love my own operating system without hating all others.  There is room in my heart for those who choose to follow Satan’s Bill’s path.

That being said, every once in a while, I run across something that makes me wonder.  On my computer at work today, I was using Windows Live Messenger (formerly MSN Messenger) to talk to a friend when I saw this cleverly worded advertisement at the bottom of my Messenger window.

You Chatting

Is there really anything else to say?  Somebody in the marketing department had a bad day I guess.

Enterprise Java Tools

Posted by on April 3rd, 2007

The Java Language presents many advantages for the enterprise-types.  My personal favorite language really shines on the web, but for the full architecture and support desired in enterprises, Java has a lot to offer (not the topic of this post).  Right now we’re going to look at 2 Java tools that have become commonplace in enterprise development: log4j and JMS.

log4j
log4j (non-capitalized on purpose) is an open-source project developed under the Apache Jakarta banner.  It was originally developed by Ceki Gülcü. It is built to be the best Java logger around, and the industry agrees that it is.  It’s used for debugging and logging and can provide detailed context for application failures.

It is built as a package that you can drop into your application and start making calls to the logger object.  log4j may provide the best or only solution for debugging (this is often case in distributed applications).

log4j enables logging at run-time without modifying the application’s compiled binary.  This means that you can enable debugging without suffering the heavy performance loss that you might expect by bloating your binaries with extra code.

Perhaps one of the most useful features in log4j is the idea of hierarchy and inheritance.  As you make calls to the logger object and log different kinds of events, you can have different outputs that listen to the logs and pass them on when certain criteria are met.  It’s sort of a subscriber provider model for things.  Potential subscribers would be loggers outputting information to the console, files, databses, SMTP servers, GUI components, etc.  These subscribers are called appenders.

This means that you could potentially have everything logged to a standard file, important things put into a different file, database, etc., and have critical errors emailed to someone that can fix them.  The only thing you’d need in your application code would be the one call to the logger object and everything else happens as the different loggers subscribe to the different events.  All the subscriptions to events are handled by external configuration files, so you don’t have to modify your application code in order to change the behavior of the loggers.

JMS
The Java Messaging Service is another logging solution.  My research on this topic introduced the phrase “asynchronous logging” for the first time although it sounds like log4j works on the same principle.  Reading about JMS also used the publisher/subscriber metaphor which I unfortunately already used, but these two facts should illustrate some of the similarities.

JMS actually supports to different types of logging.  The queuing model has a producer and only one consumer.  They are independent, so the consumer does not have to be running when the producer produces, and the producer does not have to be running when the consumer consumer.  This is a higher level of abstraction than log4j uses (according to my understanding).

The Publish/Subscribe model published messages in “topics.”  Zero or more subscribers can subscribe to a particular topic.  In this model the subscribers and the publisher are not even aware of the other’s existence.

Some enterprising individual has even built an Appender for log4j that plugs the JMS into log4j.  O’Reilly has also published a book on the JMS which in my book means it’s significantly more complex.  From my readings, log4j is also further abstracted out of the application than JMS.  It sounds like in order to change what your JMS publisher is doing, you’ll have to change code in your application and recompile.

Why I Don’t Like Outlook

Posted by on March 30th, 2007

Or, one reason that I don’t like Outlook.

So you know already, that when your computer boots up, there are lots of processes that have to start, programs that have to run etc. This process consumes a lot of processing power, so after typing in my password on my work computer, I usually find something else to do for the next couple minutes until my computer is actually useable (this is only a slight exxageration, the process takes well over 60 seconds).

Then since email has become a major form of communication where I work, I wait for all the processes to run and die down and then I open Outlook and log onto the Exchange server. Starting where the first spike hits halfway up, this picture shows what Outlook was doing to my computer while it checked my mail. Outlook was unresponsive the entire time (except that brief drop in the middle).

Outlook CPU Usage

What on earth is going on? Is there any reason that Outlook should be maxing my CPU for that amount of time? A spike or two sure, but 100% for over a minute? “I must have a lot of work to do,” I thought to myself, “if there’s that much mail coming in.”

No. There wasn’t. Only 3.

Messages

And people wonder why I prefer Apple Mail.

Model Driven Architecture [part 3]

Posted by on March 24th, 2007

This will be a short post, but I thought it would be interesting to look at one specific offering of an MDA product to see what they can do.  OptimalJ is made by Compuware and provides MDA programming for those of use that live in a J2EE world.

To start things off, this PDF file is one of their marketing releases, but as we look through it, we can see the foundations of what makes an MDA product.

OptimalJ consists of three basic components.  (1) Metamodels create separation between application design, infrastructure, and code.  (2) Technology patterns make model-to-model transformation possible. (3) Finally, implementation patterns allow for the model-to-code transformation.

Metamodels: At the high level, you need to separate the different aspects of your applications so that you can address the concerns of each individual piece before you bring it all together to work out those issues.  Since we’ve started breaking things down into threes (3 MDA posts and 3 OptimalJ components) we’ll do one final three-part breakdown.  There are three kinds of metamodels.  The domain model, the application model, and the code model.

Proper usage of these metamodels formally defines the kinds of data needed by the application,  what technology the application will be using, and specific code pieces that will be used in certain situations.  This last part is a bit confusing, but the OptimalJ product allows for editing of templates (of a sort) that will later be used during the translation of model-to-code.

Technology Patterns: above we mentioned that this provides model-to-model transformation.  Specifically, this provides for the transformation of the domain model into the application model.  So starting from the kind of data that we want, we now translate that into the architecture of our application.  What kind of application is this?  Web-based, client-server, etc.

Implementation Patterns:   this transforms the application model into the code model.  This is where actual code is produced.

OptimalJ provides graphical editors for all these different pieces, but breaking it down this way, we can begin to see what OptimalJ can do.  We start up front with the need for an application.  After defining what data we need in the data model, we can generate an application model that provides an overview of the application itself.  Further transformation into the code model gives an application that can be compiled and run.

If we change the way the data should be stored, we can regenerate the application model and the code model and cut out all the in-betweens of recoding to match our new data structure.  All this auto-generation even includes SQL scripts for datbase creation if you’re willing to spring for the higher-end versions.  Eclipse support and Netbeans support virtually guarantees that you’ll be in a familiar environment.  Is there anyone in the world that still writes Java outside of those IDEs?

Is Model Driven Architecture Right For Me?

Posted by on March 20th, 2007

Is represents Part 2 in the MDA series. In part one we talked about what exactly MDA is and what it can do. In this section, I wanted to talk a little bit more about how if fits in different places. This isn’t meant to be a comprehensive source of information (it’s just a blog), but I would like to discuss some of the things I would look at before making the MDA leap.

How much software development does your firm do? Not all technology firms are involved in software development, and if yours is one of the ones that doesn’t do some hardcore development, MDA is probably not your thing.

For development firms, there are major benefits to be realized under certain circumstances. Richard Blais from Locus Systems Inc. believes that

…software development is not necessarily an art form. It requires discipline, it requires a process…

He talks about the benefits of using OptimalJ in a short video clip. I think it does a good job of illustrating benefits for large development companies. Some of the highlights are:

  • Solid code generation, good process within the code
  • Reuse of code & effort (4-5 of 10 things that have to be done for new applications are already done)
  • Shortened SDLC (55% decrease in time to market)
  • Empowers software architects and programmers
  • One source of a competitive advantage
  • 44% revenue growth powered by OptimalJ

What if you’re not running a big development firm, but you’re still in the ball game somewhere. MDA could be a good fit for your business, but it might not be. How do you know? Maybe it’s a good fit for certain projects and not for others.

Let’s take my hypothetical web development business that helps local businesses get themselves up on the web. Some of them would want to actually sell products online, but others just want to start a web presence. Some want to handle online scheduling and others just want their information available. Is MDA a good fit?

These are some of the things I would look at to decide if MDA is a good fit for my little projects.

Complexity: If the business is very complex, or particularly when the data model is complex, MDA begins to become a stronger candidate. In my mind, MDA can really shine through when you’ve got complex rules on top of complex data structures. Even if you’re only using it for the first round implementation, a lot of the complexity can be reduced by an MDA product.

Size: Again, the bigger the project, the more potential that MDA can knock out a significant amount of the work up front.

Flexibility: This is closely related to the next point, but if there is a lot of flexibility required, perhaps MDA is not the greatest candidate.

Ambiguity: If the requirements are ambiguous or the client is figuring things out as you go along. MDA won’t be much help here. Without a fairly completed definition up front, generating code from a model becomes problematic and difficult. If you run into this problem very often, you might have a little business problem in your own business besides a difficult client relationship to manage.

Time line: I suppose this is related to the first two points as well, but on a tight time line, an MDA product of one sort or another can really help you front load the project and more complex routines taken care of at the beginning. If you use MDA often and consistently, you might find yourself in the enviable position of Locus and have several components of code that you can reuse from project to project. That doesn’t mean that MDA is the only (or even the best) way to reuse code, but the required levels of formality and process make it a much greater likelihood.

Existing code base: If you’ve got an existing code base, in my mind I would tend to swing away from MDA. Partially (or poorly) implemented projects tend to have less documentation and formality. In my experience, that doesn’t give you enough information up front to go the MDA route.

I think I’ll wrap up tonight’s post at this point. In the last and final installment in my MDA series, we’ll take a look at OptimalJ more in depth to see some of the specific benefits it (and MDA in general) can offer.