Archive

Archive for the ‘Web development’ Category

The 5 Most Common UX Mistakes

May 20th, 2013 Comments off


Many companies are heads-down in their product development process. It makes sense — building a great product takes not only hard work, but collaboration across teams, especially in larger organizations.

Sometimes, companies make mistakes when building their products, especially when it comes to user experience. Here are a few UX mistakes we commonly see:

Cram That Feedback

Most people know that they should be seeking user feedback as early and as often as possible. But knowing is different than doing. Most companies end up cramming user feedback in at the very end of a project, like waiting until the night before to open your text for a final exam.

Companies that do gather user feedback are often doing it the wrong way. Teams rely on surveys and focus groups to make design and messaging decisions. They rely on a lazy approach called market research versus the “listening to the heart” approach of the user called behavior research. The main difference between market research and behavioral research is that the first collect opinions, while the second observes actual behavior. If you want to learn why users run into difficulties, and how they use your product, then don’t ask, but watch! Observe and listen as users interact with the site. Both in-person and online user testing are ideal methods for this approach.

Furthermore, most teams think you have to wait for a working product to begin a feedback session, but this is wrong. With methods like paper and codeless prototyping, a designer or marketer can collect insights from users as early as the idea stage. Getting into the habit of testing every single assumption and idea as early as possible is something teams should fully commit to. If you are not running an experiment everyday, then you are doing something wrong.

To help you do it, right here are some tips:

  • Identify issues with a product and brainstorm changes
  • Ask users if they have the same issues
  • After validating an issue create a sketch, wireframe, or rapid prototype
  • Engage users again, observe how they use the prototype
  • Iterate and show the improved version to more users
  • Deploy, measure, and validate with users that their pain is relieved

Marketeers Know Best… Not!

Many organizations let marketing have the final approval about what goes on the website. Marketing professionals develop the brand, and they make sure the language is consistent with the brand; they position products, they focus on aesthetic consistency and attitude and messaging.

We see organizations conducting excellent behavioral research, and handing the results to marketeers, who say: “That’s interesting—lets see how this fits into the marketing strategy.” it’s not marketing’s job to produce a solid, functional experience. The problem is that UX designers and researchers usually have little say in the final design of the site.

Marketing-driven design is problematic and it also misrepresents what it means to build a brand. The landscape is changing and the industry knows that building amazing experiences is a much better branding strategy than endless marketeer gibberish. Research to build something people love, then build that!

Size Matters

Mobile is exploding: Brace yourself. The world is browsing on smartphones and tablets. People switch between tablet, to smartphone, then desktop, and back again. Nearly everyone is walking down the street and buying shoes online.

Yet, we still tend to design for users sitting at a large desktop, alone in a quiet space. Unless you are drop-dead positive your audience is experiencing your website from a desktop, you need to think design for a multi-screen, active experience.

Sure, it’s possible to code for a multi-screen experience, and everyone talks about responsive design, but can you easily prototype a multi-screen or responsive experience? And what about user testing for a multi-screen experience? Hopefully our jobs will get easier; In the meantime we’ll have to devise workarounds to be sure that we aren’t stuck in the “desktop” paradigm.

Wordy, Wordy, Wordy…

There’s nothing wrong with having text on your website, except of course that people likely aren’t reading it.

Think about providing content in another format. Research on the human brain shows that when people are listening to someone speak, their brain activity syncs up with the speaker. The more the listener’s brain is in sync with the speaker’s, the more thoroughly the listener will comprehend the content.

Where it makes sense, use audio and/or video instead of just relying on text. Ohh, and the right picture can communicate a 1,000 words, but you must test your images to insure you picked the right 1,000 words.

Copycat

Many designers — and this is far too common an occurrence — copy the look and approach of someone elses design. If a design is appealing and appears to be working surely a rigorous process was used to arrive at the aesthetic, right? This may have been the case, but likely not. By being a copycat you copy the same issues, problems, and of another’s design.

It is recommended to leverage design patterns and the best approached from other designs, you must to think long and hard about how that design might perform, and of course, test it!

Image Source(s): All images by maraga via Shutterstock.


Original from: http://feedproxy.google.com/~r/speckboy-design-magazine/~3/VanxjPzelzU/

Using CSS Preprocessors With WordPress – What Are They?

May 20th, 2013 Comments off

This entry is part 1 of 1 in the series Using Preprocessors With WordPress

I’ve been working with WordPress for three years, but it wasn’t until a year ago that I got serious about WordPress development. Specifically, I’m passionate about child theming and spend much of my time working in theme development.

During the past couple of years, we’ve seen the rise of CSS preprocessors – mainly, tools that make writing stylesheets easier and make them more maintainable.

In this series, we’re going to take a look at what preprocessors are, what popular ones are available, and how we can integrate them into our theme development.

/>

Where We’re Headed

When it comes to user-interface development, it’s not just about how to make things look great, but it’s also about making things well-structured and as performant as possible, and I believe that this should be something that’s pulled through in our WordPress projects, as well.

In this series, I plan on giving a little background on what preprocessors are and highlight some of the key players in the space. I will also talk about some of the more popular frameworks. I will then move on to more of a deep dive into LESS and explain why I prefer using it. Lastly I will cover how to use it with CodeKit to compile your CSS for your theme.

/>

About CSS Preprocessors

As mentioned, there are a number of CSS preprocessors, the most commonly used being LESS and SASS. Both are syntactically similar and can dramatically increase the speed at which you can write your CSS.

