Blog posts tagged "patterns"
June 11, 2008⇒ Yuiblog: Patterns for Designing a Reputation System.
Excellent, pragmatic, Christopher Alexander style patterns for building online community. With really cute graphic.1. (Aside collaboration, community, flickr, patterns, social, yahoo, yui)
September 10, 2007⇒ r0ml.net: History teaches us ….
r0ml explores the secret Catholic bias present in Java enterprise development. (in case the hair shirts weren’t a dead giveaway)0. (Aside, architecture, history, patterns, programming, tier)
March 9, 2006⇒ Shirky: A Pattern Language for Moderation Strategies.
I love pattern languages, and this is an excellent start. E.g. main problems with community can be addressed by MakeIdentityValuable0. (Aside clay shirky, collaboration, community, identity, participation, patterns, reputation)
January 26, 2006⇒ Fowler adds “rought cut” patterns on event collaboration and accounting to PoEAA.
See also Pattern Oriented Softare Arch., vol 2 for good enterprise event patterns0. (Aside books, enterprise, fowler, patterns, programming)
my eastern reversible destiny; ebullient barnacle turkey y propitious zeiss novice, coverlet upsilon mausoleum remiss optoelectronic emblematic irritant sesame morphology. ambrosia shim grunt switchblade filigree gait amino caleb duration budge embargoes allied
Random gibberish, and yet 100,000 years of pattern matching expertise refuses to let it go that easily, finding primordial poetry, and humor.
Has anyone wondered what the extreme, cut throat Darwinian pressure of the spam wars might be evolving?
And what kind of AI could such a crucible produce I wonder? Vicious and deceptive? Slippery, polymorphic and rentless? Recent samples seem to suggest a cryptic, Delphian source of Zen koans.
November 25, 2005⇒ Runt – Ruby Temporal Expressions.
an implementation of select temporal patterns by Martin Fowler0. (Aside calendaring, fowler, patterns, ruby)
March 15, 2005⇒ Lay out of a PHP application.
Solid advice. I do it a little differently (more structure), but following this advice will make your app better, and make you a better programmer0. (Aside patterns, php, programming)
February 15, 2005⇒ Rafe recommends “Head First Design Patterns”.
I’ve been boycotting it due to the cover0. (Aside books, design, ora, patterns, rafe)
September 20, 2004⇒ UI Patterns and Techniques.
Its all about patterns0. (Aside patterns, ui, web)
August 25, 2004⇒ Resign Patterns – Ailments of Unsuitable Project-Disoriented Software.
I’m using the Brig pattern right now.0. (Aside funny, patterns, programming)
At work we’re using Class Table Inheritance to model the core data structures of our as yet nameless open source CRM. (actually it has a code name, but I don’t like it, so we’ll pretend it’s nameless)
This week as I learned both the name of this pattern, and the SQL to implement it efficiently in MySQL I thought I’d share some notes on what we’ve come up with.Read the rest of this entry »
August 7, 2004⇒ Single Table Inheritance.
The power of naming, transmuting bad relational design into a legitimate enterprise pattern.0. (Aside eaa, patterns)
April 15, 2004⇒ class HelloWorldEmphasizer extends HelloWorldDecorator.
Hello world in Patterns, a cautionary tale0. (Aside humor, patterns, php, programming)
I finally made it a SeaJUG meeting last night, Ted Leung speaking on Groovy proved to be an irresistible draw (and I was in town for once). This was also my first venture across the 520 bridge, into deepest, darkest suburbia (Bellevue). Wilhelm and Ted took pity on my carless state, and were great company
SeaJUG is a great group; smart, friendly, and intellectually curious. There are several vibrant subgroups including a Scheme group, a GoF study group, a regular language agnostic pair programming night, and a new Eclipse group (first meeting is first Tuesday in April, and I’ll be out of town, bah). I can also see that it would be an intimidating group to present to, especially bullshit, and this was confirmed by quiet evil laughter describing their last vendor visit.
Groovy has fascinated me since I first heard of it. I’m a dedicated “scripting” language hacker. Life is too short, and there are too many interesting problems to solve to slave away in the service of the compiler. And yet I’ve definitely felt the pull for more rigor and structure at times (generally when I was having to work with someone else’s code). Much of Perl works by consensus, I agree to call a method just so, and you agree not to muck with my internal variables (or the symbol table). Java works by locks (and shotguns, according to Larry Wall). Groovy provides a gradient, I can be as dynamic, and loose, and experimental as I want, or as locked down and precise, and I can change my mind, over time, about which way to go.
Groovy is a Java compatible, dynamic language, built on the JVM. You can pare it down to something it will make a Perl programmer pause (no classes, no methods, objects defined at runtime as closures, no semicolons), or add structure, type declarations, and all sorts of baggage all the way up to Java itself. Code can be run interactively, or can be compiled to Java bytecode. (one wag even suggested you could write Groovy, compile, and then use a decompiler to get your Java code. This is not recommended)
The Groovy developers have done a lot of work adding the syntactic sugar which makes scripting languages fun. Primitives are auto-boxed, and collections have been instrumented with a variety of useful methods that will make your functional programmers feel right at home. They’ve also been building some powerful domain specific constructs for operating on tree structures (XML/Ant/GUI widgets), building web pages (as ugly as PHP on a bad day, should make it popular!), and marshalling data into and out a relational DB. And lastly they address the other thing life is too short for, reinventing the wheel (especially as they seem to get more square each time). Because Groovy is compiling down to Java bytecode you have total, native access to many many high quality Java libraries.
See Ted’s slides. (understanding of closures is highly recommended)
Would I Use It?
Not this month. Not next month either. The syntax is still somewhat influx (if you’re a language hacker, that makes now a great time to get involved), and there were part which seemed either undefined or ambigous never a good thing in a programming language. There also feels like there has been a lack of discipline, too many special cases in the syntax, and a sense that the designers are kids in a candy shop running amok borrowing syntax from all their favorite languages. Still I’m excited about it. Its about 6 months old. I think 6 more months will tell us how successful its going to be.
Ted is as smart, interesting, and informed as you would expect him to be reading his blog. He kept his cool in the face of hardware trouble, and a large contingent of the audience who weren’t buying it. As Ted said, “to fully buy into Groovy, you have to buy into some assumptions about how software should be developed, which is philosophical bordering on religious.” He is talking about agile software development, which I occasionally forget still has its detractors, and its unintiated.
He ended by addressing the fact that much of programming is mechanical, and that far from happening accidentally, or improving over time this trend is getting worse. With top heavy, byzantine architectures like EJB, or the ever deepening W3C XML stack, you see the work of the large technology vendors who are interested in keeping entry difficult, work rote (and therefore cheaply offshore-able), and profits up. As he ended with “the big corporations are going to solve this for you, we need to solve this for ourselves” I had a brief moment of cognitive dissonance as my worlds collided and I couldn’t remember if I was at an anti-globalization meeting, or a software users group. This is the sort of stuff people should at least bring up at the next CATS meeting.
It was fascinating to get an inside update on Chandler, a project I’ve watched with fascination since its early days. (Thankfully I’ve got a job I’m very happy with, and so I didn’t have to embarrass myself by pumping him for contacts as the OSAF.) I’m looking forward to Mitch Kapor’s keynote at next week’s PyCon (not that I’ll be attending)
And he addressed the problem I’ve always had with mixins. (recently reinvented by the AOP crowd apparently as “static cross cutting”) You see when I hear mixins the first thing I think about (or the second, after I think about too many late nights struggling with Mailman) is ice cream from Herrell’s. Herrell’s is a Boston (and Northampton) ice cream shop that will pound your ice cream out flat, mix all sorts of wonderful things into it, and roll it up again. Turns out that that is the origin of the term. Back when it was Steve’s and the MIT hackers were working on the original Lisp machine. Wow.
In preparation for doing the Protest.net re-write I’m doing some research on web frameworks. I find myself rewriting the same central dispatcher code, adding refinements, like a redirect method (similiar to the forward() method in servlets) and in general missing some of the refinements of Java’s web environments (servlets, Struts, bundles for i18n) while refusing to give up Perl, CPAN, and Template Toolkit.
This is my brain dump so far. Lots of questions, a few answers. The next step will be firing up the text editor and looking under the hood.
Steal from the BestApplications I’m going to examine for ideas to steal, particularily framework ideas (error handling, inner loop, etc.)
- Moveable Type – in my few glaces at the code its seemed intelligent, and well structured. Runs under mod_perl and CGI, handles some complex UI demands like pages that use redirects to update progress bars, and re-entrant forms.
- Bricolage – based on Mason, I’ve been hearing good things about this CMS, particular about its clever Burners abstraction, hope to find other good things under the hood. Don’t really know much about Mason, not sure if that is going to be barrier
- RT – popular, mod_perl and Mason, ticket tracking software. Also supports email, and command line interfaces.
- Scoop – haven’t looked at Scoop in a while, but I remember it seemed well done (having just come from looking at Slashcode 1.0), I wonder if it will stand the test of time. Not expecting to find anything all that relevant, but maybe. Will probably do a quick skim of the CMS parade: Slash, Everything2, and maybe LiveJournal. Definitely want to look at LiveJournal’s embedding instructions.
- ?? Do you any Perl web applications you would consider examples of best practices??
- OpenInteract seems popular, and uses TT2, but leaves me cold, partially because I’m just not crazy about persistence layers. But I should probably spend some time looking at it. ?? Any expirences using it ??
- Mason natively uses an embedded, page based execution model, which seems PHP-like to me, but Design Issues with Mason: What are Components For? seems to be simple guidelines for avoiding the siren calls. There is an Oreilly book coming out on it, which will be available online, but the author says, don’t expect it until mid-October.
- Wombat is billed as an implementation of the Servlet API in Perl, but I can find exactly zero reference to anyone using it, never a good sign.
- AxKit is a web framework built along the lines of Cocoon. I bet there are seriously cool ideas to steal in there, but I’ve been burned pretty badly playing with XSLT and don’t want to go back into that water right now.
- OpenFrame also seems interesting. It has the request and response objects ala servlets, and acme is being paid to work on it, and it has a “Slot” concept which seems similiar to Brico’s Burner concept, and supports TT2. However it bills itself as an “open source application framework for distributed media applications.” Which isn’t really what we are building.
- A few others are listed at Application Servers and Toolkits based on modperl. Also, Web Frameworks and their Template Engines is interesting.
- Last time I was looking at this stuff there was JellyBean, which no longer seems maintained, and Iadio, which no longer exists.
- I found a simple home-rolled framework that feels simliar to the one I did for Rockwood. It was mentioned in this interesting thread.
- The book, Perl for the Web from New Riders, is freely available online and seems interesting if out of date.
Piecemealing with Modules
- We’ll definitely be using Template Toolkit. Read Perrin’s classic article on Template engines. (the sequel to his classic article on building the eToys website.)
- Apache::Session is a given. Not finding a good webpage on it, but it has great POD.
- Cache::Cache is a given. The Perl Cache project is one of those tools, like TT2, that makes you never want to leave Perl.
- DBI is an of course, and I think we’ll be avoiding the DBIx namespace in favour of having a peer layer with hand written SQL.
- Many people are reccomending CGI::Application as an implementation of the central dispatchers. An article on using CGI::Application, and on using CGI::Application with Template Toolkit. I’ve looked at it before, and it was simpler to roll my own, but I’m going to check it out again. It runs cleanly under Apache::Registry, but isn’t really a full blown modperl app.
- Data::FormValidator is recommended, and includes a tutorial, but some people prefer HTML::FormValidator, but I don’t really know what the difference is yet. Hmmm, they look like they might actually be the same module. ?? Any idea ??
- ?? Did I leave out your favorite module ??
UPDATE: After looking at the available options, and at Struts 1.1, I would go with Java if I didn’t know I would have an insurrection on my hands.