FireFox - Just like a disfunctional relationship

I loved firefox at one time. She had everything I wanted and needed, and more, from a browser. She was fast, nimble, extensible, she had and did everything I needed. And I do mean EVERYTHING. She was HOT!!

Then we got married. She put on a lot of weight, she became very sluggish and started to really slow me down. She uses all of my resources and will sit there and do nothing for long periods of time so I cannot do anything else but wait for her.

It is over baby. You are a fat, sluggish, resource hogging glutton that is taking more than you give.

I still love you, but I have to move on. And even though I will be dating your red headed step sister I will still want to see you from time to time so I can use firebug.

Open Source used to be so sexy. What happened to you? Are you becoming like Britteny Spears?

I don't know shit....

If you are a CF developer (or web developer) and you are still using DreamWeaver or Homesite or CF studio and not using Eclipse or any other of the advanced IDE's like Komodo, Visual Studio, Aptana, NetBeans etc, *you literally have no idea what you are missing out on*.

If you use F1 on DreamWeaver, Homesite or CF studio as a primary source of information about programming, CSS, HTML and your available options you are also missing a HUGE piece of information .

I have been using Eclipse for about 9 months now and the one thing it has taught me is how little I know. When I first fired up CF studio some 10 odd years ago I looked at all the CF related buttons and the options and felt clueless.

By using various Eclipse distros like the one provided by Pulse I feel even more clueless than I did 10 years ago. AND I have a working knowledge of web development and client and server side languages like JS, SQL, XML, XSL, HTML, XHTML, CSS, ASP, PHP, RegEx, CFML etc under my belt. As well as being exposed good doses of VB, ASP.NET, C#, ROR, Java, PERL, Python etc over the years.

The one thing I am finding out that I don't know shit.

At FSU the is an engraving on Dodd Hall that reads "The half of knowledge is to know where to find knowledge"

Now I know the other half of knowledge is making sure that you are being exposed to *new* knowledge on a regular basis.

If you explore Eclipse it will end up teaching you more than you can possibly imagine.

Literally.

My new favorite things: Groovy and Grails

I ran into it here.

http://www.barneyb.com/barneyblog/2008/02/11/barney-and-the-holy-grail/

Sean Corfield wrote on it

http://corfield.org/blog/index.cfm/do/blog.entry/entry/Grails__a_first_look

I have been looking for a replacement for CF for some time now. I am not taking any chances and started learning Java. As you might know Java is huge and it is going to take a while to get up to speed with it. I have played with ROR and and Jruby I am not fond of the syntax or the development process

Enter Groovy and Grails. Grails makes some pretty complex and advanced techniques ridiculously easy to do. And the language is similar enough to CF and CF script to make the learning curve and barrier to entry not as steep as say Ruby or Java. And since it creates Java Byte code it should (in theory) run side by side with CF (That is this weekend’s science experiment). Basically to lets you write Java apps with out having to actually write Java.

http://dev2dev.bea.com/pub/a/2006/10/introduction-groovy-grails.html

http://groovy.codehaus.org/

http://grails.org/


CF 8 at work!!! YES!!!

We pitched CF 8. Not really. The topic came up and our CTO looked at the specs and was all over the Exchange integration. His words "This is Huge".

Cold fusion is the best web app server there is. Period.

Some of my favorite things: CF, PHP, Java, ROR… all playing together. Literally.

I am in search of the perfect application stack. There are many things about the above app stacks to love. I like them all. I have used all of the above to varying degrees. I have been on the Java train for some time and have been trying to get my head around it for the last few months. I wrote a couple POC apps in ROR to see what the hype is about and have been using PHP for years. And CF has been by my side for the last 10 years or so... A while back I was giving jRuby a spin using GlassFish and NetBeans and I really liked it. I liked it a lot. I also liked working with Java in NetBeans.

The thing is, I can't get them to play together all under one roof.

CF runs on Java so that is a given. PHP can play with Java a and ROR has been ported to Java via JRubyy. CF can talk to PHP and Ruby. I just wish I could get the all to run together, on the same machine, on the same web/app server, on the same port.

So I tried to install CF 8 as a WAR file on GlassFish and it worked. But CF 8 Enterprise is $7500, so I tried installing Railo and that is running fine. I am about to see if I can get JRuby and php/Java bridge to run as well.

