Category: Technology

Go interactive with local ads and offers

Visit your favorite big box or grocery store online to find special offers available at your nearest stores and print coupons to use during your next visit. Simply type in your ZIP code and you have the same deals from the free-standing inserts (FSIs) found in your Sunday paper.

Now for the fun part: We’ve launched a turn-key solution for creating electronic FSIs that attract customers to local retail stores or to your site. We’re not talking about just uploading a PDF. We’re talking about creating elegant, interactive environments to advertise multiple products, complete with 360-degree product views and videos to highlight specific features. Customers can print coupons, save products to a wish list, and email themselves both to use later. We make it easy to update text and images, too. To learn more about the eFSI and to arrange a demo, email business@solutionset.com

Green IT operations: important for your corporate sustainability strategy

Green IT Operations - Corporate Sustainability

Sustainability has become an important topic for most major companies. Thousands of businesses around the globe currently track and publicly report their carbon footprint.  Initially, pressure from customers, employees and shareholders was a major driver for companies to monitor and report their energy and environmental performance. However, many companies now see sustainability projects as offering the highest ROI of any initiatives they undertake.

IT operations in large organizations typically consume a great deal of energy. Electricity can account for up to 15 to 20% of the data center operating costs. The latest statistics show that data center electricity consumption will double every 5 years. Data centers account for 2% of electricity consumption countrywide and this is growing. More than 30% of servers in the U.S. operate at less than 2% capacity and this is only one of the inefficiencies contributing to wasted electricity.

SolutionSet helps our clients meet the challenges and opportunities of optimizing energy consumption in IT operations:

Assessment and Definition:  we review your IT operation processes and current sustainability activities and recommend strategies and programs to bridge gaps and build upon opportunities.

Planning and Design: working with your internal teams we develop a plan focusing on the areas of greatest impact and ROI that may include:

  • Underutilized server and other infrastructure resources
  • Suboptimal hardware and applications requiring more hardware than necessary
  • Overcooling and hotspots
  • Expensive and non-renewable energy sources

Program Development and Implementation: based on these plans, we help you:

  • Minimize underutilized server resources through virtualization (cloud computing) technologies
  • Optimize servers and application to require less servers and consume less electricity
  • Use alternative energy technologies such as photovoltaics, heat pumps, and evaporative cooling
  • Use thermal profiling to identify hot spots and overcooling in data centers
  • Implement energy usage reporting systems and applications–knowing how much you use is half the battle
  • Develop applications to monitor energy usage not only in data centers but across the organization

Monitoring, Reporting and Refinement: We create dashboards that enable you to coordinate IT information from all over your organization, all over the world, then we flow the information into reports consistent with the reporting standards of the countries you serve.

Stakeholder Engagement: Where appropriate, we can develop online communities that enable you to share best practices with other IT operations professionals within your organization or with other companies. When approached correctly, IT sustainability projects can be extremely positive to your bottom line while contributing to your corporate responsibility objectives. Your relationships with employees, customers, partners and investors are enhanced through your commitment to sustainability.

By Amanda North, Pavel Pragin

Symfony Live Conference, Paris 2010 (Day Two)

A tour de force lasting from 9am to 7:30pm, day two of Symfony Live was packed with informative sessions and, of course, the preview release of Symfony 2.0 (which will be covered in its own separate blog post very soon).  I wrote this post based on my conference notes while on the plane back from Paris on precious little sleep, so please let me know if you find any inaccuracies. For day one of Symfony Live 2010, click here.

All of the presentation slides can be viewed online on the Symfony Live Event page on Joind.in.

Okapi and Symfony

The makers of the Okapi translation framework obtained an early copy of the Dependency Injection Container (DIC) from Sensio and undertook a migration of their product to use Symfony Components. The presentation gave some clues on the architecture of Symfony 2.0. For example, arguments will be passed explicitly to the controller (instead of the controller grabbing the request object itself). Lukas Kahwe Smith warned not to simply pass around the DIC as this defeats the purpose and nullifies performance gains. We were also given a peek into how the Dependency Injection (DI) configuration will use parameter syntax like %dsn% to avoid repetition. Symfony Events, as opppsed to the filter chain in symfony 1, can now call filters only once if necessary. They claim that migrating to the Symfony Routing component took only 2 hours to complete (plus some tweaks). After the migration, Okapi now relies more on Symfony classes than custom classes which means less code to maintain.