There are a few differences like their compilers and extensions or frameworks with which they can be combined.

LESS

less_logo

LESS is a dynamic stylesheet language. You can write your CSS programmatically in a .less file and compile your output into a .css file. The compilation language for LESS is JavaScript. This a great because you can run the compiler on the server side or client side.

Some of the features of LESS include:

  • Variables – Variables can be defined and are used throughout your file. Make a change in one place and see it updated wherever it’s used.
  • Mixins – Mixins include a bunch of properties from one ruleset into another ruleset. You can also use Parametric Mixins that accept arguments.
  • Nested Rules – Nested Rules give you the ability to use nesting instead of, or in combination with cascading.
  • Namespaces – Namespaces allow you to group your variables or mixins, for organizational purposes, or just to offer some encapsulation.

I will be going into more detail on the syntax for these in the next post in this series.

Two of the more popular front-end frameworks that use LESS are:

SASS

sass_logo

SASS is an extension of CSS3. It has two syntaxes: .scss and .sass. .SCSS is the most common syntax used but it also supports the older indented syntax.

Some of the features of SASS include:

  • Variables – Variables can be defined and are used throughout your file. Make a change in one place and see it updated wherever it’s used like LESS.
  • Mixins – Mixins allow you to re-use whole chunks of CSS, properties or selectors like LESS
  • Nesting – Avoid repetition by nesting selectors within one another like LESS
  • Selector Inheritance – It can tell one selector to inherit all the styles of another without duplicating the CSS properties. Not available in LESS.

Here’s a few frameworks that include SASS and SCSS:

/>

Conclusion

CSS Preprocessors are definitely a growing trend in web design. They can dramatically speed up the time you spend on writing styles for your sites.

They can also help with structuring your CSS like you would functions in other languages like PHP or JavaScript. If you aren’t already using CSS preprocessors in your web project, you should definitely consider it.

Now that we’ve taken a look at two of the more popular preprocessors, I’ll take a deeper dive into LESS and give some reasons why I personally choose to use it in the next post. I will also show you how to get started with using CodeKit with your WordPress projects.

/>

Resources

Original from: http://feedproxy.google.com/~r/Wptuts/~3/LIeQNI_vY4E/

25 Beautiful Content Heavy Websites

May 20th, 2013 Comments off


Perhaps the hardest project you could ever take on is designing the website of an online news magazine. One of those sites that gets updated umpteen times a day and publishes various formats of content, like news articles, image galleries, videos, blog columns, polls, etc. Yes, I am talking about content heavy websites. Those behemoths of sites that seem to be impossible to plan, nevermind design for.

As you will already know, there are thousands of content-rich websites out there, but very few seem to focus on good design. Sure, they have put a lot of thought into organization and structure, but for the most part they do rely on the old tried and tested magazine-style layouts, and never really tend wander far from those confines.

Fortunately, not all are like that. Some do dare to venture out and breakout off those shackles and design something truly unique and, and dare I say it, beautiful.

Monocle (Responsive)

Monocle - Content Heavy Web Inspiration

Award

Award - Content Heavy Web Inspiration

Esquire (Responsive)

Esquire - Content Heavy Web Inspiration

The Next Web (Responsive)

The Next Web - Content Heavy Web Inspiration

Polygon (Responsive)

Polygon - Content Heavy Web Inspiration

Newsweek (Responsive)

Newsweek - Content Heavy Web Inspiration

House (Responsive)

House - Content Heavy Web Inspiration

The Gadget Flow (Responsive)

The Gadget Flow - Content Heavy Web Inspiration

ReadWrite (Responsive)

ReadWrite - Content Heavy Web Inspiration

Mashable (Responsive)

Mashable - Content Heavy Web Inspiration

Google Science Fair (Responsive)

Google Science Fair - Content Heavy Web Inspiration

National Academy Museum

National Academy Museum - Content Heavy Web Inspiration

The Verge

The Verge - Content Heavy Web Inspiration

True Digital (Responsive)

True Digital - Content Heavy Web Inspiration

UGSMAG (Responsive)

UGSMAG - Content Heavy Web Inspiration

BBC

BBC - Content Heavy Web Inspiration

GOOD

GOOD - Content Heavy Web Inspiration

Wired (Responsive)

Wired - Content Heavy Web Inspiration

The Brief

The Brief - Content Heavy Web Inspiration

Black In History (Responsive)

Black In History - Content Heavy Web Inspiration

The Artfuls

The Artfuls - Content Heavy Web Inspiration

DesignTAXI (Responsive)

DesignTAXI - Content Heavy Web Inspiration

Reform & Revolution (Responsive)

Reform & Revolution - Content Heavy Web Inspiration

B-Reel (Responsive)

B-Reel - Content Heavy Web Inspiration

Glamour (Responsive)

Glamour - Content Heavy Web Inspiration

You might also like…

Our 50 Favorite Web Designs from 2012 →
Examples of ‘Flat’ in Web Design →
Creative Depth in Web Design →
30 Clean Web Design Agency Homepages →
20 Websites with Original, Non-Standard Geometry →
40 Examples of Brilliant Responsive Website Layouts →
Essential Elements of a Design Agency Website Layout →
30 Highly Unusual Web Designs →
40 Effectively Designed Non-Profit and Charity Web Sites →


Original from: http://feedproxy.google.com/~r/speckboy-design-magazine/~3/XIOMVze4vpE/

Digital Food Photography: 30 Images and Tips for Effective Shooting

May 19th, 2013 Comments off


