Posts Tagged ‘coding’

How to Create an Image Slider using Photoshop & jQuery

Undoubtedly, image slider is one of the most commonly used elements in the business web design, due to its relatively large size that is able to draw the visitor’s attention once they arrive the site. Though the web has started to rethink about the usability of the image slider, it’s still considered as a must-learn for the newcomer of the web design industry.

tutorial nivo slider 41 How to Create an Image Slider using Photoshop & jQuery

In this web design tutorial, we will learn to create custom image slider above using Photoshop, which you can preview the final result from here. Not only will we illustrate it in Photoshop, we will also turn it into a functional design by converting it into HTML/CSS and adding jQuery for its awesome sliding effect.

Sounds like a lot of complicated bits involved, but in fact it’s pretty straightforward and very easy to understand, let’s get started then!

More interested about adopting an image slider and customize it on the way? Here are posts dedicated for you.

Getting Started

For this tutorial you will need the following resources:

Part I – Designing Image Slider

Step 1: Setting Up Background

Start by creating a new file with size 1000×700 px. Fill background with color #efc89e.

tutorial nivo slider 01 How to Create an Image Slider using Photoshop & jQuery

Add Pattern Overlay using free pixel pattern from PSDfreemium.

tutorial nivo slider 02 How to Create an Image Slider using Photoshop & jQuery

tutorial nivo slider 03 How to Create an Image Slider using Photoshop & jQuery

Step 2: Slider Base

Activate Rectangle Tool. Create a rectangle with size 940×450 px. You can use any color, it doesn’t matter.

tutorial nivo slider 04 How to Create an Image Slider using Photoshop & jQuery

Double click layer to open Layer Style dialog box. Add Layer Style Drop Shadow, Outer Glow, and Stroke.

tutorial nivo slider 05 How to Create an Image Slider using Photoshop & jQuery

tutorial nivo slider 06 How to Create an Image Slider using Photoshop & jQuery

tutorial nivo slider 07 How to Create an Image Slider using Photoshop & jQuery

This is the result. The slider base now has a nice frame with soft shadow behind it.

tutorial nivo slider 08 How to Create an Image Slider using Photoshop & jQuery

Step 3

Add a photo and place it above the slider base. Hit Ctrl + Alt + G to convert it into Clipping Mask and insert the photo into the slider.

tutorial nivo slider 09 How to Create an Image Slider using Photoshop & jQuery

Step 4: Ribbon

Draw a rectangle shape with color #f4e1ae to be used as a ribbon.

tutorial nivo slider 10 How to Create an Image Slider using Photoshop & jQuery

Double click the shape’s layer and activate Bevel and Emboss, Gradient Overlay, and Pattern Overlay with following settings.

tutorial nivo slider 11 How to Create an Image Slider using Photoshop & jQuery

tutorial nivo slider 12 How to Create an Image Slider using Photoshop & jQuery

tutorial nivo slider 13 How to Create an Image Slider using Photoshop & jQuery

This is the result after adding Layer Styles.

tutorial nivo slider 14 How to Create an Image Slider using Photoshop & jQuery

Step 5

Let’s add paper texture onto the ribbon to make it more realistic. Place texture on top of the ribbon shape. Convert it to Clipping Mask by pressing Ctrl + Alt + G.

tutorial nivo slider 15 How to Create an Image Slider using Photoshop & jQuery

Step 6

Let’s paint some shadows and highlights onto the ribbon. Create new layer above the ribbon. Paint black on lower part of the ribbon. Convert it to Clipping Mask (Ctrl + Alt + G) and then reduce its Opacity to 10%.

tutorial nivo slider 16 How to Create an Image Slider using Photoshop & jQuery

Step 7

Repeat previous process to upper part of the ribbon. But this time, add highlight by painting white and then reduce its Opacity to 50%.

tutorial nivo slider 17 How to Create an Image Slider using Photoshop & jQuery

 

Step 8: Stitches

Activate Pencil Tool. Hit F5 to open Brush setting. Set brush size to 1 px and increase the spacing until we get a dotted line on the preview area.

tutorial nivo slider 20 How to Create an Image Slider using Photoshop & jQuery

Step 9

Draw 1 px black line on top of the ribbon. Reduce its Opacity to 20%. Duplicate layer by pressing Ctrl + J. Hit Ctrl + I to invert its color. Increase Opacity to 50%. Activate Move Tool and then press down arrow and left arrow once to nudge it.

tutorial nivo slider 21 How to Create an Image Slider using Photoshop & jQuery

Here’s the result viewed at 100% magnification.

tutorial nivo slider 22 How to Create an Image Slider using Photoshop & jQuery

Step 10

Repeat this process to draw other stitches on another side of the ribbon.

tutorial nivo slider 23 How to Create an Image Slider using Photoshop & jQuery

Step 11: Add Ornate Shape

Set foreground color to gray. Use soft brush with size 1 px to draw an ornate shape. Be creative, you can use any shape you like. Next to it, draw a 1 px line and then erase its outer edge using a soft Eraser Tool. Duplicate the line, flip it horizontally, and place it on the other side.

tutorial nivo slider 18 How to Create an Image Slider using Photoshop & jQuery

Step 12

Select all ornate layers and merge it into one layer by pressing Ctrl + E. Duplicate shape and then place it under the original ornate shape. Hit Ctrl + I to invert its color. Activate Move Tool and then press down arrow once to nudge it 1 px down.

tutorial nivo slider 19 How to Create an Image Slider using Photoshop & jQuery

Step 13: Photo Information

Type photo data inside the ribbon.

tutorial nivo slider 24 How to Create an Image Slider using Photoshop & jQuery

Step 14: Navigation

Next, we’ll draw some circles for slide navigation. Draw a circle shape with color: #8d877c on lower part of the ribbon.

tutorial nivo slider 25 How to Create an Image Slider using Photoshop & jQuery

Add Inner Shadow using following settings.

tutorial nivo slider 26 How to Create an Image Slider using Photoshop & jQuery

This is the result. The circle is turning into a shallow hole now.

tutorial nivo slider 27 How to Create an Image Slider using Photoshop & jQuery

Step 15

Hold Alt and then drag circle shape layer to duplicate it.

tutorial nivo slider 28 How to Create an Image Slider using Photoshop & jQuery

Step 16

Let’s set active condition on one of these links. Select one of the circle and change its color to #bebbb5. Add Inner Shadow, Gradient Overlay, and Stroke.

tutorial nivo slider 29 How to Create an Image Slider using Photoshop & jQuery

tutorial nivo slider 30 How to Create an Image Slider using Photoshop & jQuery

