ASP.NET 4.0, Part 1: New Visual Studio 'Code Optimized' Profiles

by DanM 11. February 2010 23:30

Welcome to Day 1 of my tour through ASP.NET 4.0. Before we get down to looking at some actual code tomorrow, a quick note about the new settings profiles in Visual Studio 2010 for web developers and how to find a middle ground.

Having installed it, the first time you run VS2010, you'll be asked which settings profile you want to use.

Initial Run Profile Choices

You'll notice that there are now two options for web developers. The Web Development profile, highlighted above is the same generic profile previously encountered in VS2008 and VS2005. It makes visible the standard menu set and typical helper windows like Windows Explorer, Server Explorer, Toolbox, Properties and so on.

Web Application Settings Active

The second settings profile, named Web Development (code only) is new to VS2010 and aimed at those developers who prefer to write all the code rather than using the Visual Studio wizards and dialogs to generate them for you. Selecting this option will return an IDE with all but Solution Explorer and Server Explorer closed or hidden. You'll also note in the screenshot below that both design and split view are disabled when editing aspx and html code files.

Code Optimized Profile In Action

As ever, should you pick one particular profile and then wish to try the other later on, you can change up or save your own customizations by selecting Tools > Options > Import and Export Settings from the VS2010 menu bar. If you’ve not used this wizard before, here are the steps.

  1. You need to load a new settings profile into VS, so select “Import selected environment settings” and click next.
  2. The next dialog asks if you want to save your current settings before importing new ones and where to save them if so. If you’re a fan of dark Visual Studio themes1 or simply like to use spaces rather than tabs when formatting your HTML mark-up, now is the time to click “Yes, save my current settings”. Or, if you’d prefer essentially to reset the VS environment to a standard profile, select “No, just import new settings, overwriting my current settings”. NB It is possible to import only part of a settings profile in step 4 – but consider saving your current settings just in case, if you’re considering this route.
  3. Finally, you get to choose which collection of settings to import. All the default settings you saw on first run are listed here, along with any previously saved settings you’ve made. Make a selection and press next.
    Importing Settings Into VS2010
  4. At this point VS2010 offers you the option of importing only parts of the settings collection chosen in step 3. Check or uncheck as required and press Finish.
    Choosing Individual Settings
  5. Your settings will now be imported and you’ll need to click Close to exit the wizard.

For reference, you can easily toggle the Design and Split views for web pages off and on again, by clicking Tools > Options and in the General tab, checking ‘Enable HTML designer’. You’ll need to restart VS for your changes to take effect.

Visual Web Developer - “Expert Mode”

All the above information applies equally to all versions of VS2010. However, in addition, Visual Web Developer adds to this in two ways.

  • First, VWD defines a third settings profile called Expert Mode. This is basically a halfway house between the standard and code optimized profiles mentioned earlier.
    7_ExpertMode
  • Second, as well as the wizard documented above, VWD lets you reset to any of the three default profiles directly from the Tools menu, as shown below.
    Visual Web Developer Profile Shortcuts

And that’s it for today. In the next post, we’ll look at the new project solution types in VS2010 and see what they do.

1On a side note, dark themes within programming windows in VS2010 work fine, but dark themes are still not consistently inherited from windows themes. This post demonstrates this with Office – the same applies with VS. Just in case you were wondering.

ASP.NET 4.0 Cometh

by DanM 9. February 2010 22:00

It has been a quiet evolution but make no mistake, web development has changed over the past five years. The crusade for web standards has, to all intents and purposes, been won and the proliferation of AJAX usage plus the adoption of various JavaScript APIs such as jQuery, scriptaculous and prototype has meant that client-side programming has had a renaissance as a result. However, the cleaner mark-up needed to marry script for jQuery and the like to the controls on the page has not been easily generated with standard ASP.NET webform controls. Developers seeking greater control have thus been attracted away from webforms to lighter weight templating patterns such as MVC and MVP which provide it. (It's not the only reason that MVC and MVP have been tempting away developers but that's for the many Webforms vs. MVC vs. MVP discussions around the net to cover.)

Similarly, the sheer number of users on the internet has meant that concerns of performance, extensibility and scalability have come to the fore. Sites like MySpace and Microsoft.com use ASP.NET and IIS to serve millions of pages a day. It's not just the ability to serve pages faster than the blink of an eye that's required, it's the need for a site's data, caching, session, and membership infrastructure to scale up and work in web gardens and farms as well.