Food photography, while being a specialized type of still life art form, has already formed its own following. From amateurs taking pictures of what they had for lunch to award-winning photographers celebrating a collection of cultures, food photography has us engaged.

The art of food photography is a precise one as well, requiring understanding of spacing, distance, color, and focus. Today we’ll take a look at tips and tricks to make your food appear to be the best that money can buy.

Food Photography Techniques

1. Equipment

Professional photographers use expensive digital backs on equally expensive cameras, but the barrier for entry isn’t that high. All you’ll need is a DSLR or an advanced point-and-shoot that will let you make adjustments to your shots.


Image Source: Photography Icons via Shutterstock.

The most important characteristic of your camera is the ability to tweak is settings, instead of relying on automatic modes. For DSLRs, interchangeable lenses are a must for taking photographs of different subjects. Tripods are also essential, to keep your shots steady.

Optional tools include lamp stands for external lighting, as well as lens shades to control the light. Don’t forget the accessories to complement your food, like bowls, napkins, silverware, and flowers.

2. Camera Settings

We touched upon this in the last section, but for food photography it’s essential that your camera has the ability to manually change the settings. It’s the only way you can focus on the minute details of the food, and highlight the features that you want to emphasize.


Image Source: Photography Icons via Shutterstock.

Take note of your aperture, which controls how much light will hit your sensor. A low aperture setting will let in more light, generally resulting in brighter photographs. Its partner, shutter speed, controls how long the shutter is open. You usually adjust both these settings in conjunction to compensate for changes in one setting with the other.

The third important setting is ISO, which controls your camera’s sensitivity to light. A higher ISO is used in darker scenes, but will result in a grainier photograph.

3. Composition

Having the right equipment and understanding the camera settings is nothing if you don’t know how to compose your shot. Food photographs are usually crisp and well lit, bringing out the texture of the food. Your goal is to feed your readers through their eyes, making them want to reach out to the photo and nab the food.


Image Source: Photography Icons via Shutterstock.

When composing, remember that the food itself shouldn’t be the only thing in the shot. The bowl or plate that holds the food (or even a napkin or a spoon) frames the subject in such a way that the accessories emphasize its presence. Avoid blank spaces and create a sense of movement in the image—crumbs, flakes, all in a natural position.

4. Lighting

Natural lighting is always recommended for food shots. While your eyes (and brain) can adapt to any sort of light and reconcile what the food is supposed to look like, cameras aren’t at the same level and need all the help they can get.


Image Source: Photography Icons via Shutterstock.

Ample light source is one of the most critical elements of food photography—find your light source and compose around it. Do you use the light shafts streaming through the window or the increased light available coming in the doorway? Lighting brings out the natural color of the food, and this is very important in keeping your subjects appetizing and appealing.

5. Angle

Like in any mode of photography, angle is critical in bringing out the best in your subjects. This is particularly important in food photography, because the shots are so close up. Some foods are best shot from above, like grains and cereal (with bits outside the bowl to create dynamism). Others, meanwhile, are best shot from an angle, such as cakes with layers.

Angle comes after composition—you don’t want to be thinking about the silverware and the napkins when the food is ready to be shot.

6. Focus

Focus changes the primary elements of your shot. You wouldn’t want the fork to be the subject that is highlighted in your picture of a cake, after all.


Image Source: Photography Icons via Shutterstock.

Focus is a result of the different settings and techniques working together, and is also influenced by the camera’s distance to the subject. However, if your camera’s autofocus isn’t cutting it, you can also manually adjust this setting to focus on the subject you want. How deep or short will the depth of field be? Because food photography relies so much on macro, having an understanding of focus is important.

Of course, these tips all lead up to the shot itself. If you want to do more with the photo, you can always edit them after the fact. But if your photo isn’t good in the first place, there won’t be anything to touch up.

Food Photography Inspiration

Here are some amazing examples of food photography for your inspiration:


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source


Image Source

How have these techniques helped your food photography? Are there other tips you use in creating that perfect shot of food? Let us know in the comments below!


Original from: http://feedproxy.google.com/~r/speckboy-design-magazine/~3/Ebc-ERV01KE/

Take Your Skills to the Next Level, Build Your Own Plugins

May 18th, 2013 Comments off

There are only a few Early Bird tickets left for our fantastic new workshop led by Instructor Tom McFarlin: Introduction to WordPress Plugin Development

Are you an aspiring WordPress developer? Are you ready to take the next step and start building your own custom plugins for WordPress? Our newest Tuts+ Live Workshop is the perfect way to get started!

Tom is going to teach you how to write a WordPress plugin that connects to the is.gd API in order to implement an alternative URL shortner to the built-in wp.me shortner.