Optimizing PHP Code

Xavier de Cock’s presentation on performance was the most low-level in nature (from a technology stack perspective). The beginning of the talk was very Zend focused, and a bit hard to follow for a more application-focused person who is not very familiar with Zend Engine (also because of a thick French accent). Essentially, De Cock is interested in profiling an application, such as SwiftMailer, and analyzing every aspect down to the opcode in order to improve performance. In general, he discourages trying to “outsmart” the underlying opcode caching mechanism, noting that you may end up actually reducing performance. He uses Vulcan Logic Dumper to see what opcode was produced by the PHP code and employed both Xdebug and Zend Debug profilers to identify sections of code that are ripe for optimization.

Suggested tips and tricks

  • Use built-in PHP functions (as opposed to your own custom functions)
  • Use opcode caching (APC, eAccelerator, etc)
  • Use data caching
  • Optimize SQL (usually the number one culprit)
  • Get your data from the 2DB in batches
  • Create a PHP extension (I doubt most of us will I’ll go this far)
  • Use other extensions like HipHop, Phc, Quercus or Roadsend PHP
  • Pre-incrementation of a counter variable inside a loop performs better
  • than post-incementation
  • While loops outperform for loops
  • Stay away from array functions like array_unique() (but they’re dang convenient)

Biggest common mistake: Creating memory leaks created by referencing objects in loops. This is only big deal in processing scripts like daemons (not typical web pages), and the cyclic garbage collection in PHP 5.3 provides vast improvement here.

Bottom line: the most interesting aspect of this talk was seeing what tools and techniques he used to identify slow code, but most developers should not worry about the majority of the techniques he demonstrated and just focus on optimizing database queries because that is where the low hanging fruit is.

Git 101

Scott Chacon is clearly a seasoned speaker, having done the Rails conference circuit, and the high quality of his presentation showed it. The graphics and animation in his slides are more than eye-candy; they genuinely help to demonstrate how Git works. Scott also gave a full-day Git training the day after Symfony Live, which I unfortunately could not attend. I reckon that this presentation was an abridged version of that training sans exercises. There were a lot of points that he did not have time to go into, but here are the high-level features:

  • Developed by Linus Torvalds
  • Used for Linux Kernel and Android
  • Fully Distributed. Each clone is a backup and is equivalent
  • No network connectivity needed to do work
  • Immutable (never removes data)
  • Based on full snapshots (not deltas)
  • Commits are hashed strings (incrementing numbers, although convenient, are not used)

Parts

There are three primary working parts to wrap your head around:

  1. Working Directory
  2. Index
  3. Repository

Workflow

In the Git workflow, there are four primary steps:

  1. Edit Files
  2. Stage your changes (git add)
  3. Review your changes (git status)
  4. Commit your changes (git commit)

Tips

If you’ve been working on a lot of different files and features simultaneously, committing a “changeset” of related edits instead of one gigantic commit is a good idea.

Random Thought by Scott

Although it is theoretically possible for two Git revision hashes to collide, it is more likely that your entire development team will be killed by wolves in separate incidents.

This presentation solidified my opinion that Git is generally better than Subversion and that it should be the SCM of choice in the future. I have been wanting to make the transition to Git as the default SCM for all of our PHP projects at SolutionSet, but existing infrastructure investments and lack of developer knowledge have been a hindrance. I hope that the use of Git for Symfony 2 will speed the adoption of Git in the PHP community and lead to SolutionSet’s transition to Git in 2010.

Writing Clean Class Interfaces with Symfony Events

Dennis Benkert, also the organizer of Symfony Day in Germany, shared his thoughts on how to reduce coupling in your classes and separate concerns. Accoring to Ted Faison, “Coupling is single greatest problem in complex system”. When different classes need to interact, a Service Layer should be used. There are two main ways to achieve decoupling (once you’ve already logically defined your classes): Depency Injection (DI) and Events. DI should be used for mandatory depencies and Events for optional dependencies. This presentation focused on Events.

