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.
Archived Comments
Beautiful piece Ray.
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 :)
What a great post, I was about to start a very large project about 2 months ago so i decided to look at the cf frameworks (again) and I came to the same conclusion its just too much of a learning curve and too much code to do simple things. Of course I appreciate that it depends on whether your working with a large team or using outside developers who need to get up to speed quickly but i'm not, its just me and another cf developer I do the front end (jquery, html,css) and he does the logic We have come up with the noframework framework, basically a really organised file system and files broken down into very small chunks, its works for us!
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??
Awesome post! Thanks for taking the time to write it.
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!
Thanks for this post, Ray. I'm in the same boat with Keith. I keep looking into different frameworks and see growing complexity and I just have enough time to write my apps, big or small, simply, designing and coding the same way I have for years.
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 actually was thinking about this, on some level, just the other day. I started out as a website designer some 10 years ago, and immediately got a job working at a dotcom company that used ColdFusion. 10 years (and a new job) later I've developed numerous ColdFusion-based websites, from tiny 4-5 page informational websites, to good size, custom-built E-Commerce websites, with some social networking elements. I could, given the free time, easily develop social networking applications like Facebook, or my own craigslist.org, thanks to the power of ColdFusion.
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?
This is perfect timing. I've recently been looking into frameworks and I feel like a complete idiot while trying to take in both OO and MVC. My best friend is a Flex developer and we've both questioned the usefulness of Frameworks in most practical applications (at least as far as we've experienced). But we've been under the impression that OO and Frameworks are the "right" way of doing things (perpetuated by job posters who state that we all "must use a framework").
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)
I remember feeling exactly the way Keith did after taking a break from developing for a couple of years while CF5 was still in. I was worse off though as I had actually missed all the CFC stuff completely. When I came back I had a crapload of stuff to learn and I always felt inferior to practically every other developer, and every job interview asked about CFC's and frameworks, so it IS important, even just for the sense that you're not falling behind. I stretched my brain into Fusebox, then Mach-II, then built my first large scale app in Mach-II, then I FINALLY got a job on the strength of this work. Thankfully, my current employers are highly OO-oriented, so I can't help but gain more and more. And the more I learn the more excited I get. It's that sense of accomplishment, that sense of mastering something you once thought impossible. There's a little pain at the beginning, but I've found it well worth it.
Just read some of this .
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
Wow, well said. Funny how I was just thinking we need to have more framework awareness. I'd love to lead a class in frameworks 101, what they are and why we use them.
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.
@Andy: Sean Corfield did a presentation on the essential differences between the major frameworks.
Ray, thanks for taking the time to write this entry. I've been doing CF for about 9 years now, and I have often gone to a CFUnited or a Maromedia/Adobe Max and come away feeling like a total lowlife, preschool CF developer, even though I know I'm building some pretty powerful apps. I look around and assume I'm the only one, so I don't ask the questions I'd like to ask and I end up missing out on golden opportunities to move my understanding to the next level. I owe a lot to members of the community like you who take the time to speak at my level and solve problems that may seem trivial and elementary to some. I actually got my team to start using cfcs after attending one of your sessions at CFUnited a few years ago. It was the first time I had approached the subject and not come away scratching my head.
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.
Thanks for this post, Ray. It really got me thinking about how I was much like Keith not too long ago and the road I took in my quest for knowledge. Before I knew it, it became a blog post!
http://www.objectivebias.co...
Wow. I write an email and I get a great blog post from Ray. Thanks Ray! Great info, and info that I can trust to boot. Fantastic.
Ray,
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.
Great post, Ray, thanks. CF is still that easy. There are still companies out there doing pure procedural (or whatever we call non-OO now), but it's working for them. Maintenance may be more effort than with a well-architected framework, but there are frameworks like Fusebox that are (or were) not OO but still very powerful for file organization and code re-use. Used Fusebox3 for years and years, and re-use in a large app was a snap. The move (for me) to Model-Glue was tough at first, but it is just another tool as well, and I think you boiled that down and presented it exactly right.
Excellent post Ray. People often get too tripped up by stigmas!
I added this comment to Marc's post:
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.
I think about it not in terms of my own programming, but in terms of those who might come after me. THAT is why I code OO and use frameworks (no matter the language).
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.
As far as programming with the future of an application in mind with respect to it being handed off to other developers, its ok if those developers know the framework that you have used, and its also true that each famework has its docs, but if you don't know the framework and have to learn it and some of them have steep learning curves how's that better than building a well organised app with coldfusion standards (use of cfc's and separation of logic from display) and some good written documentation?
Darren, all things being considered, there is a N% chance that a new developer knows a public framework, and a 0% chance they know your custom, home grown one. That doesn't mean that your framework is bad, just that if you use one of the common, adopted ones, you have a higher chance of finding someone who knows how to use it.
Great article Ray.
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.
First of all, let me say thank you again to all the commentors here. I don't think I have done that yet. I definitely appreciate all the responses here, and most of all, I really appreciate the maturity. There have been no flame wars (on this post ;) and I think that's great.
@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.
Well, let me be the one to state unequivocally that Ray is absolutely wrong. He said, and I quote "I'm not that smart." And that's just plain wrong!
;-)
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.
Good gahd, we sound like we're group therapy-ing on Oprah or something. None the less, this post is spot-on for me too!
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!
Ray, commenters;
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/bl...
Thanks for sharing this, Doug.
I'll add - the CF Unconference now has a lunch time session scheduled for this topic on Tuesday: http://www.coldfusionjedi.c...
I've realized in recent months that, although I always strive for simplicity in my code (meaning that it accomplishes goal X as simply as I can accomplish goal X), I sometimes get sucked into describing simple concepts with complex language. I think this helps explain the tendency we have to confuse a theory with an implementation of the theory, like the guys who look at CF and say it's not "true OO" because it takes longer to create an object or because there aren't abstract classes. I've also been reading books about communication in recent months to help overcome the other challenges of my asperger syndrome, so I've been recommitting myself to "keep it simple" when I'm talking to people. Because as much as I at times might have sounded "ivory tower", like a lot of you guys, I don't have a degree (much less a CS degree) and really just love the language and the time it saves me. So I really appreciate your comments at the end, not just as a reader, but as someone who knows that the pull of "ivory tower language" has caused problems for me in the past. :)
OK, you've got me scared enough to where I will help sponsor a good CRUD example.
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.
@PS: I think you are asking for a lot, unless the 'sponsored' part implied money. ;) Your requests cover a lot of different grounds really. It covers: jQuery+CF integration, ORM, unit testing. All good topics - but if all of them are new to you, I'd certainly NOT recommend learning them all at one time. Baby steps, Phillip. :)
I'm not afraid. After all, I've been a cf developer since 2003.
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.
Well it just seems like if your intent is to learn something then you are asking for a lot at once. If you know jQuery - then is it your point to just see a nicely done CRUD? There are examples of that - many of them. Maybe I'm just not getting your point here?
And it should have error trapping & logging while in production, but not in dev.
Ray, you couldn't have written this better. This is what I explain to developers over and over again. There is a need to separate “geekness”, usefulness and business case. What do I mean? Let me explain. Whether we like it or not, business needs should drive application development. A jobless geek is usually of no use to even himself.
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.
Adedeii, I'm glad that you commented on this blog. It reminded me of the plea I made back in September. Since then I've started a project on Riaforge where I'm working on a 'really good' CRUD application.
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.
I hope I can do something with EasyXMS for OO and for ColdFusion. I was also kind of sick implementing CMS for Customers with Joomla and other kinds of PHP OpenSource free software and then find my way through the jungle of Scripts and modules that on the one hand do not what the customer asked for and on the other hand are slow and so difficult to maintain. In August 2009 I started therefor EasyXMS and choosed ModelGlue because I knew already I have all choices of Inheritance and seperating Layout, Data and Logic. If I am exact I seperate complex Logic in Components from simple Logic in Templates (I think this is 4 Layers :p). Yesterday I finally ported BlogCFC (juhu!). I understand yet its all german and english people wont give too much recognition to it. Though I think OO is only in the garage for tuning up. Its simply to speak the better technology and if Railo also continues their good work Enterprise Applications will continue using OO Technology instead of Script Chaos. My three cents.