Archive for the ‘Development’ Category

Makin’ Days

Tuesday, February 9th, 2010

We didn’t have to create Just Made My Day. There was no imperative dictating the (at this moment) mostly unprofitable format, and definitely no room in the market for another site that lets users share updates about their lives. We did feel, though, that it was worth it to craft a little beacon of positivity on the oft-negative internet. It has been so good to us, after all.

The following is the casually recollected time line of concept-to-creation for Just Made My Day: Unit’s latest way to brighten people’s day:

Concept

Nov. 4th, 2009 — An idea comes to Andy while showering. Not specifically focused on anything, he thinks about how nice it would be to create a place online where “folks could just celebrate the cool things that happened to them, especially the cool people who did something nice for them”.

Nov. 5th, 2009 — Andy takes R.A. and me out for coffee. The trip is a Trojan horse laden with a new undertaking for Unit. It’s solid idea from the start: “Just Made My Day” (JMMD if you’re savvy) will be a site to allow users to easily share the little things that make them happy. We discuss the various implications, difficulties, and merits of launching such a site. Quick sketches and wire-frames are scribbled on scrap paper. R.A. uses phrases like “implicit moderation” and “social-media authorization APIs”. We emerge highly caffeinated, with a foundation for moving forward.

Design

Nov. 5th, 2009 — While watching a documentary on Monty Python—Almost the Truth: (The Lawyers Cut)—I think it would be nice to rip-off Terry Gilliam’s collage style for something. It occurs to me that JMMD would be ripe for experimentation.

Nov. 6th, 2009 — Although there’s no plan for me to design JMMD, I decide to get a jump on a look and feel rattling in my head. I spend a quite Friday morning making a collage of landscape elements. I want to create an impression that is inherently positive, and will behoove users to behave. While playing with more organic layouts of nature, I realize that a fully symmetrical approach allows the landscape to both be more pleasant, and act more as a background to the form elements, not a focal point. The resulting masthead gets me excited; I decide to finish a full design comp.

Nov. 10th, 2009 — I finish out a full comp of the site design. Somehow, the thrill is gone. I wind up with what I feel is a muddy attempt at redesigning Rotten Tomatoes. The design needs more simplicity, and serious amount of editing. It occurs to me that I’m riding a little too hard on the landscape concept; it needs to be a website, not an art project.

Nov. 13th, 2009 — I show Andy my design. We decide this is the right direction, but it needs some work. Angela later tells me about some great little games on the Xbox arcade.

Nov. 17th, 2009 — On Angela’s recommendation, I download Braid late one evening and am blown away by its ingenuity and pure artistry. Shortly before bed—still humming a haunting tune from Braid—I have a few design-related epiphanies. When I say them out loud, my sleepy wife does her best to act like I am smart, God bless her.

Nov. 18th, 2009 — I complete the design that will become JMMD. I make some tweaks to the form to give it affordance, and help it feel more balanced. Now, we’re ready to build this thing.

Development

Nov. 19th, 2009 — The entire Unit crew sees JMMD as an opportunity to push our knowledge. We have already begun delving in to HTML5, and this looks like another great opportunity to work with it. I think that a parallax technique will really make this design sing, and begin learning how to pull off such a thing.

Nov. 24th, 2009 — I finish the parallax effect, add some birds and the main title in Chunk Five, using some @font-face goodness via Font Squirrel. I put up a teaser site, and begin developing the rest of the site.

Nov. 25th, 2009 — I really want to make sure I am using HTML5 to its fullest, so I read up on everything. I start working heavily with CSS3 techniques as well. We discuss the ramifications of leaving Internet Explorer in the dust. We are okay with this.

Dec. 7th, 2009 — I finish front-end development. We decide WordPress will work best as an engine for posts. I begin integrating a theme and R.A. helps me build a set of plug-ins to allow users to post. Basically, we turn WordPress inside-out. Next, we begin learning authorization APIs for Twitter, Facebook, and Open ID.

