Category Archives: VS 2008 - Page 3

Новости в Visual Studio 2008 beta 2

Наскоро Microsoft представиха последните версии на Visual Studio 2008 и .NET 3.5 beta 2. Visual Studio 2008 можете да изтеглите от тук, а умалената експрес версия от тук. Важно е да отблежим, че новите версии можете да инсталирате съвместно с по-старата VS 2005.

Ето и някои от последните нововъведения в Visual Studio 2008:

- Поддръжка на Multi-Targeting – VS 2008 ви дава възможност да създавате приложения предназначени за различни версии на .NET Framework. Лесно може да се превключва от една версия на друга.

- VS 2008 Web Designer и поддръжка на CSS – в тази версия е включен подобрен HTML web designer. В него се поддържат ‘двоен’(сплит) изглед, внедрени една в друга master pages, и подобрена CSS поддръжка.

css Новости в Visual Studio 2008 beta 2

- ASP.NET AJAX и поддръжка на JavaScript – в .NET 3.5, ASP.NET AJAX е внедрен, както и са добавени нови функционалности като UpdatePanel с WebParts, поддръжка на WCF за JSON, и редица други подобрения по бързодействието. VS 2008 има и увеличена поддръжка относно интегрирането на JavaScript и AJAX в приложенията. Новото студио се отличава с подобрен Intellisense, който дори работи при включени външни JavaScript файлове.

js Новости в Visual Studio 2008 beta 2

- Езикови подобрения и LINQ – новите компилатори на VB и C# имат доста подобрения относно функциите на езиците. Това основно се забелязва при LINQ(language integrated query) който добавя нови възможности при заявки и работа с данни. Ето и някой от подобренията налични в C#:
o Automatic Properties, Object Initializer and Collection Initializers
o Extension Methods
o Lambda Expressions
o Query Syntax
o Anonymous Types
lambda Новости в Visual Studio 2008 beta 2

- Подобрен достъп до данни чрез LINQ към SQL
LINQ към SQL е внедрен OR/M (object relational mapper) в .NET 3.5. Той ви дава възможност да правите заявки чрез LINQ, както и да редактирате/изтривате и вмъквате нови записи. LINQ към SQL напълно поддържа транзакции, изгледи и запазени процедури.

dataaccess Новости в Visual Studio 2008 beta 2

Това са само някои от многото подобрения представени в новата версия. Дотук всичко е добре, но лично за мен остават отворени въпросите:
– Ще успеят ли да разработят всичките езикови подобрения и за Visual Basic?
– Ще успеят ли до Февруари 2008 да са готови с крайната версия?

Using ASP.NET AJAX Control Extenders in VS 2008

Scott Guthrie again shows one of the new feature of the new Visual Studio 2008 which is the improved designer support for ASP.NET AJAX Control Extenders.

What are ASP.NET Control Extenders?

ASP.NET Control Extenders are controls that derive from the System.Web.UI.ExtenderControl base class, and which can be used to add additional functionality (usually AJAX or JavaScript support) to existing controls already declared on a page. They enable developers to nicely encapsulate UI behavior, and make it really easy to add richer functionality to an application.

The ASP.NET AJAX Control Toolkit is a great example of a project that takes advantage of this control extender functionality. It includes more than 40+ free control extenders that you can easily download and use to add AJAX functionality to your applications.

For example, let’s assume we wanted to have a textbox on a page where a user could enter a date:

step1 Using ASP.NET AJAX Control Extenders in VS 2008

If the browser has JavaScript enabled, we might want to have a nice client-side calendar date picker appear when the user sets the focus on the date textbox to help with selecting the date:

step2 Using ASP.NET AJAX Control Extenders in VS 2008

Enabling this is trivial using the ASP.NET AJAX Control Toolkit. Just add the “CalendarExtender” control that ships with it to the page and point its “TargetControlID” property at the :

step3 Using ASP.NET AJAX Control Extenders in VS 2008