Types of Event messages in Symfony

  • notify - doesn’t expect a response
  • filter - returns a value to the next filter in the chain
  • notifyUntil - similar to a filter but stops the filter chain when a certain condition is met

When Dennis put out a call on twitter for example of Event usage, he got some useful responses such as allowing someone to override the behavior of a plugin, but the most notable was a sarcastic tweet about using Events to totally obfuscate your classes so no one else can follow them.

Event Usage Pitfalls

  • Don’t use for mandatory coupling (use DI)
  • There is no order to event listeners (if you are expecting this you are doing something wrong)
  • Events make code harder to follow and debug
  • Events can be slow once you add a lot of listeners
  • Don’t use events in the model

There were a couple of memorable quotes from this talk…

A phrase that was picked up by multiple other speakers: “Every time you use sfContext, you kill a kitten”.

And my personal favorite (on the Symfony Events component mascot): “The octopus is keeping his eye on everything. Like with his arms.”

Zend Framework and Symfony

Matthew Weier O’Phinney, project lead for Zend Framework (ZF), started by saying “I am not the enemy”, and I believe him. Given the fact that Zend invited representatives of Symfony and other PHP frameworks (Cake, Agavi and CodeIgniter) to spar at the last ZendCon and the fact that Symfony 2 heavily relies on Zend Components, it appears that ZF and Symfony headed more in the direction of cooperation than competition. That being said, O’phinney still won the best tweet of the conference for saying “I enjoy the fact that Fabien is worried about spilling secrets to me”. Expect ZF to take a few pages out of Symfony 2’s playbook in the future.

Matt explained that there is really no magic to using Zend Components within Symfony; it’s as simple as adding some code for the Zend autoloader in the ProjectConfiguration class. An example of this is given in the Jobeet tutorial, but the code has been optimized to store the autoloader instance. His theory is use the best tools to do what you need to do regardless of their source, be it PEAR, EZ Components, or anywhere else.

Zend Library Standouts

  • Feed Tools
  • Remote APIs
  • Lucene Search
  • PDF generation
  • Queuing
  • Cloud computing

It was exciting to hear Matt talking about the Service Layer concept from Domain Driven Design. With the new flexibility of Doctrine 2 and Symfony 2, it should now be possible to design a richer domain layer within a Symfony project that includes Services, Entities, Data Mappers and a Data Access Layer (DAL). The Service layer is useful for validation and filtering, permissions (ACL) and interactions between Entities. For unit testing he mentioned 80% coverage as a good target (as opposed to 90-100%). Zend libraries can be used to easily expose your service layer as an API. I am looking forward to using this technique on a current project of mine.

Debugging Symfony

Alvaro Videla shared his experience debugging and optimizing a very large German dating site with 2 million members hosted on 28 production servers. He uses the vast amount of data that is stored in Symfony logs to identify slow areas of code by using a flag in APC to turn logging on in the production environment for a short period of time on each server and store the logs in CouchDB. CouchDB was able to handle storing 15 million log records in the first week!

Debugging Tools and Technologies Used

  • AWK - for extracting log data
  • avRedisLoggerPlugin - a persistent key-value database
  • Tsung - a high performance, open source benchmarking framework
  • XHProf - code profiler
  • Graphite - a powerful data visualization tool

He uses logging to detect site outages by generating an alert if say 100 DB connection error logs happen within a minute and calls this “threshold logging”. Alvaro is also the developer of the FireSymfony Firefox plugin, which is an awesome replacement for Web Debug Toolbar except for the fact that it doesn’t work with the latest version of Firefox. Well, at least it doesn’t work for me on Snow Leopard and a lot of other people if you check the support forum.

Implementing a CMS in Symfony

When Marcos Labad set about providing a Content Management System (CMS) for his client in the publising business, he looked at the major options available in early 2009 (Sympal, Diem and Apostrophe) and decided to roll his own. Key aspects to the success of his project were great people, good communication, designating stakeholders and planning backwards.

Why Choose Symfony as base?

Active development and support Some Learning curve but good documentation Big and growing community Form framework Easy maintenance and support for the final owner Based on good practices and patterns Reusable parts Easy to integrate new engineers

Why not Drupal or Joomla? Not good for specific data models Learning curve as well May be fast to implement but are hard to maintain and extend

