Founder of Agile Developer, Inc.
Dr. Venkat Subramaniam, founder of Agile Developer, Inc., has trained and mentored thousands of software developers in the US, Canada, Europe, and Asia. Venkat helps his clients effectively apply and succeed with agile practices on their software projects, and speaks frequently at international conferences and user groups. He is author of ".NET Gotchas" (O'Reilly), coauthor of 2007 Jolt Productivity Award winning "Practices of an Agile Developer" (Pragmatic Bookshelf), and author of "Programming Groovy: Dynamic Productivity for the Java Developer" (Pragmatic Bookshelf).Presentations by Venkat Subramaniam
Spring Dynamic Modules for OSGi Service Platforms
OSGi is a specification that helps with versioning Java modules at runtime.Spring helps with dependency injection of Java components and beans.
Spring has embraced OSGi and allows you to integrate different OSGi implementations into your
Spring applications. In this presentation we will look at the rational for mixing Spring and OSGi
and look at code examples of the same.
FP on JVM
Functional Programming Languages (FPLs) have been around for a long time. A lot of features that we get excited aboutin dynamic languages are common place in FPLs. FPLs are gaining importance due to various changes in our industry. What's exciting is that you can use them on the JVM. In this presentation we will dig into the details of what makes FPLs so interesting and look at ways to use them on the JVM?in your Java projects.
Know your Java?
Java has been around for well over a decade now. It started out with the goal of being simple.Over the years, its picked up quite a bit of features and along comes complexity. In this presentation
we will take a look at some tricky features of Java, those that can trip you over, and also look at some
ways to improve your Java code.
Design Patterns in Java and Groovy
You're most likely familiar with the Gang-of-four design patterns and how to implement them in Java. However, you wouldn't want to implement those patterns in a similar way in Groovy. Furthermore, there are a number of other useful patterns that you can apply in Java and Groovy. In this presentation we'll look at two things: How to use patterns in Groovy and beyond Gang-of-four patterns in Groovy and Java.Got Guice?
In this presentation we will take a look at Google's dependency injection framework,discuss its features, capabilities, strengths, and weakness. We will then discuss where it
stands in comparison to Spring.
MOPping Up Groovy
Groovy's dynamic capabilities makes it an attractive language for Meta Programming.There are several facilities to intercept method calls to do AOP kind of operations.
You can also inject methods dynamically. You can also easily perform method synthesis as well.
In this presentation we will take a look at techniques that make Groovy pretty Hip for MOP.
DSL in Groovy
DSL or Domain Specific Languages focus on a domain or problem at hand. They're expressive, but theirrestricted scope keeps them simple and small from the user point of view. However, designing them is not easy.
In this presentation we will explore the features of Groovy and show how they can be used to create DSLs.
Testing with Groovy
Groovy's dynamic and Meta Programming capabilities makes it a great tool for unit testing. In this talk we willtake a look at how we can use Groovy for unit testing and creating mocks both for testing Groovy code and Java code.
Dubugging AJAX
When you start playing with JavaScript and AJAX, you very quickly experience the two Ps-the power and the pain. As you exploit the power, what can you do more than putting those agonizing alerts to debug your code? In this presentation, we will look at tools that can help you debug your code and techniques to keep the development from getting overwhelming.BDD in Java and Groovy
In this presentation we will take a look at what BDD is and look at toolsto create them in Java and Groovy.
Creating Domain Models
Domain Driven Design (DDD) is an approach that places emphasis on the domain model and carrying it into implementation. In this presentation we will discuss what DDD is and how we can use it to create domain models. We will also discuss ways to validate such a design.Caring about your Code Quality
We all have seen our share of bad code. We certainly have come across some good code as well.What are the characteristics of good code? How can we identify those? What practices can promote
us to write and maintain more of those good quality code. This presentation will focus on this
topic that has a major impact on our ability to be agile and succeed.
State of Continuous Integration
Continuous Integration helps maintain the quality of your application. There are a number of tools (commercial and open source) that provide Continuous Integration Service (CIS). In this presentation we will take a look at what CIS is, discuss the motivations to use them, and delve into details of tools, their capabilities, and limitations.Books by Venkat Subramaniam
by Venkat Subramaniam
-
The strength of Java is no longer in the language itself; it's in the Java Platform (the JVM, JDK, and rich frameworks and libraries). But recently, the industry has turned to dynamic languages for increased productivity and speed to market.
Groovy is one of a new breed of dynamic languages that run on the Java platform. You can use these new languages on the JVM and intermix them with your existing Java code. You can leverage your Java investments while benefiting from advanced features including true Closures, Meta Programming, the ability to create internal DSLs, and a higher level of abstraction.
If you're an experienced Java developer, Programming Groovy will help you learn the necessary fundamentals of programming in Groovy. You'll see how to use Groovy to do advanced programming including using Meta Programming, Builders, Unit Testing with Mock objects, processing XML, working with Databases and creating your own Domain-Specific Languages (DSLs). - Available At: http://pragprog.com/titles/vslg
by Venkat Subramaniam and Andy Hunt
-
Adapting to change is key to successful software development.
Many books and articles have been written describing agile, adaptable approaches to writing software. But somehow, reading about software development isn't the same as actually doing it, so readers typically come away uninspired?few books describe what agile development actually feels like, or how to tell if you?re doing it well.
Now you can see for yourself what agile is all about. Not just ?what you should do,? but also ?how it really works.? Noted authors and consultants Venkat Subramaniam and Andy Hunt share their experiences and reveal pragmatic, practical agile development practices that work in the real world of modern, commercial software development.
You'll see how to:
* Establish and maintain an agile working environment
* Deliver what users really want
* Use personal agile techniques for better coding and debugging
* Use effective collaborative techniques for better teamwork
* Move to an agile approach
You'll succeed in delivering and meeting your user's expectations. You?ll be able to keep normal project pressure from turning into disastrous stress while writing code, and see how to effectively coordinate mentors, team leads, and developers in harmony.
Of course, you could learn all this stuff the hard way, but this book can save you time and pain. Read it today, and you'll be a better developer?today.
This book is a 2007 Jolt Productivity Award winner. - Available At: http://pragprog.com/titles/pad
Agile Developer Venkat's Blog
Agile Developer: Venkat Subramaniam
Thursday, May 1, 2008
Here is some additional information at the NFJS Website.
I yelled out "that is good" when I read about the Fundraiser for the family of Steve Metsker.
My friend Brian Sletten blogged about Steve here. Brian Goetz organized funds from NFJS speakers
a few weeks ago. I am pleased to hear that NFJS is planning on good donation on Monday, in
addition to the fund raised at the event.
I look forward to meeting several developers there.
Thursday, May 1, 2008
The topics for the first day are "Business Value of Test Driven Development" (for managers and non-programmers) and "Practices of an Agile Developer" (the second session is based on the book I coauthored with Andy).
The full-day workshop is for programmers and will focus on Test Driven Development?Principles, Practices, and Pragmatics.
I was in beautiful Vancouver last week. I look forward to another visit to Canada within a month.
Thursday, May 1, 2008
G2One will update on Groovy and Grails. If you have any favorite questions to ask, you'll have Graeme Rocher, Guillaume Laforge, and Jeff Brown during this update and Q&A session.
After a short appetizer and drink break, Jay Zimmerman will give an NFJS tour update at 9PM, followed by a panel discussion. Quite a few of NFJS regular speakers including Jeff Brown, Scott Davis, Neal Ford, David Geary, Brian Goetz, Ted Neward, and I will be there.
NFJS will be raffling off some signed copies of Groovy Recipes and Programming Groovy books. Scott and I will be there for that.
If you will be in San Francisco on Monday, please drop by. You can find more details about location, etc. and also register for this free of charge event here.
Thursday, April 24, 2008
As an author of a class you're often concerned with state and behavior. As a user of a class, you're often concerned with getting things done.
Supposed you want to provide a class that helps send out emails. You are concerned about getting various information for the mail. You want to know from whom it is, the list of recipients, the subject, the body (and more?like priority, urgency, etc.).
As a user of the class, you want to quickly send out the email with as much ease as you can get.
Let's start with the familiar Java like API and refactor that into a fluent API with context. Ready for the short ride?
public class Mailer
{
// In each function I println in this example to illustrate the method call
// You can substitute the actual implementation for these, my focus here is on the API
public void to(String[] toAddress)
{
System.out.print("to ");
for(String to : toAddress) { System.out.print(to + ", "); }
System.out.println();
}
public void from(String fromAddress) { System.out.println("from " + fromAddress); }
public void subject(String theSubject) { System.out.println("subject " + theSubject); }
public void body(String message) { System.out.println("body " + message); }
public void send() { System.out.println("send"); }
}
Here is a way to use the above API.
Mailer mailer = new Mailer();
mailer.from("johndoe@example.com");
mailer.to(new String[]{"janedoe@example.com", "bobdoe@example.com"});
mailer.subject("refactor to fluency and context");
mailer.body("Hello, ...");
mailer.send();
The output from the above code is shown below:
from johndoe@example.com
to janedoe@example.com, bobdoe@example.com,
subject refactor to fluency and context
body Hello, ...
send
There is too much noise in the above code. You are creating a Mailer object, and it caries around the information until (and even after) you call the send()method. Can you reuse this instance of Mailer to send out another email? That is not clear.
Let's solve one problem at a time. Let's remove some of the clutter in the above code by rewriting it in Groovy.
class Mailer
{
void to(String[] toAddress) { println "to ${toAddress.join(', ')}" }
void from(String fromAddress) { println "from $fromAddress" }
void subject(String theSubject) { println "subject $theSubject" }
void body(String message) { println "body $message" }
void send() { println "send" }
}
In the above version, I eliminated public as that is default in Groovy. (Also, the printf in to() method is a lot simpler to implement).
The Groovy code below shows how to use the above code?again, call to the to() method is a lot simpler. However, the code is only a notch better than the Java version.
mailer = new Mailer()
mailer.from 'johndoe@example.com'
mailer.to 'janedoe@example.com', 'bobdoe@example.com'
mailer.subject 'refactor to fluency and context'
mailer.body 'Hello, ...'
mailer.send()
The output from the above code is shown below:
from johndoe@example.com
to janedoe@example.com, bobdoe@example.com
subject refactor to fluency and context
body Hello, ...
send
The send() method has to be called last. Also, it still does not tell us if I can reuse the Mailer object or not. We will fix that in the next version below.
class Mailer
{
void to(String[] toAddress) { println "to ${toAddress.join(', ')}" }
void from(String fromAddress) { println "from $fromAddress" }
void subject(String theSubject) { println "subject $theSubject" }
void body(String message) { println "body $message" }
static send(closure)
{
def mailer = new Mailer()
closure(mailer)
println "send"
}
}
In the above version, I made the send() method a static method of Mailer. It takes a closure as parameter, creates a Mailer instance and sends it to the closure. The closure will work on the Mailer instance provided to it as shown below. Once the control returns back to the send() method it can take care of finishing up the job of actually sending the mail.
Mailer.send { mailer ->
mailer.from 'johndoe@example.com'
mailer.to 'janedoe@example.com', 'bobdoe@example.com'
mailer.subject 'refactor to fluency and context'
mailer.body 'Hello, ...'
}
Once you're done with the send, the Mailer instance is gone. The output from the above code is shown below:
from johndoe@example.com
to janedoe@example.com, bobdoe@example.com
subject refactor to fluency and context
body Hello, ...
send
There is still some noise and lack of context. We will fix that in the next final version below:
class Mailer
{
void to(String[] toAddress) { println "to ${toAddress.join(', ')}" }
void from(String fromAddress) { println "from $fromAddress" }
void subject(String theSubject) { println "subject $theSubject" }
void body(String message) { println "body $message" }
static send(closure)
{
def mailer = new Mailer()
mailer.with closure
println "send"
}
}
The send() method is creating an instance of Mailer and is asking the closure to execute in the context of that instance (the with() method sets the context or delegate object of the closure to the target object, in this case the Mailer instance. As a result, the closure will route calls to untargeted methods to the context object). The code to use the Mailer now reduces to this:
Mailer.send {
from 'johndoe@example.com'
to 'janedoe@example.com', 'bobdoe@example.com'
subject 'refactor to fluency and context'
body 'Hello, ...'
}
The output from the above code is below (same output as above, of course):
from johndoe@example.com
to janedoe@example.com, bobdoe@example.com
subject refactor to fluency and context
body Hello, ...
send
So, we started with
Mailer mailer = new Mailer();
mailer.from("johndoe@example.com");
mailer.to(new String[]{"janedoe@example.com", "bobdoe@example.com"});
mailer.subject("refactor to fluency and context");
mailer.body("Hello, ...");
mailer.send();
and ended with a much lighter, fluent syntax below:
Mailer.send {
from 'johndoe@example.com'
to 'janedoe@example.com', 'bobdoe@example.com'
subject 'refactor to fluency and context'
body 'Hello, ...'
}
That was hardly any effort, right? Like it?
