Moved to AWS

10 years a go I worked on a site for a local company. This month I officially am off that project. With that the server that the site was hosted on and this one as well will be going away.

With that I opted to move to Amazon Web Services EC2 server to host my blog and a couple of the other sites that I work on.

I am currently working on writing up the procedures I used to get every thing up and running on AWS. I am sure there are a few write ups on how to set up Apache + Railo + MySql on AWS but I hope to come from a plain ubuntu install to everything working together.

I also plan to being to post more with most of it being on the Jquery/Railo ORM side of things as I being working on a new project.

Endless scrolling with jQuery and Coldfusion using ORM

Been on Facebook, Twitter or any number of sites that loads data as you scroll? I would bet that most of you have. lets show you how to set up your site to load data inline while the user scrolls down the page.

The first steps is to get the initial set of data and a record count for the entire dataset that is going to be loaded up. This is pretty much standard Coldfusion nothing fancy.

view plain print about
1<cfset numRecords = ormExecuteQuery("select count(*) as total from entries")>
2 <invalidTag>
3    //Will discuss the script section below.
4 </script>
5 <cfoutput>
6    <cfset entries = entityload("entries",{},{maxResults=10,offset=0})>
7        <div id="entries">
8            <cfloop array="#entries#" index="e">
9            <div class="entry">
10                <h3 class="title"><a href="#e.getUrl()#">#e.getTitle()#</a></h3>
11                <div class="content">#e.getContent()#</div>
12            </div>
13            </cfloop>
14        </div>
15 </cfoutput>

[More]

Using the IN Operator with OrmExecuteQuery

Yes, another ormExecuteQueryEntry! I promise my next article will not have anything to do with ormExecuteQuery. While I was searching for an unrelated issues I was coming across posts where people were having issues using the IN operator with ORM. Here is a quick breakdown of how to format the query.

[More]

Using parameters with ormExecuteQuery and Railo

Though the new ORM functions in Railo are great there is often times you need just a little more than matching one or two columns exactly when you're getting data. When you reach this point it's time to bring in ormExecuteQuery as a method of gaining that little bit more of control over getting your data. Though there is more to ormExecuteQuery but I want to discuss how to use the conditional parameters of your where clause.

Though you could just insert the parameters directly into your query, we all know that that is not safe and is how SQL Injection attacks occur. In fact I am not even going to show that as we don't even want you to think about doing it that way, and since cfqueryparam cannot be used here we need to find another way to keep our system secure but get the data we need.

[More]