Tips

  • Don’t forget about 301 redirects when upgrading a site
  • Use Doctrine behaviors to save time

Symfony in the Cloud

Kris Wallsmith, release manager for symfony 1.3 and 1.4, is currently working on a startup called nebul.us which allows users to passively share what they are doing online (as opposed to actively blogging or tweeting about it). It seems like a powerful idea if they can make it easy enough to control what people see without making it an active process again. He made some very good points about deploying nebul.us (or your app) to the cloud:

  1. You don’t need to know how the could works, you just need to know how to use it, and hosting providers like Rightscale, Amazon and others make it easy
  2. There is nothing difficult about deploying to the cloud. It’s essentially the same LAMP stack you are used to.

Query Splitting

Kris put a lot of thought and into query splitting and has shared his work in the sfDoctrineMasterSlavePlugin which uses database transactions by default.

File Uploads in the Cloud

Files in the cloud will need to be:

  • Uploadable to a service (like S3)
  • Retrieved from a service in the view (with a helper)
  • Disable-able (for the dev environment)

Deployment Tips

  • Use the symlink method so you site is only down during the database migration (and not the code update)
  • When using migrations during deployment, be sure to only execute once

Symfony at Yahoo!

Dustin Whittle joined Yahoo! with the assignment of migrating Yahoo! Bookmarks to symfony. Once Bookmarks was proven as a test case, Yahoo! went about migrating several more web properties, such as Yahoo! Answers, to symfony. Yahoo! Answers is the largest collection of human knowledge on the Internet (515 million answers). Clearly, a generic ORM is not going to cut it for a data store of this size, so Yahoo! only uses symfony for the presentation layer and uses web services to retrieve the data (although for smaller projects Yahoo! still uses Doctrine). Dustin makes a good point when he says, “all PHP developers use a framework, even if they don’t think so”. In other words, your non-framework based project still makes design choices that could be considered a framework. Dustin works for Rasmus Groth (the creator of PHP), who believes that you should design your application to solve your particular problem and nothing more. It was this kind of thinking that led Sensio to create Symfony 2 with much more flexibility.

Yahoo! Symfony Plugins

Yahoo! has created and shared a handful of plugins that they use to build symfony applications. They all start with a “y”, for example:

  • ysfBuildPlugin (for deploying performant apps)
  • ysfR3Plugin (for Yahoo!’s flavor of translation)
  • ysfDimensionsPllugin (adding depth to symfony’s configuration)
  • ysfYUIPlugin (for Yahoo!’s javascript library)

Tips and Observations

  • Scalability is when you can add hardware and get a proportionate increase in performance
  • Most performance comes not from the language, but from the design -Rasmus
  • Don’t spend more time managing the cache than retrieving data from it
  • Don’t use .htaccess (use regular Apache config for better performance)
  • Aggregate and minify your CSS

Dustin encouraged developers to get to know the Yahoo! Open Stack.

MOST INTERESTING MOMENT: After plugging YUI, Dustin asked the room to raise hands to show what javascript framework they use. jQuery left all other libraries in the dust. Then he tweeted “It just clicked how many jQuery users there really are…”

Symfony 2

The preview release of Symfony 2 deserves it own post, which I will post soon.

For day one of Symfony Live 2010, click here.

Symfony Live Conference, Paris 2010 (Day One)

Today was the first day of Symfony Live, the biggest symfony conference of the year and there has been a LOT going on. For day two of Symfony Live 2010, click here.

All of the presentation slides can be viewed online on the Symfony Live Event page on Joind.in.

sfPot

I don’t know if this event was named after Fabien Potencier (the leader of the symfony project) or what, but it was a good chance to drink some locally brewed beer with other serious members of the symfony community before the actual conference at Le Frog’s pub in a charming part of Paris.  I learned that Fabian thinks “Symfony 2 isn’t really an MVC framework in the typical sense”, but I’ll just wait until Wednesday’s unveiling of Symfony 2 to get the juicy details. Note: This event coupled with jet lag induced me to miss the first presentation the following day on internationalization.

Working with the Admin Generator