Dec. 18th, 2009 — Early on, we decided that in order to lower the barrier for entry as much as possible, we would need to allow users to log in using social media accounts. We were sure they wouldn’t want to create and remember a whole new account for our little site. Twitter authorization (oauth) was the easiest (IMO). We test and then soft-launch JMMD without Facebook or Open ID integration. Over the holidays, we leak the site to a few friends and family, and allow some initial posts to build up.

Jan. 13th 2009 — I finish up Facebook authorization using Facebook Connect. We use RPX to allow Open ID. Next we fire up the Twitter clients and start telling the loyal web denizens of our latest project.

Epilogue

So far, response has been overwhelmingly positive. Even if it were a failure, though, this scrappy Unit staff was able to take a great idea from concept to launch in just over 2 months. We learned a lot and we are proud of the fruits of that labor.

Thank you to everyone who is making days, or sharing about days made!

Developing For Unify – pt. I

Thursday, September 3rd, 2009

Until recently, the bulk of thought towards managing a site’s content has weighed on the side of more options and more control. With this has grown more headaches, indecipherable usability, and more opportunity for the misguided destruction of otherwise well-considered designs and/or mark-up. The guiding principle of Unify has been to put the power back in the hands of designers and developers by creating a content editing option with dead-simple, customizable implementation, limited-yet-permissive content control, and a polished, intuitive UX.

Unify is not a complicated system; in fact it is not a system at all. This two-part series will illuminate some of the unique aspects of Unify, allowing any website designer/developer the most opportunity capitalize on its potential. Unify is the closest to a plug-and-play content editor available at this time, and these tips should help make your next Unify install as quick and effortless as possible.

How Unify Works

The Unify UI is built on the jQuery library and jQuery UI. Through javascript and CSS, Unify gives a constant and accurate depiction of the changes being made to the HTML. Therefore, when manipulating items through the Unify UI, you are editing only what the browser sees. Publishing changes, on the other hand, deals with the actual HTML/PHP written in your files (more on this later). The Unify text editor is a custom build of tinyMCE, sharing all of its triumphs and tribulations. We have taken great pains in smoothing out some of tinyMCE’s eccentricities, and will continue to do so, but those with tinyMCE experience will recognize some of its hiccups.

When the changes are completed in the interface, and it comes time to publish these changes, we get to the core of what makes Unify unique. On publish, Unify will pick up the HTML/PHP page that you are publishing to (and any includes), find the elements you have edited, replace their content with the updated content, and then save those files back down on your server. This eliminates the need for a database, as your HTML/PHP files are, in a sense, storing your content. During this process, Unify also creates backups of your files, allowing for previously saved states to be “restored.”

Before all of this can take place, though, you must install Unify on the root of your website. There are some server requirements you may need to look in to at this point, but given that you have a common PHP setup, Unify should just drop on to your server and work. You should then be able to define the editable content throughout your site by adding the class of “unify” to elements. You can also use the “unifyRepeatArea” and “unifyRepeat” classes to really make your content dynamic. More on these Unify Repeatables later.

It is important to note here: Unify elements do not nest. Any “unify” or “unifyRepeat” elements within other “unify” or “unifyRepeat” elements will be ignored both by the interface and the publishing functions.

Development Environments

We have given serious consideration to how to set up development environments for Unify. In order for Unify to work, you must have purchased a license and registered your copy of Unify for a specific domain or sub-domain. Seems simple enough until you want to develop on one domain/sub-domain, and then deploy in another, right?

Unify was not designed to be a complicated solution that would require a lengthy testing period or any development area. It either works, or you will need to sort out some PHP config issues, and then it works. If you want to give it a test run, though, before deploying, we suggest one of these three options:

  • Purchase a license for a sub-domain/domain specifically for Unify installs, e.g. unify.yoursite.com. This will be a one time fee, and will allow you to use Unify in any folder in this sub-domain. You could copy fifty Unify folders in to fifty site folders for fifty clients, and they would all work in that sub-domain on one license for a one-time purchase.
  • Purchase a dev license and a live license for your client as part of your project with them, rolling this in to the cost of your project. This would allow you to develop in a sub-domain.
  • Simply develop in a sub-folder of the domain on which you wish to use Unify.

