Dec 03

I have severe lack of time so thats the reason to blog about the following posts in one short notice. Few weeks ago I came across Matt Berseth’s blog and made me quite good impression. He blogs frequently and providing quality posts. His last two I liked a lot.

The first one was about how to create image reflections. He describes three practices:

- Browser Specific Client Side Solution
- Cross Browser Client Side Solution
- Cross Browser Server Side Solution

Which one we choose is a matter of what we really want - rendering time or support for all browsers.

Then he wrote about my favourtite IDE - Visual Studio 2008. Matt described how we can use the new ListVew control plus adding DataPager control and extend it with SliderExtender Control from AjaxControlToolkit.

This post is provided with demo and source code for download. Thanks Matt!

Nov 19

Today Microsoft shipped Visual Studio 2008 and .NET 3.5. You can download the final release using one of the links below:

* If you are a MSDN subscriber, you can download your copy from the MSDN subscription site (note: some of the builds are just finishing being uploaded now - so check back later during the day if you don’t see it yet).

* If you are a non-MSDN subscriber, you can download a 90-day free trial edition of Visual Studio 2008 Team Suite here. A 90-day trial edition of Visual Studio 2008 Professional (which will be a slightly smaller download) will be available next week. A 90-day free trial edition of Team Foundation Server can also be downloaded here.

*If you want to use the free Visual Studio 2008 Express editions (which are much smaller and totally free), you can download them here.

* If you want to just install the .NET Framework 3.5 runtime, you can download it here.

List of New Features - old version

- VS 2008 Multi-Targeting Support
VS 2008 enables you to build applications that target multiple versions of the .NET Framework. This means you can use VS 2008 to open, edit and build existing .NET 2.0 and ASP.NET 2.0 applications (including ASP.NET 2.0 applications using ASP.NET AJAX 1.0), and continue to deploy these application on .NET 2.0 machines.

- ASP.NET AJAX and JavaScript Support
.NET 3.5 has ASP.NET AJAX built-in (no separate download required). In addition to including all of the features in ASP.NET AJAX 1.0, ASP.NET 3.5 also now includes richer support for UpdatePanels integrating with WebParts, ASP.NET AJAX integration with controls like and , WCF support for JSON, and many other AJAX improvements.

- VS 2008 Web Designer and CSS Support
VS 2008 and Visual Web Developer 2008 Express includes a significantly improved HTML web designer (the same one that ships with Expression Web). This delivers support for split-view editing, nested master pages, and great CSS integration.

- 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.

- 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.

- Browsing the .NET Framework Library Source using Visual Studio

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, and with Outlook. Visual Studio Tools for Office support is also now built-into Visual Studio (you no longer need to buy a separate product).

New WCF and Workflow projects and designers are now 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…

Installation Suggestions

People often ask me for suggestions on how best to upgrade from previous betas of Visual Studio 2008. In general I’d recommend uninstalling the Beta2 bits explicitly. As part of this you should uninstall Visual Studio 2008 Beta2, .NET Framework Beta2, as well as the Visual Studio Web Authoring Component (these are all separate installs and need to be uninstalled separately). I then usually recommend rebooting the machine after uninstalling just to make sure everything is clean before you kick off the new install. You can then install the final release of VS 2008 and .NET 3.5 on the machine.

Once installed, I usually recommend explicitly running the Tools->Import and Export Settings menu option, choosing the “Reset Settings” option, and then re-pick your preferred profile. This helps ensure that older settings from the Beta2 release are no longer around (and sometimes seems to help with performance).

Note that VS 2008 runs side-by-side with VS 2005 - so it is totally fine to have both on the same machine (you will not have any problems with them on the same box).

Silverlight Tools and VS Web Deployment Project Add-Ins

Two popular add-ins to Visual Studio are not yet available to download for the final VS 2008 release. These are the Silverlight 1.1 Tools Alpha for Visual Studio and the Web Deployment Project add-in for Visual Studio. Our hope is to post updates to both of them to work with the final VS 2008 release in the next two weeks. If you are doing Silverlight 1.1 development using VS 2008 Beta2 you’ll want to stick with with VS 2008 Beta2 until this updated Silverlight Tools Add-In is available.