John Cleveley gave a useful and witty presentation on working with the symfony admin generator which included tips that are not in the documentation.  I did not know that the admin generator automatically created REST routes for your modules or the best techniques to go about creating your own admin theme.  Here are his “Ten Commandments”:

  1. Understand the client’s workflow
  2. Think about security from the start
  3. Look through and understand the auto-generated, cached PHP files
  4. Change the table_method call to reduce database calls
  5. Use a custom (bespoke in U.K. english) form class for the admin if its different from your app(s)
  6. Keep form configuration in the form classes (as opposed to the generator.yml) where possible
  7. Create a theme or plugin to reuse your work
  8. Consider users with small screens
  9. Create functional tests to guard against regression
  10. Maintain good MVC and decoupling practices

He also recommended the sfAdminDashPlugin and sfAdminThemeJsRollerPlugin.

Microsoft Presentation

Two representatives from Microsoft gave a pitch on the history of supporting PHP within Microsoft, the Open Source Techonology Center (OSTC) and using Windows Azure for cloud applications.

Symfony Internals

Geoffrey Bachelet quickly walked the audience through symfony’s execution of a request in a french accent so thick you could cut it with guillotine.  This was a review for advanced developers but a very useful reminder of the relevant design patterns that symfony implements such as the Observer and Chain of Responsibility.  It was enlightening to learn that returning the “Error” template is not often used since the new form framework was introduced and that the proper way to serve ajax requests for HTML is with the “None” return value in your action.

Doctrine Migrations

Dennis Benkert, the orgnizer of Symfony Day in Germany, shared his knowledge of Doctrine migrations which are largely inspired by Rails migrations.  I was pleased to learn that Doctrine now has command line tasks that will compare your newt schema.yml file to your existing model classes and generate a “migration file” for you.  This migration file is associated with a numbered and timestamped version of the database and consists of an up() and down() method which you run on your production database at deploy time.  This will replace the risky, error-prone and annoying process of having each developer maintain a SQL file with schema changes.  It is worth noting now that rollbacks don’t often work if a failure occurs during the migration and that Doctrine 2 will use a totally new migration technique.

Doctrine 2

The most exciting presentation of the day was given by Jon Wage on Doctrine 2.  With all of the talk recently about the Propel project being reinvigorated of late, this was Jon’s chance to show that Doctrine is still in the leading spot as far as PHP ORMs (Object Relational Mappers) go.  Given the features that Jon showed and that Fabien and Sensio are currently supporting Doctrine, I would agree that Doctrine is definitely the ORM to choose when starting a new symfony project or choose which one to learn.

The codebase has been completely rewritten to take advantage of PHP 5.3 and performs a LOT faster according to the benchmarks reported. Fabien requested that they “Remove the magic”, so there will be a bit more work for developers to do, but a better understanding of what is really happening and more control for advanced queries. A key feature is the separation of the ORM and the DBAL (Database Abstraction Layer). This will allow for the DBAL to used as a standalone component if desired and will allow for schema-to-database comparisons and improved migrations.  DQL (Doctrine Query Language) will be a true language with a recursive parser that builds queries and throws useful, informative exceptions.  A more explicit relationship between your model classes (based on PHP comments) will vastly improve entity inheritance, performance and the ability to write raw SQL and still get hydrated objects back as a result.

Worst case timeline for a stable release is six to twelve months.

Offline Admin Generator with HTML5 and Gears

Thomas Parisot’s offline admin generator is a peek into the future of running web applications offline.  Neither HTML5 nor Google Gears (which is discontinued) is supported enough to make this a reality for a consumer application yet…perhaps if you can force people to use a particular browser.  He did make some interesting observations about how it is possible make a javascript listener on every form that posts to the server to generically capture and locally store all of the transactions in the local SQLite database.  There are two models to choose from when designing an offline app.  The simpler approach is to have the user explicitly request to switch to “offline” mode before they lose connectivity.  The preferable, yet more complex approach is to always store transactions locally and then check if the connection is still up when moving from the local copy to the database.  Admittedly, the sample offline admin generator was more of a proof-of-concept than anything we can expect to actually use in the near future.

The Symfony Community

