ColdFusion Community

The online ColdFusion / CFML community website

Brian Swartzfager
  • Male
  • Bowie, MD
  • United States
Share on Facebook
Share

Brian Swartzfager's Friends

  • Christian Ready
  • Ryan Stewart
  • Troy Hahn
  • Ramanathan
  • Nafisa
  • Liz Frederick
  • Matthew Abbott
  • Raymond Camden
  • Gareth Arch

Posts from My External Blog

CORS in Grails 3 Using An Interceptor

<p>The other day I started working on a personal project involving Angular 1.x and the latest version of Grails (3.0.1).  I created a Grails controller with a method that returned a list of domain class objects as JSON, while on the Angular side I wrote a service method to make an HTTP request to retrieve that JSON.  But because the HTTP request came from a different domain, it was disallowed:  I needed to instruct Grails to accept the request via <a title="Link to Wikipedia entry on CORS" href="http://en.wikipedia.org/wiki/Cross-origin_resource_sharing" target="_blank">CORS</a> (cross-origin resource sharing).</p> <p> After some trial-and-error, I came up with a solution involving the <a title="Link to Grails Interceptor documentation" href="http://grails.github.io/grails-doc/3.0.x/guide/single.html#interceptors" target="_blank">Interceptor</a> artefact introducted in Grails 3.</p>

Angular Material Design, $mdToast, and HTTP Interceptors

<p>Recently I've been playing around with the current beta distribution (0.8.3) of <a href="https://material.angularjs.org/#/" target="_blank">Angular Material Design</a>: a set of Angular modules and resources that apply the "Material Design" style and behaviors used in Android 5.0 to an Angular website.</p> <p>One of the services added by the Angular Material modules is the <a href="https://material.angularjs.org/#/api/material.components.toast/service/$mdToast" target="_blank">$mdToast service</a>,  which provides an easy way to display small pop-up notifications ("toasts") in response to events (a common behavioral convention on mobile devices).  I wanted to use the $mdToast service in my <a href="http://www.webdeveasy.com/interceptors-in-angularjs-and-useful-examples/" target="_blank">httpInterceptor</a> service function for handling HTTP response errors so that I could display a toast message if the server returned a nasty 500 HTTP status code.</p> <p>But I ran into a problem:  when I tried to inject $mdToast into my interceptor service factory using standard Angular dependency injection, I got a "circular dependency found" error message when I loaded my Angular app.  The same thing happened when I tried injecting $mdToast into a service module of my own creation - toastService - and injecting that into my interceptor service factory.</p> <p>The solution to the problem offered on the <a href="https://groups.google.com/forum/#%21forum/ngmaterial" target="_blank">"ngmaterial" Google Group forum</a> was to manually inject $mdToast into the service factory via $injector:</p>

Using a Route Naming Convention to Control View Access in AngularJS

<p>Suppose for a moment that you have an AngularJS single-page application, one with view routes managed with then ngRoute module, that is used by users with different roles.  A user in your company's Sales group has access to certain areas of the application, while a user in Accounting works in other parts of the application.  And there are also some areas of the application that are common to all users.</p> <p>Now, you already have the navigation menu wired up so that users only see the navigation links appropriate to their user roles.  And even if a Sales user somehow ends up in a view meant for an Accounting user, the server answering the REST calls for the data powering that view is going to check the security token sent with the request and isn't going to honor that request.  But you'd still like to keep users out of UI views that aren't meant for them.</p> <p>You could do a user access check at the start of each controller, or perhaps within the resolve property of each route, but that would be repetitive and it's something you could forget to do on occasion.</p>

Introducing Sparker: A Codebase Library Management Tool Showcasing AngularJS, Protractor, and Grunt Techniques

<p>Sometimes projects take on a life of their own, and you end up with something unexpected.</p> <p>I set out to create an template for CRUD-focused single page AngularJS web applications, something I and perhaps my colleagues could use as a foundation for writing new applications.  But under the momentum of self-applied scope creep, what I ended up creating was a Grunt-powered codebase library management tool, with my original template concept as the first codebase of potentially multiple foundational codebases.</p>
 

Brian Swartzfager's Page

Latest Activity

CF Mitrah liked Brian Swartzfager's discussion Alpha Releases Out of Updated jQuery UI and Brand-New jQuery Enchant Libraries
May 23, 2012
Angela McGregor joined Brian Swartzfager's group
Thumbnail

ColdFusion in Higher Education

A group for ColdFusion developers who work in higher education (universities, colleges, etc.).
Mar 2, 2011
Michael Horne replied to Brian Swartzfager's discussion Introduce yourself! in the group ColdFusion in Higher Education
"I'm Mike. I work at ecch.com, based at Cranfield University, Bedfordshire, UK. We distribute Case Study material to universities and colleges, primarily in the management sector."
Oct 24, 2010
Michael Horne joined Brian Swartzfager's group
Thumbnail

ColdFusion in Higher Education

A group for ColdFusion developers who work in higher education (universities, colleges, etc.).
Oct 24, 2010
Tim Heald joined Brian Swartzfager's group
Thumbnail

ColdFusion in Higher Education

A group for ColdFusion developers who work in higher education (universities, colleges, etc.).
Nov 9, 2009
JP Revel replied to Brian Swartzfager's discussion Saving the order of items rearranged by jQuery in the group CFJQuery
"Thanks a million - you saved my hide."
Sep 2, 2009
CVgeek joined Brian Swartzfager's group
Thumbnail

