background preloader

Code

Facebook Twitter

App Template of the week: Bringing a Wordpress site to the Windows 8 store - Go DevMENTAL. This week’s template allows you to take a website build using Wordpress.org and turn it into a Windows 8 store app If you missed any other templates of the week, you can find them here.

App Template of the week: Bringing a Wordpress site to the Windows 8 store - Go DevMENTAL

This week’s template was created to make it easy for a Wordpress.org user (not wordpress.com) to quickly create a Windows 8 store app to showcase the content on a Wordpress site. Platform Windows 8 Functionality View your blog posts by categoryView recent blog postsView your pagesView and post commentsBookmark favourite posts Windows 8 features. ASP.NET MVC 2 Localization complete guide. In this article we are going to explore all aspects of localization web application based on ASP.NET MVC framework.

ASP.NET MVC 2 Localization complete guide

Localization. Testability and Entity Framework 4.0. Testability and Entity Framework 4.0 Scott Allen Published: May 2010.

Testability and Entity Framework 4.0

How to: Implement Remote Validation in ASP.NET MVC. ASP.NET MVC: Handling Exceptions and 404 Errors. In a previous article, we saw how to use ELMAH for managing unhandled errors in MVC applications.

ASP.NET MVC: Handling Exceptions and 404 Errors

If for some unique scenario, ELMAH does not handle your needs, you can fallback on the default HandleError Attribute in MVC. In this article, we will see how we can use the HandleError attribute to quickly put together an exception handling mechanism that helps hide the ‘dark’ underbelly of your application but helps you debug with the same configuration.

We will also look at a solution to handle 404 errors gracefully. Overall we try to achieve the following on IIS 7+ Goal 1 - Use MVCs HandleError action filter to take care of Unhandled/Unexpected errors Goal 2- See only user friendly messages at Runtime Goal 3 - See exception stack traces at debug time Goal 4- Manage 404 error with a proper error message Goal 5 - Keep a 404 Response status The HandleError Attribute The HandleError attribute helps mark controller classes for ‘Unhandled Error’ exceptions. Setting up the Custom Errors page. MVC 3: Layouts and Sections with Razor. This is another in a series of posts I’m doing that cover some of the new ASP.NET MVC 3 features: In today’s post I’m going to go into more details about how Layout pages work with Razor.

MVC 3: Layouts and Sections with Razor

In particular, I’m going to cover how you can have multiple, non-contiguous, replaceable “sections” within a layout file – and enable views based on layouts to optionally “fill in” these different sections at runtime. The Razor syntax for doing this is clean and concise. I’ll also show how you can dynamically check at runtime whether a particular layout section has been defined, and how you can provide alternate content (or even an alternate layout) in the event that a section isn’t specified within a view template. This provides a powerful and easy way to customize the UI of your site and make it clean and DRY from an implementation perspective. MVC 3: Layouts with Razor. Two weeks ago we shipped the ASP.NET MVC 3 Beta Release.

MVC 3: Layouts with Razor

It supports “go live” deployments, and includes a bunch of nice improvements/enhancements. You can see a summary of the new ASP.NET MVC 3 features in my beta announcement post. Also read my original ASP.NET MVC 3 Preview post to learn about other ASP.NET MVC 3 features that showed up with that initial preview release. Necolas/idiomatic-css. Smart CSS Ain’t Always Sexy CSS. The web professional's online magazine of choice.

Smart CSS Ain’t Always Sexy CSS

In: Articles By Martin Ringlein Published on July 15, 2008 There is an emerging desire to want to be sexy. When did we become so afraid of maintaining, updating, and manipulating HTML? When it comes to our CSS, we all agree that being bloated, slow, and messy are less than attractive traits—but the CSS used in enterprise-wide and mass-adopted web applications, or those with significant daily unique visitors or websites that demand extreme extensibility and flexibility, being smart isn’t always being sexy.

Québec Original. Semantic approach in naming convention. Unit Testing ASP.NET MVC. Testable MVC Building Testable ASP.NET MVC Applications.

Unit Testing ASP.NET MVC

Generic Repository: Fake IDbSet implementation update (Find Method & Identity key) « REFACTOR (this) Walkthrough: Using TDD with ASP.NET MVC. A best practice in MVC is not to include Entity Data Model (EDM) or any other data-access framework code inside your controller.

Walkthrough: Using TDD with ASP.NET MVC