Read Scott Gu

Oct 22

Това са няколко често срещани случая когато употребата на Ajax e неуместна. Или поне трябва да се замислим преди да започнем разработването. Списъкът не е пълен, нито изчерпателен. Нека всеки който иска да добави нещо към него да напише коментар, после ще бъде добавен.

1. Използването на Ajax, само защото е Ajax

Използването на Ajax e модерно, но да не забравяме че е инструмент, а не играчка. Наистина трябва да се обмисли предварително къде и как да се използва.

2. “Back” бутона става неизползваем

За съжаление ‘Back’ бутона на всеки браузър не се разбира добре с Java Script. Това е една основателна причина върху която да се замислим преди да напишем едно приложение изцяло работещо на клиента.

Същестувават известни ‘workaround’ методи за този проблем, но засега нищо не е 100% работещо.

Все пак трябва да имаме предвид, че всеки модерен дизайн трябва да позволява връщане назад и със стандартни линкове и препратки.

3. Индикация когато нещо се прави(зарежда)

Ако нещо което натисна активизира Ajax, то аз искам да има индикация на екрана, че нещо се случва. Типичен пример е GMail с малката червна кутия в горния десен ъгъл.

4. Сигурността на Ajax приложенията

Когато използваш асинхронен метод за трансфер на данни, сигурността на тези данни трябва да е първото нещо за което да се помисли!

5. Невъзможността да запазиш страницата на компютъра си

Доста потребители все още ползват бавна интернет връзка с която те отварят търсената страница и я запазват на компютъра си. При повторно отваряне на запазената страница често се случва информацията да не е записана.

6. Мулти-платформеността на Ajax

За да използваш Ajax, трябва да познаваш Java Script доста добре. Разликите между различните Java Script имплементации обаче са всеизвестни. Не е достатъчно да пишеш по Java Script стандартите, а трябва и да се тества на всевъзможни браузъри.

7. Твърде много код забавя браузъра

Ajax предоставя възможност за доста по-интересни приложения, но всяка ‘екстра’ си има цена. В случая става въпрос за нуждата от мощен процесор. В миналото именно това беше основния недостатък да се използват богати Java Script сайтове. Но дори сега с напредналия хардуер проблемът си остава.

8. Когато не оставяме избор на хората без Java Script

Според последните проучвания на W3 schools, потребителите които нямат Java Script са някъде към 11% от всички. Ако твоят сайт се основава изцяло на Java Script това означава, че си ‘отрязал’ една десета от потенциалните си потребители.

9. Мигането и промяната на части от страницата неочаквано

А-то в Ajax идва от асинхронен. Проблемът при асинхроните съобщения е, че могат да се появяват неочаквано и да са доста объркващи.

10. Невъзможноста да изпращаме директни линкове към страниците

Всеки от нас е свикнал да изпраща линкове от страници на своите приятели и е сигурен, че те виждат това което и той. Сега обаче ситуацията се промени. В момента който страниците не са генерирани на сървъра съдържанието им остава само в потребителския браузър. Доста от новите сайтове създадоха специални “permalinks” секции именно заради този пробелм.

11. Блокиране на търсачките

Ajax страниците могат да съдържат огромно количество текст без да презареждат. Това малко напомня на горния проблем, нали  За да бъде правилно идексирана дадена страница, търсачките трябва да прочетат статичен HTML.

12. Character sets

Голям недостатък на Ajax приложенията е липсата на поддръжка на character sets. Винаги трябва да обозначаваме кой сет използваме на сървъра, както и кой се използва от Java Script на клиента. Напоследък се е наложил UTF-8 като универсален, защото поддържа доста езици.

13. Измислянето на нови правила за ползването на сайт

Принципът на ‘кликни и задръж с бутона на мишката този div, после го влачи и пусни на друго място’, работи добре за Ajax приложенията. Но определно не е универсален в интернет, което може да е объркващо.

