Tuesday, January 31, 2006

Mach-II Pet Market Article Available Online

If you're interested in seeing how Mach-II compares to some of the other CF frameworks available, you need to check out the latest ColdFusion Developer's Journal. The January issue is focused on frameworks and hits all the major ones, including Mach-II, Model-Glue, Fusebox, ColdSpring, onTap, theHUB, and SAM.

I'm highly biased of course, but I find the Mach-II article by Ben Edwards, Hal Helms, and myself particularly compelling. ;-)

All the code is also available at cfpetmarket.com (although when I just tried that URL from my office I was sent to careerbank.com--probably a DNS issue), so you can download the sample apps and compare them yourself. This is a great, great learning resource and I highly encourage you to take advantage of it!


Comments


If you hit this post earlier and didn't see the link to CFDJ and didn't see Model-Glue in the framework list, my sincerest apologies; I left the closing " off these hyperlinks. I wasn't purposely leaving Model-Glue off the list!


Sent me to the bank, too.


I say,

One of the most confusing parts of Mach-II ... is how you get the queried information INTO a bean. You have all these getters and setters, with it's constructor etc. But where do you tell a bean ... that this select statement, where ID = 32 etc., is the data I want you to return!

I can read code, but dang, it's not obvious.

Is there an example of just 1 variable, ie. a stripped down version of M2PetMarket? I'll keep reading, but it would be convenient if there was a step by step of WHAT actually happens. Kinda like the document you wrote for beginners Matt - "Intro to Mach-II Listeners".

Thanks for listening.



Thanks 'noname'--I'll work up and intro to this sort of thing very soon and post here when it's ready to go! It's always good to hear the specific types of things that would help people better learn and understand Mach-II.

Saturday, January 28, 2006

Apache + SSL on Windows (Yes, Windows)

