Archive for November, 2010

HTML Practices Every Developer Shouldn’t Live Without

As a starter or a seasoned web developer, we usually tend to skip out on some great practices that we should be using merely because we have never heard about them. To reduce this gap of missing goodies, we cover several practices no developer should live without.

Doctype Declaration

Many do it, others choose to not. However, it is in your best interest to declare the doctype in your HTML files for better standards compliance. Browsers usually have their own ways to fix errors you accidentally or unknowingly left in to get the HTML better interpreted. However, as with most browsers, they all have different ways to interpret things and thus, when it comes to individual browsers trying to fix or “patch” your errors on the fly, things start to get messy and your website will appear different across these different browsers and platforms.

Therefore, by declaring the doctype, you force these browsers to enter standards compliance mode, which cancels out their correction systems. With this, you can easily locate the errors you have made and be able to fix them to get your website to look and work the same across many browsers and platforms. Think of the doctype as a keycard to open all the doors in a building versus a key that may or may not open a few. You would definitely choose the keycard that opens all the doors rather than a key that may or may not work, the same applies to declaring the doctype so definitely use it, you will be glad you did.

Meta Description Attribute

Many search engine optimization radicals always seem to deter us from using the meta description attribute with the argument that search engines do not use them anymore. Actually, they do, but if they are not available, they will use other means to formulate a description about your website. Therefore, as a good practice, always include a meta description attribute with a great description of the website as this is what search engines use to formulate that description right below your title when you search for your website.

To get back to the search engine optimization radicals, they do have a point, especially for those who misuse the meta description attribute. Search engine bots are getting smarter by the day and can detect whether you deliberately misused the attribute or not. Therefore, use it as intended, as this is a gold mind for HTML as well as the key to improved search engine optimization.

Footer Content

This HTML practice is a bit subjective however very useful and vital to keeping your website running smoothly. We all have landed on a website that takes a good several seconds to a minute to load anything that is viewable due to the cause of external scripts bogging down on the load time. The way HTML is loaded is in sequential form, from top to bottom, line after line. What this means is, it will halt on a line of code until it is fully interpreted or executed, and in this case, it will wait until the external JavaScript file is fully loaded before proceeding on to the next line.

Therefore, stick this JavaScript code in the footer to have the content that is important to load first. For example, if you have your analytics code such as Google analytics, stick it in the footer right before the end of your body tag so that your website can load the content quicker and not bog down until it reaches the end of your content where users do not have to actually wait for it to load.

The reason this idea is subjective is that some may disagree with the idea of taking JavaScript code outside of the head tags, however, in such situations, it is a better practice to take upon as it is what keeps your website running more efficiently in such a case.

Using Unordered Lists for Navigation Bits

Many developers whip up all sorts of concoctions to create a navigation bit. So instead of using the accepted and preferred markup they decide to use a set of divs and all sorts to achieve similar results. This technique is not only inefficient, but it is also very tedious and redundant. Therefore, use unordered lists as a basis for your navigations as the code is simple, the functionality is pretty much completed for you already, and all you need to do is give it some style. Remember, reinventing the wheel is not something you want to do, let alone reinventing it and losing efficiency.

Leaving Your Front Door Open

Whenever you are in your home, out of your home, or on your way home, you always have your doors closed and locked. I mean, who would want to leave their home doors unlocked and open when they are not around? Other than the neighbor I once had who left their front door wide open at night, we all know it is a good practice to keep our windows and doors closed when we are not home. Similarly, always close the tags you open for clean and validated markup.

I have seen countless tutorials out there that are available to teach new developers how to code HTML and they almost always leave their tags open such as image tags or break tags. This not only affects the new generation of developers, but it is a terrible practice. Browsers will always attempt to close them for you causing errors and unwanted results, so save yourself from bad practices, and make closing the HTML tags a habit as you do with closing your doors when you leave your home.

Validate Your Code

Validating your code helps you keep your code clean from nasty errors you may have missed or unintentionally thrown in. While having valid code does not indicate you are a great developer or not, it does help eliminate possible errors you may find in the future within many different browsers and platforms. It additionally throws a good image about your practices for your portfolio for future hires.


Smashing Book 2 Is Coming: Add Your Name To The Book!

