Posted by Richard Cirerol on Oct 6, 2009 in
Dotnet |
View Original Article
In September, Cory Isakson and I presented AutoMapper to the Boise .NET Developer User Group (NETDUG). As promised, I have included the sample code here. AutoMapper 1.0 RC1 is available on the CodePlex site.
At my company, we have embraced convention-over-configuration throughout our applications, from our data access framework (Fluent NHibernate) to our IoC container (StructureMap) to our build scripts to our…well, you get the picture. However, we had been hitting a pain point in our application when trying to serialize our domain objects for transport across the WCF service layer. We were also seeing some issues with using domain objects directly in our MVC views. The old way would have been to write that boring left-hand/right-hand code. We all know that left-hand/right-hand code is ugly and pollutes the methods that should be doing real work with ceremonious busy work.
Well, just as we were really getting stung by these pain points, Cory and I started talking about AutoMapper. Now, for those who have no idea what AutoMapper is, check out the Getting Started page on CodePlex. If you want to check out the source, go to the Google code site. Jimmy Bogard, the AutoMapper author, describes the AutoMapper as a convention-based object-to-object mapper.
Different Means to an End
Here is the basic idea… In the past, I would write this classic chunk of code:
var meeting = _repository.GetMeetingById(meetingId);var dto = new MeetingDto();dto.Begins = meeting.Begins;dto.End = meeting.End;dto.Attendees = meeting.Attendees;dto.AttendeesCount = meeting.Attendees.Count;//do something meaningful
With AutoMapper, I can write this instead:
var meeting = _repository.GetMeetingById(meetingId);var dto = Mapper.Map<Meeting, MeetingDto>(meeting);//do something meaningful
Herein lies the beauty of AutoMapper. When your classes align themselves conventionally, your mapping configuration can be as simple as:
CreateMap<Meeting,MeetingDto>();
This is a trivial example, but where AutoMapper shines is in the ability to map lists and nested properties by convention. Or constructing an object based on another object’s properties. All without littering a method with ceremonial code.
Using an object-to-object mapper does have its drawbacks:
- The classic left-hand/right-hand code performs faster than mapped code, although Jimmy has made great strides in increasing performance.
- When defining unconventional mappings, you will still have left-hand/right-hand code
- There will be a learning curve for you (and/or your team) if you have not had experience with convention-based frameworks or some of the .NET 3.5 features.
However, we have found these drawbacks to be trivial when compared to the benefits.
Mapping Toolset
In addition to providing the convention mappings, Jimmy has provided a toolset for enhancing the mappings. Listed here are several tools we either use or find compelling.
Custom Converters: Code to convert from source type to destination type. Defined once and implicitly used for all mappings.
Custom Resolvers: Code to convert from source value to destination value. Defined once for use by any mapping, but must be explicitly used by a mapping.
Custom Formatters: Code to reformat a type for presentation. Like resolvers, formatters are defined once and explicitly used.
Before/After Map Functions: Provides the ability to run custom code before or after the mappings are performed.
Validation Assertion: Provides a method to short-circuit at runtime (or in tests) with an explanatory exception when a mapping may cause failures.
Mapping Profiles: Profile is a base class that helps you organize your code. If you are familiar with StructureMap’s Registry class, you will feel right at home with the Profile class.
Where We Use AutoMapper
We use AutoMapper to transform our object model to our presentation model. This happens in two places – in our MVC controllers and at our WCF service layer.
In the controllers, we will map from a domain model or DTO into the view model. We will also map from our view model into a message object for use by the service or domain.
At the service layer, we flatten our domain model into a DTO or map a message object to run a command against the domain.
Code Samples
I am including the sample code used at the NETDUG meeting. The first sample shows different ways to setup mappings (inline vs. profiles). The second sample shows some usages of custom resolvers, formatters, and before-maps.
Download the AutoMapper source. Jimmy has provided many sample classes and unit tests showing off the usage of different conventions.
Matt Hinze also posted a sample solution using AutoMapper with NerdDinner (of which I borrowed some custom formatter code – Thanks Matt!).
Download the CodeCampServer source. It is full of examples and conventions, including using an IoC/DI implementation of the AutoMapper engine.
Tags: Esoterica
Posted by Saud Khan on Oct 6, 2009 in
Javascript |
View Original Article
WordPress is one of the most popular blogging software with large community behind it. There are numerous themes and plugins which allow you to easily create and manage corporate, news paper, magazine type of websites with it. Due to its popularity and ease of use, developers are constantly looking for ways to extend WordPress even further.