14. Съобщаването за проблеми

В стандартните страници наличието на проблем е очевидно. При страниците генрирани на клиента обаче е възможено дори да не забележите, че нещо се е объркало освен ако нямате подходящ код.

Oct 16

We’re all living on the web, and we all seem to be starting our own websites, so it’s time we all learned the languages that make it run. The guys at Mashable.com have gathered over 250 resources to help you get going.

This list is aggregated from previous Mashable posts.

The list is quite extensive and features many ajax libraries, loading indicators etc so its best to be viewed at the original place.

Oct 11

XMLHttpRequest is not the only way to implement Ajax - in fact it is not even the most popular one. Take a quick look at the various transport methods in Ajax…

XMLHttpRequest

This is the W3C standard - most modern browsers supports this - browsers like…

* Firefox
* Opera
* Konquror
* Internet Explorer 7
* etc.

ActiveX(XMLHTTP)

This is the preferred method in Internet Explorer. Currently this is the most used method for ajax calls - due to the simple fact that IE has the majority market share. This is basically a different name for XMLHttpRequest - except for the initilization, all the API calls are the same as in XMLHttpRequest(thank God for that).

IE did not have a native XMLHttpRequest object(dispite the fact that they invented the concept). XMLHttpRequest was first introduced to the world as an ActiveX control in Internet Explorer 5.0. Fortunatly, they have native support for XMLHttpRequest from IE 7 onwards.

IFrame

This is used as a fallback for older browsers by some ajax libraries. In this method you load the URL in a (typically) hidden iframe element. Once the iframe has compleated loading, you can read the contents of the iframe. That way, you have a working Ajax system even in very old browsers.

One of the main advantages of this method is that it does not have the cross-domain issue(also known as the same origin restriction).

Image Source

This is not a popular transfer method - in fact, I have seen it in use only once. The basic concept is that you can point an image’s src to a server-side script. That script can do the necessary operation on the server and then return the image.

The major disadvantage of this method is that data can only be passed to the server - the server cannot pass data back to the client. Well, it is possible - if you set a cookie on the server and then read it in the client side. Trust me, you don’t need that kind of headaches - Ajax development is enough trouble as it is.

But it has a few advantages too…

* No cross domain issue
* Works with old browsers

Script Tag

This uses the same principle as the Image method - the only difference is that you use a script instead of an Image tag. That way, the server can return data to the client side as well.

This is a very popular method in the mashup scene. The main reason is this method don’t have the cross domain issue. For example del.icio.us offers this as a choice to get data from their site.

This method is also possible using a stylesheet - but I don’t want to go into that.

Non Javascript methods
Flash

Flash can be used to get data from the server and pass it to the javascript code.

Java Applets

I am sure that Java Applets can be used for this too - can anyone confirm this?

read source

Oct 01

Ajax and Javascript resources

You probably remember MiniAjax about which I posted way back in March.
Well now I finally got the chance to update with two not really new, but must visit web sites. The first one is AjaxRain.com, the site dedicated to aggregating Ajax, JavaScript and RIA controls & libraries. On the web site it says that should contain 755 + Ajax/Javascript/Dhtml examples and demos to download.

The second one is WebAppers - Only the Best and Free Resources for Web Application Developers. This one also contains significant amount of controls and plugins segmented into different categories.

Aug 28

Recently I came across this piece of software, it a solitaire game build on top of YUI. It is developed by Robert Schultz and over here you can read an interview with him.
Here is the game itself.

Aug 20

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:

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:

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 :

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

Aug 08

Folks at ajaxian.com had this post today:

The Adobe bus tour has published some videos from the first leg of the tour.

Andre Charland spoke on how to build Ajax applications on Air. The talk has good demos and examples, such as the Salesforce.com demo.

Kevin Hoyt also gave some good JavaScript-y talks such as:

The second leg of the bus kicks off next week, and you can check out if it hits a city near you. I am hoping to be on the third leg at some point.

read source

Jul 30

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:


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