Archive

Archive for the ‘Technology’ Category

AutoMapper – A convention-based object-object mapper

April 30th, 2010 No comments

AutoMapper uses a fluent configuration API to define an object-object mapping strategy. It uses a convention-based matching algorithm to match up source to destination values. Currently, it is geared towards model projection scenarios to flatten complex object models to DTOs and other simple objects, whose design is better suited for serialization, communication, messaging, or simply an anti-corruption layer between the domain and application layer.

Conventions

Since AutoMapper flattens, it will look for:

  • Matching property names
  • Nested property names (Product.Name maps to ProductName, by assuming a PascalCase naming convention)
  • Methods starting with the word “Get”, so GetTotal() maps to Total
  • Any existing type map already configured

Basically, if you removed all the “dots” and “Gets”, AutoMapper will match property names.  Right now, AutoMapper does not fail on mismatched types, but for some other reasons.

Features rundown

AutoMapper supports:

  • Mapping of simple types
  • Mapping to arrays from any IEnumerable source
  • Custom member resolution, for that 1% case you have to do some extra mapping work
  • Polymorphic array mapping
  • Custom formatting for mapping from any type to a string
  • Global formatters
  • Null substitutes for formatting (i.e. a missing Product formats to “n/a”)
  • Profiles, for separating different sets of configurations (JSON vs. ViewModel vs. EditModel etc)

Other features include:

  • Convention of no null destination objects, ever.
  • No null destination array properties, ever.
  • A fluent configuration, with both a method chaining syntax (through Mapper) and object scoping (through a Profile)

For more information, please go to http://automapper.codeplex.com/

Categories: Programming Tags:

Visual Studio 2010 and .NET Framework 4 will be released today

April 12th, 2010 No comments

The new release of Visual Studio 2010 has plenty of compelling new features and updates that will make every developer more productive. For instance:

  • Visual Studio 2010 allows users target of the right platform for their application, including Windows 7, Windows Server 2008 R2, SQL Server 2008, SharePoint. Office, Windows Azure, and Windows Phone 7 applications using their existing skills.
  • Visual Studio 2010 is a rich, personalized development environment.  We know that software developers spend much of their time in the IDE, and features like the new editor and multi-monitor support make your time in Visual Studio more productive and enjoyable.

Teams are able to work more efficiently using Application Lifecycle Management tools. The Visual Studio 2010 team have done a great deal of work in Visual Studio 2010 to improve testing and debugging tools.  Features like IntelliTrace and easy project management help your team ensure high quality.

If you are an MSDN subscriber, later in the day on April 12th you can download Visual Studio 2010 from MSDN.

Free – Moving to Visual Studio 2010 e-book

April 9th, 2010 No comments

It’s a book that will help professional developers move from previous versions of Visual Studio (starting with 2003 and on up). It will cover the features of Visual Studio 2010 through an application. It will go through a lot of the exciting new language features and new versions of the most popular technologies without putting the emphasis on the technologies themselves. It will instead put the emphasis on how you would get to those new tools and features from Visual Studio 2010.

Get your copy here.

Open Data Protocol (OData) SDK is available

April 2nd, 2010 No comments

Open Data Protocol (OData) provides a way to unlock your data and free it from silos that exist in applications today. OData makes it easy for data to be shared in a manner that follows the philosophy of Open Data and enables the creation of REST-based data services. These services allow resources identified using Uniform Resource Identifiers (URIs) and defined in an abstract data model, to be published and edited by Web clients using simple HTTP messages. It enables a new level of data integration across a broad range of clients, servers, services, and tools.