The goal of the plugin is to demonstrate:

  • How to write an object-oriented based plugin.
  • How to interface with a third-party API.
  • How to introduce a custom meta box.
  • How to perform input validation and sanitization.
  • Early Bird tickets are half-price at only $49, but places are strictly limited so act fast to make sure you don’t miss out! />

    />

    Introduction to WordPress Plugin Development

    Our newest Tuts+ Live Workshop, Introduction to WordPress Plugin Development, teaches you everything that you need to know to start developing WordPress plugins; from setting up a local development environment, all the way through to building a WordPress plugin that’s ready for release into the WordPress Plugin Repository.

    It’s led by Instructor Tom McFarlin, a self-employed WordPress developer who divides his time between running his own WordPress development shop, building plugins for WordPress, blogging every day about software development in the context of WordPress, and working for 8BIT (the team responsible for Standard Theme and WP Daily).

    Each weekly workshop will last one hour, running over a five week period. You’ll have the opportunity to follow along with Tom, ask questions live during the workshop, and complete a weekly homework assignment. Not able to make it to the live recording? No problem! All of the workshop recordings will be made available online the day after the live workshop.

    Learn more about Introduction to WordPress Plugin Development

    />

    Grab an Early Bird Ticket Now!

    We’re offering a special Early Bird price of $49, but these tickets are limited. Once the Early Bird tickets have disappeared, the workshop will be $99.

    If you’re interested in future workshops then definitely join the Tuts+ Live Workshops mailing list to stay posted on upcoming workshops and get notified as soon as they’re available, the Early Bird tickets for our previous workshops have all sold out, so it’s worth getting ahead of the game!

    We’re really excited about new workshop, Introduction to WordPress Plugin Development, but places are strictly limited so act fast to make sure you don’t miss out!

    Original from: http://feedproxy.google.com/~r/Wptuts/~3/iXBVq3u8XV8/

Weekly Web & Mobile Creativity n.14

May 18th, 2013 Comments off


It is that time of the week again, a chance for you to sit back and enjoy some of our favorite web and mobile designs from this past week. And of course, don’t forget to click the ‘Change Viewport’ button to explore each site in detail.

Roynel.co

Roynel.co- Web & Mobile Creativity

Roynel.co →

WNDRMNT (Responsive)

WNDRMNT- Web & Mobile Creativity

WNDRMNT →Change Viewport

ZURB (Responsive)

ZURB- Web & Mobile Creativity

ZURB →Change Viewport

Hyperkit (Responsive)

Hyperkit- Web & Mobile Creativity

Hyperkit →Change Viewport

Profission

Profission- Web & Mobile Creativity

Profission →

#Music.Twitter (Responsive)

#Music.Twitter- Web & Mobile Creativity

#Music.Twitter →Change Viewport

Yahoo! Weather (iOS App)

Yahoo! Weather- Web & Mobile Creativity

Yahoo! Weather →

Hike (iOS, Android & Windows Mobile App)

Hike- Web & Mobile Creativity

Hike →

Do you have a website or an app that deserves a place in our Weekly Web & Mobile Creativity column?
If so, click here and give us a shout on Twitter.


Original from: http://feedproxy.google.com/~r/speckboy-design-magazine/~3/TIM2knK3PC8/

Categories: Web development Tags: ,

Design Patterns in WordPress: The Simple Factory Pattern

May 17th, 2013 Comments off

This entry is part 3 of 3 in the series Design Patterns in WordPress

In this series, we’re taking a look at design patterns and how we can leverage them to our advantage when building products on top of WordPress.

The nice thing about design patterns is that they aren’t explicitly limited to themes or plugins – they are handy in a variety of different scenarios. It’s simply a matter of being able to identify which patterns are applicable to certain scenarios.

In the last post, we reviewed the Singleton Pattern. In this article, we’re going to take a look at the Simple Factory Pattern which is especially useful when you have a number of different classes each of which has a unique purpose and solves a specific problem.

In this post, we’ll take a look at another pattern – the Simple Factory Pattern – which is useful when you have a number of classes each of which has a unique purpose and that can be selected based on certain criteria.

/>

The Factory Method Pattern

The Simple Factory Pattern is actually derived from a pattern known as the Factory Method Pattern which is a slightly more complicated version of the pattern that we’re going to be reviewing.

According to Wikipedia, the Factory Method pattern is defined as follows:

The factory method pattern is an object-oriented creational design pattern to implement the concept of factories and deals with the problem of creating objects (products) without specifying the exact class of object that will be created

Sounds a bit complicated, doesn’t it?

The truth is, it’s actually a really powerful design pattern but it would take a much longer article to discuss it, and it’s a bit out of scope for the purpose of this series.

So, as mentioned, we’re going to take a look at a version of the pattern that’s paired down a little bit and should be more generally applicable to less complicated projects.

Before we do that, let’s come up with a definition of the Simple Factory Pattern:

The Simple Factory pattern returns a specific set of data or a specific class based on its input.

Ah the risk of making a pun, simple, right?

A Note About the Simple Factory Pattern

The truth is, many software engineers refer to the Simple Factory more as an idiom than a full-blown pattern; others consider this a pattern.

For what it’s worth, I see it as a very simple pattern. It has a specific use case that can be easily identified when to use it during the course of development which we’ll review later in this article.

Regardless, I bring this up so that if you see this used as an idiom (or a pattern) used throughout various articles on the Internet, or even in conversation, you’ll know that the developers in question are referring to the same programming strategy – just in a different way.

So Why Does This Matter in WordPress?

Just as design patterns in non-WordPress specific projects, such as larger applications, the design patterns provide a tried and true way to solve a common problem.

It helps to abstract our code a bit, keep our project easily maintainable, easily readable, and can actually help us to keep our code lean. This may result in us actually having more files in our project, but each file should have fewer lines of code.

This means that each file should have a specific purpose that should be clear, not only to us, but future developers as well.

/>

What It Looks Like

Now, before we dive into the diagrams, talking about classes, and the strategies required to implement the actual pattern, I want to mention that we’re going to be taking a simple approach to this.

The thing is, the readership of this blog spans a wide array of experiences – we have some people who are learning to write code; others who are seasoned veterans.

In order to appeal to the majority of the readership, we need to strike a balance. So for those of you who have been involved with software engineering for years, this may seem overly simplistic; however, don’t skim it – perhaps you’ll pick up something new.

