aspose file tools*
The moose likes Other Application Frameworks and the fly likes * Welcome Craig Walls Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "* Welcome Craig Walls" Watch "* Welcome Craig Walls" New topic

* Welcome Craig Walls

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 30758

This week, we're delighted to have Craig Walls helping to answer questions about the new book Modular Java: Creating Flexible Applications with OSGi and Spring. See the table of contents online.

The promotion starts Tuesday, July 21st 2009 and will end on Friday, July 24th 2009.

We'll be selecting four random posters in this forum to win a free copy of the book provided by the publisher, Pragmatic.

Please see the Book Promotion page to ensure your best chances at winning!

Posts in this welcome thread are not eligible for the drawing.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

Welcome to Craig Walls, also author of Spring In Action !
There are also some sample chapters in pdf at the publisher's home.

[My Blog]
All roads lead to JavaRanch
binayakumar patel

Joined: Jun 26, 2009
Posts: 27
Welcome Craig Walls

Can we use the combine frame work of OSGI and Spring as desktop application or
we can use this only for web base and enterprise application.
Rahul Juneja
Ranch Hand

Joined: Aug 03, 2002
Posts: 425
Welcome Craig,

Let me start by asking what exactly is OSGI as i haven't worked on it yet and i have an understanding of Spring Core and Dependency inject in general.


Rahul Juneja
ThoughtClicks -
Craig Walls
Ranch Hand

Joined: Sep 19, 2003
Posts: 301
Thank you for the kind welcome. I've been here before fielding questions about Spring. This time we'll be talking OSGi, Pax, and Spring-DM.

Let me offer a quick prelude to this week's discussions...

I got into Spring early on because dependency injection and AOP helped me untangle the objects in my application. I never thought of myself as an organized kind of person, but letting DI and AOP decouple my object made me really appreciate distinct separation of my application objects.

The problem is that while my application objects were decoupled from each other, I was still jumbling up the modules of my applications. I liked Maven's support for build-time modularity, but it still left me wanting to better separate the more coarse grained application elements.

When I first heard of OSGi, I dismissed it as some complex, heavyweight thing that didn't interest me. But then when Spring-DM came about, I couldn't help but take a look. If the Spring guys were embracing OSGi, then maybe there's something to it. If the guys who's tagline is "Eliminating Enterprise Java Complexity" are interested in OSGi, then maybe it's not as complex as I had thought.

I dug into it and discovered that OSGi isn't complex and it isn't heavyweight. And I discovered that what rough edges OSGi does have are nicely smoothed out by things like Spring-DM and the Pax selection of tools. I found OSGi to be a pleasure to work with and a great way to achieve true modularity in my applications.

So, I set out to write about my experience. That's what Modular Java is all about--an OSGi experience. It's not a comprehensive volume on OSGi, nor is it a detailed reference. It's a practical walk though the same kind of experience that I had with OSGi with you, the reader, as my pair programming partner. In just over 250 pages, we develop a complete, modular web application using OSGi, Spring-DM, and a variety of other tools that I pull in as necessary.

Now we're here on JavaRanch this week talking about OSGi. I'm here to answer your questions as best as I can. Like Java itself, OSGi is a broad and ever-growing topic, so I'm sure that there'll be some questions that stump me. But feel free to ask anyway. Let's have some OSGi fun this week.

Spring in Action - Unleash POJO power in your applications!
Modular Java - Discover the secret weapon to modularity on the Java platform!
XDoclet in Action - Your complete guide to code generation with XDoclet.
binayakumar patel

Joined: Jun 26, 2009
Posts: 27
OSGi stands for "Open Service Gateway Initiative" also known as the "Dynamic module System for java"
It defines an architecture for modular application development.
Craig Walls
Ranch Hand

Joined: Sep 19, 2003
Posts: 301
binayakumar patel wrote:Welcome Craig Walls

Can we use the combine frame work of OSGI and Spring as desktop application or
we can use this only for web base and enterprise application.