The OData SDK brings together a wealth of resources to help developers participate in the OData including:

  • Sample OData online services (northwind, etc) – open a browser and test out an OData Service.
  • OData client libraries
  • Windows Phone 7 series
  • iPhone
  • AJAX\Javascript
  • PHP
  • Java
  • .NET
  • Silverlight
  • Online OData explorer (Source code also available for download from odata.org)
  • Data Service Provider toolkit: Whitepaper and sample WCF Data Services provider implementation to demonstrate how to create a data service over *any* data source
  • OData validation tool: A test harness and a few sample validation tests to make it easy to validate your OData endpoint.  The harness is designed to be easily extended allowing anyone to easily add new tests.
  • Netflix has exposed their catalog of movies via OData at http://odata.netflix.com
  • Microsoft codename ‘Dallas’ exposes datasets in the cloud and allows developers to access and monetize them using OData
  • SQL Azure now features an “OData easy button” – a one click experience to get your SQLAzure database exposed as an OData feed

For more information about OData, please visit its web site at: http://www.odata.org/

Categories: Announcements, Technology Tags: , , ,

ASP.NET MVC 2 Released

March 12th, 2010 No comments

Scott Guthrie just announced yesterday that ASP.NET MVC 2 final release is available for VS 2008/Visual Web Developer 2008 Express with ASP.NET 3.5.

ASP.NET MVC 2 Features

  • New Strongly Typed HTML Helpers
  • Enhanced Model Validation support across both server and client
  • Auto-Scaffold UI Helpers with Template Customization
  • Support for splitting up large applications into “Areas”
  • Asynchronous Controllers support that enables long running tasks in parallel
  • Support for rendering sub-sections of a page/site using Html.RenderAction
  • Lots of new helper functions, utilities, and API enhancements
  • Improved Visual Studio tooling support
  • Can run side-by-side with MVC 1 (meaning you can have some apps built with V1 and others built with V2 on the same machine)

If you’re planning to use Visual Studio 2010 or Visual Web Developer 2010, they will have ASP.NET MVC 2 built-in.

Please click here to go to MS’s download page.

ReSharper 5 Beta 2 Released

February 19th, 2010 No comments

ReSharper 5 Beta 2 released, works with VS2010 RC build.

Improvements/Fixes:

  • Support for Visual Studio 2010 RC
  • Extended ASP.NET MVC functionality
  • Stable Structural Search and Replace
  • Multiple usability improvements

Learn more and download it.

Microsoft Visual Studio 2010 RC and .Net Framework 4 RC have been released

February 12th, 2010 No comments

Microsoft Visual Studio 2010 RC and .Net Framework 4 RC have been released and available for download. Please click on the link provided below to go to the download page.

http://www.microsoft.com/downloads/details.aspx?FamilyID=457bab91-5eb2-4b36-b0f4-d6f34683c62a&displaylang=en

How To: Fix database access permission on IIS

January 30th, 2010 No comments

Issue:

When deploying your web application to IIS that uses SQL Express database, you get an error stating that “Failed to update database ‘APP_DATA\XXXX.MDF’ because the database is read-only”.

Here’s how you can fix it:

  1. Make sure App_Data directory or any contained files does not have file system attribute Read-only set.
  2. Give user ASPNET and NETWORK SERVICE Modify control over the App_Data directory.
  3. Run IISRESET to restart IIS to refresh its permissions

ASP.NET MVC 2 RC is available for download

January 29th, 2010 No comments

These are the features that have been introduced in the ASP.NET MVC 2 Release Candidate release.

ASP.NET MVC validation scripts have been moved to their own file

To help reduce conflicts with other Ajax libraries, the built-in ASP.NET MVC validation scripts are now in a separate JavaScript file.

ASP.NET MVC validation scripts can be included at the top or bottom of a page

The server component that renders the client validation metadata now renders the metadata into a JavaScript variable. This allows the validation scripts to be included either at the top of the page or at the bottom, because the scripts will look for the variable and load the metadata when it is available.

ASP.NET MVC validation scripts support globalization

When the required ASP.NET Ajax globalization scripts are included in a page, the validation logic uses the culture-specific data for data types (such as dates and numbers) when it validates input text. The new Html.GlobalizationScript helper method can be used to render a reference to the globalization script for the current culture.

Html.ValidationSummary helper method can display model-level errors