ASP.NET 4.0 is just around the corner with both it and Visual Studio 2010 due out on April 12. A release candidate build of both was released today and up until release, I'll be taking a look at the new features and improvements that ASP.NET 4.0 provides in its core and for webforms users. You'll see how it has been shaped by this quiet evolution and in particular:

  • The need for greater adherence to web standards
  • The need for webforms to be more in tune with the way that web developers build websites today
  • The need for webforms output to be more search engine friendly
  • The need to correct some (in hindsight) bad design decisions made before ASP.NET v1.0 was released
  • The need to rework existing features that weren't designed to work in a server farm or across multiple application domains on the same machine
  • The need to accommodate the reorganisation of .NET as a whole.

It's such a great time to be a web developer and ASP.NET 4.0 is a fantastic bit of kit. I’ll build up an index of this series here as posts are made. I hope you'll join me tomorrow, but in the meantime, happy coding!

ASP.NET’s Midlife Crisis

by DanM 11. January 2010 19:30

8000 words into the new book and then my mind turned left…

They say that a year in internet terms is equivalent to three or so in our own. The speed with which the web development tools we use continue to change and improve remains consistently high despite the fact that in internet terms, the web is now in its fifties. ASP.NET development too has reached its mid-life crisis, swapping the classic postback estate car for the sportier Web 2.0, AJAX-enabled asynchronous model, dallying with coquettish client-side javascript libraries and yet still relying on the server-side framework to do all the chores that are taken for granted while it remains ignorant of those interactions on the browser. Some homely webforms with the extra slice of viewstate on their pages have been divorced in favour of the slimmer, higher maintenance MVC models, while CSS fashion gurus tell us that this year's little black dress is increased web standards compliance (when is it not?) with a dash of HTML 5 and a soupcon of CSS 3, accessorized with a little Silverlight bling and social network integration.

What Is This Blog For?

by DanM 6. January 2010 23:00

This blog is not a dedicated braindump in the way that Warren’s is.

Nor is it a focussed call to arms like Ariana’s.

It is not a site that I often refer back to. That “magazine with a target audience of one“ is my tumblog.

It is however, an aggregate of me. An archive of everything I’ve thought, learnt and tried to do online since August 2000 when I started writing an online diary about living and working in India. It is not a cohesive whole, except as a well-tagged historical record that you may want to dredge through from time to time. But it is definitely me.

Other sites with a more defined purpose appear elsewhere. They’ll be announced here when they do. And archived here when they end.

Announcing VirtualDNUG

by DanM 5. January 2010 22:30

Virtual user groups continues to grow in popularity. MS dev teams have held live online chats for ages and both Second Life and ReactionGrid have hosted virtual user group spaces for a while now as well. Last year, .NET developers on LinkedIn started LIDNUG, an online user group that such luminaries as Scott Guthrie have already presented on, bridging the continents in one fell swoop rather than visiting Europe one day and India the next. And now we have VirtualDNUG.com, a new virtual user group being started up by Andrew Siemerof dotNetRadio.

I am finally going to put my full steam into setting up my VirtualDNUG users group.  With the help of the good folks over at ineta (they are providing a LiveMeeting license for us) I am hoping to host a great environment for learning.  I will probably start off with topics on ASP.NET MVC and the various side projects that surround that world (Turbine, Spark View Engine, FubuMVC, etc.) but I am totally open to just about any other cutting edge .net topics as well.

If you are interested in attending our initial meetings, would like to present, or have a topic that you would like to be covered, please contact me directly at asiemer@hotmail.com.

Is this another reason to sit in front of a screen of an evening? Yes. Is it another opportunity to try out presenting for those who want to? Absolutely, and with the added bonus that if the demo gods fail on you, you can blame LiveMeeting or the snow that’s currently hampering your broadband connection. Meanwhile, you’re talking to like-minded people around the world. Which is pretty cool.

Andrew is California-based so meetings may well be timed GMT+8. However, they can also be recorded so if you’re elsewhere in the world, this is not necessarily a problem.

Powered by BlogEngine.NET 1.6.0.0
Theme by Mads Kristensen, adapted by Dan Maharry

About Dan

Dan Maharry Dan Maharry
Web developer at Co-operative Web and tech writer. More...
Creative Commons License View Dan's bookmarks on Delicious LinkedIn Facebook Facebook Last.fm
Last.fm Twitter Subscribe to Dans RSS Feed Download Dans OPML File Add blog to technorati favorites

RecentComments

Comment RSS