The CalendarExtender now automatically emits an ASP.NET AJAX javascript client script that adds the client-side calendar behavior to the TextBox at runtime. No additional code is required.


Using ASP.NET AJAX Control Extenders in VS 2008

With VS 2005 you had to manually wire-up control extenders yourself (either via source-view or via the property grid).

VS 2008 makes it even easier to discover and attach control extenders to your controls.
read original

Using LINQ to XML (and how to build a custom RSS Feed Reader with it)

Here is latest post from ScottGu’s blog. There he describes how to build a custom RSS Feed Reader using LINQ to XML. Check it out:

One of the big programming model improvements being made in .NET 3.5 is the work being done to make querying data a first class programming concept. We call this overall querying programming model “LINQ”, which stands for .NET Language Integrated Query.

LINQ supports a rich extensibility model that facilitates the creation of efficient domain-specific providers for data sources. .NET 3.5 ships with built-in libraries that enable LINQ support against Objects, XML, and Databases.


What is LINQ to XML?

LINQ to XML is a built-in LINQ data provider that is implemented within the “System.Xml.Linq” namespace in .NET 3.5.

LINQ to XML provides a clean programming model that enables you to read, construct and write XML data. You can use LINQ to XML to perform LINQ queries over XML that you retrieve from the file-system, from a remote HTTP URL or web-service, or from any in-memory XML content.

LINQ to XML provides much richer (and easier) querying and data shaping support than the low-level XmlReader/XmlWriter API in .NET today. It also ends up being much more efficient (and uses much less memory) than the DOM API that XmlDocument provides.


Using LINQ to XML to query a local XML File

To get a sense of how LINQ to XML works, we can create a simple XML file on our local file-system like below that uses a custom schema we’ve defined to store RSS feeds:

step2 Using LINQ to XML (and how to build a custom RSS Feed Reader with it)

I could then use the new XDocument class within the System.Xml.Linq namespace to open and query the XML document above. Specifically, I want to filter the elements in the XML file and return a sequence of the non-disabled RSS feeds (where a disabled feed is a element with a “status” attribute whose value is “disabled”). I could accomplish this by writing the code below:

VB:

step4 Using LINQ to XML (and how to build a custom RSS Feed Reader with it)

read whole article

VS 2008 JavaScript Intellisense for Silverlight

Thats an interesting post from Scott Guthrie’s blog about JavaScript Intellisense for Silverlight:

In addition to shipping VS 2008 and .NET 3.5 Beta 2 last week, my team also shipped the first release candidate of Silverlight 1.0 (it was a busy week at the office!). You can download the Silverlight 1.0 RC here.

I blogged about our Silverlight plans and roadmap a few months ago. This first Silverlight 1.0 release is focused on enabling rich media scenarios, and delivers high quality video and audio streaming and XAML based vector graphics and animation support in the browser. Silverlight is cross browser and cross platform, and can be easily added to any HTML page. Silverlight 1.0 supports a JavaScript programming model that makes it easy to integrate into an AJAX based page experience (note: Silverlight 1.1 will then add a cross-platform .NET framework programming model and enable RIA support).

JavaScript Intellisense for Silverlight 1.0

Over the last few weeks I’ve blogged about the new VS 2008 JavaScript Intellisense and VS 2008 JavaScript Debugging features in Beta 2. In addition to using these JavaScript tooling features when building pure HTML AJAX solutions, you can also now take advantage of them when targeting Silverlight 1.0.

Justin-Josef Angel earlier today released an awesome Silverlight 1.0 JavaScript Intellisense CodePlex Project that helps dramatically with this. It includes some nice annotated JavaScript helper methods that provide the ability to work with any XAML element in Silverlight with full intellisense in VS 2008.

To use it, simply add his JavaScript library to the top of your page:

step1 VS 2008 JavaScript Intellisense for Silverlight

You can then use Justin’s helper functions to take late-bound objects and indicate their JavaScript type:

step2 VS 2008 JavaScript Intellisense for Silverlight

