Entries Tagged as Preview

CFHTTP with NTLM

September 04, 2012 · 2 Comments

One of the downsides of CFHTTP is that it does not work with NTLM authentication. The latest version of Railo 4.0.1 allows now to use NTLM authentication as well.

[Read more →]

2 CommentsTags: Features · HowTo · Preview · Railo 4.0 · Tips

Railo 4.0 Previews: For/In loops

June 01, 2012 · 3 Comments

In Railo 4.0 we have expanded the capabilities of using the cfscript syntax. As part of this we devoted some attention to how you can loop through collections using the for(x in y){} syntax.

We have also changed how we loop over queries, now giving you access to the row itself!

Let's check out some examples, first up looping through a structure:

myStruct = {one: "The One" ,two: "The Two",three: "The Three",four:"The Four",five: "The Five"};

for(key in myStruct){
   dump(key);
}

This dumps out the following:

We can do this for arrays too!

myArray = ListToArray("one,two,three,four,five");
for(item in myArray){
   dump(item);
}

This dumps out the following:

And finally, we don't forget Queries! (notice the creation syntax! Lovely!)

myQuery = Query("id":[1,2,3,4,5],value:[1,2,3,4,5]);
for(row in myQuery){
   dump(row);
}

This dumps out the following:

3 CommentsTags: Preview

Railo 4.0 Previews: Member Functions

May 31, 2012 · 15 Comments

For a long while Railo has had a number of functions available for you to be able to modifyand work with collections such as Arrays, Structures and Queries. These functions take the format of Array*(), Struct*() and Query*().

Some examples of these functions are:

  • Arrays: arrayeach, arrayprepend, arrayslice, array, arrayset, arrayfind, arraysum, arrayfilter, arrayappend, arraysort, arrayreverse, arraymerge, arrayclear, arrayfirst, arraycontains, arrayindexexists, arraydelete, arrayresize, arrayfindallnocase, arrayfindnocase, arraymax, arrayinsertat, arrayavg, arraydeleteat, arraycontainsnocase, arraynew, arraytostruct, arraylast, arrayisdefined, arrayfindall, arraymid, arraymin, arrayswap, arrayisempty, arraylen, arraytolist
  • Structs: structupdate, structinsert, structkeytranslate, structfindvalue, structget, structdelete, structfilter, structfindkey, structappend, structcopy, structkeyexists, structfind, structnew, structkeyarray, struct, structisempty, structcount, structsort, structclear, structeach, structkeylist
  • Query: queryslice, querysort, querycolumnarray, querycolumncount, queryaddrow, querysetcell, querydeletecolumn, querydeleterow, querynew, queryaddcolumn, querygetcell, querycolumnlist, querycolumnexists, query, queryrecordcount

In Railo 4.0 we are adding the ability to use them as methods attached to the collections themeselves, so so that instead of doing ArrayLen(myArray) you will simply be able to do myArray.len().

Let's look at some examples: Sample Objects:
These are the objects we are going to be modifying:
<cfscript>
   myItems = ListToArray("one,two,three,four,house,dog,ball");
      myStr = {
         one: "Onsey",
         two: "Twosey",
         three: "Thressey"
      };
   </cfscript>

New Way of using the objects
In Railo 4.0 we can now do the code:
dump(var=myItems.len(), label="Shortcut for ArrayLen(myItems)");
Which would give us the following:

Appending is pretty easy too:
myItems.append("elvis");
   dump(var=myItems, label="Shortcut for ArrayAppend(myItems, 'elvis')");


We can now even loop using a closure:
var filter = function(arg1){
      dump(var=arg1, label="key of the struct from a closure");
      dump(var=myStr[arg1], label="value of the struct");   
   };
      myStr.each(filter);


And of course, this also works on Structures (and Queries):
dump(var=myStr.keyList(), label="List Keys");
   dump(var=myStr.keyExists("one"), label="Key Exists");



15 CommentsTags: Preview

Railo 4.0 Previews: Memory Monitor Extension

May 30, 2012 · 2 Comments

An extension that we released a little while back and have been getting feedback on is the Memory Monitor Extension.

Once installed, this extension adds a new section in the Railo Server Administrator that allows you to inspect the memory of your SERVER, APPLICATION and SESSION scopes

[Read more →]

2 CommentsTags: Extension · Preview · Railo 4.0

Railo 4.0 Previews: Cached Functions

May 29, 2012 · 13 Comments

In this first post of the Railo 4.0 previews, we are going to focus on the Cached Functions feature. In Railo 4.0  you can cache your functions and methods in a CFC, so that after the first request the results and output are  obtained from cache rather than re-evaluated each time. 

Let's look at an example.

Take the following code in CacheDemo.cfc:

component {
   function getTime(String name, Numeric age)
         cachedwithin="#createTimeSpan(0, 0, 0, 10)#" {
      return Now() & " " & arguments.name & " " & arguments.age;
   }
}

You can see that we have added the argument cachedwithin to the getTime function, when we call this multiple times, we will get the same result, as now the output and result of the method are cached!:

<cfset comp = new cfcs.CacheDemo()>

<cfdump var="#comp.getTime()#" label="Inital call">
<cfset sleep(1500)>
<cfdump var="#comp.getTime()#" label="Cached call">

<!--- now with attributes --->
<cfdump var="#comp.getTime("Elvis", "29")#" label="Inital call">
<cfdump var="#comp.getTime("Sean", "42")#" label="Inital call">
<cfset sleep(1500)>
<cfdump var="#comp.getTime("Elvis", "29")#" label="Cached call">
<cfdump var="#comp.getTime("Sean", "42")#" label="Cached call">

Results:

You can even cache a call to function within a page, not just components:

<cffunction name="cacheTest" cachedwithin="#CreateTimeSpan(0,0,1,0)#">
   <cfreturn Now()>
</cffunction>

<cfdump var="#cacheTest()#" label="Initial Call">
<cfset sleep(1500)>
<cfdump var="#cacheTest()#" label="Cached Call">

Results:

13 CommentsTags: Preview · Railo 4.0

Railo Server software archive now online

December 13, 2011 · 1 Comment

Screenshot of the Previous Versions pageIf you've ever updated Railo, you probably found it very easy to do with our one-click install. Just click the update button on the Server admin and you're done! And if you need to remove an installed update, you can easily uninstall the latest (or all) patches with just a few more clicks.

But what if you need to install version 3.2.2.000, or 3.1.2.001, because that's what your client runs on? Or perhaps you'd like to test how much faster Railo Server became between version 1.0 and 3.3?

Well today, we are happy to announce the Railo Server archive, where you can find versions of Railo Server going all the way back to Railo 1.0! The archive is not yet complete, but almost all main versions and all release candidates for 3.3 are now online and downloadable!

Check it out at http://www.getrailo.org/index.cfm/download/olderversions/

1 CommentTags: New release · Preview · Railo 1.1 · Railo 2.0 · Railo 3.0 · Railo 3.1 · Railo 3.1.2 · Railo 3.2 · Railo 3.3 · Reference · Release

Railo Extension - Ram Resource Info

November 12, 2009 · 5 Comments

Gert just tweeted about the "Ram Resource Info" being available on the preview site ( http://preview.getrailo.org/ExtensionProvider.cfc ). I thought I'd take a moment to show you how to install and use it.

[Read more →]

5 CommentsTags: Community · Extension · Preview