For those of you who are beginners or even intermediate programmers, pay close attention to what we’re discussing as it can provide dividends in future (or even existing) work.

The Purpose of the Simple Factory

So imagine this scenario: You’re working on a function that takes in a set of input – usually some type of unique string or integer – and you have this long if/else statement or perhaps you have this large switch/case statement that continues to grow as your project grows.

The problem is that the conditionals become a pain to manage. In fact case conditionals, or the case blocks, may actually end up doing as much work as a certain function should do.

This is where the Simple Factory comes into play. What we can do is abstract the details happening in each of the conditionals into their own class thus making it much easier to maintain and keeping the code much leaner.

And that is the Simple Factory Pattern.

A Look at the Pattern

The Simple Factory Pattern

So here are the key features of the Simple Factory Pattern:

  • Notice that the Plugin class has a private reference to the Factory class
  • The Factory class encapsulates all of the logic to return an object of the type User
  • The User class is a base class for three other classes: Admin, Volunteer, Reader, and the idea is that each of these types are subclasses of users with unique functionality of their own
  • The Plugin will receive a certain type of input that it will pass to the Factory
  • The Factory will examine the input and then, based on its value, will return one of the three user types

Nothing too complicated, right? Honestly, I think that the diagram is a bit more complicated than the principles at play. It really provides a lot of flexibility especially whenever you’re looking to introduce another User type like an Editor or something similar.

Note: This is not to be confused with WordPress’ built-in user types. This is simply an example to show what the pattern would look like.

A Working Example

Now that we’ve taken a look at the diagram for the pattern, let’s take a look at the source code in action. Below, we’ll look at the source code for each class and then I’ll provide a download to a fully documented demo after the discussion.

The Plugin

First, let’s look at the plugin class. Remember, this is nothing more than a prototype of what the pattern looks like. It’s not the same thing as a fully developed WordPress plugin.

factory = new Simple_Factory();
	

	public function get_user( $permission ) 
		return $this->factory->get_user( $permission );
	

}

?>

Notice that the plugin is relatively simple:

  • It includes the simple-factory.php script in the header of the file
  • It then defines a constructor in which it sets the $factory property to an instance of the Simple_Factory
  • The only method available in the plugin is get_user which returns a user based on a type

We’ll see how this comes into play after we’ve examined all of the other classes.

The User

The User is an abstract base class that provides a basic constructor and an abstract function that must be implemented by all other subclasses.

role = $role;
	

	abstract public function get_role();

}

?>

Note that this class is intended to be subclassed by a variety of other classes, each of which we’ll look at in detail momentarily.

The Administrator, The Reader, and The Volunteer

The following four classes are all separate files each of which subclass the User base class. I’ve opted to include them all here together because there’s so little deviation from their actual implementation that it should be easy enough to follow.

The Administrator
role = "Administrator";
	

	public function get_role() 
		return $this->role;
	

}

?>
The Reader
role = "Reader";
	

	public function get_role() 
		return $this->role;
	

}

?>
The Volunteer
role = "Volunteer";
	

	public function get_role() 
		return $this->role;
	

}

?>

As usual, leave me questions in the comments; otherwise, review the code then be sure to read up on The Simple Factory which is the next section – it ties all of this together.

Also, remember that all of this code will be shared at the end of the article along with code comments that describe exactly what’s happening.

The Simple Factory

The Simple_Factory class is really the crux of the entire pattern. Here is where all the decisions are made and the appropriate objects are returned.


Note that the Simple_Factory includes the base user class and its subclasses and then works to return the appropriate type of user based on the incoming set of permissions.

/>

The Advantages of the Simple Factory Pattern

Though it should be a bit obvious by this point in the article, the Simple Factory Pattern provides a number of advantages especially if you’re used to working with large conditionals.

  • It provides an elegant way to abstract your code so there’s less visual clutter
  • It allows you to introduce specialized, focused classes with a single purpose (which is great if you follow the SOLID principles)
  • It makes the code more maintainable as there’s a single place where classes are instantiated, and each class serves a single purpose

Overall, this is one of my favorite patterns simply for the matter of code organization and specialization that it can bring to the table.

/>

Conclusion

Finally, you can checkout the entire source code – complete with documentation and installation instructions – on GitHub using this link.

At this point, we’ve taken a look at three patterns:

  1. The Observer Pattern
  2. The Singleton Pattern
  3. The Simple Factory Pattern

This series could go one for a while; however, I think that we’ve covered enough ground at least to get many of us started with implementing patterns into our work.

So in the last article in the series, we’ll recap what we’ve learned and I’ll also recommend some other patterns, their purpose, and some further points of research that should continue to aid you in continuing to learn about design patterns and their advantages not only in WordPress development, but general software development, as well.

Original from: http://feedproxy.google.com/~r/Wptuts/~3/5pBVx7cN4do/

Handling Ethical Disagreements With Clients

May 17th, 2013 Comments off


Sometimes, you may get a client who wants you to do something that you’re just not comfortable with. We all want to please our clients, but how do you please a client who, say, really wants you to directly copy another company’s logo design or sales copy? Or who wants you to do something malicious to a competitor’s online reputation, Google ranking, et cetera?


Image Source: Shoulder Devil and Angel via Shutterstock

It doesn’t matter what the unethical thing is or your reason for not wanting to do it – it’s always a pain to deal with and handle in a professional and courteous manner. Luckily, there is a reliable process many freelancers can use to stop these types of clients from getting out of control, and often prevent ethical issues from coming up in the first place.