tutorial nivo slider 31 How to Create an Image Slider using Photoshop & jQuery

tutorial nivo slider 32 How to Create an Image Slider using Photoshop & jQuery

Step 17

Hold Ctrl and then click on the ribbon base thumbnail in the Layers Panel. Create new layer under the ribbon and fill it with black. Activate Move Tool and hit left and down arrow a few times.

tutorial nivo slider 33 How to Create an Image Slider using Photoshop & jQuery

Step 18

Soften it by performing Gaussian Blur filter. Click Filter > Blur > Gaussian Blur.

tutorial nivo slider 34 How to Create an Image Slider using Photoshop & jQuery

Step 19

Place ribbon shadow above slider frame layer. Convert it to Clipping Mask by pressing Ctrl + Alt + G.

tutorial nivo slider 35 How to Create an Image Slider using Photoshop & jQuery

Step 20

Reduce shadow Opacity to 40%.

tutorial nivo slider 36 How to Create an Image Slider using Photoshop & jQuery

Step 21

Paint ribbon shadow on background. Reduce its Opacity to 20%.

tutorial nivo slider 37 How to Create an Image Slider using Photoshop & jQuery

Step 22

Use Pen Tool to draw back part of the ribbon. Set its color to #b68f63. Place it behind the slider.

tutorial nivo slider 38 How to Create an Image Slider using Photoshop & jQuery

This is the result viewed at 100% magnification.

tutorial nivo slider 39 How to Create an Image Slider using Photoshop & jQuery

Step 23

Duplicate the shape we have just created and place it behind the top of the ribbon. Flip it vertically.

tutorial nivo slider 40 How to Create an Image Slider using Photoshop & jQuery

Step 24: Final Result in Photoshop

This is our final result in Photoshop. Next, we will continue to code it into a functional slider.

tutorial nivo slider 41 How to Create an Image Slider using Photoshop & jQuery

Part II – Converting Into HTML/CSS

Step 25 – Setting Up Files

Create a new folder called My-Photo-Slider. Inside this folder, create a new blank HTML document (index.html), blank stylesheet (style.css),
and folder for images (img). We also need to include jQuery library and Nivo Slider plugin to the folder. As we use HTML5 markup, we need to add an IE hack to enable HTML5 elements on IE 8 or below. We’ll use a script called Modernizr to accommodate IE.

tutorial nivo slider 42 How to Create an Image Slider using Photoshop & jQuery

Step 26 – Basic HTML Markup

Open index.html in your favourite code editor. Define the DOCTYPE (we use HTML5), head elements (where we
add the title of the documents and link CSS and JavaScript (jQuery Library, Nivo Slider, and Modernizr). We also add a div wrapper
(to center the layout), header element, and slide wrapper.

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta name="author" content="Aris FM" />
		<meta charset="UTF-8" />
		<title>My Photo Slides</title>
		<link href="style.css" media="screen" rel="stylesheet" type="text/css"/>
		<script src="jquery-1.6.1.min.js" type="text/javascript"></script>
		<script src="jquery.nivo.slider.pack.js" type="text/javascript"></script>
		<!--[if IE]>
			<script src="modernizr-2.0.min.js"></script>
		<![endif]-->
	</head>

	<body>
		<div id="pagewrap">
			<header>
			</header>
			<div id="slidewrap">
			</div>
		</div>
	</body>
</html>

Step 27 – Slice PSD

Open the PSD mockup and slice out all of the necessary images. For the picture, let’s grab following pictures from sxc.hu (login required, if you don’t have an account yet,
you can sign up for free). Resize all images to 920×430 px. Put all the images into the image folder (img).

  1. Rinjani by Ciaciya
  2. Stupa by Agnes Sim
  3. Tally by Nino Satria
  4. Offerings by Timo Balk
  5. Uluwatu-Bali by Aris Wjay

tutorial nivo slider 43 How to Create an Image Slider using Photoshop & jQuery

Step 28 – Create Header

Add these following code between <header> and </header>.

<h1>
	<a>My Photo Slides</a>
</h1>

Now let’s add style to the header. We also add the style for the body and wrapper elements. Put all styles into the stylesheet, style.css.

/* Basic Styling */
body {
	background:transparent url(img/bg.jpg);
	font:15px/2 'Adobe Caslon Pro', Georgia, Serif;
	margin:0;
	padding:0;
}
a {outline:0 none}
#pagewrap {
	margin:120px auto;
	padding:0;
	position:relative;
	height:100%;
	width:960px;
}
header {
	display:block;
	float:right;
	margin-right:40px;
	width:192px;
	z-index:52;
	position:relative;
}
h1 {
	background:transparent url(img/separator.png) no-repeat center bottom; /* Add a separator line below the title */
	font-size:18px;
	font-weight:bold;
	height:70px;
	line-height:1.1;
	margin:55px 10px 0;
	text-align:center;
	text-transform:uppercase;
}

Step 29 – Add Photo Slider

Now we’re going to add code to main part of our document, the photo slider. Let’s add the photos first. Place these following code between <div id="slidewrap"> and </div>.

<div id="slider">
	<img alt="Gallery Picture" title="#caption1" src="img/sample.jpg" />
	<img alt="Gallery Picture" title="#caption2" src="img/sample1.jpg" />
	<img alt="Gallery Picture" title="#caption3" src="img/sample2.jpg" />
	<img alt="Gallery Picture" title="#caption4" src="img/sample3.jpg" />
	<img alt="Gallery Picture" title="#caption5" src="img/sample4.jpg" />
	<img alt="Gallery Picture" title="#caption6" src="img/sample5.jpg" />
</div>

And then add the ribbon and the caption for the photos.

<div class="ribbon"></div>

<div id="caption1" class="nivo-html-caption">
	<span class="title">Photographer:</span><br/>
	Enrico Nunziati<br/>
	<span class="title">Location:</span><br/>
	Namib desert<br/>
	<span class="title">Model:</span><br/>
	Dead Vlei<br/>
	<span class="title">Date:</span><br/>
	Mar 18, 2011
</div>

<div id="caption2" class="nivo-html-caption">
	<span class="title">Photographer:</span><br/>
	Lina Dhammanari<br/>
	<span class="title">Location:</span><br/>
	Lombok Island, Indonesia<br/>
	<span class="title">Model:</span><br/>
	Mount Rinjani<br/>
	<span class="title">Date:</span><br/>
	May 8, 2008
</div>