Amazingly WordPress has proven to have a really robust architecture allowing developers to take WordPress beyond blogging. W3Avenue has compiled a list of themes and plugins which allow you extend functionality of your WordPress powered website beyond a blog with minimum effort.
Frankly speaking every plugin is suppose to extend functionality of your WordPress installation in some way. WordPress themes are meant to customize the look and feel, but there are many which also extend its functionality. Our list consist of themes and plugins which either change the overall function of your website from a blog to something else or add new function that will otherwise require a separate software.
Discussion Forum
- OnePress Community
The OnePress framework is an integrated website and forum solution. It is, simply, a WordPress theme to serve as the foundation and framework for your web site and online community. Leveraging the powerful WordPress and phpBB projects, OnePress provides a set of features focused on helping you build and maintain your site from the inside out. With this set of tools, you can easily run your community and do so with professional presentation.
- Simple:Press Forum
Simple:Press is a feature rich forum plugin for WordPress. It fully integrates into your WP based site utilizing the same user records and database and displaying on a single WP page. It is fully customizable and comes with a number of skins and sets of icons to get your started.
Membership Site
- Members Only
Members Only is a WordPress plugin that allows you to make your blog only viewable to visitors that are logged in. If a visitor is not logged in, they will be redirected either to the WordPress login page or a page of your choice. Once logged in they can be redirected back to the page that they originally requested. You can also protect your feeds whilst allowing registered user access to them by using Feed Keys.
- WishList Member (Commercial Plugin: $97)
WishList Member plugin is a membership script that can turn any WordPress blog into a full blown membership site. Popular features include Total Content Protection, Sequential Content Delivery, Easy Member Management and much more.
- Suma (Commercial Plugin: $199)
Suma is a Membership and Subscription Management plugin for the WordPress publishing system. It provides functionality that transforms WordPress into a pay-to-view, membership-oriented, subscription-based content publishing platform.
News Aggregator
- FeedWordPress
An open-source Atom/RSS Aggregator plugin for the WordPress weblog software. It syndicates content from feeds that you choose into your WordPress weblog; if you syndicate several feeds you can use WordPress’s posts database and template engine as the back-end of an aggregator (”planet”) website.
- OneNews (Commercial Theme: $49)
Commercial WordPress Theme that allows you to create a single-page news aggregator like Popurls or multiple-pages news aggregator like Alltop. It allows you to add and arrange feed blocks for normal text feeds; Flickr feeds; Youtube, Metacafe and Dailymotion feeds; and any PHP or HTML code, including JavaScript.
- WP-o-Matic
WP-o-Matic plugin makes automatic blogging a snap by automatically creating posts from the RSS/Atom feeds you choose, which are organized into campaigns.
Email Newsletter / Notifications / Mailing List
- MeeNews
A WordPress plugin that lets you customize the layout of the template as you like, manage mailing lists, create newsletters, etc. Its configuration is very easy and simple and does not require much knowledge of programming; compatible with all major email clients: Outlook, Thunderbird, Gmail, Hotmail, etc.
- MailPress
MailPress is a WordPress plugin that will add Newsletter Mailing functionality to your blog. MailPress allows you to send text or HTML based emails from your WordPress.
- Subscribe2
Subscribe2 WordPress plugin provides a comprehensive subscription management and email notification system for WordPress blogs that sends email notifications to a list of subscribers when you publish new content to your blog.
e-Commerce Site
- WP e-Commerce
The WordPress e-Commerce plugin is a state-of-the-art e-Commerce platform with a focus on aesthetics, web standards and usability. It integrates with Google Checkout, Paypal, Authorize.net, Payment Express and many other trusted payment processors.
Free Themes Using WP e-Commerce Plugin: SimpleCart(js), Crafty Cart, Vanilla Cart, wpStore
- ShopperPress
ShopperPress is a fully featured shopping cart plugin for WordPress, suitable for selling any types of products, services, and digital downloads online. It has built in support for multiple payment gateways allowing you to accept product payments online.
- Market Theme (Commercial Theme: $55)
The Market Theme is a fully featured WordPress theme that transforms a standard installation of WordPress into an e-commerce storefront. Utilizing custom fields all over the place, Market allows you to easily add products, set prices, and instantly create buy now buttons automatically.
- Shop (Commercial Plugin: $55)
Shopp is an e-commerce plugin that adds a feature-rich online store to your WordPress-powered website or blog.
Gallery Site
- Snapshot
Snapshot is a flexible WordPress theme from WooThemese that can be used for either a photo showcase, portfolio or design gallery. It provides two different theme layouts / capabilities to allow you to switch between a photoblog / portfolio showcasing your own work or using Snapshot as a design gallery.
- CSS Gallery
A CSS Gallery Wordpress theme for webmasters who want to build CSS showcase or web gallery. Packed with built in Tagging, Google ads and a sidebar block with 125 x 125 banner ads. Theme is valid XHTML 1.0 transitional and valid CSS.
- More Themes: Gallery, CSS Gallery Theme 2.0
Micro Blog
- P2
A group blog theme for short update messages, inspired by Twitter. Featuring: inline comments on the homepage, a posting form right on the homepage, inline editing of posts and comments, real-time updates so new posts and comments come in without reloading, and much more.
- TWEEM (Commercial Theme: $15)
WordPress theme that let you create your own Twitter Microsite. Features include: ability to create up to 4 tabs of Twitter search stream; easy configuration using built-in theme options; powered by jQuery; built on BluePrintCSS for easy customization.
Job Board
- JobPress (Commercial Theme: $79)
JobPress is a WordPress theme that turns your website into a perfect working Job Board Software. It comes with all features a website of this kind needs; its easy-to-use, easy-to-customize, easy-to-read and a great way to monetize.
Review Site
- GD Star Rating
GD Star Rating plugin allows you to set up rating and review system for posts, pages and comments in your blog. You can set many options for displaying the rating stars, and also add widgets into the sidebars for displaying top ratings and other statistics generated by the plugin. Plugin includes advanced settings panels that will allow you to control many aspects of rating. Plugin also supports multi ratings along with thumbs based ratings. Plugin supports use of cache plugins and dynamic loading of data using AJAX.
- WP Review Site (Commercial Plugin: $97)
WP Review Site plugin turns WordPress into a powerful review site engine, allowing you to easily create user-powered review sites on virtually anything – review products, services, websites, restaurants, hotels, credit cards! Use it to run a complete affiliate review site, or add star ratings to your existing website or blog.
Event Management
- Events Manager
Events Manager plugin is a full-featured event management solution for Wordpress. Events Manager supports recurring events, venues data, RSVP and maps. With Events Manager you can plan and publish your tour, or let people reserve spaces for your weekly meetings. You can then add events list, calendars and description to your blog using a sidebar widget or shortcodes; if you’re web designer you can simply employ the template tags provided by Events Manager.
Directory
- Business Directory
The Business Directory plugin for WordPress is an easy way to host a free Directory page for your readers, affiliates, advertisers, community or club members. Invite them to submit a simple advertisement listing for themselves on your blog. Listings include company name, a short description, and contact information including a live URL. The plugin includes an admin tab that allows you to approve of listings before they appear live on the site. You can also edit and delete listings.
Contact Management
- WP-CRM
WP-CRM is a WordPress system for creating a basic Contact Manager / CRM. The system requires a combination of plugins and a theme. Features: Add contacts from the front end of WordPress; Associate an image with each contact; Assign each contact to a company… or don’t; Create a note history for each contact; Clickable email and website links; Google map contacts address; Dial a phone number; Fully hcard / vcard compatible.
FAQ Management
- iMasters WP FAQ
You can use iMasters WP FAQ plugin to manage FAQ in your WordPress based site. Organize your FAQ’s in categories and put them in posts or pages.
- FAQ-Tastic Lite
FAQ-Tastic Lite is a multiple FAQ plugin for WordPress that makes it easy for you to answer questions from your site visitors. FAQ-Tastic can handle multiple categories of questions on your site.
Wiki
- WordPress Wiki (Commercial Theme: $30)
The “WordPress Wiki Theme” is created with idea that anyone can have a Knowledge Base or Wiki in a few easy to follow steps. The theme come with six color variations to choose from and is very easy to customize. Built with a custom Frequently Asked Questions plugin to help extend the functionality of your web site. The plugin acts as a custom write panel that displays in essence short FAQs below posts in their respective categories.
Classified / Auction Site
- Another Wordpress Classifieds Plugin
This plugin is designed to allow you to add a classifieds ad section to your blog. You can use it to add pretty much any type of classified ads service that can run under a simplified structure taking some basic information from the user.
- Classified Ads Theme (Commercial Theme: $49)
ClassifiedTheme is a Premium Wordpress theme that lets you transform your wordpress or blog website into a genuine classified website. Some of its features include: PayPal integration, autodelete old posts, set ad period and lots more. You can turn your blog into any classified ads type of site, like: auto/car ads, real estate ads, PC Ads, food ads, high-tech ads, etc.
- WP Auctions (Commercial Plugin: $39.99)
WP Auctions plugin enables you to host auctions on your blog.Features include: use any currency; place auctions in a post or page; auctions for registered users only; accept PayPal, wire transfers or checks; sell items on “Buy It Now” basis; upload multiple images for each auction.
- Reverse Auction Theme (Commercial Theme: $54)
This premium theme allows you to transform your WordPress based website into a genuine auction or reverse auction website.
Marketing / Sales
- Affiliate Theme (Commercial Theme: $97)
This theme allows you to build new affiliate websites using WordPress.
- FlexSqueeze (Commercial Theme: $129.99)
WirdPress theme that allows you to create niche blogs for affiliate or AdSense purposes.
Additional Resources
Please feel free to suggest any addition, correction or updates in your comments. You may also be interested in reading following posts published on W3Avenue:
Similar Posts:
Tags: wordpress, WordPress Plugin, WordPress Theme
Posted by 4GuysFromRolla.com Headlines on Oct 6, 2009 in
Dotnet |
View Original Article
jQuery is a lightweight, cross-browser JavaScript library designed to ease JavaScript's most common tasks, including inspecting and manipulating the
Document Object Model (DOM) and making out of band HTTP requests to support AJAX functionality. In plain English, jQuery makes it easy to perform client-side tasks like
adding or removing attributes or CSS classes to elements in the DOM, or showing or hiding elements on the page in response to a user action (such as clicking a button).
jQuery is used by many popular Web 2.0 sites to help implement rich, interactive features. jQuery can certainly be used in an ASP.NET application, although integrating
client-side script into a Web Forms application can sometimes be a bit trying. JavaScript development fits more naturally with ASP.NET MVC
applications; in fact, the ASP.NET MVC framework includes the jQuery libraries. What's more, Microsoft has announced that
jQuery will be included with Visual Studio 2010 and beyond.
I recently had the opportunity to use jQuery in a intranet-based line of business Web Forms application. This application has a number of reporting screens that use a
GridView control to display the report results. Users often want to filter the results to get a more concise snapshop of the data they are interested in, and to that end
many of these reports include a filtering user interface, which is a series of drop-downs, checkboxes, and textboxes, through which they can apply various filtering criteria.
Some of these filtering user interfaces have gotten so expansive that nearly an entire screen of real estate is chewed up by the filtering user interface alone!
We needed a way to collapse this filtering interface and only expand it upon user request. Using jQuery, some CSS, and a few lines of JavaScript, I was able to implement an
entirely client-side approach to expanding and collapsing the filtering interface. This article, Part 1, walks through the nuts and bolts of this functionality. The
upcoming Part 2 looks at how to extend the collapsible filtering user interface functionality so that it remembers the collapsed/expanded state on a user-by-user basis.
Read on to learn more!
Read More >
Posted by Kevin Suttle on Oct 6, 2009 in
Flex |
View Original Article
WOW! Can you believe it?! Adobe MAX Day 1 is complete, and we have seen a ton of new and exciting announcements. It's hard to think we have more to go. Being a die-hard Flash developer, you can guess which...
Tags: air2, Features, flashplayer101, multitouch, ui, UX
Posted by Alessandro Pace on Oct 6, 2009 in
Flex |
View Original Article
Adobe MAX 2009 is underway and yesterday during the keynote Adobe announced Flash 10.1 for mobile phones. It's a new runtime with improved performances and memory usage with support for new mobile platforms such as the Palm Web OS and...
Tags: flash, iphone, News & Events
Posted by nospam@example.com on Oct 6, 2009 in
Miscelleneous |
View Original Article
Wouldn’t it be a little magical if, when you signed up for a new site, it said something like, “We notice you have a profile photo on Flickr and Twitter, would you like to use one of those or upload a new one?” Glenn Jones created a JavaScript library called Ident Engine that can help you do just that.
Tags: Code, Scripting
Posted by nospam@example.com on Oct 6, 2009 in
Miscelleneous |
View Original Article
The value in usability testing comes from the magic of observing and listening as people use a design. The things you see and the things you hear are often surprising, illuminating, and unpredictable. This unpredictability is tough to capture in any other way. Dana Chisnell shows you how.
Tags: User Science, Usability
Posted by Robert Bowen on Oct 6, 2009 in
Design & Graphics |
View Original Article

