Hello World with ColdFusion and Spring

Firstly, what is Spring? Spring is a Java based 'dependency injection' framework, which is a complicated name for something that simply 'helps objects to talk to each other' in a well designed way. Spring is the framework that was the basis for the popular ColdFusion dependency injection framework, ColdSpring.

Learn more about dependency injection in ColdFusion

Visit the ColdSpring site

Visit the Spring site

So why use Spring? Typically you would not need to, but using Spring in a ColdFusion application is only applicable when you want to develop larger aspects of your application in Java rather than CFML. This may be useful, for example, if you were to develop your business logic layer in Java and use CFML for your views.

More ...

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
3 Nov 2009 02:26PM
Mark Mandel said:
Mark Mandel's Gravatar There is a stack more that can be done with Spring and Javaloader, be sure to check out the documentation and examples in the downloads.
http://www.compoundtheory.com/javaloader/docs/#_Co...
3 Nov 2009 03:44PM
Kevan Stannard's Gravatar Thanks, Mark.
3 Nov 2009 03:48PM
Mark Mandel said:
Mark Mandel's Gravatar Oh, and I forgot to mention, if you want to talk to a good crew of people about Java & CF integration, you can't go past the JavaLoader-Dev Google Group:
http://groups.google.com/group/javaloader-dev

Okay, i'll stop plugging my stuff now ;o)
3 Nov 2009 04:10PM
Kevan Stannard's Gravatar Thanks, joined!
16 Dec 2009 05:14PM
Joe said:
Joe's Gravatar Haha, good one guys!
16 Dec 2009 05:16PM
mark said:
mark's Gravatar Wow, all of that work, for "Hello World!"
16 Dec 2009 05:16PM
Neil Middleton said:
Neil Middleton's Gravatar Insane
16 Dec 2009 05:23PM
Sam Soffes said:
Sam Soffes's Gravatar Wow. That is a lot of stuff just to say "Hello World".
16 Dec 2009 11:37PM
Thomas said:
Thomas's Gravatar The same with sinatra:

require 'rubygems'
require 'sinatra'
get '/hi' do
"Hello World!"
end

hmm, does anybody find a difference?
17 Dec 2009 12:52AM
Kevan Stannard's Gravatar Thanks Thomas, Sinatra certainly looks impressive and I look forward to learning a bit more about it. For everyone reading, the purpose of this entry is really about connecting to Spring managed Java classes from within CFML, and not really about the display of Hello World. The Hello World aspect is just a light way to present the material.
12 Feb 2010 07:13PM
Marty McGee said:
Marty McGee's Gravatar Kevin, this is an OUTSTANDING post. You have explained, in this simple and concise tutorial, how to hook up ColdFusion and Spring, with the help of Mark Mandel's JavaLoader CFC library, which opens the tremendous possibilities of server-based processing using Java. Ya, Ruby can spit out a hello world with less lines of code, but that really has nothing to do with your entry. Again, a great post for a coldfusioner like myself of 10 years, who are seeking simple explanations of how to hook up ColdFusion (the ultimate "language") with the rest of the world's languages and frameworks. Keep rollin'.
Add a comment
(will not be published)
(include http://)