ColdFusion in Higher Education

A group for ColdFusion developers who work in higher education (universities, colleges, etc.).
Apr 3, 2009
Jon Alsbury joined Brian Swartzfager's group
Thumbnail

ColdFusion in Higher Education

A group for ColdFusion developers who work in higher education (universities, colleges, etc.).
Mar 13, 2009

Profile Information

What do you like about CFML
It's easy and quick to use, yet quite powerful.
What other technologies do you use?
HTML (obviously), CSS, JavaScript, and Flex (a little)
About Me:
I'm the sole ColdFusion developer in the Portal and Web Services unit at the University of Maryland, College Park. I develop CF-powered web applications for departments that don't have their own programming expertise, troubleshoot legacy CF applications, and develop CF-powered portlets for the relatively new university portal. I'm married with 4 greyhounds.
Blog
http://www.swartzfager.org/blog

Brian Swartzfager's Photos

Loading…
  • Add Photos
  • View All

Brian Swartzfager's Blog

ColdFusion 8's image functions + jQuery= a UI for adding text and color blocks into an image file

Posted on February 28, 2008 at 13:05 2 Comments

I blogged about this on my external blog yesterday but thought I'd share it here as well.



One of the new features in ColdFusion 8 is the ability to manipulate images using ColdFusion tags and functions. In addition to being to do generic image manipulations (like rotating, resizing, and cropping), you can also add text to an image using the ImageDrawText function.



A week ago, an idea popped into my head: "What if you could create a UI tool that would let a user decide what… Continue

Switching Between Sets of Tables On The Fly

Posted on February 8, 2008 at 12:55 0 Comments

(This post is also on my external blog, but I wanted to share it here as well).



Ever need to tell your ColdFusion app to run select queries against a different set of tables while you do something to the original set

(like perform a batch update)?



I did. Here's how I did it.

First, I gave each table in each set a two-part name, two words…

Continue

ColdFusion Getting Some Respect from Dzone.com

Posted on January 23, 2008 at 13:24 0 Comments

The folks over at Dzone are going to launch several new websites containing news and information about various web technologies, including ColdFusion:

DZone's Network is growing

Dzone's a pretty cool site, so I think this can only be a good thing for ColdFusion.


Counting down to the conferences...

Posted on January 13, 2008 at 17:12 0 Comments

Just on a whim, I decided to add countdown timers to the cf.Objective() and CFUnited promotional badges on my external blog. I also wrote a blog post about the JavaScript code involved.



So let's see...right now it's just over 109 days until cf.Objective(), and 163 days until CFUnited. Can't wait!…



Continue

How to Use the Same Server-Side Code to Validate Form Data With or Without AJAX Using jQuery

Posted on January 3, 2008 at 0:14 0 Comments

Just finished a post on my external blog about a technique I developed recently that allows me to write a single set of ColdFusion code to validate data submitted via an HTML form that can then be executed via AJAX if the user's browser has JavaScript enabled or executed server-side via a regular form post if JavaScript has been… Continue

Comment Wall (4 comments)

You need to be a member of ColdFusion Community to add comments!

Join ColdFusion Community

At 19:46 on December 31, 2007, Christian Ready said…
Hey Brian, thanks for the welcome. I'm glad to be here!
At 16:47 on November 22, 2007, John Allen said…
I am the lucky bone head that gets his questions answered by the great ColdFusionWeekly.

Nice to meet you!

ColdFusion rocks.... cool dogs.
At 17:50 on November 15, 2007, Liz Frederick said…
From Jared's page http://www.coldfusioncommunity.org/profile/JaredRypkaHauer

Brian, I totally agree. I put CFUnited as a group the minute I signed up. I have been begging for someone to do this for a long time. I think all attendees should create a profile. It is a great way to get connected. I see great things in the future for this site. I plan on inviting Nick Tong to CFUnited Europe.
At 18:12 on November 13, 2007, Scott Pinkston (ScottP) said…
I did also - somehow it keeps getting removed. I'll put it back and how long it stays up this time.
 
 
 


Latest Activity

Alex Kaniaru joined Mark Drew's group
Thumbnail

CFEclipse Users

For people that love using the IDE that is Eclipse with the awesome plugin of CFEclipse
Apr 22
Alex Kaniaru liked Russ Johnson's group ColdBox
Apr 22
Alex Kaniaru joined Russ Johnson's group
Thumbnail

ColdBox

Community group for the ColdBox framework.
Apr 22
Ashutosh Verma liked Raghuram Reddy Gottimukkula's blog post My Experience with Coldfusion Builder
Mar 2
Harmindra Sirohi updated their profile
Feb 18
Harmindra Sirohi posted a status
"Hello"
Feb 18
Isaac Dealey posted a discussion

PayPal Cart Integration

Hey guys,I know I haven't been on here in a little while. I'm hoping one of you will have some information on this...A client of mine asked me to integrate PayPal into their existing custom shopping cart. It's just the typical old PayFlow-style, send the browser to PayPal and then bring them back afterward. I read through all the documentation and I've got it creating the form and sending to PayPal and it all works.Now PayPal says form encryption is not required, although they also say you…See More
Jan 2
Isaac Dealey updated their profile
Jan 1

Members

Translate this page

© 2015   Created by Nick Tong.

Badges  |  Report an Issue  |  Terms of Service