In the world of freelancing, the entrepreneur has to take on a number of tasks for themselves that would normally be handled by a separate department at a bigger company. Most of these tasks are not part of the creative processes that freelance workers are used to, but rather are more tedious, left-brain paperwork. Right-brain creatives often shudder at the thought of these forays into linear domains. Such detail-ridden tasks would strain any freelancer who wears multiple hats, but they must be completed.
One such task is contracts. Drafting a contract that covers you, and doesn’t just enumerate information, is more than important: it is a must. Freelancers do not have the benefit of a legal department dedicated to protecting their interests with a watertight contract. Nevertheless, a freelancer’s contract must be comprehensive, concise and clear. It should outline the scope of the job, scheduling demands, the expectations of both parties and more.

In this post, we’ll help you identify the information that should be included in your contract and make sure you have a concrete agreement that leaves little chance of things getting out of hand… as can sometimes happen to those of us in the freelancing crowd.
These do’s and don’ts will hopefully remove a lot of the headache and guesswork that comes with drafting a contract. By understanding the rationale behind various contractual elements, you will be able to better customize your contracts to fit the specific job you have been hired for.
The Basics
Include the basic information, obviously. The “who” and the “what” of the project. Who is contracting you to do what kind of work? This is standard stuff included in every contract that defines the job as a whole. While this information is probably well known by both parties, put it in the contract anyway so that everyone is on the same page about their roles and responsibilities. Because it is such basic information, freelancers often overlook how important this section is for establishing the framework of the project.
Do’s and Don’ts
K.I.S.S. Keep It Simple, Simon (your name may not be Simon, but it is nicer than the traditional “S” in the phrase.) Do be sure to clarify your role in the project from start to finish and exactly what it entails, so that the client doesn’t try to put a hat on your head that you do not want to wear (for example, trying to make you switch from designing to providing tech support once the project has launched).
You know who you are and what your strengths are; don’t leave room for the client to change your role in the project for their convenience. Be specific about what roles you are and are not willing to play.
Time Frame