<div id="caption3" class="nivo-html-caption">
	<span class="title">Photographer:</span><br/>
	Agnes Sim<br/>
	<span class="title">Location:</span><br/>
	Borobudur, Indonesia<br/>
	<span class="title">Model:</span><br/>
	Big Stupa<br/>
	<span class="title">Date:</span><br/>
	Jun 12, 2008
</div>

<div id="caption4" class="nivo-html-caption">
	<span class="title">Photographer:</span><br/>
	Nino Satria<br/>
	<span class="title">Location:</span><br/>
	Taman Safari Indonesia<br/>
	<span class="title">Model:</span><br/>
	Tally Giraffe<br/>
	<span class="title">Date:</span><br/>
	Aug 16, 2009
</div>

<div id="caption5" class="nivo-html-caption">
	<span class="title">Photographer:</span><br/>
	Timo Balk<br/>
	<span class="title">Location:</span><br/>
	Ubud, Bali, Indonesia<br/>
	<span class="title">Model:</span><br/>
	Offerings<br/>
	<span class="title">Date:</span><br/>
	Dec 20, 2009
</div>

<div id="caption6" class="nivo-html-caption">
	<span class="title">Photographer:</span><br/>
	Aris Wjay<br/>
	<span class="title">Location:</span><br/>
	Uluwatu-Bali<br/>
	<span class="title">Model:</span><br/>
	Beautiful Beach<br/>
	<span class="title">Date:</span><br/>
	Jul 20, 2011
</div>

Now, if we open index.html in the browser, we have something like this:

tutorial nivo slider 44 How to Create an Image Slider using Photoshop & jQuery

Step 30

We still need to fix the slider’s appearance using CSS.

#slidewrap {position:absolute;}
#slider {
	position:relative;
	height:auto;
	width:920px;
	border:10px solid #fff;
	box-shadow:0 0 5px #444;
	margin:10px;
}
.ribbon {
	background:transparent url(img/info-bg.png) no-repeat;
	height:482px;
	width:192px;
	position:absolute;
	right:40px;
	top:-3px;
	z-index:50;
}
#slider img {
  position:absolute;
  top:0px;
  left:0px;
  display:none;
}

This is what we have now.

tutorial nivo slider 45 How to Create an Image Slider using Photoshop & jQuery

Currently, we have linked Nivo slider plugin but we haven’t hooked up the script. So let’s hook up the script by adding these JavaScript functions between <head> and </head> element.

<script type="text/javascript">
$(window).load(function()  {
$('#slider').nivoSlider();
});
</script>

Step 31: Slider Style

The final step is adding the style of the slider.

/* The Nivo Slider styles */
.nivoSlider  {
	position:relative;
}
.nivoSlider img  {
	position:absolute;
	top:0px;
	left:0px;
}
/* If an image is wrapped in a link */
.nivoSlider a.nivo-imageLink  {
	position:absolute;
	top:0px;

	left:0px;
	width:100%;
	height:100%;
	border:0;
	padding:0;
	margin:0;
	z-index:6;
	display:none;
}
/* The slices and boxes in the Slider */
.nivo-slice  {
	display:block;
	position:absolute;
	z-index:5;
	height:100%;
}
.nivo-box  {
	display:block;
	position:absolute;
	z-index:5;
}
.nivo-directionNav {display:none!important}
.nivo-html-caption  {
  display:none;
}
.nivo-caption {
	position:absolute;
	right:20px;
	text-align:center;
	top:130px;
	width:192px;
	z-index:60;
}
.nivo-caption p {margin:0}
.nivo-caption .title {font-style:italic}
.nivo-controlNav {
	position:absolute;
	bottom:10px;
	right:20px;
	height:15px;
	width:192px;
	text-align:center;
	display:block;
	z-index:51;
}
.nivo-controlNav a {
	background:transparent url(img/button.png) no-repeat center center;
	display:inline-block;
	height:14px;
	width:14px;
	text-indent:-9999px;
	cursor:pointer;
}
.nivo-controlNav .active {
	background:transparent url(img/button_active.png);
}

Final Result + Download

This is our final result, click here to see the working demo.

tutorial nivo slider 46 How to Create an Image Slider using Photoshop & jQuery

Can’t achieve certain step? Here are the result’s PSD file & complete project for you to test and play with.

How to Display/Update “Facebook Likes” Using Node.js

By working out the sample codes from the previous post, you might got the feeling of what is the actual benefit of using Node.js. In today’s post, we throw in a practical script that clearly demonstrates the use of Node.js in event-based programming.

node js How to Display/Update Facebook Likes Using Node.js
(Image Source: node.js)

We’ll be creating a simple script that outputs the number of "Facebook likes" of a particular Facebook page. And on top of that, we’ll throw in an additional feature that will update the number of "Facebook likes" every 2 seconds.

The output will be simple and plain, probably looks something like this: "Number of Likes: 2630405" and it is up to you to style it using the CSS, let’s get started then!

To Give You An Idea

Before we dive into using Node.js, let’s take a moment to think what we’d normally do it with common server-side programming languages (like PHP). If you are thinking to make an AJAX call to find the number of likes in every 2 seconds – you are correct – but this may potentially increase the server overhead.

multi threaded execution How to Display/Update Facebook Likes Using Node.js

We can consider accessing graph.facebook.com which would be a time-consuming I/O operation. Consider 5 users accessing the same page (which outputs the number of likes). The number of access to graph.facebook.com in 2 seconds will become 10, because everyone will update his/her number of likes once in 2 seconds and it will be executed as a separate thread.

event based execution How to Display/Update Facebook Likes Using Node.js

That’s not necessary with a Node.js server implementation. Only one access to the Facebook server is required and the time to get and output the result (number of likes) can be greatly reduced.

However, how are we going to implement this? That’s what we are going to find out in the sections below.

Getting Started

Before we start, your should have Node.js installed and running on a v8 environment-supported web hosting account. Check out the topics, "Getting started with Node.js" and "Installing Node.js" in our previous article, Beginner’s Guide to Node.js if you haven’t.

In the server we access graph.facebook.com at an interval of 2 seconds and update the number of likes. Let’s call this as "ACTION1". We will prepare a page so that it will update itself via AJAX every 2 seconds.

Consider many users accessing the same page. For every user’s AJAX request an event listener is attached in the server for the completion of "ACTION1". So whenever the "ACTION1" is completed the event listeners will be triggered.

Let’s take a look at the server-side’s code.

The codes:

