My Free Prorate Golden Ring (or why you don’t use Google Translate for sales letters)

Email I received:

Subject: this is your last week to get your free prorate golden ring

En route to Retain the services of software Developer 

Throughout present times apple iphone is easily the most popular device on the globe due to the lovely look and remarkably innovative capabilities along with performance. Their purchasers would be the the majority of energetic individuals and they are generally premade revolutionary along with valuable apple iphone software therefore, software development is actually growing at every part around the globe. Folks are with the use of the apple iphone mania because of their corporations and grow not wanting to grab customers who are expressly use apple iphone within their day-to-day actions. Although are usually planning to produce some performance throughout Application store simply by marketing very good apps together with amazing concepts. 

Whatever their motivation to get iPhone database development they must retain the services of iphone 3gs program designer or perhaps crew involving iPhone app designers for big notion of more organization specific demands. If you are going to get enterprise iphone app improvement you need obvious concept that that are used for going to get this sort of iphone app as well as what ideals it’ll add your organization we have spent this kind of wages? Additionally, you should be crystal clear that which will takes place organization iPhone app, your employees maybe clients or even each? 

What can are the dynamics of the enterprise iPhone app means could it enable you to speed up your company procedure as well as will assist you to in selling particularly if your current salesmen need to on the vacationing quite often? There are other choices as if you will offer totally free getting along with your software contains your Adverts of one’s business and other company which can be paying you every click/visit. When you employ iPhone programs designers they certainly asks you about your concept if you are intending to produce some money inside the Application store in order to evaluate the prospects of the application in the grass actuality to become achievement story within the Application retailer.

When they note that the thought is different and will remedy the down sides with the majority of the market or even increase valuations within the use of potential clients with the app they instantly wish to know which whether you have sufficient price range or not and what is your time to arrive at on the industry for them to calculate the potential time line in the iphone 3gs application coding and place statistics for Return to suit your needs as well as them. In case your employ i phone developers staff isn’t tuned in to these types of factors as well as simply consider the expense of the work next don’t go along with all of them for your apple iphone growth or else you will likely be stored in any mesh and may missing your cash and moment although using lasting pain using 50 % supported merchandise.

i phone encoding is hard issue that any newbie developer are able to do that a lot as any modest or even mediocre iPhone application development organization are able to do by purchasing recession with the sufficient sources. So it will be crucial that you should retain the services of apple iphone programs developers that are nicely knowledgeable, experienced and inventive therefore his or her out-of-box thinking will make your own iPhone app strong and with optimum usability and ideal person experiences.

How to determine if you’re on Amazon

