Posts Tagged intermediate

Intro to Ehcache Server and RESTful Web Services

An out-of-process caching mechanism can seriously help reduce load on your servers and databases. Ehcache provides a very simple, yet powerful, way to cache data and is a system that should be seriously considered when making a caching decision.

When you think of caching there are basically two types: in-process, and out-of-process (or external caching). In-process caching all happens on the host machine and often within the same JVM container (if you’re using ColdFusion specifically). That is, all caching will always reside locally, making caching operations extremely fast. The obvious downside to this method of caching is that the cache consumes the same resources that would have otherwise be spent on your application server.

In order to allow you to scale out (by adding more servers to a cluster, for example) rather than scaling up (by adding additional ram) you need to provide an out-of-process caching mechanism. Again, the obvious downside to an out-of-process setup is the fact that you must serialize and transmit data to an external JVM, which requires much more overhead and transmission time.

(more…)

Unmasking Passwords

Masking passwords is a great over-the-shoulder security feature, but hurts usability. Providing the option to toggle the password field on and off will increase a user’s experience on your site.

After reading Jakob Nielsen’s post, “Stop Password Masking”, I really wanted to develop a quick and easy jQuery plugin which provided the ability to toggle a field between a masked and unmasked versions.

(more…)

Writing an Effective Gateway Object

The gateway object is a great way to separate your database calls into a container that could be easily swapped out in the event that you change to a different database setup and to make things a little more distinct and easier to understand when coding.

Assuming you follow the philosophy of the MVC frameworks out there, you’ve likely come across Beans, Services, DAOs (data access objects), and Gateways. Without getting too much into detail about what each of these types of components do, which I’ll get into in a future blog post, your gateway layer is meant to interact with your database where you need to do more than just create, read, update, or delete objects (which is what a DAO is for).

(more…)

Playing with jQuery: DragForm Plugin

In an attempt to both learn how to construct plugins for jQuery, as well as learning some of jQuery 1.4, I’ve created the DragForm Plugin.

So what’s the point? Why create a plugin for dragging and dropping form elements? I thought I’d try a different take on the typical web-form usability and created what I think is a pretty decent alternative.

Drag and drop elements have been around forever. It’s a pretty good metaphor in terms of describing to the user how certain elements of a user interface are to function. The web is a different matter however. Drag and drop, while isn’t all that new to the web, it hasn’t been as widely adopted with how web sites are designed and are meant to be interacted with.

(more…)

Search Engine Safe Routes in Mach-II

Search Engine Safe (SES) Routes are another great way of generating immaculate URLs using Mach-II which are great for SEO applications and making things just look cleaner.

What are Search Engine Safe (SES) routes? Take a typical Mach-II URL, e.g. /index.cfm?event=world&country=canada&province=british%20columbia&city=vancouver. Even using Mach-II’s own Search Engine Safe (SES), the URL remains somewhat ugly: /index.cfm/event/world/country/canada/province/british%20columbia/city/vancouver/.

Suppose the format of the URL is always consistent. In our example above it can safely be assumed that the event name is world which is followed by country, province, and city.

Search Engine Safe URLs with Mach-II

(more…)