Finally, Stefan Koopmanschap, the current symfony community manager, gave a talk about how to properly get involved in the symfony community.  There are the Google Groups (symfony-userssymfony-docssymfony-devs and symfony-community).  If you can’t find what you want there, then there are the IRC channels or sending out a tweet with the #symfony hashtag.  There are many local groups as well.  For example, the San Francisco Symfony Meetup group where I’ll be giving a recap of Symfony Live in the near future.  He stressed that if no one contributes, then there is nothing to be gained from the community, so please submit bugs to Trac if you find them, answer people’s questions, speak at a meetup or conference and introduce yourselves to your fellow developers!

For day two of Symfony Live 2010, click here.

SEC rules on global warming: green + digital = standard business practice

Last week the Securities and Exchange Commission ruled for the first time that public companies must alert investors of any serious risks that their businesses may face due to global warming. Environmental issues have been among the threats that the SEC has required companies to disclose, but this is the first time that global warming specifically has been called out. This is just the latest indicator that “green” is becoming a standard and necessary consideration in business practice. Business leaders across industries proactively are analyzing the impact of their activities, developing strategies aimed at improving efficiency, engaging their employees in the process and reporting the results to their various constituencies.

Digital technology is a key enabler for businesses in their quest for sustainability. Digital dashboards aggregate enterprise data and compare it to standards set by leaders in their industry and, increasingly, by regulatory authorities. Business information systems analyze the information and focus decision makers on optimizing consumption of resources like water, paper and power. Online communities encourage employees to participate in making their areas more efficient and share tips. Social networking media technologies enable companies to share their results with broad constituencies and invite discussion. New C level positions are being created to oversee this process. In addition to the societal benefits they are generating through investment in sustainability projects, these executives report very positive impacts to their bottom line.

Digital technologies and services are powerful tools for companies exploring sustainability and engaging in these practices. In the area of paper consumption alone digital communications can reduce or eliminate paper by helping companies migrate to online investor and corporate responsibility reports, using electronic forms, creating online communities to support customers, partners and developers, and shifting to “eCirculars” and web-based information instead of printed materials distributed by the US Mail.

Businesses who pursue digitally based sustainability strategies succeed in achieving the dual goals of: “adopting business strategies and activities that meet the needs of the enterprise and its stakeholders today while protecting, sustaining and enhancing the human and natural resources that will be needed in the future.” (World Commission on Environment and Development)

See the New York Times editorial 01.31.10 about the SEC ruling.

It’s 2010 - do you know where your IE6 is?

SolutionSet has been carefully watching the browser market share for IE6 and there’s a promising trend: IE6 has lost more than 1% of the market every month in 2009. With only 5% of the market in the United States, IE6 now has fewer users than the latest version of Safari and an old version of Firefox. Globally, IE6 is faring much better, but even with 13% of the market it still dropped the same 1% per month that it did in the US. It will be interesting to see if the trend continues throughout 2010. Keep an eye on the Windows 7 market share as an indicator of what’s in store for IE6.

This news means that SolutionSet is now ready to phase IE6 off our list of browsers we support. Unless a project has IE6 as a specific technical requirement, supporting IE6 should be seen as an additional development cost that could potentially be avoided. Already it makes sense to deliver a degraded experience to IE6 for certain design elements such as rounded corners and drop-shadows. As major corporations start the slow upgrade to Windows 7, 2010 is shaping up to be the year that IE6 finally becomes a thing of the past.

Optimizing your workflow as a front end developer

Harder, better, faster, stronger

Working in a fast-paced environment on a stressful project with a short timeline can easily take a knock on your development time and efficiency. Here are some tips to quickly get organized and get coding.

Review the designs

When you’ve first find out that you’re starting on a new project, ask the assigned Project Manager if there can be a period of time reserved before development for review:

  • Resolve any inconsistencies between page designs
  • Get all of the fonts being used in the design for sIFR or Cúfon
  • Ask any questions that you may have about the design, for example: Does that box stay the same height, or will it grow with content? Is that text going to be part of the image?
  • Bring up any potential issues and figure out a strategy for resolution before starting development
Build templates

When building HTML templates, it’s best to start with creating your global elements, then work towards specific page elements.

  • Build out the global elements first
  • Build the secondary page templates
    • Make sure your layout works in all browsers after adding in some filler copy
  • Build out the home page
  • Build out important secondary pages or various landing pages
Know your browser bugs

