— Forest and the Trees

Archive
Design Patterns

Practical Patterns in Flex

Begins: Wed, 01 Aug 2007 at 7:00 PM

Ends: Wed, 01 Aug 2007 at 8:00 PM

Location:

Brightcove

One Cambridge Center

Cambridge, MA

At this month’s Design Patterns group, Jim Echmalia will give a run-through of his talk for the 360 Flex Conference, Practical Patterns in Flex. Jim is a software developer at Allurent. The abstract for his talk is here. Looks like it should be a good one.
As always, first Weds of the month, 12 floor of Brightcove. Bring your own food and drink. And afterwards, we all go to the bar downstairs and play foosball.

Map
Big building to the right of the Marriot if you come up from the Kendall Square T Station. Come up to the 12th floor and ring the bell.

Read More

Flywieght Pattern

Begins: Wed, 11 Jul 2007 at 7:00 PM

Ends: Wed, 11 Jul 2007 at 8:00 PM

Location:

Brightcove

1 Kendall Sq.

Cambridge, MA

My friend and co-worker James Gauthier will be presenting on Flyweight Pattern tonight. Apparently his power point presentation is totally awesome.

Tags: designPatterns flash code

Read More

I posted the files from the Adapter and Facade patterns talk I gave Wednesday. The swfs are totally amazing and there would be no way to create them w/o using design patterns.

Files here.

Read More

Adapter Pattern Talk

Begins: Wed, 09 May 2007 at 7:00 PM

Ends: Wed, 09 May 2007 at 8:00 PM

Location:

Brightcove

One Cambridge Ctr

Cambridge, MA 02142

US

Link: map to Brightcove

I’ll be giving a talk on the Adapter pattern – and maybe Facade – at the Design Patterns Group. As always pizza and excellent views provided by Brightcove. And beers and foosball afterwards.

Tags: flash designPatterns

Read More

Keith Peters is presenting on the State Pattern tonight at Brightcove. If you haven’t made it to a patterns meeting yet, this will be a good one. Plus, as always, Brightcove supplies pizza, beers afterward, and you can watch me beat James at foosball. Or watch Sam beat me.

Directions to Brightcove.

Read More

I finally cleaned up the files I showed for my Iterator presentation a few weeks ago. Here’s the code. All of these examples are basically Hello Worlds. They should be pretty easy to understand, but, they’re not that exciting.

The main class is IteratorTalkMain. Take a look at the init() method and you can comment in/out various methods that demonstrate different aspects of iterator.

The code demonstrates the following:
1. Simple iterator.
2. Iterating on an interval without having to add much to your main class.
3. Iterate using the remove() method. (Earlier methods shown are hasNext() and next())
4. Iterating over a hash array. Because your iterator class is external to the class that is calling the iteration, the class that calls the iteration is able to treat a hash identically to an array.
5. Using different iterators to traverse the same data. This example filters out strings that do not have a minimum length.
6. Internal iteration. For internal iterations, you pass a method to the class that holds the data, the data class traverses over its data and modifies the data using the method passed. I am not sure if I implemented this correctly. In general, it seems that internal iterators are frowned upon (at least in the GoF book).
7. Composite Iterator. This is the most complex. It shows how to iterate over a data structure that uses the Composite Pattern. In Composite, both nodes and leaves are treated identically. The iterator is recursive. There is one weird glitch in the CompositeIterator class. Everything works, but, I ended up having the iterator creation increment by 2 when I used push (which froze the player) – to fix it I added a klugey length check. If you want to take a look – look for the ‘wtf’ comment.

Most of this code was based on code from Heads Up Design Patterns, which is a great book. I also read the Iterator chapter in the Gang of Four book.

I am not a design patterns expert. If you find errors in this code, let me know.

In addition to the code, there is a swf of the presentation – basically text slides.

This code is open source. Use for whatever you want.

Read More

Iterator Pattern

Begins: Wed, 02 Aug 2006 at 7:00 PM

Ends: Wed, 02 Aug 2006 at 8:00 PM

Location:

Brightcove

One Cambridge Center

Cambridge, MA 02142

USA

Link: Brightcove

Link: BFPUG

I’m giving a short talk on the Iterator pattern as part of the Design Patterns group. Hopefully I will finish my examples by Weds. As always, pizza and drinks supplied by Brightcove. And, we go out for beers afterwards.

Tags: ‘design patterns’ iterator ‘composite iterator’

Read More

First Design Patterns Meeting

Begins: Wed, 05 Apr 2006 at 7:00 PM

Ends: Wed, 05 Apr 2006 at 9:00 PM

Location:

Brightcove

One Cambridge Center

Cambridge, MA 02142

USA

Link: Boston Flash Platform Group announcement

Brightcove is hosting the new Design Patterns group on the first Wednesday of every month.

Directions.

Read More