This simply establishes the time that the project will take and the duration that the contract covers. Sometimes a freelancer has to leave time open after a project’s completion to help integrate the product into the client’s existing media stream. But not always. Determining that time frame at the beginning and formalizing it in the terms and conditions of the contract will ensure you are not taken advantage of.
Do’s and Don’ts
Many people do not like deadlines, and some freelancers are no different. Whether you love or hate them, including deadlines in your contracts is important. Don’t overlook this detail simply because of the pressure it may bring. Give yourself enough time to properly complete your tasks, while keeping the client’s timetable in mind.
Being vague about how much time the contract covers will give your client room to find things for you to improve after the project has launched. Also, do be sure to include time frames on when the client needs to respond to your submissions with their questions and concerns, so that you are not endlessly strung along waiting to hear back on how to proceed.
Delivery Details
Putting this in the contract further clarifies expectations at the outset. The client knows up front what the final product will be and how you will be delivering it to them. This frees you from having to guess later on things like what file types they can access, and it gives the client peace of mind knowing that you are both on the same page.
It also gives you an indication of the depth of the client’s knowledge in this area of work and how well they will be able to work with the product once you hand it over. And being able to anticipate the client’s need for assistance in accessing and integrating your product will help you formulate other parts of the contract.
Do’s and Don’ts
Once again, keep it simple. Once you’ve assessed the client’s needs, don’t send them more files or file types than are needed to satisfy the project’s requirements. Don’t try to impress them with a ZIP file full of extras that show how professional you are. This will overwhelm clients who are not design-savvy and encourages needless pestering. Keeping it simple will move your client happily along their way, not only giving you peace of mind from a job well done but freeing you from future distractions as you move on to your next client.
The Financials