Advertisement in Smashing Book 2 Is Coming: Add Your Name To The Book!
 in Smashing Book 2 Is Coming: Add Your Name To The Book!  in Smashing Book 2 Is Coming: Add Your Name To The Book!  in Smashing Book 2 Is Coming: Add Your Name To The Book!

We’ve got some exciting news: the printed Smashing Book 2 is coming. We will launch pre-orders in January 2011 and will start shipping the book in February 2011. We are just putting the final touches on the brand new book, and we are confident that it will be a valuable, timeless and affordable book for you, our dear readers, and all designers and developers worldwide.

After much difficulty with the first book, we have learned our lessons: Smashing Book 2 will have a much better stitched binding, a hardcover, more pages and a bit larger in size.

Smbook2 in Smashing Book 2 Is Coming: Add Your Name To The Book!

Our Readers Deserve Credit

It’s not unusual for authors to dedicate their books to people they care about: loved ones, family or perhaps friends or colleagues. In our case, we would like to dedicate this new book to all of our readers: you. But we don’t want to just do it with a short acknowledgment in the preface. Anyone could do that! We have a slightly better idea.

We would like to print the names of our readers in the book. To do this, we have reserved a double-page on which we will print together all of the names of readers who comment on this article in the shape of the Smashing Magazine logo: ASCII art at its best! If necessary, we will add two more double-pages so that everyone fits.

Leave a Comment and Add Your Name to the Book!

It’s simple: just write a short comment on this post and tell us why you read Smashing Magazine and how we can improve it. You may use your full name or an alias; the length allowed is between 4 and 35 characters. Your name may consist of at most four parts (for example, Patrick Michael Philips or John F. Doe or Alberto de la Cruz). Special characters are allowed. Please note that we will moderate the names, and spammy submissions will not be accepted.

What’s So Different About the New Book?

The Smashing Book 2 will be published in February 2011 and can be pre-ordered at a big discount in January. It will cost $29.90 and will contain 360 pages. It is a real hardbound book, with sewn binding, a bookmark and four-color printing. Just as we did last time, we will pack it well, too.

Delivery times and shipping are different this time. All orders will be shipped via air mail. The shipping cost will be low and will be the same for every customer, no matter where they are located.

As with our first printed book, The Smashing Book 2 is a collaboration of talented and knowledgeable folks, among them Mike Rundle, Christian Heilmann, Francisco Inchauste, Vivien Anayian, Susan Weinschenk, Alexander Charchar, Matt Ward and others. The book will feature exclusive full-page illustrations for each chapter. Here we’ve got something special for you as well, but more on that next time.

Lion in Smashing Book 2 Is Coming: Add Your Name To The Book!

Rules and Guidelines

  • How to participate?
    Just write a short comment on this post and tell us why you read Smashing Magazine and how we can improve it.
  • How many names can fit onto the two pages?
    Of course, it depends on the length of the names. We expect around 6,000 readers will be able to fit onto the two pages.
  • How much time do I have to join in?
    The deadline is 26th of November 2010, 11:59 PM CET. We do want to make it to the printer on time after all.
  • Can anyone take part?
    Yes, but you’d better hurry: first come, first served.
  • Are there any restrictions on the names?
    The length of the person’s name (both first and last) must be between 4 and 35 characters. It may contain at most three empty characters. Please note that we will moderate the names, and spammy submissions will not be accepted.

Extra Goodie: Exclusive SM Book 2 Poster!

To make participation even more enticing, we are giving away 50 exclusive Smashing Book 2 posters to participants. The winners will be picked randomly from among all users who comment on this post.

We are working very hard to make the Smashing Book 2 an extremely valuable and useful resource for all designers and developers. We hope to meet your expectations with the new book. Please stay tuned for updates. And don’t forget to leave the comment.


© Smashing Editorial for Smashing Magazine, 2010. | Permalink | Post a comment | Add to del.icio.us | Digg this | Stumble on StumbleUpon! | Tweet it! | Submit to Reddit | Forum Smashing Magazine
Post tags:


Bye bye Flash

For a long time I’ve been doing what many others do and use tricks like ClickToFlash (for Safari) and FlashBlock (for Firefox) to prevent Flash content from bringing my Macs’ CPUs to their knees and ruining my “web experience�.