Instead, you should use the repository pattern. The repository sits between the application and the data store. A repository separates the business logic from interactions with the underlying data base and focuses your data access in one area, making it easier to create and maintain. The repository returns objects from the domain model. Isolating Code under Test with Microsoft Fakes.

Microsoft Fakes help you isolate the code you are testing by replacing other parts of the application with stubs or shims.

Isolating Code under Test with Microsoft Fakes

These are small pieces of code that are under the control of your tests. By isolating your code for testing, you know that if the test fails, the cause is there and not somewhere else. Stubs and shims also let you test your code even if other parts of your application are not working yet. Visual Studio’s Best Kept Secret – Compare & Update Database Schemas Right in Your IDE. When working with different iterations of a SQL database running on Internal, Staging and Production infrastructure it can become a pain in the ass rolling out updates at deployment time or keeping them in sync. Developers often use third party tools to help them do this job, however depending on what version of Visual Studio you have installed, there may be another option you have overlooked, and it’s baked right into the IDE.

This post is part of a multi-part series on Visual Studio’s Database tooling. Along with an in-depth look at the database tooling, I will include ways to include these tools in your Continuous Integration Setup to help you achieve automated database awesomeness… Visual Studio Premium upwards contains a whole heap of best-in-class tools for working with databases. Writing a ContinueAfter method for Rx. With Reactive Extensions you sometimes need one observable sequence to run after another observable sequence completes. Perhaps the first one has side effects the second one depends on. Implementing an asynchronous settings service, Part 1 : Going Async. TL;DR: This article is part of a series about implementing asynchronous services contract, and starts by an the creation of basic functionality for a User Settings storage service using C# 5.0 async features. In the next episode, we'll talk about writing a user setting and consuming settings change notifications.

Most of the time, this is pretty much CRUD-like contracts that do not offer much to perform asynchronous reading/writing, easy two-way data-binding and notifications. Some offer change notifications, but most of the time, this is related to roaming settings that have been updated. Reading settings in a synchronous way is a common performance issue, and most of the time accessing the data can be expensive, which is not good for the user experience. For instance, the Silverlight and Windows Phone IsolatedStorageSettings implementation has a pretty big performance hit during the first access, due to the internal use of Xml Serialization (and its heavy use of reflection). Windows Azure Developer Center - Intro to Windows Azure. Azure is Microsoft's application platform for the public cloud. You can use this platform in many different ways.

For instance, you can use Azure to build a web application that runs and stores its data in Azure datacenters. You can use Azure just to store data, with the applications that use this data running on-premises (that is, outside the public cloud). You can use Azure to create virtual machines for development and test or to run SharePoint and other applications. How can I publish database in VIsual Studio 2012 Server Explorer. Environments for Windows Azure development - Tom Hollander's blog. Windows Azure Websites, Web Roles, and VMs: When to use which? - The Silver Lining Blog.

The June 7th update to Windows Azure introduced two new services (Windows Azure Websites and persistent VMs) that beg the question “When should I use a Windows Azure Website vs. a Web Role vs. a VM?” A successful Git branching model » nvie.com. Microsoft Spain - Domain Oriented N-Layered .NET 4.0 Sample App. 30+ PHP Best Practices for Beginners. Page 4 - Object Oriented Programming in PHP. Introducing “Razor” – a new view engine for ASP.NET. HttpClient is Here! - Henrik's Blog.

HttpClient is a modern HTTP client for .NET. Lazy Remote Validation with ASP.NET MVC 3 - Pietro Brambati Blog. The Repository Pattern. Implementing the Repository and Unit of Work Patterns in an ASP.NET MVC Application (9 of 10) The Contoso University sample web application demonstrates how to create ASP.NET MVC 4 applications using the Entity Framework 5 Code First and Visual Studio 2012. Bundling and Minification. Bundling and minification are two techniques you can use in ASP.NET 4.5 to improve request load time. Bundling and minification improves load time by reducing the number of requests to the server and reducing the size of requested assets (such as CSS and JavaScript.) Most of the current major browsers limit the number of simultaneous connections per each hostname to six. That means that while six requests are being processed, additional requests for assets on a host will be queued by the browser.

In the image below, the IE F12 developer tools network tabs shows the timing for assets required by the About view of a sample application. The gray bars show the time the request is queued by the browser waiting on the six connection limit.