For most design work, billing by the job, rather than by the hour, is easier for everyone. You may have already come to an agreement on financial matters, but include them in the contract anyway for good measure. Just because you have an understanding about payment, the client could always conveniently “forget” the amount or change the terms.
Do’s and Don’ts
Agree on an initial deposit (whatever seems fair) before doing any work, to protect both parties if either wants to back out. Make sure the client understands that this deposit protects them as well by committing you to the project and keeping you from being sidetracked by other clients. Also include a Cancellation Clause in the financial section of the contract. This isn’t Santa’s less famous brother; it actually protects you, the freelancer, in case your client backs out by stating the financial obligations of both parties should the project terminate before completion.
Revisions And Alterations
You can also protect yourself by including a clause that states how many alterations and revisions to the product are covered by the fee. You can set the pricing for changes requested by the client that go beyond the number specified in the contract, thus preventing the client from abusing their privilege.
Be clear that this is not a commentary on either party; by including this, you are not implying that the client will be hard to please or that you will need multiple attempts to get it right. It simply recognizes that we sometimes need time to fully process something before making a decision and that we should have the freedom to change our minds about whether an idea works or not once we actually see it in action.
Do’s and Don’ts
Remember that professionalism should win out at all times, so don’t let this part of the contract be any different. Yes, it can be aggravating how some clients come back to you over and over with requests as a result of every whim that moves them, but do be reasonable. Don’t punish all of your clients because of one that burned you in the past. And don’t let pride keep you from accommodating a modest amount of revision by the client, even if they don’t suit your taste. After all, the design may be yours, but they are paying you to create it for them.
The Fine Print And Bottom Line