Keep track of known issues you could encounter when building a page. The best way to prevent having to constantly cross-check everything is to stick with code that you know will work with multiple browsers. Try to not get too extravagant with your HTML and CSS. Sometimes even the code you think will work doesn’t.

When you know what bugs or differences in rendering you’re likely to encounter you can squash the bug and resolve differences before the QA cycle.

Choose a reset stylesheet that you can agree with

There are so many options out there for reset stylesheets. Many will change the font-size of all elements, which you may not want. Some will change the font-size to go with the hierarchy of tags [h1, h2, h3, etc]. You’ll be changing most of these values to match your design anyway, but what if you’re just working on clickable wire-frames?

What are some of your options?

  • YUI Base - Sets default sizes for some elements
  • YUI Reset - Sets all font-sizes to 100%
  • MeyerWeb - Sets all font-sizes to 100%
  • Blueprint - Also has helpful grid CSS for fast templating
  • There are many more out there. Do your research and build your own if you want!
Options for IE6 specific issues

It can be a hassle to deal with 24-bit transparent PNGs. It’s the alpha-transparency that kills us, really. For inline images, it’s usually easiest to use something like DD_BelatedPNG. For background images that are added via CSS, always go for the CSS option: Microsoft’s AlphaImageLoader.

Both of these options run on page load, so they can slow down your page-load time. If you can avoid PNGs, stick to using GIFs. If you have no other option, approach with caution as functionality may be limited by IE6.

Some notes about AlphaImageLoader:

  • The code: filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(sProperties)
    • The only part you will need to change is sProperties: src=”” and sizingMethod=""
  • The src is always relative to the page that you will be viewing.
    • If the image is to be displayed on http://test.com/about/news/ and your image lives at http://test.com/images/news/transparent.png the src should read: src="/images/news/transparent.png"
    • Note the preceding /. This means start at the root directory and work your way down. Simply putting src="images/news/transparent.png" won’t work.
    • Normally in your CSS you may format the image paths relative to where your CSS lives: background-image: url(../images/transparent.png);. This path formatting wouldn’t work either, because IE6 would then be looking for transparent.png in http://test.com/about/, where it doesn’t live.
  • There are three options for the sizingMethod attribute, but usually it’s best to go with the scale option. This depends on what you’re trying to put a transparent PNG background on, though.
    • scale: scales the image to fit within the constraints of the container
    • image: scales the container to the size of the image
    • crop: crops the image to fit within the container

Another issue to look out for is the use of floats, margins, padding and positioning, and a combination of the four in IE6/7. Making too many nested elements position: relative; will cause some of the items to be displayed in the wrong place, or the z-index of other elements to be completely off.

  • Limit your use of position: relative; and -absolute;
  • Floated elements with margin and padding can sometimes cause layout problems
  • Don’t use negative margins too frequently as many browser hacks are needed to make the elements render correctly
Use browser specific stylesheets sparingly

Reducing the number of stylesheets used will make it easier to manage the site later on. However, there are many cases where you should use browser specific stylesheets, i.e. when applying Microsoft’s AlphaImageLoader, because filters will make your CSS invalid.

If there are small differences between browsers, there’s no reason to create separate stylesheets, just add them in to your current CSS using browser hacks (IE6 only: _property: value;, IE7 and older: *property: value;). Currently there are no one-line browser hacks for IE8, Firefox or Safari, although all three of these render nearly the same.

However, there are options for Safari and Chrome only, which appear to work flawlessly:
@media screen and (-webkit-min-device-pixel-ratio:0) {

    /* Safari 3.0 and Chrome rules here */

}

And there are other options for Firefox only, which require more research:
/* Firefox 1 - 2 */

    body:empty #firefox12 {

    display: block;

}
/* Firefox */
@-moz-document url-prefix(){

    #firefox { display: block; }

}

Drumroll please

Black Friday effect: Weekend sees rise in shoppers
More shoppers hit stores, but spend less each
Shoppers fill streets if not their bags
Shopping’s up, spending’s down

This is a sampling of headlines from reports on Black Friday consumer shopping activity (USA Today, NYT, WSJ and Washington Post). Just from the headlines, you get the idea. As anticipated, there were lots of people out shopping over the weekend - NRF estimates 195 million people shopped in stores or online during the four day weekend up from 172 million last year.