For Unify to work, it must be installed and running on a live, licensed domain or sub-domain. This means you will need a live connection to the Internet to use Unify. It also regrettably eliminates the ability to develop in a local environment. Please see Developing for Unify pt. II for info on developing locally.

Efficiency Through Unify Repeatables & PHP Includes

Unify works with PHP includes. The UI cannot recognize if content has been brought in through a PHP include statement, but when publishing, Unify loops through all the includes called on your PHP page, and replaces the appropriate content in each. So, if you have recurring content throughout your site—e.g. in a site header—you need only make the change once and it will populate throughout the site.

Another important to note: do not put any PHP (or PHP includes) inside of a Unify element. As mentioned before, the Unify UI only knows to save what the browser sees, so this could destroy some of your server-side code when publishing. Your included Unify element must be within the include, not surrounding it.

Unify Repeatables are an all together different tool that allow you to rearrange and duplicate complex sets of elements. For example, say you have an element whose inner HTML is a little bit complicated, like so:

<div>
   <img class="fancy" src="images/fancyimg.jpg" alt="Fancy" />
   <h4>Caption Header</h4>
   <p>Some more caption content goes here</p>
</div>

If this element will need to be duplicated, you could just wrap it in a “unify” element and hope that your client is savvy enough to grab all the appropriate tags when copying. We know this is a scary thought to most developers, and this is why we created Unify Repeatables. Now you can create a “unifyRepeatArea” container, and make the original element a “unifyRepeat” element, like so:

<div class="unifyRepeatArea">
   <div class="unifyRepeat">
      <img class="fancy" src="images/fancyimg.jpg" alt="Fancy"
      »» />
      <h4>Caption Header</h4>
      <p>Some more caption content goes here</p>
   </div>
</div>

Line wraps marked “»»”. -ed.

The “unifyRepeatArea” defines a boundary. Within that boundary, “unifyRepeat” elements can be duplicated and rearranged. There can also be non-editable elements within the “unifyRepeatArea”, but these will be static, and will only be moved as nudged by other arrangeable content. “unifyRepeat” elements outside of “unifyRepeatArea” elements will be ignored by the UI and publishing functions.

By combining Unify Repeatables and PHP includes, you can create fairly dynamic and functional site modules that are easily updated through Unify.

What’s Up in Pt. II?

In part two of this series, we will look at how Unify works with dynamic content, like Twitter feeds, and how you can better implement Unify to be friendly with page behaviors such as tabs and lightboxes. Plus, we will take a look at the future of what Unify will have to offer.

Finally, That Unit PNG Fix Update You’ve Been Clamoring For…

Wednesday, July 22nd, 2009

We know you have been teetering on the edge of your collective office chairs, anticipating the next iteration of the Unit PNG Fix. Well, the wait is finally over.

Only slightly larger than its predecessor, the new Unit PNG Fix weighs in at just over 1kb and now fixes your PNGs in IE6 before the page load, eliminating any pesky flickers as the script runs. Now, your beautiful PNGs can shine as they were intended, without betraying any of their unflattering incompatibilities.

Just one more thing (black turtleneck not included): You can now opt-in to fix only the PNGs you want fixed by adding a “unitPng” class to specific elements. By default, Unit PNG Fix will fix every PNG, but this may cause layout issues, or slow your page down with PNG-Fix-Overkill. Therefore, by adding the “unitPng” class, you can target only those PNGs that are acting up.

This is likely to be the last edit to the Unit PNG Fix (barring any major scripting errors). Muerte a IE6.

Unify™ Private Beta