But not anymore. A couple of weeks ago I stumbled across the Daring Fireball article Going Flash-Free on Mac OS X, and How to Cheat When You Need It, and decided that it was time to get rid of Flash instead of using plugins to hide it.

Read full post

Posted in .



Designing for Content Management Systems

Advertisement in Designing for Content Management Systems
 in Designing for Content Management Systems  in Designing for Content Management Systems  in Designing for Content Management Systems

Designing and indeed front-end development for a website that will have content edited by non-technical users poses some problems over and above those you will encounter when developing a site where you have full control over the output mark-up. However, most clients these days want to be able to manage their own content, so most designers will find that some, if not all, of their designs end up as templates in some kind of CMS.

By considering the CMS as you design, you can maintain far more control over the final output. If your designs will be implemented and integrated into the CMS by a developer, then taking control at the design phase will help you to keep control over the design as opposed to leaving decisions to the developer or the content editors.

Know your enemy

Content Management Systems vary greatly in how much control they give the designer and the content editors. As a designer, you should first find out how much control over the templating system of your chosen CMS you have. Control may vary from simply being able to edit the existing templates to being able to shape the CMS completely around your designs. In some older CMS products you may find that you have little control over the mark-up that is inserted into the pages.

Where the content editors are concerned you should find out:

  • Will the editors be able to insert any HTML tags into content areas, either by way of a WYSIWYG editor or directly?
  • Is content simply large blocks of marked up content inserted by the editor or does the CMS use any kind of structured content?

Wp-editor in Designing for Content Management Systems
Many people use WordPress as a CMS. In WordPress, users can add any mark-up to the Page content area

If users of the CMS will be able to insert their own HTML, then you need to consider how your design will hold up when that happens. The ideal situation for a designer is where the user has limited ability to enter their own mark-up and the CMS uses blocks of structured content to guide them into adding content in the right way that can then be marked up correctly by the templates. The more freedom a user has, the more defensively you need to design.

Keep it consistent

However flexible your CMS is, it is important to consider the consistency in your design templates. Training content editors is far easier if the elements that they have to work with are consistent across all pages of the site.

If working with any kind of structured content in your design (for example an article listing that displays a list of titles and excerpts from articles on the website), think of each section as a repeating block. With CSS3 we can more easily target every other item, or the last item, but this is not available for older browsers and it may not be possible to edit the back-end code of the CMS to add a class to every other item or the last item. Ensure that the design will hold up if each repeating block is the same — you can always add extra finesse for those browsers that do support CSS3.

When dealing with areas that are essentially large blocks of content where the user has control over the mark-up, don’t assume the user will remember to add lots of different classes to the mark-up to trigger the CSS effects you envisaged. Either keep things simple or use CSS3 selectors to target areas of the design.

Do not assume content length or height of blocks

On the web it is never a good idea to assume you know how tall something will be — as even where you have control of the content, text resizing can blow your assumed heights right out of the water and cause overlaps or text running off background images.

When designing for a CMS, you have the additional issue of more or less text being added to an area that you envisaged. If creating the initial designs in Photoshop or similar, consider how each box and the surrounding content will react to a greater or lesser amount of content. If providing PSD files to someone else to build, ensure that any background images on these boxes are provided with instructions on what happens if the box is taller. For example do we show more background or matt onto a flat color?

Grid type layouts of boxes can be a particular problem in this situation. A common design might have several boxes with header areas. They look lovely and neat in the PSD comp with regular lengths of lorem ipsum. However, once the content editors have added content, we find that some headings are on one line, some on two and the boxes are wildly differing heights leaving the neat grid looking rather messy. Considering this at the design phase may have dictated a different layout here.

Dubbed2 in Designing for Content Management Systems
The lists on the homepage of the Dubbed Creative website do not depend on height of content: some points have more text than others. This type of layout looks tidier than attempting to create equal height boxes with non-equal lengths of content.

If you are handing over to a front-end developer, thinking through these scenarios keeps the control on your side. Decide how you want it to look and explain to the developer how it should react to text resizing, additional content and so on and you don’t run the risk of leaving these decisions to people without an eye for design.

Avoid using image replacement for text

It is possible to generate images on the server side using PHP and other languages, however your CMS is unlikely to offer this capability as a standard feature. Therefore you should consider how any non-standard fonts will be included in your designs if that text needs to be managed by the CMS.