Opting Out

First, it’s important to remember that the best option in situations like these is to simply have more options and avoid these types of projects altogether. Clients who are shady are almost always more trouble than they’re worth, and if the unethical activity can be traced back to you in any way, you’ll find yourself with more trouble on your hands than you ever wanted.


Image Source: Modern David vs Goliath via Shutterstock

If you have other potential clients you can work with, you can simply fire these bad apples and send them (politely) on their way things start to get moldy. But how do you determine who’s on the level before you take on a project?

Spotting The Red Flags

Many times, you can use your natural intuition to determine whether or not a client will present ethical dilemmas before you begin working with them. It can be as simple as a “vibe” – just a weird feeling you get when talking to them, or the dodgy way in which they answer your questions. I’ve turned down work from clients before who just had an oddness about them that I couldn’t explain. I didn’t know why they made me uncomfortable; simply that they did and I wanted nothing to do with their project. In more than one case, I found out later that they were, in fact, up to no good. Freelancer: 1, disaster: 0.


Image Source: Hacker via Shutterstock

Other times, it can be the type of work a client asks you to do that sets off the alarm bells. Reputation management, radical brand redesigns, or conflict de-escalation with third parties like angry customers or threatening competitors, while not unethical by themselves, can be signs that your client might want to handle these problems in ways that aren’t entirely above board.

Use your judgement and listen to your gut when deciding which projects to take on. It might seem silly to turn away a client just from a feeling, but it can save you potentially years of headaches and legal problems. Plus, word to the wise: it’s often these kinds of clients who provide the biggest issues when it comes to payment as well.

Remember You’re The Expert

Sometimes, a request for something unethical can truly come out of nowhere. Everything is going fine, then suddenly your client springs a rotten request on you that you’re not sure how to handle. In these situations, it’s likely that your client is less likely to be a crook, and more likely to simply be misguided on the direction they should be taking with the project. They see what’s working for their competitors, and they decide it’s not worth tampering with what’s clearly a winning formula. In other words, they have the right general idea, but need some help executing it in an original way.


Image Source: Wearing Lab Coat via Shutterstock

It’s important to remind these types of clients – and yourself – that you were hired to apply your professional expertise to solve their business problems. Don’t be afraid to challenge your client’s assumptions as to what will be truly effective and why. Point them to results you’ve achieved in the past that will show them that there are many ways to approach the dilemma that won’t violate anyone else’s intellectual property rights. Don’t just send them a new round of comps or revisions – take the time to explain what works, what doesn’t, and what will help them avoid a lawsuit.

Saying ‘I Told You So’

Ah, yes. Gloating. It’s not just for schoolchildren anymore. If you’ve done everything you can to convince a client to do the right thing, and they still refuse to see reason, it’s essential to be able to release yourself from liability if and when something goes horribly wrong. Here’s where having a record of all communication comes in handy. Even if most of your exchange with the client happens in person and over the phone, always make transcribed copies of your recommendations, requests, and warnings, and ask the client to sign off or verify them via email.


Image Source: Breaking Free via Shutterstock

Keep records of all the advice you provide and send a copy to your client, even if they end up completely ignoring you. That way, when their idea fails miserably, you can whip out your notes and show them that you warned them. Besides being satisfying to get a little revenge on a stubborn client, it makes it impossible for the client to hold you responsible for their poor behavior. Hopefully, this will convince them that it’s always better to do things the right way rather than treading on someone else’s rights, but if not, at least you can walk away with a clean conscience and warn other freelancers you know to avoid that client at all costs.

What Do You Think?

Have you ever dealt with an unethical request from a client? What strategies worked for you when dealing with the outcome? Comment and let us know!

You might also like…

You could read more posts from Addison Duvall, or you could browse our Freelance or Design categories.


Original from: http://feedproxy.google.com/~r/speckboy-design-magazine/~3/Qi92SLycNj8/

Quick Tip: After the Content – Share This

May 16th, 2013 Comments off

This entry is part 7 of 7 in the series After the Content

If we’re saying that content is “king”, social media might as well be the “queen”. We can safely claim that social media is the most efficient way to spread the content around the web, in our time.

In this post, we’re going to cover how and why we should include a “Share This” section with our content.

/>

“Share This” for Instant (And Free) Content Promotion

In the golden era of social media, it would be silly not to encourage people to share your content on social networks like Facebook, Twitter, Pinterest, or Google+.

Yes, we live in a social world and it’s not just something we do among our friends. I wrote this quick tip in Turkey, my editor published it in Australia and while a German reader gave it a five-star rating, an Iranian reader shared this quick tip on Twitter and a Korean friend of his retweeted his tweet. Just ten years ago, this wasn’t possible at all.

Think of this example and think about your own blog. It doesn’t have to be an international magnificance but you can reach a serious amount of people with the power of social media. With WordPress, it’s ridiculously easy to go viral – as long as you create quality content and allow your visitors to share that quality.

Plugins to Offer a “Share This” Section

As you can imagine, creating a “Share This” section manually is relatively easy. You could just get the “widget codes” of the social networks you like and replace the URLs with and inside the widget code, if necessary.

Then it’s all HTML:


