Posted in ColdFusion | Posted on 07-10-2009 | 8,100 views
Keith sent me this email a few days back, and as it touches on a kind of a hot topic lately, it took me a while to formulate a response. Anyway, I hope this helps folks:
After reading Jay McEntire's new blog entry, I really feel like I'm falling behind. I use relatively simple CF code and CFCs, but I have no idea about frameworks, why I should use them, why it's better, etc. Seems like if I try to find a total beginner's guide it just isn't there. I've read the descriptions, "This makes it easier! Use it now!" then I see 2,000 files added to a "hello world" app...it just isn't clicking for me, especially when I can do so much with vanilla CF right out of the box. Do you have any recommendations for somewhere to start? It's all very overwhelming. I'm a CF dev, but I'm realizing more and more every day that I'm more of a front end guy... Thanks Ray. Hope you can help.
Yeah. Kind of a big one there. Jay's blog entry also links to the other "big" entry, How OO Almost Destroyed My Business. I took Marc to task for what I thought was an attack on 'the elite' for pushing OO. Yes - there are a lot of people talking about OO, but as far as I know, no one is out there saying that there is One True Way to Code. However, I can definitely see that there is a growing level of frustration out there.
It saddens me. The following is going to sound like sappy marketing, but deal with it. I love ColdFusion. I want people to feel powerful and empowered with it. One of the barometers I use for any technology is how it makes me feel after I've read some of the docs. Do I feel like I could build anything with it? Cool - that's a winner. (And by the way, that's exactly what ColdFusion, Flex, AIR, and jQuery do for me.) Do I feel like I'd rather yank my hair out than write Hello World? Yeah, that's a loser for me. (That's what I think whenever I see Python and Ruby. Sorry. I must not be smart enough for them.)
I shared a few emails with Hal recently, and he helped clear some things up for me. I don't feel like I do much OO. I feel like I develop well. I feel like I follow best practices. I also feel like I apply well known and tested solutions to problems. But I don't feel like I'm doing the OO buzzword 100% of the time. Am I an OO developer if I use MVC? If I use Swiz in Flex does it mean I've become a proper Flex developer?
Hal made the point (and I hope he doesn't mind me butchering his wisdom down into Ray-sized bites ;) to me that the goal here isn't to use anything - the goal is to build applications. Deliver results. Obviously we want to do the best we can. Obviously we want our code to be secure, well maintained, easily updateable by new developers, etc, but OO isn't the goal in itself. It is just the tool.
This is something I think I knew, but just needed it spelled out a bit nicer (thank you Hal).
I picked up Model-Glue not because I wanted to learn MVC. I picked up Model-Glue because I was sick and tired of worrying about where to place my files. I was sick and tired of copying files from the last application and ripping out all the custom stuff. Model-Glue, and the MVC design pattern, solved a problem. Period. It isn't rocket science. But when it comes to managing a large application, it almost acts like a safety blanket for me. I'm not a terribly bright person. Anything that helps me think less about the simple stuff and spend more time on the complex stuff is a good idea.
Keith - if you are being successful with simple files and CFCs, then you aren't missing anything. If you encounter a problem, I think that's the time to ask, "Hey, can Model-Glue help me?" I'd apply this to everything really.
Not to throw another buzzword out there - but when I worked at Broadchoice, I saw Brian and Joe make use of delegates. I had heard of them before but had never really gotten the point. Seeing them in use, and seeing why they were used and the problem they solved, made it crystal clear to me why someone came up with that idea in the first place - but frankly, if I had never run into a real use case of the example, no amount of reading about it would have helped me understand it better.
I guess my advice is this - and I apologize for being long winded. I've never regretted keeping things simple when I can. I think that while I'm not very smart - I do have a knack for explaining things and breaking things down into simple, easy to digest nuggets. I think that comes across in my code as well.
Don't feel like you have to use anything, and you know what - there are enough problems in life. Don't go looking for more.
I do recommend being aware of OO, design patterns, and the like. Just because you are aware of them does not mean you should use every single one of them in your next application. Hell no. Just try to be aware of what they are and what kind of problems they solve.
For me, a MVC framework solved the problem of simply setting a site up and handling the flow of the application. That sounds so trivial, doesn't it? But jeeze - if I could have the time back I wasted on that I'd probably have BlogCFC6 done by now.
We can all be better programmers. But that doesn't involve slavishly copying every new bit of code you see (and yes, I've done it too). We have to be proactive in not only examining and learning from others but trying to put a critical eye to it. "Yes, interfaces are neat, but does it really help me solve something for this application?"
As a last statement - let me know if I ever get too Ivory Tower on you guys. If I need to take a step back, explain something more, slow down, whatever, be my guest to let me know.