Tuesday, June 9th, 2009

Sign up for our private beta For the past few months the Unit Interactive team has been working hard on a little application that is meant to solve big headaches for web designers and their clients. It’s called Unify, and it’s a website content editor that is easy to install and easy to use.

We are ready to begin private beta testing on Unify and we cordially invite you to sign up to participate.

UPDATE:
The beta testing sign-up is now closed.

What is Unify?

Unify is not a content management system. It’s is a simple content editor that anyone can use. It has a ridiculously simple implementation and requires no database integration. To use Unify, you simply go to your website, login, edit the content right on the page, and click “publish.” Done.

 - no CMS
 - no backend interface
 - no database setup
 - no proprietary syntax or tags

Just change, add, or delete content right on the page in your browser.

Setting Up Unify

For the designer/developer, implementation is a snap. Once you create an account and download Unify, just…

1.    Upload the Unify folder to the server,

Add the Unify folder to the server

2.    Add the appropriate Unify classes to the HTML elements or divs that you’d like to be able to edit, and upload the page(s) to the server.

Add the unify class to a container

…or…

Add the unify class to specific elements

3.    There is no step 3. You’re done.

Why Unify?

Not every website needs a cumbersome and complex CMS. Sometimes all someone needs is the ability to modify content; to edit contact information, to replace an image, or to change some copy. For website owners, the easiest and most intuitive way to do that would be to go to their website in a browser and edit the content right there, on the page. Unify makes this possible.

For Designers & Developers

Wouldn’t you like to have a simple content editing solution for those clients who don’t need a powerful CMS? Unify is perfect for brochure sites and other informational websites where content updates are minor and infrequent. With Unify, your clients don’t have to know HTML and they don’t need to learn to use a complex, counterintuitive backend system. Unify lets you give your clients an easy-to-use editing solution so that they can be self-sufficient …and you can determine which elements they can edit and which elements they can’t.

Unify is not a hosted solution. It lives on the website’s server. The license cost will be very low, allowing for easy inclusion in project budgeting.

Using Unify

After going to www.yourdomain.com/unify and logging in, editable areas become conspicuous on the page. Double-clicking on an editable area or clicking on the edit tab opens up an intuitive editing interface for that content element or containing div. The controls are contextual to the elements you are editing. Unify even has a robust definition list wizard; a feature lacking in other content editing apps. Unify’s intuitive image wizard allows uploading, editing, application of classes, IDs, or alternate text properties to images.

For more complex content arrays, like image+copy+stats for a typical company’s staff listing or a product listing, Unify even has a repeatable element function so that website owners can add a new staff member or product. The user can select a repeatable section, insert a duplicate, and change the relevant information or image. This function prevents your client from destroying a complex product or staff listing while editing in visual mode.

Unify works to preserve good markup. You can edit in either visual or HTML mode. The visual mode prevents users from adding presentational effects (like underlines or colors) to content, so the presentation stays within the CSS.

Sign up for the Private Beta

If you are a web designer or developer and would like to help us put Unify through its paces, please go to the Unify website and sign up to participate in our private beta.

UPDATE:
The beta testing sign-up is now closed.

Making InnerHTML and Internet Explorer Get Along

Friday, November 7th, 2008

I had been wrestling with this a couple of days ago, and thought it might be nice to share. You see, not only does Internet Explorer (all versions through 7 at least) mangle CSS, but seems to have a special interest in making Javascript applications exceedingly difficult as well. Mainly, it takes any code provided by Javascript’s innerHTML property and capitalizes all of the tags before spitting it back out in the desired element. This sounds harmless enough, but by my standards, IE should have no business rewriting my code. Therefore, I devised this little script, using a bit of Regular Expression goodness (» represents line breaks):

newElement.innerHTML = element.innerHTML.replace(/<.([A-Za-z]*[A-Za-z0-9]w*)?(?=.*>)/gi, » function(w) {return w.toLowerCase();});