var facebook_client = my_http.createClient(80, "graph.facebook.com");
var facebook_emitter = new events.EventEmitter();
function get_data() {
	var request = facebook_client.request("GET", "/19292868552", {"host": "graph.facebook.com"});
	request.addListener("response", function(response) {
		var body = "";
		response.addListener("data", function(data) {
			body += data;
		});

		response.addListener("end", function() {
			var data = JSON.parse(body);
			facebook_emitter.emit("data", String(data.likes));
		});
	});
	request.end();
}
my_http.createServer(function(request,response){
	var my_path = url.parse(request.url).pathname;
	    if(my_path === "/getdata") {
			var listener = facebook_emitter.once("data", function(data) {
				response.writeHeader(200, { "Content-Type" : "text/plain" });
	    		response.write(data);
	    		response.end();
			});
		}
	    else {
	    	load_file(my_path,response);
	    }
}).listen(8080);
setInterval(get_data,1000);
sys.puts("Server Running on 8080");

Codes Explanation:

var facebook_client = my_http.createClient(80, "graph.facebook.com");
var facebook_emitter = new events.EventEmitter();

We create a HTTP client to access Facebook Graph API’s facebook_client. We also need the EventEmitter() function which will trigger when the "ACTION1" has completed.

This will be clear in the code described below.

function get_data() {
	var request = facebook_client.request("GET", "/19292868552", {"host": "graph.facebook.com"});
	request.addListener("response", function(response) {
		var body = "";
		response.addListener("data", function(data) {
			body += data;
		});

		response.addListener("end", function() {
			var data = JSON.parse(body);
			facebook_emitter.emit("data", String(data.likes));
		});
	});
	request.end();
}

Function get_data fetches data from the Facebook API Call. We first create a GET request using the request method of the following syntax:

Client.request('GET','get_url',{"host":"host_url"});

The number “19292868552” is the Facebook ID of the page which we need to access its details. So the final page we are trying to access becomes: http://graph.facebook.com/19292868552. After making the request we need to add three listeners to it, respectively the following:

  1. Response – This listener is triggered when the request starts receiving data. Here we set body of the
    response to an empty string.
  2. Data – As Node.js is asynchronous the data is received as chunks. This data is added into the body
    variable to build up the body.
  3. End – This listener is triggered when the "ACTION1" specified above has completed. The data returned by the Facebook Graph API call returns data in JSON format. So we convert the string to JSON array using the JavaScript function JSON.parse.

You can see that a listener is attached for the event_emitter object. We need to trigger it at the end of the "ACTION1". We trigger the listener explicitly with the method facebook_emitter.emit.

