My Stuff

2010 Conferences

OSGi DevCon @ JAX London

February 23 - Keynote titled OSGi in the Enterprise: Agility, Modularity, and Architecture’s Paradox

EclipseCon

March 22 - 25 - Tutorial on Modular Architecture

Über Conf

June 14 - 17 - Sessions titled Turtles and Architecture and Patterns of Modular Architecture

Catalyst

July 26 - 30 - Two sessions on rich mobile applications and one on agile development. Half day tutorial on software process improvement.

Tweets @ Twitter

Apple's profits for its latest quarter are $1 billion. That's $1 billion per week, by the way. http://t.co/wE6RglA5 1 week ago

If you know JavaScript and HTML, you can crete your own custom widgets in iBooks Author. That's pretty cool…#Apple 2 weeks ago

High School Textbooks also available. Major publishers are on board. Several volumes available today…#Apple 2 weeks ago

#Apple announces iBooks Author for OS X and iBooks 2. Using author, you can create your own interactive books for iBooks. 2 weeks ago

Nice #HTML5 site (html5rocks.com). Check out the Interactive Presentation & HTML5 vs. native comparison (http://t.co/UFTuafAE) via @mahemoff 2 weeks ago

LinkedIn Profile

The opinions expressed on this site are my own, and not necessarily those of my employer.

Class, Component, Service

Filed Under Architecture & Design, Java, Platforms |  

A class defines the variables and methods available to it’s specific instances. A class serves as the blueprint for an object. An object is an instance of a class with state. In Java, a class is a .class file

A component is a unit of deployment. A component contains classes. Components are invoked in-process (locally). Components are not instantiable. Components are stateless. Component interactions are synchronous. In Java, a component is a .jar file.

A service is a software system. Services are distributed, may execute in different processing environments, communicate over a network, and are invoked remotely. A service is not instantiable. Services are stateless. Service interactions are synchronous or asynchronous. A service contains components. In Java, a service is an .ear file with the appropriate deployment descriptor.

Agree or Disagree? I’m interested in your thoughts on this subject…

Comments

5 Responses to “Class, Component, Service”

  1. Robert Fischer on September 12th, 2007 2:00 pm

    What is the context for these definitions? Are they intended to be the building block for a larger system, or are they intended to be a universal set of categories?

    What’s the rational for services being stateless? A “user service” would, then, always have the same collection of immutable users?

  2. kirk on September 12th, 2007 2:54 pm

    The context is strictly technical. When developers communicate, they often use these terms quite loosely. “I wrote a component that does that” and “That should be a service” are two general examples. But I wonder if the terms conjure similar images in the minds of different developers who hear the statements. I’m looking for something tangible, such that when the term “component” is used, developers form an immediate opinion on it’s general characteristics, such as those surrounding deployment.

    The definition for “service” is of the SOA flavor (ie. web service, session bean, messaging, etc.). Should a service be stateful or stateless, and is it important to know when talking about “services” if the service in question is stateful or stateless? Or is knowing that unimportant?

  3. Confluence: Java on September 13th, 2007 8:54 pm

    Class, Component, Service…

    From a post…

  4. dd on September 21st, 2007 8:57 pm

    It is difficult for me to separate a ‘component’ from a ’service’ when pulling definitions from both SOA and component architecture.

    Class and object seem straight forward but component and service seems to be changing. Instantiation differentiates what I consider a service or component. Now, granularity is another item that seems to seep in when comparing. Distribution would also be a big hint that it was a service, though not a guarantee.

    Component seems to be the most difficult (for me anyway). It seems to blur and morph relative to the work I’m doing. With the component frameworks integrating with backed beans, my first thought triggered from “component” included stateful/stateless, which isn’t the statelessness I’d say if I was thinking only of java.

  5. sauter's blog on October 19th, 2007 12:03 am

    sauter’s blog…

    sauter’s blog…

Leave a Reply