I am almost there

I have been working on yet another code generator for ColdFusion for the last six months. I have learned a lot. When I am done.... it will read a databse and using the metadata and it will create a working app using the ENTIRE database. It is like a mini Ruby on Rails.

You point it to the data source and a destination dir, press enter, and you have a working app. You can go from zero to working admin for a 20 table database in about a minute.

It also:

  • Generates client side validation based on the data type (string, numeric, float, date, etc.).
  • Generates time and date pickers for date/time fields.
  • Generates inline wussywig text editors for Text fields
  • Automatically generates and populates drop down boxes using foreign keys .
  • Has optional secondary validation using key words in the column name (like email, phone, fax, zip, etc.).
  • It is almost entirely Object Oriented and uses a very simple MVC methodology.

I am pretty pumped and have been working on this every chance I get. When I get it done, (It really snow balled from what seemed to be a very simple idea), I will be able to crank out a working app, with a couple of clicks, in a matter of minutes.

And yes, I will be releasing it open source.

Blue Dragon J2EE Goes FOSS

Yes! Finally there is a mature version of CF supported by a stable company that is FOSS.

I love CF. I dreaded the thought of having to go back to PHP or learning .NET or Java as main programming platform. I like PHP, ASP, .NET and Java well enough. But CF has spoiled me. It just takes so much more code/work to write apps in these languages. Besides, I know CF like the back of my hand. I *think* in CF. I dream in code. I program in my sleep and when I dream it is genearly from a CF stand point.

I have been learning Java due to my FUD with "CF is dead" and the general lack of jobs for CF in my area. I just got started with Java and to bring my chops up to speed, with my CF chops, on any of the above, will not happen with out some serious effort.

BTW, I never had FUD with CF until I started looking for a job outside my geek friend circle last year. But that is another story for another time.

But no more. With Blue Dragon J2EE going open source it means that all the companies and dept's that balked at the $7500 per box cost for Enterprise CF have no (good) reason to do so anymore. The $1500 jump in price for Adobe's Enterprise version really pissed me off seeing that it effectively priced itelf out of the ball park for most (mom and pop or local) ISP's and hosting companies and grass root startups (like my past efforts).

The one thing I have learned while learning Java is how powerful (and easy) CFML is. When I started learning Java (and OO programming in general) my eyes became wide open and realized how little I knew and that I was just scratching the surface to the potential of CF.

A few years back, I had foolishly thought that I had done pretty much most every thing that could be done with CF. And at the time, just around when cf 6 was released I probably was pretty much versed in 80-95% of the language to the point where it was rote.

Imagine how stupid I feel now with a ~year of OO under my belt and still not knowing shite.

So I DL's the J2EE version of BD, read the docs. I deployed it on TomCat and got busy.

First thoughts: TomCat was at 23 megs just sitting there. With BD it hit about 33-35 megs, again, just sitting there. It was at about 45 megs running some simple CFM's, i.e no CFC's. I did beat on it a bit (looping over 10,000 items) but it never went over 45 megs. Adobe CF 8 on tomcat hovered at easily twice that and the stand alone version (on apache) kisses 200 megs (sitting there) not including the ODBC, .NET bridge or search services,

All I have to say is that I am thoroughly impressed with BD. Aside from some minor syntactical difference, and missing some minor functionality from Adobe's offering; I am very, very impressed.

In fact, after reading the docs, the enhancements that BD brought to the plate (for CF 7.x) more than makes up for its compatibility issues.

So hello BDJ2EE. Me love you long time.

My script goes to eleven.

Whiskey Tango Foxtrot?

This reminds me of debugging PERL back in the 90's.

Whiskey Tango Foxtrot

ColdFusion Rocks

I have been fighting it. The FUD, the slim job market, the abuse. But I have given in again to the lure of CF.

I have played with and or made production apps with PHP, ASP, C#/ASP.NET, Java/JSP/Groovy, Ruby, ROR, PERL and so on.

And the one thing I have noticed is that for a lot of the above languages writing a simple app (say in Java/JSP) is like swatting a bug with a sledge hammer.

With ROR, you have to know a bazzion hand shakes to do something that is SUPER SIMPLE. Like trying to group output by category:

http://instantbadger.blogspot.com/2008/02/i-still-miss-cfoutput.html

Or with PHP where everything is odles of noodles spaghetti.

HTML is spaghetti, SQL is spaghetti, dynamic JS is spaghetti.... You will go blind trying to debug dynamic JS generated by PHP.

ASP? As Sid said in '78: No future for you!

ASPX/C#? Code behind? Poor excuse for OO. It never made sense to me. ASP.NET is smart and well designed but the whole Code behind thing gave me a rash.

I do like the VB and C# syntax. Especially C#

BTW JS browser issues irritates me to no end. i.e. "GODDAMMIT just FARKING WORK!!!!"

But CF? It is so simple, so smart, so damn easy. The easy stuff is idiot proof, the harder stuff is a cake walk compared to other languages. And the hard stuff? Do you even have to ask?

You need to do something? Chances are there is an out of the box tag or function for it. Need to do some heavy lifting? You have COM, the entire Java and .NET library at your command. Not to mention most any Java class including most everything at Apache.org and Source forge. Or you can roll your own.

What else you need? AJAX? Done. Frameworks? Done. ORM? Done. Code Generators? Done. Scaffolding? Done. Unit Tests? Done.

Ever update a database record with one line of code using three variables?

I didn't think so.

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.

RIP Homesite and CF Studio.

I was a HUGE fan of Homesite and CF Studio for years. I thought that I would never find a replacement. I mean never ever. I never liked Dreamweaver and I have long admired MS's Visual Studio but developing strictly for windows was never really an option for me.

The current crop of IDE's that I have been using to do Java development (NetBeans and Eclipse) make Homesite look like a child's play thing. Homesite (and CF Studio) is a great text editor. A true masterpiece in it's time. However, the difference between CF Studio and Eclipse is far greater than the difference between CF Studio and Notepad.

In that light, I can say that in the last 5 years ColdFusion has not had a good IDE. I love CFEclipse but it is not so much the CF part that I love s much as it is the Eclipse part. Hats off to mark Drew and Crew, I am deeply indebted to the CFEclipse team for what they have done. But Mark is one guy. The other IDE's have armies of developers. CFEclipse is not nearly, not even remotely, close to the tools available to MS, PERL, PHP, Ruby, Java, etc. developers.

Perhaps the CF community is happy or content with DW and CFEclipse. I am not. I know there is better and that bothers me.

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.

More Entries

Calendar

NAVIGATION

Recent Comments

RSS

Search

Subscribe

Tags