The problem for me is not knowing if I'm missing some bit of knowledge that could make my life easier, but that's more of a general issue with life and learning and stuff :)
by the way I do flex as well and have used cairngorm but in flex that seems to make sense, for some reason coldfusion and frameworks don't seem an obvious route. Maybe because the kanguage is soo good already, I wonder what coldfusion framework adobe uses??
Another problem to touch on is that you don't have to learn ALL the possible frameworks out there, either. Having just gone freelance full time, I thought it wise to take on some PHP projects as well. While I code in PHP, some PHP frameworks are freakishly scary to work with. I quickly realized that I need to focus on what I know. Luckily that's CF cause I love it.
Dealing with the OO at first can be tricky, but I think we just make it too complicated. People would be surprised how fast vanilla code can turn into OO just by changing how you think about it all.
Keep writing posts like this! We all appreciate it, trust me. And let the beer.consume() begin!
I would love to find a reference which describes all of the frameworks out there (in 2 pages or less) so I can get an idea of what kind of problems they solve.
I have to admit however that the state of the economy has made me aware that sometime down the road I may find myself in the market for a new job. For anyone who's browsed job listings for ColdFusion can probably tell you, they are few and far between, even in major cities like my own. Those that you do find every so often list crazy skillsets, skillsets that honestly I have not yet developed. Whether those are experience with a specific framework, or Ajax, Java; I honestly have been building some pretty spiffy ColdFusion applications in my last 10 years and have yet to really need these skillsets. Object-oriented programming? Seems like a personal preference to me, and to be honest I don't see the benefits from using it. But, in the end, will this mindset be my crippled knee when it comes to getting out in the job market someday?
Do I follow the masses and learn PHP. How do I justify diving into Ajax and Java integration with my ColdFusion applications, when I have yet to really see the need?
Or is there a need, and I too am just finding those "Hello world." tutorials that don't relate these new technologies to me in a practical, "I can see how that would help me..." kinda way? Like how I originally learned ColdFusion in the first place, is there some grand 2,000 page book called "Mastering Ajax" or "ColdFusion + Java = Awesomeness" that everyone is failing to tell me about?
I'm glad to hear you of all people say that OO is simply a tool, not the bar to which we should all be striving to. (I say "of all people" since I own the CF books that you co-wrote)
To me oo and mvc is like a protection racket trying to act .
Gives a kind of protection for a price you can't afford .
Think of this before using each new piece .
cheers , dc locked in a coldbox
A way to say "Hey, you build things with this toolbox, I use that one". But in the end it really is whatever works best.
Thanks for validating my own lack of lack of OO adoption.
Keep up the good work and please continue to enlighten those of us who are a bit thicker (or maybe just slower) than the rest.
http://www.objectivebias.com/blog/entry/the-quest-...
Great post. A co-worker and I both read Jay's article and we both took something a little different away from it. I concentrated more on the parts about making sure people just starting out in CF weren't being immediately pushed towards OO and frameworks. Let them learn the basics, become comfortable and *then* start to explore and experiment in the more complex concepts. I've been doing CF for a long time (Allaire was still at Fresh Pond in Cambridge even) and that progression seemed to work best. It seemed like every time I looked, there was something new to learn. It never got (gets) stale that way, it's always exciting.
My biggest pet peeve (and it really goes to all dev. communities) is when I'm in a forum and someone new asks a simple question and provides a code sample. They've come there to seek assistance and it seems the first thing that happens is that 2 or 3 'experts' who've apparently forgotten that they haven't always known it all, start to berate him/her because they 'should be using x framework' or they shouldn't put their querys in the page with their display code. The worst part is that they never even come close to helping the person with their problem. That really turns new people off.
To your (and alot of others, don't get me wrong) I've never seen that from you. We all tend to harp on our favorite methods, frameworks, coding styles, etc. but that's because we tend to stick to our comfort zone. It's what we know best.
My biggest takeaway from this (and by this I mean the entire debate) is that we need to encourage and instruct newer developers and make sure they know all that's available to them. That's CF's biggest strength and that's what community should be about.
Sorry for the long reply, but thanks for letting me bring my soapbox to the party.
I would have never used an MVC if a programmer where I worked hadn't quit and left a rather large Model-Glue application in my lap.
I was lost. Even though I was competent with CF, I just couldn't wrap my head around it. Not until...
I built an app from scratch in MG. I did this on purpose because I was drowning in this MVC and had no where to go for help. Then it slowly, slowly, slowly dawned on my how this stuff worked. Now I love it - for large, complicated apps. Smaller, ad hoc stuff works great with plain vanilla CF and CFCs.
I got lucky. I had the time to learn it. And, now I have one more option for how I want to approach a CF project.
Right tool for the right job.
Just because you can get it out quickly and you remember everything about it, doesn't mean that a future developer will. So while you might save the customer a little bit of money now, when a future dev comes in (and trust me, sooner or later they will), it will be that much more expensive. Not because the code is bad, but because it doesn't adhere to the standards.
It isn't that IE has always had BAD standards, it is just that the standards were not what the rest of the world had already decided on.
So what it comes down to is not that your code is good/bad or indifferent, but that your code can be understood quickly and easily by anyone that comes to work on it. THAT, more than anything, is why I use a framework.
I tend to code in a basic fashion. I use components a lot, and I have a preferred basic skeleton that I start out with for any new site I build. After that, I let the site/application tell me how it needs to be built. There is no one true solution that fits for everything. It's why we are in this business after all, custom development.
IMO, no two sites are the same, nor should they be. Every site has it's own requirements and ultimately their own distinct nuances. To those that are diehard believers in a framework for all your work, I say great. For many the security of having walls to work within probably helps them a lot. To me I find having to overthink for here every little piece of code goes can sometimes slow me down to a point that it's preventing me from getting the job done. Personal opinion on the matter though.
Chances are that you could take two good developers, assign them the same task, and they would both get it to do what it needs to, with sometimes major differences in the code. The point is that both end results work. Bottom line, results. Nothing else matters before that. If it works and and works fast, you've aced it in my book.
If you use best practices, try and be consistent in what you do within a site, and most of all if you make a point of good header and inline documentation, the rest takes care of itself. Of all the spaghetti code I have inherited over my 14 years in this industry, the single most maddening thing I found was the lack of documentation. I try and make sure that at worst I provide a basic set of breadcrumbs for a developer to follow so that they can easily enough figure out what is going on and be able to add onto it. I don't go overboard on it, but something is better than nothing. In my experiences, nothing is usually what is done.
@Rob: I think its awesome you use 'walls' to describe a framework, where to me it is the exact opposite. It's like lines on a road. Yes, they block me in, but gosh darnit I'm happy they are there.
;-)
Seriously, Ray, I'm so glad you wrote this post. There are a lot of developers who feel disempowered by feeling that if they're not doing really complex stuff, they're somehow second-class developers. I think the thing we value most as CF programmers is the degree to which it empowers non-traditional developers. (Heck, I'm just a woodworker who got drafted into the web frontlines.)
I know a lot of turmoil has occurred in the last few weeks (and I've been at the center of some of it), but I hope that the upshot of all this is that all of us developers will gain a sense of empowerment -- that we don't have to do anything -- other than create great apps.
Well done, Ray.
I've spent the better part of the past 6 weeks trying to leverage Fusebox, Mach-ii, Model Glue, ColdBox, CFWheels (and even, Ruby on Rails -- which CFWheels docs references quite a bit), with precious little to point to you could call success. Started thinking my mojo was no mo'.
Seeing this group of mighty-minded peeps having a hard time too makes me feel SO much better.
Thanks Ray, and the rest of you!
I wanted to share what all of your observations and feelings evoked in me in the form of a comment here, but it turned into several paragraphs so instead I posted it on my blog. It wasn't that long ago that I was at the exact same spot as many of you are now, so I can completely empathize with the anguish of being content and happy in ones own self-perspective while at the same time feeling constantly in the judging spotlight of those who have drank the OO Kool-aid and can't get enough of it! Anywho, here are my thoughts... http://www.dougboude.com/blog/1/2009/09/On-Falling...
I'll add - the CF Unconference now has a lunch time session scheduled for this topic on Tuesday: http://www.coldfusionjedi.com/page.cfm/ColdFusion-...
I know everyone will reply by saying "Well, every situation is different, yada yada yada", but I really need a good example.
Something that has a snazzy front end like jqGrid.
Something that has a snazzy back end like CF9's ORM.
Something that uses test driven development (I've heard talks but not seen examples).
Something that handles one-to-many relationships (I would prefer my cities/U.S. states examples at www.cfmzengarden.com)
Something that looks good, either with css, or some other technology that I know nothing about, like Flash or AIR or Flex.
I know jQuery reasonably well.
I know CSS.
I would rate myself as an above average ColdFusion developer.
I know SQL Server.
So please sir, may I do a CRUD screen?
Yes, I'll pay.
And all the code can be made available to the community.
What is the essence of the latest whiz-bang framework if it can’t deliver that application on time? As a customer, do I care what new pattern you are uysing if my needs are not met? Not every programmer is a genius but a programmer worth his salt should know it takes to deliver on his projects.
That is exactly what drove me to Coldfusion in the first place. I could deliver my applications in record time. Out of the box, CF offers me the flexibility and scalability that I need. Even before OO was properly cemented into CF, I told my colleagues that I didn’t care that much – CF just delivers. Same issue I had with SQL Server. With Oracle, you need more expertise to deliver same results and I just didn’t care. With just a few more tweaks, you can reinforce SQL Server to be as secure as any Oracle installation. It got so bad I used SQL server to move data between two Oracle DBs.
This is why Linux will remain just a niche product. Linux is not user friendly and unfortunately, the majority of us are not geeks and we don’t care about those fancy features the Linux crew talks about. Until Linux could be as easy to use as Windows or Mac, it would never go beyond where it is.
I think I started it around Thanksgiving, and I'm still working on it. It's a complete example of Create, Read, Update, Delete using ColdFusion version 9 ORM and Microsoft SQL Server 2008 along with jQuery UI and the blueprint-css framework.
I'm still pushing files around and struggling with what to name what. Here's an example: I decided to put the css folder under the includes folder so that both folders aren't in the root (css files are includes after all).
Just last night I reworked how to invoke jQuery and jQuery UI using Google instead of locally using the google.load command. I've pushed 14 revisions up to Riaforge so far, and am experimenting with the new html5 tags (header, footer, nav, aside, section). Although the concept for the application is extremely simple, it's been in development now for 4 months.
The following sentence is just in case anyone doesn't get the implications of what I've written so far:
If someone will help me put together a complete example of a "really good" CRUD application, I will pay them for their time plus make the code Open Source.
[Add Comment] [Subscribe to Comments]