Oct 30

This is Joe Walker’s presentation from The Ajax Experience last week. It is about web application security issues and possible solutions.

Oct 28

This one I found on remy sharp’s b:log which is quite good comparison between the two popular Java Script libraries.In 25 slides it shows what jQuery does and Prototype doesnt:

Oct 24

Thats something really good! Now in the new Visual Studio 2008 you don’t have to use underscore when writing text on multiple lines. Here is an example how we used to write it:

Dim oldWay = "this is a string" & vbCrLf & _
               "with formatting" & vbCrLf & _
               "and stuff" & vbCrLf & _
               "look ma, underscores" & vbCrLf & _

Now we can do something like that:

Dim newWay = <string>
this is a string
with formatting
and stuff
look ma, no underscores!!!</string>

The text formatting is preserved as well. All you have to do is get the .Value of the XElement, which is the string literal. As you can see this is much cleaner than what we’re used to. And if you still like to see your string literals in the default reddish color, you can easily change the color settings for VB XML literals in Tools –> Options –> Environment –> Fonts and Colors, then select “VB XML Text” and set the custom color to RGB(163,21,21).

Even more, now we can embed expressions using the <%= syntax.

Dim simple = <string>
This is a simple text merge example:
Hello, <%= Environment.UserName %>
                     </string>

Here is Beth Massi’s post about these features! Thanks Beth!

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 19

This language specification corresponds to the version of Visual Basic that will ship in Visual Studio 2008. The spec covers the following major new features:

• Friend assemblies (InternalsVisibleTo)
• Relaxed delegates
• Local type inferencing
• Anonymous types
• Extension methods
• Nullable types
• Ternary operator
• Query expressions
• Object initializers
• Expression trees
• Lambda expressions
• Generic type inferencing
• Partial methods

The following features are not covered but should be shortly:

• XML Members
• XML Literals
• XML Namespaces

Although it will be updated again for the final release, the VB team wanted to get this out to the community now.
Here is the source
Here is the actual link for download

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

Това е нещо което го има още от CSS2, но само някои браузъри го поддържат. Да се надяваме, че след финализиране на CSS3, големите в бизнеса ИЕ и Мозила ще го имплементират също.

color: #fff;
background-color: #fff;
text-shadow: 2px 2px 2px #000;
Това е бял текст на бял фон. Ако четете това значи ползвате Опера 9.5 или друг WebKit(Сафари) браузър.

Ако нямате Опера 9.5 или Сафари, текста малко по-нагоре изглежда така:

Oct 11

I am quite excited seeing the latest Ext 2.0 Beta 1 released!

These guys are doing very serious job as moving the production effords further. The new beta comes with updated samples which are Web Desktop and my personnal favourite Portal.

2.0 Availability
The Ext 2.0 codebase has stabilized and several clients have begun to use Ext 2.0 in production environments. Ext 2.0 is available for download and code updates are available to SVN subscribers in the Ext SVN under branches/ext2.0.

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 03

Raise hands!

Today from Microsoft anounced that they will be including .NET Framework libraries source code with .NET 3.5 and VS 2008 release later this year.

Here is a part from ScottGu’s post. You can read the rest here.

We’ll begin by offering the source code (with source file comments included) for the .NET Base Class Libraries (System, System.IO, System.Collections, System.Configuration, System.Threading, System.Net, System.Security, System.Runtime, System.Text, etc), ASP.NET (System.Web), Windows Forms (System.Windows.Forms), ADO.NET (System.Data), XML (System.Xml), and WPF (System.Windows). We’ll then be adding more libraries in the months ahead (including WCF, Workflow, and LINQ). The source code will be released under the Microsoft Reference License (MS-RL).

You’ll be able to download the .NET Framework source libraries via a standalone install (allowing you to use any text editor to browse it locally). We will also provide integrated debugging support of it within VS 2008.

VS 2008 will include support to automatically retrieve the appropriate .NET Framework source files on demand from Microsoft. This means that the source code for the ASP.NET GridView and BaseDataBoundControl classes above do not have to already be installed on the machine before we started the debugger. Instead, when we use F11 to step into their implementation VS can automatically download the source files from Microsoft and open it within the IDE.

By downloading the files dynamically we can also ensure that the matching source files always line-up with the particular version of the .NET Framework on your machine (for example: if you have a GDR or Service Pack Patch installed on your machine, we’ll make sure to download the source file that corresponds to it).

Summary

Having source code access and debugger integration of the .NET Framework libraries is going to be really valuable for .NET developers. Being able to step through and review the source should provide much better insight into how the .NET Framework libraries are implemented, and in turn enable developers to build better applications and make even better use of them.

TopOfBlogs