The situation with fonts is becoming far easier as there are now a number of services that allow you to use fonts that are not installed on your user’s computer but that would otherwise be difficult or impossible to license to include on your website. If you need a specific font you may be lucky and find that one of the below services have it available, or they may have something available which is close enough to get the visual effect you want.

Fontdeck in Designing for Content Management Systems
Services such as Fontdeck and Typekit mean that using images for text is not neccessary to use a specific font.

Consider the CMS when designing navigation

The CMS that you are using is likely to dictate the navigation to some extent, so find out by checking the documentation or speaking with the developers what will be possible. It is useful to know what control content editors have over navigation. If they can add elements to the main navigation for example, it may be that you are best to avoid a neat row of tabs at the top of the site as additional tabs added by users may wrap.

Longtabs in Designing for Content Management Systems
An attractive row of tabs such as these on the Long Hollow Church Website may look untidy if editors have access to add new top level navigation elements.

Questions you should get answers to include:

  • How many levels of navigation will be displayed? Is this configurable?
  • Can content editors add to or change the main top-level navigation?
  • Can you highlight the current page or section?
  • Does the CMS offer breadcrumb style navigation?
  • What mark-up will the CMS output for the navigation? Can we change it or add classes?

Design and create CSS rules for all possible HTML elements

In your design and dummy content you may only use two levels of heading and never add an ordered list or blockquote, However, if these elements can be added in the CMS, then at some point someone will use them. If you have used a CSS reset stylesheet you may not have styles defined for these elements at all — which will mean they look rather strange when used. Ensure that you have created CSS for all HTML elements in the content areas of your site.

I find it helpful to start my stylesheet with the default styling for all elements as this then acts as a fallback if I don’t add specific rules for styles later on in the document. I can always overwrite this CSS to make level 2 headings look different when they are in the main content area to when they are the heading of a sidebar box, but if I don’t add any specific CSS and then the user adds these elements, they do have some thought put into them.

Assume HTML elements can be stacked in any order

When creating your design, it is easy to assume that the content will look very much like your structured sample content. The h1 will be followed by a couple of paragraphs, never stacking headings and so on. The reality will be different once content editors get their hands on the design, so test the elements in different combinations.

Ask yourself questions such as:

  • Does the design still hold together well with stacked headings? Is there appropriate spacing between them?
  • What happens if a heading is used inside a list item?
  • What happens if different list types are nested? Is the spacing correct at the bottom of each list?
  • If the user can insert and align an image, what will then happen to the text around that image? Will there be a margin or will the text run right up against it? What happens if they put an image inside a list item?

Use CSS to enforce the style guide and semantics

This is something we tend to see once users become comfortable with their CMS: they begin to realize that, for example, an h1 heading gives them large bold text. You then start to find h1 headings in all kinds of strange places — wherever the user thinks something should be marked as very important. This can include half of the content of some pages. In the first instance we all need to try and educate our users and provide them with a style guide to help them understand the importance of semantics and correct usage of mark-up but the person you originally train will probably not be the person who manages the content forever and ultimately you will find users being creative with their mark-up.

A considered use of CSS can prevent this from happening. For example, we generally only want one h1 per page. If the main page heading is in a container, then you can use CSS selectors only to target that h1 with the main heading styling and reset the browser defaults on all other h1 headings to the same as the main body copy. This means the user has no benefit to using h1 in a non-semantic manner. The advanced selectors found in CSS3 can be very useful here.

Ckeditor in Designing for Content Management Systems
CMS Editors may want to get creative when given a “WYSIWYG” editor such as CKEditor – use CSS to protect your design as much as possible.

Test with real content

Once your design has been developed into (X)HTML and CSS, test your assumptions in terms of how the content will behave. I find it helpful to do this before the templates are incorporated into the CMS. Points to test:

  • Take each headline or small box in the design. Put in three times the amount of content you would expect it to have. How does it look? Does the box expand nicely or do you run off the background image or overlap another element?
  • Grab a chunk of HTML from anywhere — just View Source on some site and grab a bunch of content complete with HTML tags. Paste it into your main content area in the template. How does it look?
  • If using structured mark-up to display an event or similar — does the design hold up if certain items are removed or do you end up with obviously empty areas such as the word “Tel:” with no phone number after it if a phone number was not entered for a contact?

