Thursday, December 27, 2007

Fluent Interfaces, Domain Specific Languages, OO Roots

I see industry backing for Fluent Interfaces. It is in more places than you may know. In my opinion, all people in the software industry will want to know what Fluent Interfaces are, where they are used, and how they fit into the canvas of what they care about.

What are Fluent Interfaces? Fluent Interfaces is an API style that empowers the user of the API to programatically express something in a natural and easy to read way. Martin Fowler describes Fluent Interfaces well. See http://martinfowler.com/bliki/FluentInterface.html

Steve Asher
explores Fluent Interfaces in-depth from the user and designer point of view at his Build Without Boundaries blog at http://buildwithoutboundaries.blogspot.com. Search for Fluent API.

Having Martin Fowler support Fluent Interfaces is huge. I also see Fluent Interfaces as the bridge towards Domain Specific Languages (DSL). Are DSLs a possibility in mainstream software development?

Kent wrote in a JavaRanch post that there is a transition from OO languages to DSLs (Domain Specific Languages). What a powerful statement! Is it true? What's the sticking power to Fluid Interfaces and DSLs?

The Object Oriented (OO) approach to programming caught on because it feels natural. We play with objects in life. We speak about them within the context of a domain. The customers speak from within their domain perspective. The easier the trip between the problem domain concepts and reflecting those concepts in code the better.

Who's presenting their API / functionality via a Fluent Interface? Thanks to Steve Asher, I now know JUnit has begun that journey. See http://junit.sourceforge.net/doc/ReleaseNotes4.4.html where the assertThat(...) example is given. JMock uses a fluid interface too. See http://jmock.org/expectations.html If you search for "new Expectations" twice you will see examples of a Fluid Interface in action. It is used also where I work at CARFAX. Again, I refer you to the Build Without Boundaries blog.

Similar to the time when people implemented Object Oriented concepts via languages like C and Ada, we will see people using Fluid Interfaces and other approaches with existing languages. The benefits are likely to outweigh most difficulties and challenges.

The next step for DSLs and Fluid Interfaces will be stronger support and perhaps new languages entirely. Will the fashion of Fluid Interfaces and DSLs hold? Time will tell.

Thursday, November 29, 2007

xUnit Patterns and the Mid-Missouri XP Meeting

The Mid-Missouri XP (Extreme Programming) group meeting last night was quite enjoyable. James Carr led the meeting. James Carr's great experience with test frameworks and Software Development in general really showed through in a positive light.

We dove right into Gerard Meszaros' XUnit Test Patterns site at http://xunitpatterns.com/ and specifically http://xunitpatterns.com/Test%20Double.html. We covered Test Stub, Test Spy, Mock Object, Fake Object, and much more.

I put forth the questions: What are the essential Test Patterns? Where is the UML Distilled version of Test Patterns? The answer was Fake Object and Test Stub will get you to where you want to be 95% of the time.

There was much discussion too. The people who attended had dived into various things and were just great people too. We swapped stories of experience and various technologies that we have explored. Since many people there used Java, one great example of a test framework that was mentioned is JMock.

(You can hook up with what the Mid-Missouri XP group is doing at http://tech.groups.yahoo.com/group/mid_mo_xp/ : In the group, there is a post about the meeting from James Carr )




Saturday, November 10, 2007

Check My Pulse Via The Plaxo Pulse Lifestream Widget

To add the Plaxo Pulse Lifestream Widget to your blog that is located on blogger.com:
  • Go to http://www.blogger.com
  • Sign in (log into) your account
  • Click the "Layout" link of the blog you want to add the Plaxo Pulse Widget to
  • If not already active/selected, click on the "Template" tab
  • If not already active/selected, click on "Page Elements" sub-tab
  • You should be at the "Add and Arrange Page Elements" screen
  • Copy the HTML you got from activating your Plaxo Pulse Widget (Need the HTML? go to http://pulse.plaxo.com/pulse , (sign in) and click on 'Create a "lifestream" widget' Follow the directions.)
  • Again on the "Add and Arrange Page Elements" screen, click "Add a Page Element" link - located on the right hand of the screen
  • A window pops up with "Choose a New Page Element" at the top
  • Click the "ADD TO BLOG" button on the page in the "HTML/JavaScript" section
  • You'll see a screen which says "Title" and "Content".
  • Paste the HTML into the "Content" section
  • Go back up to where it says "Title" and give this widget a title. Mine is "My Plaxo Pulse"
  • Hit the "SAVE CHANGES" button.
  • See the "Page element added" text now at the top of your blogger.com web page screen.
  • Click on "View Blog" or navigate to your blog via http://www.blogger.com and click "View Blog"
  • See your Plaxo Pulse Lifestream Widget on your blog!
  • To see mine (Michael Finney blog) look at http://finneycanhelp.blogspot.com
  • My Plaxo Pulse Lifestream widget is titled "My Plaxo Pulse" although the text "Check My Pulse" is more prominent with its white text on a blue background.
Enjoy. Feel free to ask questions and do not forget to ask Blogger.com and Plaxo Pulse ( Plaxo.com ) for help as well if you need it.

Friday, November 9, 2007

Gateway Jug in St. Louis

I visited the Gateway JUG in St. Louis. I enjoyed the pizza, people, and topics. The topic of the evening was Web 2.0.

There's so much that a person gets from going to such events. Undoubtedly, a person is exposed to tips and other technologies as a result. I plan on going to the Gateway JUG again.