{
   "id": "19292868552",
   "name": "Facebook Platform",
   "picture": "http://profile.ak.fbcdn.net/hprofile-ak-ash2/211033_19292868552_7506301_s.jpg",
   "link": "https://www.facebook.com/platform",
   "likes": 2738595,
   "category": "Product/service",
   "website": "http://developers.facebook.com",
   "username": "platform",
   "founded": "May 2007",
   "company_overview": "Facebook Platform enables anyone to build social apps on Facebook and the web.",
   "mission": "To make the web more open and social.",
   "parking": {
      "street": 0,
      "lot": 0,
      "valet": 0
},

The above represents the response of the Facebook Graph API call. In order to get the number of likes: take the likes object of the data object, convert it to string and pass it to emit function.

After this action we end the request.

my_http.createServer(function(request,response){
	var my_path = url.parse(request.url).pathname;
	    if(my_path === "/getdata") {
			var listener = facebook_emitter.once("data", function(data) {
				response.writeHeader(200, { "Content-Type" : "text/plain" });
	    		response.write(data);
	    		response.end();
			});
		}
	    else {
	    	load_file(my_path,response);
	    }
}).listen(8080);
setInterval(get_data,1000);

Creating the server is similar to the previous tutorial – with a small change. For every URL (except /getdata) we load the corresponding static file using the load_file function we defined earlier.

The http://localhost:8080/getdata is the URL for the AJAX request. In each AJAX request we attach an event listener to facebook_emitter. It is similar to the addListener but the listener is killed after the listener is emitted to avoid a memory leak. If you need to check it out just replace the once with addListener. We also call the get_data function once in 1 second by the function setInterval.

Next, we create the HTML page where the output displays.

The codes:

<!DOCTYPE html>
<html>
	<head>
		<title>Facebook Likes</title>
		<link rel='stylesheet'>
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
	</head>
	<body>
		<p>Number of Likes : <b id="content_area">Loading...</b></p>
		<script type="text/javascript">
			var content_area = $("#content_area");
			function load_content() {
				$.get("/getdata", function(data) {
					content_area.html(data);
					load_content();
				});
			}
			load_content();
		</script>
	</body>
</html>

Codes Explanation:

The jQuery AJAX part is pretty self-explanatory. Do check out the call of the load_content function. It looks like it is running an infinite loop, and yes it is. That’s how the number of likes gets updated itself.

Each AJAX call will be delayed by the average time of 1 second as the delay in triggering of each such call will be 1 second from the server. The AJAX request will be in an incomplete form for that 1 second.

So there you go – a method of delaying an AJAX response from the server to get the number of Facebook likes. Drop question in our comment section if you have any doubt or thought, thanks!

Beginner’s Guide to iOS Development: The Interface – Part I

Apple has been a leading industry in the mobile world for years with its iPhone and iPad series. Despite the hype it can create with every official release like iOS 5, it’s also holding a large portion of market shares in the mobile platform, and this is probably the reason that most clients will want their app to exist in the Apple’s app store, thus becoming the reason for developers to learn and build the iPhone app.

xcode Beginners Guide to iOS Development: The Interface   Part I
(Image Source: Apple Developer)

The good news is, iPhone application development is not as hard as you might think, and this post exists as a comprehensive guide to walk you through the complete process of building an application for iPhone. We’ll be discussing the reasons, phases, and tools for developing the app, and ultimately you will follow an easy tutorial to design the basic iPhone application using the Xcode 4.2.

So whether you’re learning for business or you just have an amazing app idea that might make you a millionaire, let’s get started on building your first iPhone app!

Note: You will need a computer with Macintosh Operating System (Mac OS) for Xcode installation, application development and app submission, there’s no way you can do it on Windows legally.

Why Develop for Apple?

I see this question asked frequently so I want to explain why you should be interested in iPhone development. Just like I’ve stated in the introduction, iPhone currently holds a large portion of market shares in the mobile platform. I think this reason should be enough for you to learn to develop the iPhone application as whether you’re developing for yourself or clients, most people probably hope their app can be accessed by many people in the world.

apple developer Beginners Guide to iOS Development: The Interface   Part I

From the viewpoint of development, Apple likes things simple, and this applies to their products and frameworks. iOS is the operating system which powers all Apple’s mobile devices. These include iPod Touch, iPhone, and iPad. So keep in mind when you’re developing apps for iPhone, you could be developing for all of other devices with the iOS!

Besides, what makes the above feature even greater is how much the coding work can be saved. When you write code for iPhone application you’re using the same programming language for all Apple’s computing devices. That means when you’re developing the iPhone application, the app can later be integrated into iPad and even Mac.

Objective-C is the core programming language powering all of their frameworks. Along with Objective-C, you will also develop iPhone app with the Cocoa Touch, the programming framework driving user interaction on iOS.

This is all just a bit of information to get you started on iPhone app development. The development is quite a complicated process but relax, take it slowly. So the reasons are here, and the decision is yours. Whether the answer is yes or not, you can always hop right into the next topic: designing apps for iPhone.

Planning your iPhone App Structure

In the standard ideology of creating an iPhone app you’ll want to go through a few phases. The first phase includes planning and sketching. First of all you need to have an idea for what your app is going to do. Why would people want to download it? And what features do you want to include? This is the most important phase as if you do it right, you’ll save a lot of confusion and troubles in the coding phase. Worst, it gets you back to the drawing board.

sketching Beginners Guide to iOS Development: The Interface   Part I
(Image Source: Cultured Code)

I recommend to sketch some rough ideas for a few pages (or views) of your application. Just draw a rectangle shape, maybe 5 or 6 shapes on a sheet of paper, then draw the features you want on each view of your app. You can think of views like different pages in a website. Each view will offer different functionality such as a login form, a list of contacts, or a table of data.

Below I’ve constructed a brief collection of the different UI bar elements:

  • Status Bar – Displays device’s current battery level, 3G connection, bars of reception, phone carrier, and a whole lot more. It’s recommended that you always include these elements.
  • Navigation Bar – Gives your users the option to navigate between page hierarchies. This often includes a button on the left side of the bar to enable the user to return to the previous app view.
  • Toolbar – Appears at the bottom of the iPhone app. This will hold a few icons tied to some functions such as Share, Download, Delete, etc.
  • Tab Bar – Very similar to the toolbar, except now you’re working with tabs. When a user clicks on a tab icon it’ll automatically be highlighted, and it’ll display a glossy hover state. This bar is used to switch between views instead of offering direct functionality.

This list only contains the toolbars you could find in most apps. There are some other views and styles to consider, which you can find them in Apple’s iOS UI Element Usage Guidelines. I highly recommend to refer to this documentation when you have doubts about iPhone’s UI elements.

In the interest of time I won’t be describing every UI element. There are too many elements to consider, and you won’t end up using all of them in your single app. But as you sketch out your views, you can draw inspiration from the guidelines suggested above, and other iPhone apps you’ve enjoyed using them.

Designing Photoshop Mockups

I’m assuming most of you are fairly comfortable working with Adobe Photoshop. It is the premiere software for creating graphics for website, banners, logos, and mobile mockups. Designing graphics for the web is a fairly straightforward process, but it’s a bit more complicated when it comes to iPhone app design. If you’re looking to build an app you really should create pixel-perfect mockup designs from the start.

photoshop mockup Beginners Guide to iOS Development: The Interface   Part I

To begin, we should discuss Photoshop settings. Since we’re designing for iPhone we need to consider 2 different design styles. The regular iPhone display is 320 x 480 pixels. However the iPhone 4 includes a retina display which doubles the amount of pixels within the same screen size. So you should double the resolution to 640 x 960 pixels and design your layouts to this standard.

This means you will also need to create 2 sets of icons for your mockups. Originally icons would be set to 163ppi but you’ll need to include icons with 326ppi for iPhone 4. The icons are traditionally marked with @2x at the end of their file’s name, such as “icon@2x.png“. To learn a bit more about this I recommend Smashing Magazine’s article, iPhone 4 Retina Display: Techniques and Workflow. It includes some great tips for Photoshop users to build and scale icons properly.

Now let’s optimize our new document settings. First we’ll need to edit some preferences, so access to Photoshop > Edit > Preferences > Guides, Grid and Slices. We’ll be setting our Gridline every 20px with subdivisions at 2. When designing for retina display 2px line will display 1 point on the screen. This is an important rule you need to keep in mind for scaling down your app.

I tend to find it easier to build my designs with higher resolution then scale them down, but you can try both methods and see what fits you best. We’re using 640 x 960 pixels at 326ppi – save this as a custom preset if you think you’ll use it frequently.

Building with Template Elements

Now you can use the Photoshop to create a pixel-perfect layout on your own, but this proves to be a very exhausting and tedious work. I will recommend the iPhone 4 GUI PSD by Teehan+Lax. It includes all of the design resources you need to build any standard iPhone app layout. After the download finishes, unzip your new file to get the PSD file, and just open it with Photoshop.

iphone 4 gui Beginners Guide to iOS Development: The Interface   Part I
(Image Source: Teehan+Lax)

This is a huge file with just too many elements. To make things easier you can press v activate the Move Tool and click on the “Auto-Select” on its option bar, then select the “Layer” rather than “Group”. With the settings, you can click on any element and Photoshop will bring you to its corresponding layer!

Feel free to play around with the mockup, or you can even create your application’s prototype from the mockup. Depending on your app you could include a slew of features within the core area, many of which you could find in this PSD file. It’s also possible to go to these elements’ layers and edit the fonts, gradient colors, and other design styles as well. Just make sure you don’t resize anything since all the bars and UI elements are set to default standard sizes.

Developing Apps in Xcode

The developer tool for iOS and Mac OS X programming is named as Xcode. If you’re running OS X Lion you can find Xcode and all applicable packages for free in the Mac App Store.

single view application Beginners Guide to iOS Development: The Interface   Part I

After the installation is completed, launch the Xcode and its welcome screen should come up. From here you can load an older project or choose to make a new one. For now you need to click “Create a new Xcode project“, then the template window will come up with a few options. Under iOS > Application, click on “Single View Application” and hit “Next”. You can give the new app a name, such as Test (preferably no spaces), then on the Company Identifier, type in any word such as mycompany, and finally pick a directory and hit “Save”.

Xcode will build the file directory and send you into a new window for working. You should see a lot of file options listed, but the folder which is named after your application is the primary focus.

storyboard Beginners Guide to iOS Development: The Interface   Part I

With the new Xcode 4.2 you have two options for designing front end elements. The classic xib/nib format is standard to Mac OS X and iOS apps, which requires you to design a new page view each time. However, as you are creating more views in a single app the amount of nib files can become far too overwhelming, so a new storyboard file holds all of your nib views in a single editor pane. From here you can remove and add UI elements and features with ease.

Additionally you’ll come across .h and .m files in the same folder group. These are short filenames for header and implementation code. These files are where you write all the Objective-C functions and variables required for your app to run. It may be a good idea to explain how Xcode works with MVC (Model, View, Controller), which is the reason that we need 2 files for each controller.

MVC Programming Hierarchy

To understand how the app works you’ll need to understand its programming architecture. With Model, View, Controller (MVC) as a foundation, Xcode can separate all of your displays and interface code from your logic and processing functions, and there isn’t really another option to choose. MVC may seem confusing at first but if you tried to understand it and start building a few basic apps you’ll come to love the structure.

model view controller Beginners Guide to iOS Development: The Interface   Part I
(Image Source: Esri)

To make it easier to understand, I’ve presented each object in the list below:

  • Model – Holds all of your logic and core data. This includes variables, connections to external RSS feeds or images, detailed functions, and number crunching. This layer is completely detached from your views so that you could easily change views and still have the same data working.
  • View – A screen or display style in your application. A table list, profile page, article summary page, audio player, video player, these are all examples of views. You can change their styles and remove elements but you’ll still be working with the same data in your Model.
  • Controller – Acts as an intermediary between the other two. You connect objects in your view to a ViewController which passes the information to and from your Model. So in this way it’s possible to have a user tap on a button and register this in your model. Then run a log out function and through the same controller pass a message “successfully logged out!”.

So basically your model holds all the information and functions that you’ll need to display somewhere onscreen. But models cannot interact with the screen, only views can. Views are mostly all visuals, and it can only pull data through a ViewController. The Controller is actually a much more refined way of hiding your back end data from the front end design. In this way you can renovate the design several times over while not losing any functionality.

With this knowledge it shouldn’t be hard to begin building your first few apps. As mentioned earlier, Objective-C is the core programming language you’ll be using to develop the app. It’s built on the C language with updated syntax and a few additional paradigms. You’ll need a lot of time to get familiar with the language, but for the beginner lesson I recommend the tutorial series from Mobiletuts+.

Design View with iOS 5 Storyboards

Now that we’ve looked into the technical aspects of an application, we should spend a bit of time designing the interface. I’m assuming that you’ve kept the “Storyboard” option checked when creating the project, which means you can find a single MainStoryboard_iPhone.storyboard file somewhere in the folder group located on the left side of the window. Click on the file to select it and open the view.

storyboard Beginners Guide to iOS Development: The Interface   Part I

A new sidebar should appear directly to the right of the folder group. This is called the Document Outline and it’s a sort of quick preview method for checking all of the available views in this storyboard.

status bar Beginners Guide to iOS Development: The Interface   Part I

We want to start by adding just a few page elements into our view controller. We need two different elements: a Navigation Bar and a Tab Bar. Before we grab them, access to the Attributes Inspector (View > Utilities > Show Attributes Inspector) on the right side of the window, then look for the Status Bar label. By default it’s set to Inferred which uses the standard iPhone status color, but you can also choose Black or Translucent Black if your app design fits the color better.

The Objects Library

If the Utilities pane at the right side of the window isn’t visible, you can enable it by access to View > Utilities > Show Utilities. On the Utilities pane, look at the bottom for a panel called Object Library. It got a drop-down menu with the “Objects” as the first item of the list. If you couldn’t find it, you can select View > Utilities > Show Object Library.

navigation bar Beginners Guide to iOS Development: The Interface   Part I

From the drop-down menu of the Object Library, find and select Windows & Bars. Now click on the Navigation Bar, drag it into the view window and position it directly under the black Status Bar (with a battery icon). We can customize the bar’s title description now. Double click on the text which currently reads “Title“, and you will see a label named “Title” on the Utilities pane, which you can change the title description to “Test” from there. Hit “Enter” to witness the change.

tab bar Beginners Guide to iOS Development: The Interface   Part I

Again in the Windows & Bars panel, scroll down to find the Tab Bar, then drag it into the view window and place it at the very bottom of your app. By default these 2 elements look fantastic.

black opaque style Beginners Guide to iOS Development: The Interface   Part I

Now maybe you want the Navigation Bar’s gradient to match the tab bar at the bottom, and to do this you can click on the Navigation Bar and look to the right at Attributes panel in Utilities pane. The very first option is called Style, which is set to Default. Change the Style from Default to Black Opaque and we’ll have a matching color set!

bookmark tab Beginners Guide to iOS Development: The Interface   Part I

Let’s also add another tab button in the bottom bar of the app. Move your mouse cursor to the Windows & Bars panel again and scroll down to Tab Bar Item, directly underneath Tab Bar. Drag this into your app window and place it in the middle of the 2 existing Tab Bar buttons. If you double click on this new button you can see some additional options in the Utilities pane, you change the item’s image and title from there. For example, I have changed the title to “Bookmark” for the newly added Tab Bar item.

So this is a brief tutorial on designing views within Xcode. It’s not a terribly difficult process, but it will require a bit more time to get used to the interface. Play with a few more elements if you feel comfortable, also you can head to Apple’s iOS Development Resources for more learning resources, it’s never a bad thing to discover more!

Stay Tuned for Part II

This concludes our first part of the guide for iPhone app design & development. In the next part we’ll delve a bit deeper into Objective-C and Cocoa Touch, and you’ll ultimately learn to build a functioning iPhone app, stay tuned!

iOS Design Gallery

For designers out there I’m also hoping to bring you some inspiration, so I’ve included a list of awesome iPhone app views below. The list features a large variety of inspiring app elements which you have probably never noticed before. Feel free to share your ideas, app views or questions in the comment section below, thank you!

Race Splitter

race splitter Beginners Guide to iOS Development: The Interface   Part I

Satisfaction Remote

satisfaction remote Beginners Guide to iOS Development: The Interface   Part I

Tweetbot for iPhone

tweetbot Beginners Guide to iOS Development: The Interface   Part I

Reeder

reeder Beginners Guide to iOS Development: The Interface   Part I

Foursquare

foursquare Beginners Guide to iOS Development: The Interface   Part I

MailChimp

mailchimp Beginners Guide to iOS Development: The Interface   Part I

Instagram

instagram Beginners Guide to iOS Development: The Interface   Part I

Joystiq

joystiq Beginners Guide to iOS Development: The Interface   Part I

Piictu

piictu Beginners Guide to iOS Development: The Interface   Part I

Darkness

darkness Beginners Guide to iOS Development: The Interface   Part I

Forrst API Tutorial — Pt II


This is a follow up tutorial to the Forrst User API Tutorial – Pt. 1 and will teach you how to grab the posts for a forrst user.
As of April 2011 this still works, but may change as their API is still being developed and in this case we are scraping the user’s profile page to generate some useful arrays that we then place into a custom template.
We will use the API V2, which returns the data in JSON format, which we then use json_decode on. In case the API fails or your server does not have json support setup for PHP, we have a backup Simple HTML DOM script by S.C. Chen to convert the user’s Posts page into a data object from which we then grab the individual posts. This DOM script only grabs public posts as it gets only displayed posts on the public profile.

You can use this to generate your own custom profile pages with Forrst data, and it’s easy to combine with the previous user data tutorial.

Instead of using file_get_contents we use Curl to grab the data in this one and that can easily be transplanted into the previous tutorial as well.



Clicking the above image will take you to a demo using the code explained below.

Resources

Active Usernames from Forrst by forsst.com

Simple HTML Dom Script by S.C. Chen

How to Grab Forrst User Posts

At this time the Forrst API does not have a search call for filtering posts, so this script will let you grab the posts for a specific user via their username to display as you see fit.

For the demo I started it with my own, but you can type in any other valid username and see their info as well.

In order to grab the posts data we are using the API V2 which returns the data in JSON format. In case of failuer we fall back to the Simple HTML Dom script which turns the html into an object set. The DOM script is not as complete as the API script but provides enough information for a basic content display.

Issues with the DOM version:
- Actual full post URLs are not links we can grab from the posts list, so we cannot reach those pages without knowing the URLs by manually grabbing them.
- It grabs less fields of data since we are stripping the posts page, so it’s limited opposed to the API V2 version.
- Does not return half the fields the API does. They are explained in the PHP code below.

function get_forrst_posts($username){
	//USE JSON DECODE (Note: Your server must have the json module installed for PHP, or another class emulating it for this to work.
	//Note: I did not use a Class for this as I wanted to embed the DOM solution too and found this was not something you would do in a Class definition.
	$curl = curl_init('http://api.forrst.com/api/v2/users/posts?username='.$username);
	curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
	$response = curl_exec($curl);
	$response = @json_decode($response); //Disable error display with "@" so the DOM method is attempted if JSON fails.

	curl_close($curl);
	if($response->stat!='ok'){
		$usedom=1; // If JSON does not return "ok" (This means, the API failed, or the API call returned fail, or json_decode does not work on this server. So we try the DOM method anyway.
	}else{
		foreach($response->resp as $post){
			//Note: do a print_r on $response to see all the variables. It does also return all the user info, but I find that should not be in the "Posts" call as it's already in the "User" call.
			//To get time ago, take created_at value, break it into pieces, use mktime to generate a unix timestamp from it, pass that to the time_ago function.
			$t1 = explode(' ',trim($post->created_at));
			$d1 = explode('-',$t1[0]);
			$t2 = explode(':',$t1[1]);
			$timestamp=mktime($t2[0],$t2[1],$t2[2],$d1[1],$d1[2],$d1[0]);
			$p['posted'] = time_ago($timestamp);

		    $p['title'] = $post->title;
		    $p['subtitle'] = ($post->url?'<a href="'.$post->url.'">'.$post->url.'</a>':'');
		    $p['description'] = $post->description;
		    $p['content'] = $post->content; // Code and Questions have the content section that essentially gets added into the full article on display.

		    $p['likes'] = $post->like_count;
		    $p['comments'] = $post->comment_count;

		    //The following fields only come from the API and are not available for the DOM solution.
		    $p['created'] = $post->created_at; //instead of days since post (like the DOM request, this returns the time of the post.
		    $p['post_url'] = $post->post_url; // URL to detailed post view on forrst. Not available in DOM result.
		    $p['type'] = $post->post_type; //Determines what var is the article description.
		    $p['published'] = $post->published; //Status var showing if the post is currently published or not. The DOM only sees published posts.
		    $p['public'] = $post->public; //Status var showing if the post is public or not. The DOM only sees public posts.
		    $p['post_url'] = $post->post_url; //Used for the subtitle.
		    $p['formatted_description'] = $post->formatted_description; //HTML version of the description
		    $p['formatted_content'] = $post->formatted_content; //HTML version of the description

		    $ret[] = $p;
		}

		if(count($ret)==0){
	    	return $ret = array('error'=>'No Posts Found');
	    }else return $ret;
	}

	if($usedom){
		// USING THE SIMPLE HTML DOM SCRIPT
		// As you can see above this does not return nearly as much information as the API and should not be used if you have json enabled.
		include_once('simple_html_dom.php');
	    $html = file_get_html("http://forrst.me/".$username."/posts"); //Generate the HTML DOM object.

	    // THIS IS COMPLETELY BASED ON THE CURRENT HTML MARKUP FOR THE POSTS PAGE.
	    // IF THE FORRST MARKUP CHANGES, THIS MUST BE UPDATED TOO.
	    if(count($html->find('div.Post')>0)){
		    foreach($html->find('div.Post') as $post) {
		        $p['posted'] = trim($post->find('div.activity-meta', 0)->plaintext);
		        $p['title'] = trim($post->find('.title', 0)->plaintext);
		        $p['subtitle'] = trim($post->find('.subtitle', 0)->plaintext);
		        $p['description'] = trim($post->find('.description', 0)->plaintext);
		        $p['likes'] = trim($post->find('.likes', 0)->plaintext);
		        $p['comments'] = trim($post->find('.comments', 0)->plaintext);
		        $ret[] = $p;
		    }
	    }else $ret='';
	    $html->clear(); // Clears memory.
	    unset($html);

	    if(count($ret)==0){
	    	return $ret = array('error'=>'No Posts Found');
	    }else return $ret;
	}
}

The function is written to generate a simple array of data. In the demo we only use the fields shared by the API call and the DOM script, but using the API you can generate some additional display data.
By looping through the array you can then generate a display with the data.

The Data Returned:

When the html data is converted into an array, the fields used for our basic display contain the following information:

  • $p['posted'] : How long ago the Post was posted
  • $p['title'] : The Username.
  • $p['subtitle'] : The Name.
  • $p['description'] : The Profile URL for the User.
  • $p['likes'] : The number of Likes for the post.
  • $p['comments'] : The number of comments for the post.

Post Display Manipulation

To display the data in the demo I used some basic html to just output the data to the screen, basic usage of some of the returned user data.
The great thing is that once you have the data array, you can essentially do anything you want with it.
Below follows a display example of the results.

<div id="wrapper">
<div id="result" class="with_bg">
		<span class="posted">posted 4 weeks ago</span>
<h1 class="sh">Freelancer Demotivational Posters</h1>
		<span class="subtitle">http://freelanceswitch.com/humour/de-motivational-posters-for-freelancers/</span>

		Enjoy these posters, a pretty funny find this morning.</div>
</div>
html, body{ width:100%; height:100%; padding:0; margin:0; font-size:12px; font-family: arial, helvetica; background:#162810;}
#wrapper{width:840px; margin:0 auto; padding:20px; background:#EBE9DB; }
.with_bg{ padding:10px; background:#F7F7F7;}
form {width:400px; margin:0 auto; }
h1{ color:#3B3227; }
#result{ width:660px; margin:20px auto; }
.posted{float:right; font-size:11px; color:#999;}
.sh{width:400px;}
.subtitle{color:#333; }

Conclusion

This script will help you grab some Forrst data and create a quick basic profile page with basic post info.

As the API develops we may eventually write a formal API class, though I’m certain the Forrst staff are already working on that.
At this time, I’m hoping this tutorial helps you get started with your Forrst apps/pages.

The full PHP/HTML/CSS source is available here: http://webnuz.com/tutorials/04-03-2011_Forrst_API_Grab_User_Posts/source.txt

You will also need the Simple HTML Dom script, which you can grab here: http://webnuz.com/tutorials/04-03-2011_Forrst_API_Grab_User_Posts/simple_html_dom.txt

Resources – jQuery Tutorials, Resources & Files

There are a large volume of good resource that offer users the ability to implement jquery quickly and easily. Jquery is very straight forward and easy to implement.

What is jQuery

jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.

 

Future of jQuery

Microsoft and Nokia have announced plans to bundle jQuery on their platforms, Microsoft adopting it initially within Visual Studio for use within Microsoft’s ASP.NET AJAX framework and ASP.NET MVC Framework while Nokia has integrated it into their Web Run-Time widget development platform. jQuery has also been used in MediaWiki since version 1.16

 

 

Gallery Plugins

Galleria is a javascript image gallery written in jQuery. It loads the images one by one from an unordered list and displays thumbnails when each image is loaded.

 

PikaChoose is a lightweight jQuery Slideshow plugin allowing for easy presentation of photos with carousels and lightboxes! Pikachoose is designed to be easily installed, easy to setup, and well… all around easy.

 

slideViewer is a lightweight (1.5Kb) jQuery plugin wich allows to instantly create an image gallery by writing just few lines of HTML such as an unordered list of images.

 

Space Gallery is another fancy jQuery photo gallery plugin. click on the image will make it fade away and the next image will move forward.

 

When working my way through a web gallery, I find it annoying when I must change pages; so in today’s tutorial, we will learn how to create an auto-generating, one-page, infinite scrolling gallery with PHP and AJAX. Let’s get started!

 

In this tutorial we are going to create an image gallery with a Polaroid look. We will have albums that will expand to sets of slightly rotated thumbnails that pop out on hover. The full image will slide in from the bottom once a thumbnail is clicked. In the full image view the user can navigate through the pictures or simply choose another thumbnail to be displayed.

 

Galleriffic is a a feature rich , easy to customize and install jQuery plugin that has been optimized to handle a high volume of images while still conserving bandwidth. Its image pre-loading, thumbnail navigation (with pagination) and its integration with both the jQuery.history plugin (supports bookmark-friendly URLs per-image) and jAlbum plugin (thumbnail generation) that truly sets Galleriffic apart from the rest.

 

Now into version its third version, the very inpressive and versatile Supersized is a fullscreen image gallery that resizes images to fill the window browser while maintaining the images dimension ratio, it will cycle the preloaded images with transitions via the slideshow function and you can navigate through the images by using the pause/play and forward/back buttons. Supersized gives the impression of being a desktop application.

 

Tutorials

This tutorials teaches you how to build a simple little tabbed information box in HTML, then make it function using some simple Javascript, and then finally we’ll achieve the same thing using the jQuery library.

 

In this tutorials you’ll learn how to create an AJAX-powered tab page with CSS3 and jQuery.

 

Sam Dunn teaches us how to create animated curtains – with a bouncing rope when they open very neat stuff.

 

One struggle that still remains today in web design is displaying all of the redundant information on every page. For example, a login form. What if there was a way to easily make the content accessible on every page, but keep it hidden until needed? Well you can, by making a top panel that when clicked, will reveal its self and its content. But we need to make this look nice, so we’ll also animate it.

 

I know there are a lot of toggle tutorials out there already, but when I was learning the basics of jQuery and the toggle effect, I had a hard time finding resources on how to switch the “open” and “close” graphic state.

 

So today’s article will focus on getting data from a database using PHP, converting that to an XML document, and reading that XML in through jQuery via Ajax calls. Seems complex, but is in fact, very easy.

 

In this tutorial you’re guided through how to get started using jQuery inside the Google Maps environment. You can create amazing mashups and creative designs with a simple connecting to the Google Maps API.

 

Interesting & Useful Plugins

The amazing Subway Map Visualization plugin allows you create interactive subway map visualizations with HTML. Its style has been based on Londons Underground maps, with smooth curves & interchange connectors and 45-degree diagonals. The map size, line width and colors can all be customizable and the markup is also search engine friendly.

 

jQuewy is a simple, efficient, and lightweight loader for Javascript functions, with a powerful CDN-ready backend. Have you ever wanted to quickly prototype an idea in Javascript, and wanted to get it down as quickly as possible? Have you noticed how a large portion of your setup time can include downloading and setting up libraries to work with? jQuewy solves this problem, because now you can summon any script, and it’ll be inserted into your head tag automatically.

 

Arbor is a graph visualization library built with web workers and jQuery. Rather than trying to be an all-encompassing framework, arbor provides an efficient, force-directed layout algorithm plus abstractions for graph organization and screen refresh handling. It leaves the actual screen-drawing to you. This means you can use it with canvas, SVG, or even positioned HTML elements; whatever display approach is appropriate for your project and your performance needs.

 

With jQuery Runloop, you can create your own small runloop with keyframes at your own choosing, each with code to execute. You can put whatever code you want in each keyframe, rearrange keyframes easily, and use reusable maps of code and/or animations to share between runloops.

 

Face Detection is an impressive plugin that does just what its name suggests. It detects faces in photos.

 

Lettering.js is a lightweight, easy to use jQuery plugin for radical Web Typography.

 

Learn how to create a collapsing menu that contains vertical navigation bars and a slide out content area.

About the Author

Ben Rama is a Graphic Designer, CG Artist & Cinematographer from London. He is the founder & director at Digital Empire with many years of experience in Graphic Design, Film & TV within London.