But there’s an even easier way to create this section: with plugins. These plugins will most probably suffice for your blog and will fit your theme like a glove:

  • Jetpack by WordPress.com – WordPress’ own “feature pack” comes with a variety of little plugins, including a sharing section which provides an elegant bar at the bottom of your posts, right after the post content. If you’re already using Jetpack (like me), this is probably the best solution for you.
  • Digg Digg – Digg Digg might be considered as a “more comprehensive solution” for sharing, in comparison to Jetpack’s share buttons. It allows you to put the buttons before or after the content, or even as a floating bar along with the content. It also lets you choose big or small buttons to fit better with your design. If you like to take control with many, many options, this plugin is right for you.
  • Share Buttons by AddThis – It looks like yet another plugin that gives you share buttons. However, along with a membership on AddThis.com, this plugin shows you in-depth analytics of how your content is shared. If you’re interested in your content’s sharing statistics, this is the plugin you should use.

There are, of course, many more share plugins out there and you may find some of them even better than the big guys above. My personal choice is Jetpack, but that’s because I use many other features of the plugin along with the share buttons.

I recommend experiencing as many choices as possible (including the one with just HTML) and decide which one is the best based on your findings.

/>

Conclusion

As I said before, we’re communicating in a social web now. If you want people to reach you, you have to provide share buttons for your content, “the king”.

Do you think there are better plugins (or non-plugin solutions) about social sharing sections worth mentioning? Post your comments below – it’s always important for you to share your thoughts with us!

Original from: http://feedproxy.google.com/~r/Wptuts/~3/8PB_Rupv_bs/

PHP Tutorials for Beginners

May 14th, 2013 Comments off


You have probably heard that PHP is much easier to learn than any other programming languages, such as Java or the .NET languages, not to mention Perl, but if you are new to PHP, it can be daunting. If you are new to PHP, we are here to help.

The first block of tutorials are more general and cover the basics of PHP as a language, such as variables, conditionals, HTML forms, loops, arrays, strings, functions… While the second block of tutorials are all about performing a particular task, such as creating captchas, building forms, and even building a complete CMS.

Now remember, take your time with each tutorial and enjoy!

PHP Logo

A Simple Tutorial from php.net

It doesn’t matter what kind kind of information you are looking for, it is always best to start at the source. This, of course, applies to learning PHP as well, the very site of the PHP programming language: php.net.

I am not saying this tutorial is the easiest, but it is a great tutorial for getting started with. It is more like a general introduction to PHP than a complete guide. Iit is split into the following sections:

  • What do I need?
  • Your first PHP-enabled page
  • Something Useful
  • Dealing with Forms
  • Using old code with new versions of PHP
  • What’s next?

The tutorial should only take you about 15 minutes to complete – providing you don’t check all the hyperlinks to the other pages. If you do, it will probably take weeks to complete.

A Simple Tutorial from php.net →

Beginners PHP (Complete Course)

This tutorial is a much longer and more in-depth that the tutorial above. It covers all the basics of PHP, such as variables, conditionals, HTML forms, loops, arrays, strings, functions, security, file manipulation, MySQL, user authentication. At the end of the tutorial you will find chapters on how to code sample apps, such as polls and online forums.

This is a long tutorial and you may have to go through some chapters more than once, especially if you are new to PHP. So, you will need at least a day or two to go through it all.

Beginners PHP →

Introduction to PHP (Complete Course)

If you are a fan of video tutorials, then you will love this PHP Course. There are over 200 videos available and they cover absolutely everything about PHP. The series covers all aspects of PHP, such as how to install XAMMP, how to create your first PHP file, input/output, variables, conditionals, operators, loops, commonly-used functions, strings, arrays, sample applications, etc.

It’s a huge resource and if you want to learn absolutely everything, you will need weeks to cover it all. Each video is reasonably short, though – from 1 to 10 minutes, so you can watch a couple of them in a day, revise them on the next day, and thenmove onto the next video.

Introduction to PHP →

PHP 101: PHP For the Absolute Beginner (Complete Course)

This is another complete PHP course that walks you through the basics. As with the other courses, it covers everything – variables, operators, loops, functions, arguments, MySQL, object oriented programming, sessions and cookies, error handling and security. It even includes two tutorials for building sample applications – such as a simple web application and an RSS news aggregator. Similarly to the other complete courses, this one will take at least a couple of days to read, learn, and revise.

PHP 101: PHP For the Absolute Beginner →

MySQL PHP Tutorial

The tutorials so far include sections on MySQL and how to use it with PHP, but since PHP and MySQL are used together [almost] all the time, it wouldn’t hurt to cover a tutorial that focuses solely on MySQL.

This tutorial explains how to create a new MySQL database, connect to it, create users and give them permissions, write a simple script, create and populate a database, retrieve data, escape characters, print column headers, count fields and rows, write and read images, and use transactions.

The following is a simple PHP script example from the tutorial:

If you are already familiar with the SQL syntax this tutorial should only take you 2-4 hours.

MySQL PHP Tutorial →

PHP OOP Tutorial from Beginner to Advance

This multipart tutorial series focuses on PHP from the object oriented programming (OOP) point of view. It starts nice and gently, so even if you are a beginner to both PHP and OOP, you will be able to follow along easily. The first part covers the basic concepts of OOP, such as objects, abstraction, inheritance, encapsulation, and polymorphism, but the following parts delve much deeper.

This tutorial will take you no more than 15 minutes (including the time you need to test the examples). However, the foloowing tutorials in the series are much longer and more complicated, so for each of them you might want to devote half an hour or more.

PHP OOP Tutorial →

List Files and Directories with PHP