If I can get all of these to run on the same server (on the same port) I will have the perfect platform. The RAD capabilities of CF and ROR, the bazillion OS PHP web apps out there and the power of Java (and bazillion prebuilt Java apps and tags as well).

Running ColdFusion 8 on a USB Thumb drive

I just got a new 4 GIG USB stick and I am trying to avoid having to tote my laptop home for the holidays. So I am setting up a portable development environment.

I did this before using Railo and while Railo is a good CF engine I am developing a new business to run on CF 8. I was reading up on Running CF on JREE and noticed that that the Coldfusion installer created a WAR file that you can deploy CF on a JREE server, specifically JBoss. Then I remembered that JBoss runs on Tomcat. Light bulb! So I tried it out. I created a WAR file and deployed it on Tomcat. It did complain about "Error [Thread-26] - Java heap space", but it worked.

So here is the setup.

Download the following:
ColdFusion Server Evaluation version.  /http://www.adobe.com/products/coldfusion/
XAMPP standard ://www.apachefriends.org/en/xampp-windows.html#641
XAMPP Tomcat plug-in. http://www.apachefriends.org/en/xampp-windows.html#644

Optional: You can snag the Java runtime buy downloading one of Railo servers that come with the Java Run time. Look for “with-jre-“ in the file name. This will save you from having to install the Java runtime on any computers that don’t have Java installed. You may have to experiment as to where you need to put it. Most probably the root directory of the drive, or under the root of tomcat. I forgot how, I did it but I did get it to work before.

http://www.railo-technologies.com/en/index.cfm?treeID=224

Instructions:

Run the CF installer and Choose the JREE version (third option) and create a WAR file and save it to disk. I did not try to install the .Net, ODBC or Search services (You are on your own on this).
Unzip XAMPP. I recommend using the ZIP archive or the Self extracting 7-ZIP archive to avoid having to install it.
Unzip XAMPP Tomcat plug-in on top of XAMPP.
Run the setup_xampp.bat fond in the XAMPP root.
Run the startup.bat EX: F:\XAMPP\tomcat\bin\ startup.bat

Point you browser tohttp://localhost:8080/ and go to the “Tomcat Manager”. The default User/Pass is xampp/xampp.

Near the bottom of the Tomcat Web Application Manager page is the “WAR file to deploy” section Use the “Select WAR file to upload” to upload the WAR file you created. You can upload the RDS.war as well. I have not tested this yet.

I recommend that you put a copy of XAMPP on a local hard drive and deploy the WAR file your local hard drive and then copy the contents of the “C:\XAMPP \tomcat\webapps\cfusion” dir to your thumb drive. See below for the reason why. I was not able to deploy CF to the thumb drive. It hung for about 20 before I got sick of waiting.

After this point your browser to http://localhost:8080/cfusion/CFIDE/administrator/ to finish the installation.

Notes:
You can run the other bat files like tomcat_service_install.bat if you want to install it as a service and all that.

You can change the port to 80 by editing one of the xml files. I forgot which one. Look at the docs or Google it.

USB sticks are *slow*. It takes a long time to copy directories with lots of files. XAMPP took a good 10 min or so copy to the USB drive.


This is just ridiculous

I was looking for a form builder that would read a database and build my forms. AKA scaffolding like RoR does. I have a home brewed one but it it is like 5 years old and is really primitive. Then I ran into this http://www.objectbreeze.com/ and thought "mutherfarker... the guy beat me at my own game...."

See... I just wrote a function that would do all my crud functions with one line of code... But it relied on code generated by the Illudium PU-36 Code Generator generator http://code.google.com/p/cfcgenerator .

I thought I was so cool.... such a bad ass. I worked really hard to get my head around beans, gateways and DAO's. Not easy stuff for the n00b.

But this guy. He just wrote a bunch of classes that does all your database operations on the fly. It is not like other ORM's or code generators that reads the database and generates your crud objects/code like RoR, Hibernate (Java) or Transfer ORM (CF). This thing does it on the fly. So if you changed your database structure it doesn't matter one bit. You don't have to regenerate your queries or your crud/database objects... or anything. Hundreds if not thousands of lines of code per application... GONE!

This is so bad ass. All you have to do is load up a data structure and send it to an object.

