<p>Method chaining is the only way I know to build fluent interfaces.</p>
<p>Here's an example in C#:</p>
<pre><code>John john = new JohnBuilder()
    .AddSmartCode(&quot;c#&quot;)
    .WithfluentInterface(&quot;Please&quot;)
    .ButHow(&quot;Dunno&quot;);

Assert.IsNotNull(john);

  [Test]
    public void Should_Assign_Due_Date_With_7DayTermsVia_Invoice_Builder()
    {
        DateTime now = DateTime.Now;

        IInvoice invoice = new InvoiceBuilder()
            .IssuedOn(now)
            .WithInvoiceNumber(40)
            .WithPaymentTerms(PaymentTerms.SevenDays)
            .Generate();

        Assert.IsTrue(invoice.DateDue == now.AddDays(7));
    }
</code></pre>
<p>So how do others create fluent interfaces. How do you create it? What language/platform/technology is needed?</p>

Fluent interface is achieved in object oriented programming by always returning from your methods the same interface that contains the method. Consequently you can achieve this effect in java, javascript and your other favorite object oriented languages, regardless of version.
I have found this technique easiest to accomplish through the use of interfaces:
```
```
public interface IFoo
{
    IFoo SetBar(string s);
    IFoo DoStuff();
    IFoo SetColor(Color c);
}
```
```
In this way, any concrete class that implements the interface, gets the fluent method chaining capabilities.  FWIW.. I wrote the above code in C# 1.1
You will find this technique littered throughout the jQuery API