But, they were spending less than last year. Consumers spent an average of around $343 this year vs. $373 a year ago. Total spending was on par with last year at $41.2 billion.

What were they buying? Well at Walmart.com, one of the biggest sellers was the  Bissell Steam Mop Hard Floor Cleaner, indicating that this may well be the year of practical gifts. Consumer electronics, especially flat screen TVs, digital cameras, e-readers and game consoles were also big sellers.

If this news seems anti-climactic, take heart in the fact that the forecasting models predicted this behavior.  Expectations are set, and consumers are generally incredibly predictable. Short of money falling from the sky, we’re probably not going to have any surprises this holiday shopping season.

Makes one wonder if the notion of pent-up demand is a thing of the past, or if we’re going to see a post-holiday spending spree? President’s Day shopping forecasts anyone?   

What can direct marketing offer the post-crisis consumer?

The TEDxKC conference was held in Kansas City in August, sort of a mini-TED, featuring several speakers in one evening. John Gerzema, Chief Insights Officer at Young & Rubicam, gave a talk about the post-crisis consumer. He shared his thinking on four major cultural shifts driving new consumer behavior and importantly, how businesses are evolving to connect with the post-crisis consumer.

Two of the trends that seem particularly relevant for direct marketers are: 

1. Consumers are looking for value and values. In direct marketing, we excel at articulating the value of a product or service. We deploy proven techniques for closing the sale based on years of testing and research. Most of the techniques revolve around the notion of value, convincing prospects that they are going to get the most for their money if they buy product X from brand X. This concept is core to our business. And it has worked! Especially pre-financial crisis, when consumers were engaged in conspicuous consumption.

However, if Mr. Gerzema’s trend plays out, if it is true that post-crisis consumers are looking for value and values as they move from mindless to mindful consumption, then our direct marketing techniques will need to accommodate this shift. In addition to our urgent messages touting the best value, will we also include at the same volume a sustainability message? Indicate that brand X’s facilities are all LEED certified? That the products are Fair Trade? 

Mr. Gerzema presented some compelling data to show this trend is well underway; as consumers are saving more and buying less, they are becoming more discriminating with the purchases they make. They are aligning values with spending. As such, if your company has values to tout that align with the values your core prospects and customers are looking for, maybe you shouldn’t ignore them in your direct marketing. It is probably worth testing a value + values message vs. a stand-alone value message. 

2. Durability. According to Mr. Gerzama’s research, consumers are looking for durability in the goods they’re purchasing. For example, people are keeping their cars longer than ever before - 9.4 years on average as of March. You can imagine this plays out amongst many product categories. So, what’s a marketer to do? This is where a CRM strategy comes in to play. If marketers can no longer primarily count on acquisition, engagement & contact with existing customers will be critical. We will all need to commit to analyzing data to learn customer preferences, understand what else we might sell them that will maintain and enhance their primary purchase (new tires? a service plan?), and what we can offer them to earn their loyalty and their next big-ticket purchase (a car-care workshop?). In the not-too-distant past, many marketers considered a CRM program a nice-to-have, favoring acquisition marketing. If this durability trend plays out, it may finally force the tables to turn.     

October Symfony Training Recap

Symfony WorkshopSolutionSet hosted its first symfony workshop last week on October 14-16th at our San Francisco office at 85 Second Street. Eight developers participated in the 3-day (9 to 5) training exercise targeted at beginner symfony users. People flew in from as far away as Michigan and Denmark! The following topics were covered:

  1. Introduction to Symfony
  2. From Flat File Application to MVC
  3. Actions and Templates
  4. Configuration and Model
  5. Model and Doctrine
  6. Conclusion and Environments
  7. Installation
  8. More with Doctrine
  9. Routing and Forms
  10. Admin Generator
  11. Session and Credentials
  12. Unit and Functional Testing

The material was well-matched to the experience level of the majority of attendees. In the future, we hope to develop an “advanced” curriculum that would benefit experienced symfony users. The next SolutionSet training will likely be held in San Francisco in early 2010. More details about future workshops will be posted at http://www.solutionset.com/symfony when they are finalized.