This past week was a pretty frustrating one on numerous levels; just one of those weeks where everything that can possibly go wrong does, and 99% of it was out of my control, which makes it all the more frustrating. Out of these challenges tends to come some experience and maybe even a bit of wisdom, however, so while it's painful while it's a growth experience and forces you to investigate things you might not otherwise have done. (That's my "silver lining" outlook at the end of the week. If I had posted anything on Monday it would have been far less optimistic!)

One of the major frustrations I had this week was trying to upgrade CF 5 to CF 7 Enterprise (multi-instance installation) on a Windows 2000 server. Nothing I haven't done numerous times before, but this particular server was the proverbial server from hell. Every single thing that could go wrong did, and since I'm in Dallas and the server's in San Diego, it made it all the more frustrating because walking over, sticking a CD in the drive, and reinstalling Windows wasn't an option. Sure I could have scheduled to have it done by the colo engineers, but that seemed overkill just to get CF upgraded.

Problem #1 was that the CF 7 installation hung when it was trying to connect to the web server, which was IIS at this point. (For some reason it was unsuccessul in migrating my CF 5 settings as well, but that was a minor issue since I had a spreadsheet with all the settings in it anyway.) I've seen that happen before but usually you can just kill the process and run the web server connector after the fact. The web server connector also hung, however, so I was faced with doing this piece manually.

This isn't that big of a deal, or shouldn't have been, but after following these instructions, it still just didn't work. When I'd hit the CF administrator it would just spit out what I assume is the encrypted CF code to the browser, and attempts to hit other CF pages would either result in the source code being displayed or some varying degrees of not processing or not finding the pages. In short, CF and IIS weren't communicating.

Step 2 was to try doing a single instance/standalone install of CF 7 because on this server I really don't need multiple instances. I prefer to do the multi-instance install regardless, but since I wasn't getting anywhere with the multi-instance install I decided to give the standalone install a try. The web server connector still locked up, so I tried these instructions to do the manual configuration for the standalone installation. Still nothing--same behavior as before from IIS.

At this point I've spent a significant amount of time on something that should have been rather trivial, so I decided to install Apache 2.0.55 on Windows and see if that would work. The web server connector still hung (I was being ultra-paranoid and uninstalling/reinstalling CF at several points during this process) when trying to talk to Apache. So I followed the stand-alone manual web server configuration instructions above to get CF to talk to Apache and EUREKA! Success!

The story doesn't end there though. The Windows installer for Apache 2.0.55 doesn't come with SSL support, and this server runs one app that needs SSL. Jared was nice enough to be listening to me yell over IM about my problems during this process and sent me a link describing how to install SSL support for Apache on Windows. This led me down a couple of other paths, but here are the links for trying this process (emphasis on TRYING):



My own personal opinion on these two sets on instructions is that they are missing some rather crucial steps (if you *combine* the two you get close), but in the end even after trying this process multiple times, it just didn't work. Apache would fail to start with the mod_ssl LoadModule line uncommented, but if I commented it out Apache would start. I checked the placement and existence of the files multiple times and spent a lot of time walking back through this process step by step, and I was sure I was using the latest package that supposedly will allow for this, but it just didn't want to work.

VERY long story short, if you want to use Apache with SSL on Windows, go download this package from devside.net and be done with it. Yes, it comes with MySQL, mod_perl, PHP 5, and a bunch of other stuff you might not want or need, but you can easily disable that stuff and it doesn't install these add-ons as Windows services, so it's really just some extra files on your hard drive that won't cause any real harm.

The key here is that this is Apache 2.0.54 with SSL support already in there. (Another option I found prior to discovering this package was to get the source code for Apache and mod_ssl and compile it myself, but I just wanted to get this thing DONE!) I just installed it late yesterday--I wasn't about to let the weekend hit without having this issue resolved--and so far it works like a champ. I generated a test certificate using Open SSL and it works great. Just going this route initially would have saved me a ton of time so my thanks go out to devside for making this available.

Now back to the silver lining stuff. I know a lot more about Apache than I did before (I'm semi-dangerous with Apache on Linux), it forced me to figure out SSL with Apache on Windows, and I also know more than I ever wanted to about manually configuring the web server connections with CF. That's not necessarily a bad thing and it likely isn't something I would have spent my time learning had I not been faced with this. Most importantly I left work for the weekend knowing that things were working, and hey, now I can count myself among the cool kids because I'm running Apache. ;-)


Comments


I always use the Apache/SSL binary from

http://hunter.campbus.com/

works like a champ is always up to date within a day of a new Apache or OpenSSL release.



Thanks Kurt--I actually used those as part of the instructions I list in the blog entry but didn't have luck getting it to work. I may take another run at it at some point but that other package seemed to install without a hitch, so I'm happy for the time being.


I've had the same frustrations with Apache/SSL/Win32. The all in one WAMP packages, like DevSide's is the way to go, if you can. There are a number of these out there, some with or without SSL. Saint WAMP is another good one which is on sourceforge. EasyPHP is a popular one, but its getting kinda stale, it doesn't have SSL, and half of the instructions are in French. Xampp, Uniform Server, IBServer, and FoxServ are other examples (but I'd probably stick with DevSide and Saint WAMP).

In any case, its quite amazing that for something that has been around as long as it has, that this kind of functionality isn't easier to get up and running and/or come out of the box without having to go to these WAMP solutions. While it makes sense that you might have to recompile things on a *nix box, it doesn't make sense for a Windows box in which it shouldn't matter. A Win32 executable is more or less the same/compatible no matter which version of Windows you have.



Oh yeah, BTW, here's another good site that I think is better (than the two you mentioned) at explaining exactly what you have to do to get 2.0.55 up and running with SSL on a Windows box:

http://www.jm-solutions.com/OpenSSL/Introduction/introduction.php




I always use the ApacheSSL package from http://www.apachessl.net



Wednesday, January 18, 2006

Fun With Subversion and Trac

In anticipation of our impending move off of Visual Source Safe (finally!) I decided to get my SCM of choice, Subversion, up and running on my Linux box (Fedora Core 4) at home. I've used SVN on Windows quite a bit, and have also used an excellent, excellent hosted SVN account at cvsdude.com, but since I may well be the one who winds up administering SVN at work, I thought it was high time to dig a bit deeper.

I also have just started using Trac over at cvsdude.com and decided to install that locally as well. (If you haven't checked it out yet, Trac is seriously cool stuff, and I've barely scratched the surface thus far.) As with all things Linux there's a bit of manual configuration involved, but in general the process of getting SVN and Trac installed was as simple as typin



yum install trac



in a term window. It downloaded all the necessary dependent packages (including SVN itself) and installed them automatically.