Now that I had that solved, I had a new problem: IE runs a rather vague error when trying to place HTML in to <p> tags. Specifically it is an “Unknown Runtime Error”… specifically. Now, I know that innerHTML is not specified by W3C, and IE is probably just doing what it thinks is best, not allowing HTML in to a non-block level element, but what about an anchor tag, or a <strong> tag? Well, with a little help from the DOM, I came up with this:

// oldElement being the element you want to place HTML in to...
var replacement = new Element(oldElement.tagName);

// now, copy all of the attributes of newElement to replacement...
for(i=0; i<$oldElement.attributes.length; i++) {
   replacement.setAttribute(oldElement.attributes[i].nodeName,» oldElement.attributes[i].nodeValue);
}

// put some code in to replacement...
replacement.innerHTML = "<a href='#'>Place some <strong>code here</strong>.</a>";

// and then pull the old switch-a-roo!
oldElement.parentNode.replaceChild(replacement, oldElement);

Well, you would think that would be enough to tame ol’ IE, but no: the folks at Microsoft have cooked up one more obstacle. All versions of IE that I have encountered will rewrite all relative urls to absolute urls on page load. I have yet to find an answer as to why, or how to stop it. This, again, crosses my ideal that the browser has no business rewriting my code, and makes for the handling of certain tasks very difficult. At this point, I throw myself on the mercy of our readers… any ideas?

Verification for Ampersands in URLs: The Movie.

Thursday, September 11th, 2008

Scene 1:
The road is abandoned except for one bold soul careening through the twists and curves of asphalt, his engine crying in mutiny against the silence of the hazy morning. In the man’s rear view mirror, lights flare up out of nowhere in a lively sequence of blue and red that might seem almost festive if they weren’t attached to the roof of a state cruiser. They pull over to the side of the road. Each footstep sounds more contemptuous than the last as the trooper approaches the side of the vehicle.

“Sir, are you aware that you just blew right through 92 validation errors back there?” The trooper says, grimacing as he adjusts his weighty belt.

“What? I mean no… no I wasn’t aware. S-sir.” The man wonders why his reflection looks so scared in the trooper’s sunglasses.

“Seems as though you have a bunch of ampersands that need to be converted to their correct HTML entity ‘&amp;’.” The trooper’s teeth are gritting.

“No… No sir, I wrote everyone out by hand! I promise!”

“Bet you didn’t think to check your href’s… how about on that link you generated off of Google translate? Or on that link from your website host? Leaving the ‘&’ unconverted could cause the link to be broken when the query happens to be an HTML entity as well, like ‘&sect;’, and such. You see, the browser translates ‘&amp;’ to ‘&’ so the server will only see ‘&’ and not ‘&amp;’ in the query string.”

“Shoot, officer, I didn’t know you’re supposed to convert those too.”

“Only every time you use ’em,” scolds the trooper, sounding fatherly. The man feels sorry for whoever might be his kid. “I’m gonna let you off with a warning this time. But don’t let me catch you making the same mistake.”

“No, no, of course not,” the man says, searching for his license and registration. “Never again. I will always be sure to convert any ‘&’ to ‘&amp;’ in the future. Especially in my URLs.”

The man turns back to the window to hand the trooper his information, but the trooper, and his almost festive lights are gone.

Unit PNG Fix Fix

Tuesday, September 2nd, 2008

The Unit PNG Fix has gotten pretty popular, with close to 15,000 downloads and 1,500 saves on del.icio.us, so we thought we should probably make sure it works as best as it can. Labs has been recently updated with a new version of the fix (the latest is from 08/31) that should solve most of the problems that have been reported. Most notably, the absolute position bug should be fixed.

We want to give a big thank you from Unit Interactive to everyone who wrote in about bugs, concerns, suggestions and adulations. Please, keep them coming. We are always looking to improve our scripts and will continue sharing them.

Recommended
Most Popular
Underappreciated