Quick little snippet on determining if your ColdFusion app is running on an Amazon Web Services instance (only tested in Railo)


 function isAWS () {
hostname = createObject("java", "java.net.InetAddress").localhost.getHostName();
 parseHost = listToArray(hostname,'-');
return (arrayLen(parseHost)==2 && trim(parseHost[1])=='ip' && len(parseHost[2]==8);
}

 

Basically it grabs the host name (in Java) and checks to see that it matches the AWS convention (ip-01234567). Obviously not foolproof, as you could use that same naming convention, or AWS could change it.

Keep in mind that this isn’t as fast as checking against Amazon’s internal metadata REST API (for example, to get hostname, do an HTTP GET to http://169.254.169.254/latest/meta-data/hostname and parse against format: ip-1-2-3-4.ec2.internal where 1-2-3-4 would represent the internal IP address) when you’re inside EC2, but would fail outside of EC2 (and a try-catch would be much slower)

I’m doing a hands-on at NCDevCon

A bit late to be posting this, but so what ….

I’m speaking at NCDevCon. I’ll be doing a hands-on session on authentication using Google, Twitter, and  Facebook. (OpenID/oAuth 1/oAuth2).

The conference is this weekend. My session will be Saturday from 3:45 – 5:45. I suppose if you can go you already have tickets and plans, since the event is at this point sold out.

Attending my session? Get the code for the session at https://github.com/bdcravens/ncdevcon2012-handson-auth (currently empty; all code coming soon). You can probably follow along even if you don’t have this repo, but this will make it much easier. However, as long as you have CF9, CF10,

Geek or Nerd?

I’ve always said I’m a geek not a nerd, but if you call me a nerd, I really won’t be too offended (depending on the context). This infographics confirms my findings:

Geeks vs Nerds
From: MastersInIt.org

All told, I do swing sometimes to the nerd side (Star Trek movies? Hah, I’ve read 20+ books!) But I married a definite non-geek/nerd, and have no interest in tons of nerdish games, movies, etc. So I guess that means I’m a geek, not a nerd!

7 months after an OS is live?

Wow. Post by Adobe for CF10 support:

 

Three to five months. Wow. Mountain Lion (OSX 10.8) was available on 7/25/12. NEARLY TWO MONTHS AGO. To say nothing of the fact that the operating system was available for those on Apple’s dev program. (I’m a tiny dude who pays for access to Apple’s dev program – don’t tell me Adobe couldn’t)

Then there’s Win 8 compatibility. Honestly I don’t care. However, has it changed that much, in the 6+months it’s been publicly available?

Still I really don’t care about Windows users. Not because they don’t matter, but because of the cool kids: every conference I go to is overwhelmingly attended by OSX users. Devs tend to not be careful and frightened; we run the latest OS’es. So go to a random CF dev conference: expect plenty of them to be running CF10 in 3 to 5 months.

Let’s talk open source. Railo (getrailo.org) runs on my laptop, and drives my clients full set of business needs today. It runs in my staging and production environment. Does it support all features or is fully compatible with CF 10. I don’t care: it’s not telling me to wait 3-5 months.

Full disclosure: I’m an Adobe ColdFusion User Group Manager. I love ColdFusion as a language, and I want to see ColdFusion developers succeed. Fill in the blanks on what’s missing. If the parent platform doesn’t fit that need …..

Defaulting event gateway values to ID in Railo

Railo allows you to write your own event gateway types in CFML, which is pretty nice. For more info:

http://wiki.getrailo.org/wiki/3-2:Create_your_own_Event_Gateway_type (note that some of the directories referenced in this post have changed since it was written)

I’m writing an event gateway that listens to Amazon Web Services SQS (Simple Queue Service) queues, which is similar to Active MQ. Here’s some good posts on creating event gateways for Active MQ:

http://www.basvandergraaf.nl/railo-activemq-event-gateway-part-i-create-your-own-event-gateway-type/

http://www.basvandergraaf.nl/railo-activemq-event-gateway-part-ii-consume-process-messages/

When you set this up, you write a driver that shows what values to grab for the instance of the gateway. You write a gateway; this is where the logic for starting/stopping etc is defined. You also write a listener: this is specific to the gateway instance (listener a for queue a, listener b for queue b, each with their own logic)

After you’ve written your driver (and restarting – my experience was you had to restart the underlying Java container, such as Tomcat; restarting Railo in admin didn’t do the trick), you then see the driver listed in the Railo Web Administrator, where you provide an ID.

Railo Event Gateway - first screen

I’d like to do a convention over configuration thing: on the next screen, where I provide CFC to execute, queue name, I’d like to match it to my ID. The screen typically looks like the following, based on what you’ve put in your gateway CFC.

Railo Event Gateway - first screen

I want to provide some sensible default: the listener would be maybe “myMapping.#ID#” and the queue name would be the same as the ID. Looking at screen 1′s source, i see the the form field is _id. Cool, easy, right?

1 2 3 4
<cfset id = form['_id']>
<cfset variables.fields = array(field("Queue name", "queuename", "#id#", true, "The queue to listen to", "text"),
field("Interval (seconds)","interval","60",true,"The interval between checks, in seconds","text")
) />

Meta post: have you commented lately?

If you’ve ever commented on a post, and I didn’t approve, I apologize. I promise, I never censor, unless it’s defamatory or illegal. Unfortunately, I gave up on comments given the volume:


Am I popular? No. It’s all spam:

Yeah, I’m running WordPress. I could run a ColdFusion-based blog engine like BlogCFC or Mango, but at the time, WP seemed a good solution given the plugin ecosystem. However, at some point I became noticed by the robo-spammers, and went from maybe a dozen spam comments a week to hundreds.

I’m aware there’s anti-spam solutions for WordPress, which probably work great. However, I’m currently rewriting my blog in node.js as a learning exercise. Hopefully the fact that it’s custom will allow me to minimize spam.

 

 

 

Quick tip: search CFDocs.org from Google Chrome address bar

I search Google using Chrome’s address bar all the time (they call this combined text box the “omnibox”). You can also search other search engines by typing a keyword (such as “bing.com” though it doesn’t have to be a URL, it’s just a keyword), followed by a space, then your search term. You can also add your own. Since I search cfdocs.org all the time, it’d be nice to be able to do a search like “cf dateformat” and automatically go to that page. (This isn’t really a search, but a URL shortcut, which is really what the omnibox does) Here’s how:

  • Toolbar icon
  • Settings
  • under Search, click Manage Search Engines
  • scroll to end of Other Search Engines
  • first text box: “CF Docs” (or whatever you’d like)
  • second text box: “cf”
  • third text box: “http://cfdocs.org/%s”
  • click OK
  • now “cf cfdump” works (it’ll take you to the exact page, or the “oops” page if it doesn’t exist)
This of course works with other sites (for example, for jQuery docs, use “http://api.jquery.com/?ns0=1&s=%s” for the URL)

Not-quite-tutorial on FW/1 structure and security

A friend in our user group asked me a few questions about FW/1: what should the structure look like, how to add security to it, etc. Like many, he’s found it hard to find up to date (v 2, not 1) tutorials, and the documentation on GitHub isn’t necessarily written for the novice. I put together a quick answer to his questions, but I thought it’d be good to post here for all. It’s far from a full tutorial, and most of the info can be found elsewhere. However, this is in one place, rather than clicking or scrolling around, so hopefully it’ll be useful. Please feel free to call me out on any inaccuracies. (Twitter is better, @bdcravens, since I don’t have much time to spend on comment moderation with the volume of comment spam I get these days). It’s not formatted perfectly since it was an email; maybe that’ll change and I’ll do a better guide or tutorial later. :-)

 

When I start a new FW/1 app, I just copy the “skeleton” directory from the FW/1 download.

 

For each section, you at least want a separate folder in your views directory. Each folder has a .cfm that corresponds to an item:

/products

details.cfm

summary.cfm

/customer

profile.cfm

register.cfm

 

This gives you section.item: index.cfm?action=product.details, index.cfm?action=customer.profile, etc

 

If you need to interact with data or do any preprocessing, you want to create a controller for each:

 

controllers/products.cfc, etc

 

The function in each corresponds to the item name (for example you’d have a function called details() in products.cfc)

 

Your controller should be fairly light: it’s purpose in life is to wire up your services and other objects to be available to your views, by handling the process of putting those things into the rc scope. Most of the real sexy action occurs in your services. When you way “model”, is that what you’re referring to?

 

Services are a bit tricky to grasp initially. Typically in your controller, you’ll set a reference to the fw in the init function (see the skeleton app example), and in your controller method:

 

function details(rc) {

variables.fw.service(‘Products.GetProductDetails’,'productDetails’);

}

 

This is the FW/1 way of doing the following:

 

productService = new Products();

rc.productDetails = productService.GetProductDetails(url.productId);

 

Here I’m assuming a url variable of productId, where you have a service call that queries the database and returns a query result for a given product. In FW/1, url and form variables all go into the RC struct; so does everything else. The RC struct is available to your view. When you call a service, it passes the entire RC struct, so you don’t explicitly pass variables like your normally would. In other words, if GetProductDetails() expects a productId arg, it automatically gets it if it’s in the rc scope. Of course, if you’re trying to pass something not already in the RC scope (say a session value), just set it in your controller function before you call your service.

 

A tricky thing is that the service calls are actually queued up, so the results of the service call aren’t available within the controller function. If you need access to those values for additional logic before your view is rendered, you do so in a function called “after(myeventname)”. There are actually a number of functions like that that run automatically; look to the API docs.

 

As for security, for most apps, doing a check in your Application.cfc’s setupRequest() function is where I do it. This is an FW/1 function. Don’t use CF’s onRequestStart, as FW/1 needs to “hijack” those native Application.cfc functions. Basically you’ll check against the session scope, making sure user is logged in. If so, don’t do anything, and they’ll go on as usual. If not, execute the proper security controller method to login them in, etc. Of course, you want to filter out your security controller to prevent an endless loop.

 

You can see an example of this in cf.Objective() example code at https://github.com/bdcravens/cfo12/. There’s logic in there for using Twitter, etc for authentication, but the concept is pretty much the same if you’re using your own internal form. Look at my Application.cfc and the first 3 functions inside of controllers/security.cfc.

1 2 3 4  Scroll to top