In the end, make sure the contract is professional and clear throughout, and be as detailed as possible in defining the roles of both parties in the project.
Further Resources
Here are some further articles and related resources:
About the Author
Rob Bowen is a talented author and graphic designer, celebrated podcaster and poet, who is now the co-editor and imaginative co-contributor of Fuel Your Creativity. With a background in most areas of the arts, Rob works from a creative wellspring that shows no sign of running dry.
(al)
© Robert Bowen for Smashing Magazine, 2009. |
Permalink |
14 comments |
Add to del.icio.us | Digg this | Stumble on StumbleUpon! | Tweet it! | Submit to Reddit | Forum Smashing Magazine
Post tags: contact, freelancing
Tags: contact, freelancing, How-To
Posted by W3Avenue Team on Oct 6, 2009 in
Javascript |
View Original Article
Ident Engine is JavaScript library that discovers and retrieves distributed identities and user-generated content filled in various profiles, uploaded photos, videos, reviews, and bookmarks. You can use this library to assist users by presenting one of their existing identities or content as an option on your website.

The library uses jQuery, so initiating a search is simple. First, you need to bind a function to render your results to the library. The library will fire an update every time it finds new data during the search process. The returned data is stored in seven collections: Identity, Profile, Resume, Entry, Event, XFN, and Tag. Ident Engine currently supports 70 sites and 142 endpoint mappings.
Developed by Glenn Jones; Ident Engine is available for download MIT License. Glenn Jones has written a very nice article about Ident Engine on A List Apart that is a must read. You can find further information, demos & download on Ident Engine Website.
Similar Posts:
Tags: Glenn Jones, jquery, Libraries, Libraries/Frameworks, MIT License
Posted by W3Avenue Team on Oct 6, 2009 in
Javascript |
View Original Article
Elastic jQuery Plugin makes your textareas grow and shrink to fit it’s content. It was inspired by the auto growing textareas on Facebook, and is lighter than most of the other plugins created for this purpose.

Implementing Elastic is very straight forward. All you have to do is include the JavaScript file containing the plugin and use the elastic method to make all textareas on the page automatically grow and shrink to fit their content.
Developed by Jan Jarfalk; You can find further information, demo & download on Elastic jQuery Plugin Website.
Similar Posts:
Tags: Form, Form/File/Folder, Jan Jarfalk, jquery