This will then cause the VS 2008 JavaScript intellisense engine to automatically provide intellisense and syntax checking for you:

step3 VS 2008 JavaScript Intellisense for Silverlight

You can learn all about Justin’s library via his excellent tutorial post here. You can then download and participate in the codeplex project here.


read original

VS 2008 and .NET 3.5 Beta 2 Released

I have been away for 10 days and during that time the new VS 2008 and .NET 3.5 Beta2. Here is what Scott Guthrie writes about this news:
You can download the Visual Studio 2008 product here. You can alternatively download the smaller VS 2008 Express Editions here.

VS 2008 and Visual Web Developer 2008 Express can be installed side-by-side with VS 2005. .NET 3.5 Beta2 also includes a go-live license which allows you to build and deploy applications into production.

Very Important: Please read my “Installation Notes” at the bottom of this blog post for a few post-installation steps you must make to ensure everything runs well. One of these steps fixes a side-by-side issue we found with ASP.NET AJAX.


Quick Tour of Some of the New Features for Web Development

Over the last few months I’ve written several blog posts that discuss some of the new improvements in this release. Below is a quick summary list of several of them that I have already published. This list is by no means exhaustive – there are a lot more things I haven’t had a chance to blog about yet (stay tuned for more posts!):

VS 2008 Multi-Targeting Support

VS 2008 enables you to build applications that target multiple versions of the .NET Framework. You can learn more about how this works from my blog post here:

VS 2008 Web Designer and CSS Support

VS 2008 includes a significantly improved HTML web designer. This delivers support for split-view editing, nested master pages, and great CSS integration. Below are two articles I’ve written that discuss this more:

ASP.NET also has a new control that I’ll be blogging about in the near future. It delivers very flexible support for data UI scenarios, and allows full customization of the markup emitted. It works nicely with the new CSS support in VS 2008.

ASP.NET AJAX and JavaScript Support

.NET 3.5 has ASP.NET AJAX built-in (and adds new features like UpdatePanel support with WebParts, WCF support for JSON, and a number of bug fixes and performance improvements). VS 2008 also has great support for integrating JavaScript and AJAX into your applications:

I will be doing a blog post in the next few days that talks more about some of the ASP.NET AJAX specific improvements, as well as how to upgrade existing ASP.NET AJAX 1.0 applications to use them.

Language Improvements and LINQ

The new VB and C# compilers in VS 2008 deliver significant improvements to the languages. Both add functional programming concepts that enable you to write cleaner, terser, and more expressive code. These features also enable a new programming model we call LINQ (language integrated query) that makes querying and working with data a first-class programming concept with .NET.

Below are some of the articles I’ve written that explore these new language features using C#:

Data Access Improvements with LINQ to SQL

LINQ to SQL is a built-in OR/M (object relational mapper) in .NET 3.5. It enables you to model relational databases using a .NET object model. You can then query the database using LINQ, as well as update/insert/delete data from it. LINQ to SQL fully supports transactions, views, and stored procedures. It also provides an easy way to integrate business logic and validation rules into your data model. Below are some of the articles I’ve written that explore how to use it:

I’ll be adding several more articles to my series above in the weeks ahead. I think you’ll find that LINQ to SQL makes it dramatically easier to build much cleaner data models, and write much cleaner data code.

Lots of other improvements

The list above is only a small set of the improvements coming. For client development VS 2008 includes WPF designer and project support. ClickOnce and WPF XBAPs now work with FireFox. WinForms and WPF projects can also now use the ASP.NET Application Services (Membership, Roles, Profile) for roaming user data. Office development is much richer – including support for integrating with the Office 2007 ribbon. WCF and Workflow projects and designers are included in VS 2008. Unit testing support is now much faster and included in VS Professional (and no longer just VSTS). Continuous Integration support is now built-in with TFS. AJAX web testing (unit and load) is now supported in the VS Test SKU. And there is much, much more…


Important Installation Notes – PLEASE READ!