Instead of always displaying all validation errors, the Html.ValidationSummary helper method has a new option to display only model-level errors. This enables model-level errors to be displayed in the validation summary and field-specific errors next to each field.

T4 templates in Visual Studio generate code that is specific to the target version of the .NET Framework

A new property is available to T4 files from the ASP.NET MVC T4 host that specifies the version of the .NET Framework that is used by the application. This allows T4 templates to generate code and markup that is specific to a version of the .NET Framework. In Visual Studio 2008, the value is always .NET 3.5. In Visual Studio 2010, the value is either .NET 3.5 or .NET 4.

Here’s the download link:

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=3b537c55-0948-4e6a-bf8c-aa1a78878da0

Categories: Programming Tags: ,

Having a web site: What Do I Need to Get Started?

October 29th, 2009 No comments

Step 1 – Getting a Domain Name
The first step is to get your business a domain – this simply means you need to register a “.com”, “.net”, “.org”, “.biz” or other extension for your business if you have not already done so. This will give you a web site and email address. eg. “www.yourbusiness.com” and “yourname@yourbusiness.com”.

Finding a Domain Name can be difficult since there are only so many words, phrases, and business names available that have not been registered. If someone already has your domain, be creative and try and think of variations that are easy to remember, but still reflect your business name.

Step 2 – Define Features for Your Site
Do you want a simple “Who, What, Where” web site? Or are you looking for more integrative features for your site like the following:

  • E-commerce
  • Content Management (update your content yourself)
  • Newsletters
  • Product Databases
  • Animation
  • Custom Applications

Step 3 – Design and Brand Identity
The third step requires that we come up with the design of your web site. This is simply how your web site looks and feels.

Ask yourself the following questions to better isolate your design needs:

  • Do you have a logo?
  • Do you have peer or competitor sites that you like the look of their web site(s)?
  • Do you already have a relationship with a graphic designer?
  • Do you want a completely custom designed web site, or are you okay with a pre-designed template?
  • What’s your budget?

Custom Designs
Custom designs require our designers (or your designer) to sit down with you, define your needs and goals, likes/dislikes, then send you design ideas for your approval. Design rates are always done hourly, so the better idea you have of what you are looking for, the more cost effective your site will be.

Template Designs for cost conscious customers
Template designs are available for clients who are on a budget. We have thousands of templates to choose from, and we can edit any colors, artwork, photography, or any graphic element to customize the template. We can help you integrate the content and your newly purchased template for a low fee. Please contact us for more information.

Step 4 – Write Your Content
Every web site needs content! The content (or text) for your pages needs to be clear and concise, and must use keywords accurately. No one knows your business better than you – so the writing of you content is a very critical step.

We can help you with this process to make sure your site is better visible in search engines, but the copy should be written by you or your marketing staff/consultant. If you don’t have a marketing copywriter and feel you could use one, contact us and we can help you.

Step 5 – Develop, Test, Deploy!
Once we have your domain, your design, your desired features, and your content finalized, we begin building your site. Using HTML, PHP, ASP, SQL, MySQL, Macromedia Flash, Macromedia Dreamweaver, and other of the latest proven technologies – we begin building your site. We generally deploy to a test server so you can see your site being built in progress! After testing and a final okay from you – we deploy your site to your web site and you are ready to go!

How Long Does It Take To Get My Site Up – Start To Finish?

Obviously we can’t give you an exact time since all sites have different needs, complexity, and varying levels of people involved. As a general timeframe, over 90% of our sites are turned around within 3-4 weeks or less – much faster than most web firms!

Updating Your Web Site

Web sites are updated one of 2 ways – by us, or by you!

When we update your site, we can guarantee it will be formatted correctly, indexed by search engines, and checked for grammar errors. We charge in 15 minute increments of our current billable rate.

For you to update your web site yourself, we need to develop a Content Management System. This costs more up front, and requires a little learning on your part. If you are comfortable with Microsoft Word or online Email (Hotmail, Yahoo! Mail, etc.), you should have no problem.