Sean Corfield
Member since Dec 11, 2008
- Profile: /members/2350-sean-corfield.htm
- URL: http://corfield.org/
- Comments: 122
Recent Blog Comments By Sean Corfield
-
Looping Over Java Arrays In ColdFusion
Posted on Aug 27, 2013 at 5:35 PM
@Steve, yup, that makes the code run on Railo (I suspect cflive.net has Java introspection disabled to ensure you can't create "dangerous" Java objects via sneaky means).... read more »
-
Default Argument Expressions Are Executed Only As-Needed In ColdFusion
Posted on Aug 21, 2013 at 9:57 PM
I would have been more surprised if it worked any other way! You certainly don't want that default value to be computed when the argument is provided and it's not at all magic that it isn't. It's just a conditional. Inside the function, it might as well be: if argument not provided then argume... read more »
-
Writing My First Unit Tests With Jasmine And RequireJS
Posted on Jul 8, 2012 at 4:59 PM
@Ben, MXUnit is absolutely best-in-breed for CFML these days.... read more »
-
Writing My First Unit Tests With Jasmine And RequireJS
Posted on Jul 6, 2012 at 10:17 PM
@Brian, No, no!! Use ClojureScript, not CoffeeScript!! :)... read more »
-
Writing My First Unit Tests With Jasmine And RequireJS
Posted on Jul 6, 2012 at 5:15 PM
Go Ben, Go! :) Once you get into the swing of TDD, you'll enjoy it. Writing a test lets you think about how the code needs to perform, a little piece at a time, and as you get into a rhythm of switching between test and code and test and code etc, you'll find you're producing more robust, more modu... read more »
-
Application Services vs. Infrastructure Services vs. Domain Services
Posted on Jul 2, 2012 at 1:53 PM
@Ben, That's still missing the point of continuous refactoring: you don't take a whole app and refactor it, instead you refactor code as you write it. With a TDD approach, you might write a test (red), write the simplest procedural code to make it pass (green), immediately rewrite that into a more ... read more »
-
Application Services vs. Infrastructure Services vs. Domain Services
Posted on Jun 8, 2012 at 4:14 PM
@Ben, Well, continuous refactoring doesn't take any time if you do it... continuously. It's just part of your normal development process. Refactoring only "takes time" if you don't do it continuously and then you face "The Big Refactor" which, of course, is a scary beast and wi... read more »
-
Application Services vs. Infrastructure Services vs. Domain Services
Posted on Jun 7, 2012 at 2:48 PM
@Ben, So, you could say that I should refactor when I get to that point. And, I guess what I'm getting at is that, when I DO get to that point, I don't even necessarily know how to refactor - I don't know which choices make more sense - I only know that I have something which is hard to maintain. ... read more »
-
Application Services vs. Infrastructure Services vs. Domain Services
Posted on Jun 6, 2012 at 8:40 PM
Here's what I had in mind with my last comment: http://corfield.org/articles/mvc-arch.pdf... read more »
-
Application Services vs. Infrastructure Services vs. Domain Services
Posted on Jun 6, 2012 at 8:21 PM
I fear you may be overanalyzing things and making life more complicated for yourself... :) I'm not sure I buy the separation of "application" services from "domain" services. There's just domain entities (business objects) and orchestration services: services that exist purely t... read more »
-
More Thinking About Model-View-Controller (MVC) And Application Architecture
Posted on Jun 6, 2012 at 3:17 PM
@Ben, Uncle Bob is indeed a pillar of the programming world. He's into Clojure these days (as well as Ruby) but he's been around forever and has written some great books: http://www.amazon.com/Robert-C.-Martin/e/B000APG87E/ Definitely worth following him on Twitter too: https://twitter.com/#!... read more »
-
More Thinking About Model-View-Controller (MVC) And Application Architecture
Posted on Jun 6, 2012 at 1:43 PM
@Ben, "Uncle" Bob Martin is coming at this from a slightly different point of view but if you consider his advice in the functional programming world, it makes perfect sense: just pass back the data that the view needs and just pass in the data that the service needs and you're all done. ... read more »
-
More Thinking About Model-View-Controller (MVC) And Application Architecture
Posted on Jun 5, 2012 at 5:33 PM
And another thing... On domain objects vs data structures (in the context of the view), one of the tenets of functional programming is a focus on the correct data structure that is used, with functionality separated out, and most importantly _immutable_ data. This makes it perfectly safe for the vi... read more »
-
More Thinking About Model-View-Controller (MVC) And Application Architecture
Posted on Jun 5, 2012 at 5:22 PM
I'm with Steven on being against a literal "session facade" because it really doesn't "encapsulate" anything - your code still refers to SessionFacade everywhere and just calls getters / setters instead of having using a struct (that happens to be called "session"). The... read more »
-
OOPhoto - A Painful Transition To Object-Based Controllers
Posted on Feb 4, 2011 at 3:05 AM
@jyoseph, That's kinda my point: you trade off the big, bloated, behind the scenes framework against the small, simple, transparent framework. It's all about trade offs :) As for FW/1, yes, there's a skeleton app and half a dozen example apps that can be used as the basis for your own applications... read more »
-
OOPhoto - A Painful Transition To Object-Based Controllers
Posted on Feb 4, 2011 at 1:05 AM
@jyoseph and others, I find it interesting that there is a push for a simple framework yet a Rails-like framework is what is being suggested. Rails - and cfWheels - include a lot of code, a lot of documentation and a lot of conventions and machinery. Certainly, Rails - and cfWheels - get you up an... read more »
-
Seven Languages In Seven Weeks: Prolog - Day 2
Posted on Dec 31, 2010 at 2:10 AM
I finally got around to doing my Prolog homework so I thought I'd post my sorting answer since it's very different to both yours and Noud's: ordered([X],[X]). ordered(L,[P|S]) :- smallest(L,P), append(A,[P|B],L), append(A,B,Q), ordered(Q,S). This makes Prolog do most of the work. smallest pulls ou... read more »
-
Seven Languages In Seven Weeks: Io - Day 2
Posted on Dec 17, 2010 at 2:07 AM
Since Ben's posting his homework, I decided to post some of mine: http://corfield.org/blog/post.cfm/seven-languages-io-day-2... read more »
-
Mom! Ben Broke My CFInterface!
Posted on Jan 8, 2010 at 11:56 AM
@Tristan Lee, Much is going to depend on whether there is a suitable "default implementation" for a method. If there is, it's reasonable to provide a base component and extend it to override / add other functionality. If there isn't, an interface might be appropriate. Personally I think interfaces... read more »
-
Getting Certified In ColdFusion 8 Scares Me
Posted on Jan 5, 2010 at 12:07 PM
Looking back through this thread I see Andy Allen posted links to Sun's Java certification (and Microsoft's .NET stuff). Both test knowledge of infrastructure / technology, rather than the language itself and / or your ability to solve problems...... read more »