Patterns, Patterns and more Patterns!

I was reading through some blogs this morning, some how I managed to read a July 2007 post on Sean Corfield's site nearly a year later... which sent me to Brian Rinald's blog and Matt Woodwards Blog about Design patterns in CF  (both are good reads, why I didnt see them before... who knows).  Than I started reading about some of Brian's post on his cf.objective() reviews, which led me to this post in particular "Flex: No Framworks Required". Anyway, most of what I do is in Flex these days with little CF writing since I use a kick@__ generator (cough... Illidium) for most of the backend logic, ColdSpring & I am looking into leveraging Transfer.

Now I have read one book so far on Design patterns, "Advanced Design Patterns for ActionScript" by Joey Lott & Danny Patterson.  This book discusses MVC, Command, Singleton, Proxy, Memento, Factory, Template and many others.  Brian's post mentions some other patterns one of which I am not familiar with:

  • Observer (I use this to help Cairngorm notify my view)
  • Registry
  • Responder (I use this)

In Sean's comments some folks talk about a ProtoType pattern that I am not familiar with yet, he also mentions a book by "The Gang of Four" on design patterns another book that I may be adding to my collection soon. 

So with all the hype, and I say hype not to mock patterns (I do indeed believe in their use), but in our community patterns are being talked about alot... therefore at the moment it's the "hype".  So with all the hype in patterns, is there a community design patterns site for Flex developers/CF developers?  Do we have a place where a developer can go and learn about different patterns, how to use them in the context of Flex/CF?  A place were others can recommend books to read, link examples, ect...  Blogs are nice, but man stuff is scattered all over the place, it would be great if there was one place that stored all this knowledge... ut oh... I said it... we need a knowledge management tool for design patterns.  (I am laughing inside, because knowledge management or KM is THE big hype in the company I work for right now).  

We have Coldfusion Cookbooks, we have Flex cookbooks, we have great blogs, Adobe has a nice developer site, but we dont have a centralized repository to keep best practices such as Design Patterns for Flex/CF developers...  or do we and I am unaware of it?  What does everyone think, I sort of went on a tangeant.  I guess I like things where I can find them easily.  Like a toolbox, where I know my tools are kept and if I need a wrench I can open up my toolbox and get one.  If that wrench isn't in the toolbox, well I have to find something else to do the job or I have to go around searching for the wrench which waste time and could lead to other problems, especially if I use the wrong tool.  I was always taught that the first part of doing a job right is using the right tool, but what if you dont know what the right tool is, or you have a question on how to use that tool and want to see an example?   If we had a place to keep our "tools" or "Best" tools (i.e. Best Practices) wouldnt life be a little easier for our Flex/CF community?

Comments appreciated ;)

 


10 responses to “Patterns, Patterns and more Patterns!”


  1. Josh I added links to some of the post I was talking about... ;)

  2. Ben Nadel @Josh,

    When it comes to design patterns, I think the hardest part is not knowing what the patterns are. As you have seen, there are lots of books and blog entries that outline the patterns. To me, the hardest part is knowing how and when to apply them, and perhaps even more challenging, how to tie multiple patterns together.

    What would be beyond awesome would be, not only a site that outlines patters, but also had an accompanying application that demonstrated those patters in a real-world example.

    Take Singleton pattern for example. Imagine if the site had a definition of Singleton. Then, it was like, see the following files [...] to see how the singleton pattern is used to instantiate and cache our Config and Factory objects... etc. etc.

    That would be hugely powerful.

  3. phill.nacelli Shameless plug here, but this is exactly why I wanted to present a series on Design Patterns in ColdFusion. I have already presented the basics version at CF.Objective() 2008 and I'm planning on doing another with more complex patterns. As I stated during my presentation, the reason is so that ColdFusion developers that are learning Object-Oriented programming and are starting to explore the huge benefits of Design Patterns would have a place to see them using ColdFusion code, not in Java or Ruby or some other language that may take away from concentrating on the pattern itself. I was planning on using my colleague Nic Tunney's cfoop.org to also document those patterns in there as well.
    Here's a link to the preso, (I know.. shameless plug but within context I hope!):
    http://www.phillnacelli.net/blog/index.cfm/2008/5/5/CFObjective--Leveraging-Basic-Design-Patterns-in-ColdFusion-Presentation

  4. Josh Nah, never shameless to share good information ;)

    Thanks!

  5. Kyle Hayes Patterns have been around since the dawn of programming. I believe the reason why there has been so much hype in our community lately about patterns is due to the fact that the online development community is finally working with more advanced concepts in the same manner that software developers use on desktop software. It is realized that these same patterns can apply to dynamic languages.

    I am a very strong advocate of the proper use and not overuse of design patterns. They are great tools that should be used when appropriate. Don't be like those people who have a copy of Photoshop and apply a bevel and a shadow to every object they get a hold of just because they can. Use the right tools for the right job.

  6. Ben Nadel I attended Phill's presentation at cf.Objective(). Top quality. Definitely got me wanting to learn a whole more about this stuff. Phill, looking forward to seeing more.

  7. Josh @Kyle,

    I agree with 99% of what you said, except the part of "Patterns have been around since the dawn of programming".

    Not totally true, people in general will make mistakes, learn from them and than apply a lesson learned (or design pattern) to fix the problem.

    So patterns have not been around since the dawn of programming, hence the name "pattern".. something that has happened before.

    I am going to speculate it took some time to figure out how to fix the problems once OO principles came out and started being applied. Programmers didnt just "know" right off how to program it the right way. It may have happened occassionally, but I doubt it happened right out of the gate.

    Like I said though I agree with the "hype" comment on why its being introduced and discussed a lot the last two years - three years.

  8. Kyle Hayes @Josh,

    Ah...I believe you assumed that I meant _standardized_ patterns. A solution to which a programmer has solved is likely to be used when that very problem occurs again in the future. That solution is a pattern. While it may not have a specific name like Singleton, or Factory, it is indeed a pattern as it follows a _specific_ way of doing something.

  9. Josh Ya I was assuming that Design patterns where general solutions to a recurring problem. Not a solution that has code problems. Next time I will define the definition of Design pattern so we are all on the same page. That will help the conversation I think in the future.

    http://en.wikipedia.org/wiki/Design_pattern_%28computer_science%29

  10. Josh I found this, maybe it can be copied for Flex/CF
    http://ajaxpatterns.org/

Leave a Reply