<!--- create an employee object to hold the form data --->
<cfset vars.employee = vars.oB.objectCreate("Employee") />
<!--- load the form data into the object --->
<cfset vars.employee.setProperty("employeeID", vars.employeeID) />
<cfset vars.employee.setProperty("fName", vars.fName) />
<cfset vars.employee.setProperty("lName", vars.lName) />
<cfset vars.employee.setProperty("email", vars.email) />
<!--- commit the employee object --->
<cfset vars.employee.commit() />

That is it! DONE DEAL! This is going to save me SO much time....

Even if it can just save me from five "Click and Saves" for each table with cfcgenerator or regenerating my crud functions with a ORM framework everytime I make a change to my database I will be better off. Especially when you have a database with 50 or 100 tables, this adds up. For my latest site, generating my crud objects with cfcgenerator would take at least 20 min of mindless "click, wait, click, wait, click enter click enter click enter click enter click enter" for each table.

And I would have to regenerate/change at LEAST 6 files every time I made a change to my database.

Work smart. AND hard.

New entries, tutorials and Java

I have been trying to write a bunch of intro level tutorials outlining my travels into OO CF land. I had to write a very simple CRUD app for our HR dept that would allow them to list links and documents to our intranet at work. So I took the opportunity to implement the CFCs generated by Brian Rinaldi's Illudium PU-36 Code Generator. http://code.google.com/p/cfcgenerator/

Like all of my projects it has snow balled out of control and now I have working examples of how to use the out of the box CFC's created by Brian's Code Generator as well as examples for ColdSpring, Mach II, Model Glue, Transfer ORM. All are very basic and are very descrete in that the only do one thing. No mixing of concepts or frameworks.

Also of note is that I have gotten into Java hard core. I started doing exploratory searches into Java, IDE's Frameworks and the lot.

I have been messing with the NetBeans IDE and I am really quite please with it. It has a very Visual studio feel to it and the doc and tutorials are very newbie friendly.

What I like the most is that the Java Language itself is pretty friendly. I mean the API is staggering in size but the language is something I was comfortable with thanx to my dealings with ColdFusiob and .NET

Another note of interest is that for the first time I have looked at learning a new language with wonder and awe. I am not intimidated by my ignorance. I am actually motivated by it.

It is like "Huh, what does this do? COOL! I can use that to do this. What does that thing do? You mean I can dump out all my DB records by just doing that? AWESOME!!!!"

The most important thing about learning is ones attitude.

The biggest obstacle to learning is the presumption of knowledge.

Yeah, that is a quote by me. Google it.

http://www.google.com/search?num=100&hl=en&newwindow=1&safe=off&rlz=1B3GGGL_enUS233US233&q=%22The+biggest+obstacle+to+learning+is+the+presumption+of+knowledge%22&btnG=Search

Check/Uncheck groups of check boxes w/ the same name

I ran into an issue where I needed to check and uncheck groups of check boxes all with the same name attribute. Now JS's DOM allows you to call an object by it's name while CSS allows you to tap into its ID and class. I can check all of them no problem. So how the fark am I going to some of them if they all have the same name?

I could loop through them a write a script to call groups of them by their position in the form like so

document.myform.myboxes[0]= checked
document.myform.myboxes[1]= checked

But that would suck.

Or I could Google it.

http://www.frequency-decoder.com/demo/checkbox/

This script rocks.Very ingenious.

FireFox is a P... I.... G.... PIG

I love Firefox. There are a couple of things I don't like about it, but for the most part it is fantastic. I can't see myself functioning with out PlugIns like Google toolbar, Webdeveloper, FireBug and Gspace. But the thing is a ram PIG. It has SERIOUS memory issues. I don't know if it is the plugins or what, but when my system is running slow at work I am usually pretty sure it is Firefox sucking 400-900 megs of RAM. Sure I have 15 browser windows open (IE doesn't get that bad) but DAMN if that thing doesn't sucks down ram like College Freshmen suck down free beer. But here is the kicker, I lock my workstation at the end of the day I just lock it and leave my apps running so I can pick up where I left off. I have come back the next day and and my box will be sluggish (Mind you this is a brand new Dell business class box with 2 gigs of ram and two P4 Duel Core 2.8 GHz processors). I look at the task manager and sure enough it is Firefox gobbling up ram. One time it sucking up 1.9 GIGS of RAM!!!

More Entries

Calendar

NAVIGATION

Recent Comments

RSS

Search

Subscribe

Tags