Syntax Highlighter
2009-12-17
One server to rule them all
Neil said: "Why on earth would you even consider using Railo et al to run your code, when it could never be as good as your language/platform specific setup you're using now."
1. From what I have read Quercus is faster than the standard PHP engine and can do several things like db obfuscation that the dll version doesn't do well. I've heard a lot about how slow Ruby is so I had assumed that jRuby may also be faster (I have since checked and yes jRudy claims to be faster and more powerful).
2. If I ran a hosting company and had the option to install languages separately with all their different admins or settings or all at once with a well thought out admin structure and a more powerful level of security sandboxing, I think it would be a no brainer if there were not a huge number of compatibility issues.
3. jRuby, Quercus and Rhino all have very active development teams already so that wouldn't change and other servers can integrate them without obscene amounts of effort. Quercus is already installed with Railo, you just have to manually add it in the Resin config file currently so adding a switch in the admin to do that would be simple I suspect.
CFgroovy2 makes it easy to switch between the languages already so given it is already done as a proof of concept I would not expect adding files to a class path via admin toggles to be a full time job, perhaps Sean could clarify?
You may have switched to Ruby, that's no doubt been great for you, like when I switched from ASP & PHP to ColdFusion. But for many Java developers who want fast scripting languages with the ability to use elements of Java they love then Java based versions of the scripting languages can be very advantageous especially when it comes to working with and using legacy code.
I think you are very wrong in being so dismissive of the idea just because in your perception it wont suite you, think outside your box, there's plenty of issues developers around the globe face and there is definitely positive movement for change and having options to get past them. .NET has JScript, VBScript, FSharp and CSharp because MS are smart enough to know that some jobs are done better by different languages.
JavaScript is the most important language for the web and is grow in popularity rapidly (more Java/JavaScript servers than any other language now I believe thanks to Rhino looking up SSJS on wikipedia), supporting Rhino is a no brainer, support for actionscript could also potentially be
added as it is based on JavaScript.
More options is always better who cares if there are some narrow minded users of a language that stubbornly refuse to investigate better options, Mono, Quercus, jRuby all show that there is a need for languages to be implemented in different ways for different needs. Bringing several of these into one place would draw in more communities of developers to one place which can only be a good thing as shown by Apache foundation itself!
2009-12-03
CFJS, one step closer to paradise
I have been obsessed for a long long time about JavaScript and the need for it to be a core factor in bringing ColdFusion out of the niche and into the mainstream. I have a dream, that dream is CFJS a JavaScript specification for CFML. A spec for CFML engines to implement so that they can create the first real consensus of a JavaScript server standard, with potentially three different servers all implementing the same spec that'd be two more than any other implementation! There are plenty of JavaScript servers out there, Rhino hacked into them in one way of form, but none that really offer any real appeal or power behind them. All ColdFusion engines offer superior clustering and database handling with well established power and performance and with integrated JavaScript with mapped functions and classes there's no reason for it not to take off among developers who love both ColdFusion and also the new masses of JavaScript developers who have come into the fold via jQuery.
CFJS is a concept that is almost a reality in one form now thanks to Alan Williamson over at Open Blue Dragon: http://alan.blog-city.com/cfjs_alpha.htm While I really like the work Alan has done there are a few things I would suggest, the first being the JavaScript scope/namespace to be used, currently $cf I would prefer to see one of CFjs, CfJs or preferably cfjs if it is encapsulated by a closure then developers can use whatever shortcut they like just as they do with jQuery becoming $ within a closure when making plugins (when they're done well! ;).
My next desire is to create a clear specification for running frameworks within CFJS, a clear definition within the Application.cfjs file for a framework scope with functions to enable/disable and choose versions of frameworks to use, so cfjs.framework.list() would return an array of framework property objects with their versions and they could be used like:
$ = cfjs.framework('jQuery','1.4');
Fb = cfjs.framework('FuseBox','6.0'); \\(-_o)//
Spry = cfjs.framework('Spry','0.1.6');
CommonJS = cfjs.framework('CommonJS','1.0');
cfjs.application({
onApplicationStart: function(){}
})
Then the frameworks could be pre-loaded compiled and poentially optimised to hopefully be even faster.
Speaking of compiled and faster, have you seen John Resig's Micro Templating project example?
http://ejohn.org/blog/javascript-micro-templating/
I like the idea of using something like that only adding
a (potentially jQuery based) compiler so there are no variables in your HTML code AT ALL. I wrote
some code earlier and included three tbody tags in a table one
with a class for no-data-items one for data-items and another called
data-item-template.
The template version looked kind of like:
<tr class="data-items template">
<input type="hidden" name="temp-id" class="data-item-id" value="temp-value" />
<td class="data-item-name">User Name</td>
<td class="data-item-email">User Email</td>
</tr>
I then added a call to:
jQuery(HTML template selector).template(array, function(template, record){
template.find('data-item-id').val(record.id);
template.find('data-item-name').text(record.name);
template.find('data-item-email').text(record.email);
tbodyData.append(template);
});
Now I haven't actually built it to work yet just throwing ideas around
in my head of just how beautiful templating in server-side JavaScript
can be, but what I intend on checking when I have time is how fast this
performs and whether or not parsing the template first so record.id
would be the text '<cfout>record.id</cfout>' and then using
Mr Resig's templater to do the rest would potentially be faster given
it wouldn't need to continually run a bunch of jQuery calls. Then
there's the option of e4x which I suspect would be faster again. I really wish I had more time each day to play with cfml!
2009-11-26
Railo, Hudson & Php in 20 minutes
I feel like I have just had a life changing experience.
I just installed Railo for the first time and within minutes added the Hudson WAR and added support for Quercus to handle .php files.
Never again will I install PHP. Not when I can use a Java implementation and install it so fast without any issues at all. It was so easy I was sure I would get an error... but none appear. I feel like I am in the freakin Twilight Zone. I am kicking myself for waiting so long to give Railo a try and so should you. Go to getRailo.org and try it out if you haven't yet, it really is a brilliant server and being open source it is likely to advance quite quickly to become the number one CFML server.
All you need to do is run the Railo installer, go to the Railo/webapps/ROOT folder for the Railo install and add in any war file you want to install and then restart Railo via your start menu. Too easy!! Quercus was then easy to install by removing the comments from the app-default.xml file in the Railo/conf folder and now I have php working! It is that easy!
Mr Gertz, Mr Corfield, Mr Drew and all the rest of you brilliant people, NICE WORK!
2009-11-17
32
Another year older and so much more learned. cf.Objective(ANZ) was great. Really enjoyed having a drink with many of the speakers and dinner at Federation Square.
I really enjoyed talking to Mike Brunt about clustering and more detailed server setup; Mark Drew about Railo and CFEclipse; Mike Schierberl about JVM tuning; Geoff Bowers about FarCry and last but certainly not least my fellow Melbournian Mark Mandel on Hudson continuous integration and ORM.
I think where I work will be installing ColdFusion 9 in the next week or two and I can't wait to take advantage of this great release.
I will take today easy and enjoy my birthday and work more on my pet hobby of trying to run John Resig's Env.js JavaScript framework blended into the ColdFusion server context latter in the week, I would love any help anyone can afford me regarding getting Rhino to bend to my will, I will elaborate further latter in the week on exactly what I desire to accomplish with CFJS.
2009-11-13
jQuery().notify();
jQuery("#messageDiv").notify("error","You are using .NET, please don't make such obvious mistakes in future.");
That's all that is needed to add an inline error message in the format designed within jQuery UI Theme Roller.
There are several notification types pre-added but it is totally configurable at runtime with default template values you can pass in.
I also added the ability to use multiple messages and create a list like if you needed validation messages for multiple form fields in a single message box for example.
I will add more detail and the actual code in the next few days.
cf.Objective(ANZ)
So I have my ticket and the days off work and I am really excited to be attending a ColdFusion conference so close to home.
I have two objectives for cf.Objective(ANZ):
1. Learn all I can about about different development methodologies and tools for things like continuous integration and unit testing frameworks for use within Eclipse IDE.
2. I'd like to also find out more about Railo and how I can help in that project but not sure if there is anyone from Railo coming, will have to add that to my list of things to check latter.
ColdFusion is awesome!
I think my first post should be about the language I love, ColdFusion and the reasons I have continued my love affair with the language for so many years and really hope I can for many years more.
I have worked in ASP and PHP, but don't like either as I never liked
their syntax and found them overly cumbersome and poorly designed. I
had expected .NET to be a far more advanced version of ASP, but
recently when I studied it, I was surprised to find that only now, with
version 4, is it starting to catch up to ColdFusion in many aspects and
yet it still seems to me to be truly aweful way to try and build an
enterprise application. Sure I can see the value in using Visual Studio
as it is fairly good and provides plenty of great tools like StyleCop,
but I just plain don't understand why anyone other than an absolute
novice would choose to develop with ASP.NET Web Forms!
ColdFusion code can be written in ways that make it appear as bad as
ASP .NET, all languages have programmers that suck at what they do,
sadly because Visual Studio is a good IDE many think that ASP .NET is
equally as good a platform for applications. Wrong.
I can see the promise in ASP MVC, but I just get a strong sense that
Microsoft will never get it right, I have seen plenty of hacks online
to try and make it work well, but when all these sorts of things have
been common in ColdFusion and done well for half a decade, why do
people try to bend ASP .NET to do what ColdFusion already does so much
better? Why is there such a strong bias these days toward .NET in
development when it offers nothing but broken deadlines, inflated
production costs and a vendor lock-in to Microsoft that will do nothing
but damage the industry in future. We all know when Microsoft acheive a
dominant position they discontinue funding and make no advances till a
rival appears a decade latter (ie. ie6nomore.com), why support
stagnation when you can advance the internet further by moving away
from such a poorly managed company and its poorly managed products?
Anyway enough with that rant (for now).
I have worked in JSP and I can see that it shares much with ASP
.NET that I don't like and seams to not be as productive. But why would
a company use JSP when they can use ColdFusion and rapidly increase
production output while taking advantage of all their current JSP/Java
code and J2EE experience!
ColdFusion has so many enterprise level features and has a new lease
on life with the huge level of support being thrown at it be Adobe,
with a roadmap heading more than three years into the future. The
number of changes to its scripting language in the latest release CF9
only exemplify that it is a growing language and only likely to get
bigger and better in future. The rise of a major open source version in
Railo is very exciting and I see it making substantial inroads into the
Open Source community through Railo and if CFJS (a ColdFusion powered
server-side JavaScript implementation) ever appeared I am sure CF would
become the platform of choice for vast numbers of new developers who
would see it leading web development forward.
ColdFusion is the most exciting thing happening in web development
today behind jQuery and I am glad to be experienced in and enjoying the
success of both.