There are two important things you should do immediately after installing VS 2008 and .NET 3.5 Beta2:

1) You should download and run this batch file. This takes only a few seconds to run, and fixes an issue we found earlier this week with the version policy of System.Web.Extensions.dll – which is the assembly that contains ASP.NET AJAX. If you don’t run this batch file, then existing ASP.NET 2.0 projects built with ASP.NET AJAX 1.0 and VS 2005 will end up automatically picking up the new version of ASP.NET AJAX that ships in .NET 3.5 Beta2. This will work and run fine – but cause you to inadvertently introduce a .NET 3.5 dependency in the applications you build with VS 2005. Running the batch file will change the version binding policy of the new System.Web.Extensions.dll assembly and ensure that you only use the new .NET 3.5 ASP.NET AJAX version with projects that you are explicitly building for .NET 3.5.

2) If you have ever installed a previous version of “Orcas” or VS 2008 on your machine (either Beta1 or one of the CTP versions), you need to reset your VS 2008 settings after installing Beta2. If you don’t do this, you’ll have an odd set of settings configured (some windows will be in the wrong place), and you’ll potentially see some IDE performance slowness. You can reset your settings by typing “DevEnv /resetsettings” on the command-line against the VS 2008 version of the IDE:

step1 VS 2008 and .NET 3.5 Beta 2 Released


Summary

There are a lot of new improvements and enhancements that I hope you’ll find really useful with VS 2008 and .NET 3.5. Stay tuned to my blog over the next few weeks as I’ll be posting more about some of the new features and how to get the most out of them.

Here is the original

VS 2008 JavaScript Debugging

Scott Guthrie writes about JavaScript Debugging into new VS 2008!
One of the other JavaScript features that I’m sure will be popular in VS 2008 is the much-improved support for JavaScript debugging. This is enabled in both the free Visual Web Developer 2008 Express edition as well as in Visual Studio, and makes using JavaScript and building AJAX applications significantly easier.

Check his post here

Intellisense in ASP.NET Orcas Beta 1

Found that post on Rick Strahl’s web log, over here he describes different situations in which JS Intellisense is and isnt working in new VS 2008. Check it out:

So I’m trying to understand what actually works and what doesn’t with Orcas JavaScript Intellisense. I’ve used Orcas for a bit now and unfortunately I’ve had little luck on getting Intellisense support with my non-MS AJAX libraries. My own libraries don’t work and neither does anything in Prototype, Scriptalicious or jQuery.

It appears that Orcas does fine with any straight function and variable definitions. If I have an ASPX page or a backing .js file and all I have in there is plain functions as is often the case with front end UI code I get Intellisense on this functionality.

The real issue has to do with class/object recognition. The problem there of course is that there are many, many different ways in JavaScript to define a ‘class’ (there really are no classes only closures that act like them ) and Orcas Intellisense only supports some of these formats.

So I set up a a sample JS file that checks for different class formats and how the Intellisense works for them. I created a simple ASPX page and added a reference to a script file. The comments indicate whether the structure is visible to Intellisense.

<script src="test.js" type="text/javascript"></script>

And then created the JS file with the following:

// this works finefunction HelloWorld(name){   alert("Hello " + name);

   return false;}

// Class as closure -  doesn't workfunction MyClass1(){   this.myProperty = "Test";   this.myProperty2 = 0;

   this.myMethod = function(input)   {       return 0;   }}

// JSON static Class syntax - worksvar MyStaticClass2 ={   myProperty: "Test",   myProperty2: 0,   myMethod: function()   {       return 0;   }      }

// Prototype syntax - worksfunction MyClass3(){}MyClass3.prototype ={   myProperty: "Test",   myProperty2: 2,   myMethod: function(num)   {       //         return 0;   }          }

// *** Additional Prototype assignments - worksMyClass3.prototype.myProperty3 = 3;

// *** Direct property assignment - doesn't workMyClass3.myProperty4 = 4;