Lists of files and directories are very common in web development. This tutorial will show you how to list files and directories with the glob() function, a combination of the opendir(), readdir() and closedir() functions, and the scandir() function. You will also learn some advanced file/directory listing techniques – SPL iterators, such as the FilesystemIterator, the RecursiveDirectoryIterator, and the GlobIterator.

The tutorial isn’t as complex as it might at first seem, but you probably should budget at least 45 minutes to complete it. It could even take longer, if everything is not working as expected and you need to make some fixes.

List Files and Directories with PHP →

Creating Your First PHP Application

We are definitely way beyond the basics with this tutorial. In fact, it’s a series of tutorials that cover the following:

Part 1 – Setting up the project and creating your first class

  • Creating an outline of the project
  • Setting up your files and folders
  • Creating a class to handle database operations: DB.class.php

Part 2 – Building the rest of the backend

  • Creating a User class
  • Creating a UserTools class
  • Registration / Logging in / Logging out

Part 3 – Building the front end

  • Forms
  • Form Handling
  • Displaying session data

As you can see this is a large tutorial, so budget at least a couple of days to complete it.

Creating Your First PHP Application →

How to Process Credit Cards with PayPal Payments Pro Using PHP

For a shopping site, credit cards payments are a must. There are many ways to accept credit card payments but PayPal is the most popular. In order to complete this tutorial you will need to have a merchant account with PayPal. The steps you need to follow are: create the directory structure, setup the config file, create an API request, send the HTTP request to PayPal, and parse the API response (there two approaches).

This isn’t the simplest tutorial, so you will probably need at least an hour or so to complete it.

How to Process Credit Cards with PayPal Payments Pro Using PHP →

Automatic CSS3 Prefixer and Compressor Tutorial

CSS files are text files but they can be very large. That is why they will benefit from some compression. Additionally, instead of writing all CSS3 properties with browser-specific prefixes by hand, this can be automated with PHP.

Automatic CSS3 Prefixer and Compressor Tutorial

This tutorial will teach you exactly how to do this: Generate CSS3 properties with browser-specific prefixes, how to concatenate (had to look this word up, it means ‘ linked together, as in a chain’ – Editor) all the CSS files to save space and reduce load time, and how to do both automatically when a web page is requested.

The estimated time to complete the tutorial is about an hour.

Automatic CSS3 Prefixer and Compressor Tutorial →

Create Your Own Captcha in PHP

This short tutorial has been written in a typical programmer’s fashion, meaning it has little to no explanation, short to missing comments, and the assumption that everything is obvious and clear. However, aside from this, it is a useful tutorial and the slightly more advanced programmers might love it just because it uses few words and plenty of code.

Create Your Own Captcha in PHP

The tutorial is short, so it won’t take you more than 20 minutes.

Create Your Own Captcha in PHP →

Getting Started with PHP Regular Expressions

And now a tutorial on everybody’s favorite: regular expressions. Unfortunately for everybody who hates them, regular expressions are pretty useful, though often you can bypass them with other techniques.

Create Your Own Captcha in PHP

The tutorial in the link explains what regular expressions are, the Perl compatible regular expressions, the basic syntax of PHP regular expressions, how to use regular expressions in PHP, useful regex functions. Additionally, the tutorial includes a cheat sheet where all the basic stuff is gathered in one neat place.

The tutorial could take you an hour or two to complete but this depends on your familiarity with regular expressions. If you are a total stranger to them, expect to read some sections multiple times and, naturally, this will take you much more time.

Getting Started with PHP Regular Expressions →

Simple Banner Rotator With PHP, jQuery & MySQL

This tutorial goes beyond PHP, but since in real life that is exactly what you need, that is why the tutorial is included here. First you need to create the database schema, then the XHTML code, then the CSS, and only after that you will move on to the PHP side of things.

Simple Banner Rotator With PHP

The tutorial will take you at least 2 hours to complete, and that is if you don’t have to make a lot of modifications to the code.

Simple Banner Rotator With PHP, jQuery & MySQL →

Build a CMS in an Afternoon with PHP and MySQL

If we are honest here, this tutorial will probably take you more than an afternoon to complete. Having said that, it also isn’t as hard as it seems. In order to create the CMS, you do need to be familiar with the SQL syntax and MySQL, so if you do lack knowledge in these areas, first check the tutorials that teach MySQL above and then come back to this one.

Build a CMS in an Afternoon with PHP and MySQL

The CMS you will be learning to build will have all of the basic features you would expect from a CMS.

The frontend will have:

  • Homepage with the 5 most recent articles
  • Article Listing Page (archives), where snippets of all articles are displayed
  • A “View Article” page (single post), where visitors can read the entire article

The backend will have:

  • Admin login/logout
  • List of all articles
  • Add a new article
  • Edit an existing article
  • Delete an existing article

Build a CMS in an Afternoon with PHP and MySQL →

PHP Script Image of the Day

This tutorial shows you how to create a PHP script image of the day. All you need to do is find today’s date (with the help of the date function), store the value in the “$today” variable, and compare $today with the name of the day. Then you display the message “Today is ” … ” (you can modify the message, of course), together with the image of the day.

PHP Script Image of the Day

The estimated time for the completion of the task is about 10 to 15 minutes. This however doesn’t include the time to search for the images to display every day, so you may want to prepare them in advance.

PHP Script Image of the Day →

PHP is fun and it can be used for so many tasks. These tutorials won’t make you a PHP guru but they will help improve your skills and hopefully allow you to develop more complex PHP applications.


Original from: http://feedproxy.google.com/~r/speckboy-design-magazine/~3/7Dw11RZsn8o/