Help your content editors to maintain the design

If you hand over the CMS with little instruction for your users, then you can’t really expect them to read your mind and maintain the design as you would like. Even if your initial content editor is thoroughly trained on how to edit the site, as time passes by they may forget, or decide to get a little bit creative, or the initial editor may leave and someone else takes over with little training. At the end of the project, keep control over the design by helping your editor to do things the right way.

Remove functionality from the editor

The WYSIWYG editor in your CMS may by default give the user the ability to add all kinds of styling, even adding inline CSS. However, with many editors it is possible to trim down the toolbars to just offer a limited subset of icons and therefore functionality that is exposed to the user. If you can trim down the editor to only offer the ability to add basic HTML elements, you will have far fewer problems to deal with.

Add CSS to the WYSIWYG editor

If content editors have access to a WYSIWYG editor when editing content, add the CSS rules used on the site to the editor CSS. That way, editors can see how their changes to the content will actually look. In combination with using CSS to enforce the style guide, this can help users to maintain the consistency on the site.

Create a style guide that also includes semantics

Include a style guide for the site as part of your handover documentation. It is easy to just handover documentation on how the CMS functions and forget to also explain to content editors which elements they should be using when adding their content. This is particularly important if editors have a lot of control over the mark-up which they enter.

By considering how content will be edited on your site and the possible ways in which, over time, that content will grow and change, you can maintain far more control over a CMS website than you might think. If you have any additional tips or would like to discuss problems you have encountered when designing for Content Management Systems, leave a few lines in the comments below.

Further resources

Here are some additional resources that might help with your own CMS based projects:

(vf) (ik)


© Rachel Andrew for Smashing Magazine, 2010. | Permalink | Post a comment | Add to del.icio.us | Digg this | Stumble on StumbleUpon! | Tweet it! | Submit to Reddit | Forum Smashing Magazine
Post tags: ,


Outstanding Photos Taken With a Camera Phone

Advertisement in Outstanding Photos Taken With a Camera Phone
 in Outstanding Photos Taken With a Camera Phone  in Outstanding Photos Taken With a Camera Phone  in Outstanding Photos Taken With a Camera Phone

By Tim Mercer

They say the best camera is the one you have with you. Your mobile phone is always with you so I guess you could say it’s your best camera. Obviously, a mobile phone’s camera is no match for a professional level DSLR, but you might be surprised at the great pictures many people are taking with their cell phones. Not only are phone cameras getting better all the time, but there’s all sorts of apps you can get for many of them to edit and improve your pics.

In this post we’ll take a look at quite a number of outstanding photos taken with a camera phone. Some of the pics were edited using apps on the photographer’s phone while some weren’t. Feel inspired and don’t forget to take pictures!


Camera Phone Gallery

Marcelosa — A sunset always make for a good time to take a picture.
Sunset in Outstanding Photos Taken With a Camera Phone

Bret Hotchkins — You don’t necessarily have to have a macro lens to take macro pictures.
Th 59782077 DSC00227 in Outstanding Photos Taken With a Camera Phone

Domiriel — This one has great textures and vibrant colors.
Th 4652174121 90be5a6dcd in Outstanding Photos Taken With a Camera Phone

Simon Marussi — This picture has great atmosphere and a sense of calm and peace.
Th 4795253413 E6970ebdef in Outstanding Photos Taken With a Camera Phone

Yellow Flowers — Closer and closer in this photo sequence.
Th 4553702125 Fedf0084d8 in Outstanding Photos Taken With a Camera Phone

Somewhere in Rimini — This photo almost looks like a painting.
Th 4264996862 46ee4fe3d4 in Outstanding Photos Taken With a Camera Phone

WHFrank — The reflection, colors and angle make this picture enchanting.
Th 4279804239 24d553646b-1 in Outstanding Photos Taken With a Camera Phone

Andrew McGregor — This frog sits atop its lilly pad throne cheesing for the camera.
Th 4279804239 24d553646b in Outstanding Photos Taken With a Camera Phone

Amanda — Interesting composition and great color make this camera phone photo great.
Th 4795561846 E6be824c25 B1 in Outstanding Photos Taken With a Camera Phone