I might be missing other ways here – if you see one of those leave a comment and I’ll add it here. It seems it would be good to know what does and doesn’t work.

read original

Visual Studio 2008 and ASP.NET 3.x

Rick Strahl is again sharing his thoughts about VS 2008 and the new ASP.NET 3.x, here is part of it:

I’ve been running Orcas quite a bit since Beta 1 was released in April and overall I’m pretty damn happy with this update to Visual Studio 2008. You may have noticed that I HAVEN’T posted a lot about Orcas issues and that’s because overall Visual Studio Orcas and the feature set is working rather well for me. Microsoft has really done a much, much better job this time around to provide a sane set of updates to the framework as well as what amounts to an incremental update in Visual Studio.

Visual Studio 2008 is interesting on several levels. First and I think this is very significant is that it works with .NET 2.0 and you can build applications that run on .NET 2.0. This means it’s possible to take advantage of many of the new features in Visual Studio – especially the new designer and the somewhat improved JavaScript support – even for today’s projects. That makes the new tool very palatable to try and play with immediately. I’ve moved several of my internal applications to Orcas and it’s been a pleasure working in VS 2008.

Second although there are some major changes in the editors, overall the Visual Studio shell isn’t completely changed. In fact, most of my add-ins, Intellisense scripts, templates etc. all work in Visual Studio 2008 which gives me my base toolset I work with and helps with productivity. I’m really glad that there wasn’t another complete overhaul of the system that required everything to be at least recompiled if not to be redesigned.

One of the biggest advantages in VS 2008 is the new HTML editor both for markup and design view. It’s based on the same editor that’s in Microsoft Web Expression (which is a great tool BTW and which I use daily!) and provides a ton of improved functionality and much better rendering. However, the biggest bonus that you’ll notice immediately with the new editor is that it is much, much faster than the VS 2005 editor. You know the feeling in VS 2005 as you open a markup or worse a designer page and you wait and wait and wait some more. With VS 2008 that is no longer the case – activating markup or design view happens in a second or two even for complex pages. Not only that but because there’s split view for design and markup you rarely switch views and because both panes stay in sync the whole experience is much more expressive. The editor and speed alone is a big productivity improvement at least for me.

That isn’t to say that that there aren’t problems with VS 2008. Yes some things are broken and Orcas will crash occasionally (although not any more than VS 2005) but overall the experience for a Beta 1 product is very good! Good enough to be productive with it.

ASP.NET 3.x

I’ve also spent a bit of time working with .NET 3.5 mostly for back end related framework stuff. There’s a lot of interesting stuff but most of the really cool features of .NET 3.5 are related to LINQ and the language enhancements in C# and VB.NET many of which are very useful productivity enhancers. I’ll post more on some of this in the coming weeks.

But what’s interesting is that there’s not a lot of new stuff for ASP.NET 3.5. In fact looking through the System.Web.Ui namespace with Reflector there’s only a couple of new controls – the ListView and DataPager. ListView is a new control that’s sort of a mix between a repeater and a GridView. It provides the rich templating of a Repeater combined with the grid’s advanced features like Paging, Sorting and Editing. It’s interesting but hardly something to jump up and down about. There’s also a LINQDataSource which makes it easy to create and consume LINQ data. That’s about all that I could find that was obvious. I spent a bit of time looking around trying to find more information on what’s new in ASP.NET but couldn’t really find anything else of note. It’s clear that the core of new features that will impact ASP.NET 3.5 are going to be related to the language enhancements and LINQ.

Disappointing? Not at all!

It’s important to remember that the ASP.NET team has already delivered very important support features prior to the Orcas release cycle. Specifically I’m thinking of ASP.NET AJAX and full support for the IIS 7 integrated pipeline, which in my opinion really counts as the ASP.NET 3.0! IIS 7 and the integrated pipeline opens up many new possibilities for deep Web server integration and it’s great to see that this whole new pipeline model was able to integrate with ASP.NET so seamlessly that as a developer you never actually know the difference.
read original