Spring is about decoupling application objects and OSGi is about decoupling application modules. It doesn't matter much what kind of application is being developed. In Modular Java, I build a web application...but that's just because that's the class of application I build most frequently, so it seemed natural to me.

But I see absolutely no reason why you can't build a desktop application with OSGi. After all, one of OSGi's most famous applications is a desktop application: The Eclipse IDE.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 61420

Pleas be sure to ask questions in new topics. This topic is for welcoming the author.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
binayakumar patel

Joined: Jun 26, 2009
Posts: 27
[question removed -- please read my post]
Vijitha Kumara

Joined: Mar 24, 2008
Posts: 3838

Welcome Craig Walls . That's a very nice prelude.

[How to ask questions] [Twitter]
Craig Walls
Ranch Hand

Joined: Sep 19, 2003
Posts: 301
Rahul Juneja wrote:Let me start by asking what exactly is OSGI as i haven't worked on it yet and i have an understanding of Spring Core and Dependency inject in general.

In short, OSGi is a specification for a modularization framework for Java. While other efforts in the JCP are underway to bring modularity to the Java platform, OSGi has been providing Java modularity for over 10 years!

Note that OSGi itself is a specification, not an implementation. There are several implementations of the OSGi specification with the big players being Equinox (Eclipse), Felix (Apache), and Knopflerfish.

Going a bit deeper, modularity is defined by two dimensions: coupling (an external measure of how intimate application elements are with other elements) and cohesion (an internal measure of how focused an application element is. Application elements that are highly coupled and low in the cohesion category aren't very modular and consequently are difficult to maintain, test, and understand. On the other hand, elements that are loosely-coupled with other elements and highly cohesive are typically easy to maintain, test, and understand.

Although it's possible to develop highly-cohesive/loosely-coupled modules in Java without OSGi, there's very little about the language or the platform that enforces it. Consequently, despite our best efforts, we developers often miss the mark on modularity. OSGi not only enforces modularity, but strongly encourages it. As a result, OSGi-based applications exhibit all of the traits of good modularity (maintenance, testability, etc).

The two fundamental ways that OSGi offers modularity are classpath management and service registries. The details of these two ideas are beyond the scope of this already lengthy response to your simple question, so I'll stop here and let you ask for more details.

binayakumar patel

Joined: Jun 26, 2009
Posts: 27
Thanks Craig Walls,

Your new book will surely give us, new direction for the development of robust and dynamic application using OSGi and Spring-DM.
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
Welcome Craig. This book is surely interesting.
Many people just know Eclipse Platform, but few know what Eclipse really is (it's not just an IDE of course).

I believe this book will bring more understanding about OSGi to developer communities.

SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
Alexandra Niculai

Joined: Nov 05, 2008
Posts: 10
Welcome Craig! Congratulations on the book!
Ravi Vakka

Joined: Nov 06, 2006
Posts: 6
Hi Craig,

Congratulations on your new book. Hope your book opens new windows in Java Spring programming.

Thanks & Regards
Ravi Vakka
David Ratliff

Joined: Jul 09, 2009
Posts: 8
Welcome Craig.
Aarti Malhotra

Joined: Dec 20, 2006
Posts: 14
Welcome Craig.... congratulations on the new book!

Aarti Malhotra
SCJP 5.0, SCWCD 5.0
Eduardo Bueno
Ranch Hand

Joined: Jun 04, 2009
Posts: 155
Welcome Craig! Hoping to win that book
Bill Johnston
Ranch Hand

Joined: Nov 17, 2005
Posts: 201
Yes weleome!

Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

Hi Author,

Welcome to Javaranch,

[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
nandini lagunia
Ranch Hand

Joined: May 05, 2009
Posts: 57
Welcome Craig!!!
Amit kull
Ranch Hand

Joined: Jun 05, 2008
Posts: 46
I have used Spring in web applications. New to OSGi.
I agree. Here's the link:
subject: * Welcome Craig Walls