So at this point I have Trac and SVN "installed," but that doesn't really mean much. Trac has some great documentation to get you going, however, and the only thing I needed to do in addition to what they outline is chmod on my svn database file and directory in order to let Trac hit it. After that Trac was up and running!

Never one to leave well enough alone, I decided I wanted to tie SVN into Apache using mod_dav_svn. Again this was pretty typical Linux stuff:



yum install mod_dav_svn



to get the files down and then some minor tweaks to the httpd.conf file. I then bounced Apache and was off to the races. There's some nice documentation about SVN + Apache that will walk you through it.

Next step for me is to get some user access settings in place, but so far not a bad installation process at all. If you're on Windows and just want SVN, the one-click installer (link above) is definitely the way to go. It gives you everything you need to run SVN through svnserve and even installs svnserve as a Windows service for you. I haven't attempted a Trac installation on Windows because quite honestly the Linux install seemed a lot simpler, but there are instructions for installing Trac on Windows over at the Trac web site.

I'm sure I'll have more to say about this as I dig into it further, but as I've said before, I just can't work without good source code control anymore. Even for a relatively small side project I just started on which I'm the only developer, the first thing I did was get an SVN repo going for it. If you haven't used SCM before or have only used bad SCM like VSS, I strongly recommend giving SVN a shot. Get CFEclipse, the Subclipse plugin (although be wary of versions ...), and give this stuff a whirl. It's a better, safer way to develop and opens up all sorts of flexibility with managing your code that you just can't get any other way.

For further info, I recommend Version Control with Subversion and Pragmatic Version Control Using Subversion. Both are extremely helpful from a conceptual as well as a technical perspective.


Comments


We're also going to be moving away from VSS. However, the big stumbling block has been the requirement that we need to preserve all comments from VSS to SVN. I found a python script to do it, but the feedback on it has been mixed at best. How are you approaching that problem, if at all?


We're not. :-) I've been using the Eclipse plugin for VSS for quite a while and it doesn't let you enter comments anyway (unless I'm just totally missing that option), and we decided that for us it just isn't worth the hassle. We'll probably leave our VSS stuff sitting around for quite a while for historical purposes but I seriously doubt we'd ever need to refer back to it.

That's where we're at in our development cycle though--we're at a pretty amazing point of synchronicity in terms of revisions between all our apps so it's pretty much the ideal time to do it. I suppose if you *have* to retain your comments I'll wish you luck and be very curious to hear how you fare!



Hey Matt, I'm about to set up a similar system at my new job, it looks like we will also be making the choice for svn simply based on the support of tracs. I have grown used to a super sweet Jira/Confluence/cvs solution thanks to free open source licenses, but it a pretty expensive solution for the new biz. So the question, is tracs available from the standard fedora repos (or extras) or did you get it from elsewhere, maybe atrpms? Being able to yum install / upgrade kind of makes the tracs/svn solution even that much more appealing.



we are moving to eclipse and want to abandon vss. there are two versions of subversion -- subclipse and subversive. is one better than the other? thanks.





I've never used subversive. Subclipse has always worked great for me.


If you're on a Mac and have been envious of TortoiseSVN on Windows, check this out:


http://lifehacker.com/software/featured-mac-download/integrate-subversion-wit...





For Windows folks, alternative to Subversion with Trac would be


Subversion with BugTracker.NET, free and open source (I'm the author). You include the bug # when you check in and then when you look at the bug, you can see your Subversion revisions, do diffs, etc. More info at http://ifdefined.com/bugtrackernet.html





Hi Matt,


I've written a walk through guide to installing Trac on Windows without Apache on my own site.


http://how-to-solutions.com/how-to-install-trac-on-windows.html


Your readers might find it of some use.



Wednesday, January 4, 2006

cf.Objective: Be There!

Jared Rypka-Hauer is heading up cf.Objective, and it's shaping up to be a great ColdFusion development conference, particularly if you're into architecture and OO development.

Speakers include Hal Helms, Sean Corfield, Joe Rinehart, Simeon Bateman, yours truly, and more. Hotel is cheap, conference is cheap, and the information will be top notch. Plan now to be there!


Comments


signed up for email on cfobjective conference link but when I try to enter my password and code that was emailed to me, I just get an error message.


Sorry Bruce--I don't have anything to do with the web site but I'll pass this along to Jared.


I think this was the session bug that Jared just fixed. Try the link again Bruce and let Jared know if you're still having problems.