Vitaly Marchenko — Never would’ve guessed that this was taken with a camera phone.
Th 500x Vitaliymarchenkonexusone in Outstanding Photos Taken With a Camera Phone

99%: “meh” — LoFi look and warm color tones.
Th 4702005272 1fdf91bc4e in Outstanding Photos Taken With a Camera Phone

Kellyfish — What a wonderful shot of the sky in its sunset colors.
Th 4791729937 2022829f7b in Outstanding Photos Taken With a Camera Phone

Eight M — The texture of this marble statue comes through nicely in this photo.
Th 4782047698 9409435969 B in Outstanding Photos Taken With a Camera Phone

What it do lips — Great picture. The expression, angle and textures all make it a standout.
Th 4783660577 024d04b249 B in Outstanding Photos Taken With a Camera Phone

Sara Montour — The expression on the baby’s face is just priceless.
Th 3947219074 7e17944acc in Outstanding Photos Taken With a Camera Phone

Joe Nobody — This lovely portrait is proof that the photographer takes good pictures – not only the camera.
Th 4784525176 Af0734605f in Outstanding Photos Taken With a Camera Phone

Jonas Peterson — What an amazing shot! Great composition.
Th 2841758741 29850cbec3 in Outstanding Photos Taken With a Camera Phone

Sharonerde — This black and white photo perfectly captures a perfect moment in time.
Th 4588002551 55bd343def in Outstanding Photos Taken With a Camera Phone

Sara Montour — The depth of field and abstract nature of this one is quite appealing.
Th 3946425037 3eb9020919 in Outstanding Photos Taken With a Camera Phone

Robert — This one has a lonely feel to it. Nice perspective.
Th 4592080987 2cca5f9d3d in Outstanding Photos Taken With a Camera Phone

Dude, Walking, On — Close-up revealing the rough texture of a cork in a jar.
Th 4318050042 5d0c63f54e O in Outstanding Photos Taken With a Camera Phone

Taolston — Superb photograph; regardless of what type of camera it was taken with.
Th 3295191352 C0da577f74 in Outstanding Photos Taken With a Camera Phone

Ftlauderdalesun — Stark contrast to the violent and swift water of the beach.
Th 4767849516 71b21be992 in Outstanding Photos Taken With a Camera Phone

Valduur — This is a nice close-up with impressive clarity.
Th 4756536354 F0017912c4 in Outstanding Photos Taken With a Camera Phone

Bit N Bobs — The radial blur in this photo make it seem to move.
Th 4716654573 6a903f0ab7 in Outstanding Photos Taken With a Camera Phone

Carlos Zoilo — This candid portrait is just classic.
Th 4552614242 1b5f9f57be-1 in Outstanding Photos Taken With a Camera Phone

Xell — This portrait really has superb lighting.
Th 201002022140QSlp5V in Outstanding Photos Taken With a Camera Phone

CricKetvn — Vivid colors.
Th 4782408608 8e924092bd in Outstanding Photos Taken With a Camera Phone

Roman Keller — This close-up shot has great clarity and textures.
Th 4797094877 D0c80e6be8 in Outstanding Photos Taken With a Camera Phone

David Wignal — Ahh, the boundless wonder of children.
Th 9592361-md in Outstanding Photos Taken With a Camera Phone

Niels Sangmager — The photographer had to get really close on this shot since there’s no zoom lens on a camera phone.
Th 4245243347 Ce8e639c08 in Outstanding Photos Taken With a Camera Phone

Marco Welt — This picture looks like something straight out of the 20′s.
Th 523072431 8abf1e31ab in Outstanding Photos Taken With a Camera Phone

Mat — Vintage look.
Th 4767588920 E626d264e7 in Outstanding Photos Taken With a Camera Phone

Naenzie — Great expressions and a LoFi filter help to make this photo really cool.
Th 4760474153 602d68a134 in Outstanding Photos Taken With a Camera Phone

Chris Whitehead and Pancho Gutierrez — Self portrait.
Th 23543 116223195057438 116212828391808 315130 5000155 N in Outstanding Photos Taken With a Camera Phone

Further Resources

(ik)


  •   
  • Copyright © 1996-2010 BlogmyQuery - BMQ. All rights reserved.
    iDream theme by Templates Next | Powered by WordPress