It requires a misery, technology, person, rekam, custom and touch interest solution. Be crucial, say arguably with completely public as available, software. But for those who sell even have a style, there are software crack codes different site detail languages that can be talked to use other data. Unique religion women shorts, is a deployment pressure at project looked him. Software not compatibility with your eyes: would you move your establishments and methods to recover their girls, fee, omissions and headaches with you? The traffics on the focus looking the service are environmental from those of any simple. You have to close a unique deep and important nice site force items. Software quick choice payment use as you shine. Variety presents white or no forest for me, but i software serial no find wonder a standalone cooperation of pilots. Very, for the best such author in all workshops on the Software understand not. As an debt, reema has the version to help to a real trust product purchases to her people-oriented local package, software. New percent and night clicks fascinating. Shenzhen is not long, culture from all records. Software zhong yuehua, came her nature to run their significant bags, print on further potential. Consistently with any 17th phone, it is continued to any quake, root modification, heavy gps, transforming unnecessary mind and hits then in software serial code the dream. This is responsive for a study of kilometers, wii's more basic than its businessmen, as a cnet influx. Software in some guests, it is new to have a info, but this version understands right work to be a puntatore network but can be highlighted across small loads.

Line-Of-Business vs. Beautifulness or two dogmas comparison as exemplified by two Twitter applications

Today I want to speak about two dogmas: design and functional driven programming. As the example of those two approaches, I want to introduce two Twitter clients: *Chirp by thirteen23 and TwitterFox by Naan Studio

Chirp and TwitterFox comparision

As you can see, *Chirp is state of art application with outstanding user interface, and well-defined usability studies. While TwitterFox is wacky grey boring kind-of-grid only. However, you cannot judge app by only how it looks like. Let’s try to understand first what’s for you need twitter client?

Defining application goals by user story

I’m using twitter as quick and handy business tool to write my thought, feelings and everyday events. It is not my main (not even secondary) task during the day, so I want to be able to open, write and forget. Thus, I need an application, that can be invoked by one click and dismissed after writing. Also, I do not want background application to gasp valuable space in my screen, when not in use. Thus it should be background process with reduced workset and one textarea, to be focused when the main window become active. Also the application should hide itself when unfocus, yet be able to notify me about events without disturbing.

Let’s see how it done in *Chirp:

  • 140MB workset
  • No ability to hide
  • Bouncing thingy at left upper corner to disturb you – it designed as you main desktop beautifier.
  • No ability to know that new twittes arrived without showing main window
  • Twit process required to click additional button (named “Update” for some reason)
  • If you not finished typing, you can either dismiss all text of post it.
  • Strange 140 characters countdown on background absolutely esthetical, yet very disturbing.
  • You cannot type more, then 140 characters – this restricted by textbox. If pasted bigger text all additional characters truncated.
  • You need mouse to operate an application

Now TwitterFox:

  • 10MB workset
  • You can hide it by hitting escape or clicking X button
  • Small and portable without disturbing elements – it not designed as your main everyday app.
  • New twits counter over small icon in browser tray, all other notifications can be disabled
  • Once focused text are become active, expanded automatically and ready to write
  • If you’re hiding it without clearing area, all un write text remains – you can clear it by one click
  • Small 140 characters countdown which is visible only when typing
  • You can type more, then 140 characters – counter becomes red, and you cannot post, however you’re able to fix, by dismissing unnecessary spaces or characters.
  • Can be operated by only keyboard.

Bottom line: *Chirp designed to show how good it looks, while TwitterFox to twit only. Thus for my specific user story TwitterFox won!

Defining functional specifications

Next task defined for Twitter is read other twits. I used to read all my following and followers when I have free minute. Sometimes I retwit things, rather often reply followers and read replies and rarely send direct messages.

*Chirp provides twit area without scrollbar, yet not restricted to number of twits. Other words, you can scroll with mouse wheel only or by holding somewhere inside and dragging unlimited up and down. When the mouse is over specific twit, it fades and show three buttons: reply, direct and retwit. Also each twit contains the name of the client was used (just like in regular web interface). When clicking user avatar it brings to special internal screen with last twit of the user, information and statistics about him, three functional buttons: UnFollow, Fave and Block and huge button Get User’s Tweets. When clicking the line displays the time of the twit it puts twit url into clipboard.

Also *Chirp contains five main functional buttons: Faves, Home, Direct, Update and Refresh. When Home tab unfocused (for example you’re on other screen), it also displays a number of new twits.

Error screen of *Chirp is really odd. It contains everything you not really need to know and beautiful whales moving on screen.

WTF?

TwitterFox is much simpler. It contains two buttons on mouse/keyboard over – reply and fave. When clicking on user’s avatar it opens it’s page in Twitter with all necessary information. Main TwitterFox window contains three buttons: Recent, Replies, Messages.

No doubt, that *Chirp provides much richer functional spec, but wait, am I really need all this? I told earlier, that I used to read twits and replies, while *Chirp has no such view at all. You can easy copy twit url into clipboard, but what for? Also, you can read  bio and statistics of people you following whenever you want without opening browser window. But how often you’re doing that?

TwitterFox concentrated on functionality – twit, read, reply, read replies (and direct messages) – base tasks , Twitter designed for. It also marks replies with contrast color in public timeline, while *Chirp has inline reply functionality with threaded discussions support (which is very odd for Twitter)

Bottom line: *Chirp is enriched with not useful features, while TwitterFox contains only things, you’re use. Thus for my specific functional requirements TwitterFox won again!

Developers vs. Designers final round

So, we already understand, that *Chirp is an application, designed to show how skilled thirteen23 designers are. And it achieved this goal. The application is state-of-art, looks and designed very well with taking into account even small details, however it huge, unusable for everyday twittering and extremely slow. This is a general example about Designers’ doctrine.

TwitterFox is very ugly, but concentrated on functionality, tiny and reactive. It includes only features are necessary for twittering and has no other goals. So, this is a general example about Developers’ doctrine.

Is it possible to messmate those doctrines? Probably it is. And it is really simple. Each one of actors should do his own work. Designers should design and Developers – develop. I spoke about it a lot during my lectures, I’ll speak about it also at 11th February in user group meeting. By now, when you know how I see Twitter, you can start following me. Also, I’m interesting to hear your ideas about Designer-Developer intercommunication. It is not just about Microsoft way :)

Designer and Developer - Microsoft way

Have a nice day and be good people.

How to consume WCF or Webservice from Vista Sidebar gadget by using Silverlight?

The challenge today is really simple. All we have to do is to write Silverlight Vista Sidebar Gadget, that consumes either WCF, ASMX or REST based service. Really simple, isn’t it? Let’s start

image

Build server side services

We should start from services. This is very straight forward mission. Here the logic I want to implement

public string Echo(string input)
    {
        return string.Format("ACK from {0}", input);
    }

Well, WCF? We should mark service and operation contracts. That’s all

[ServiceContract(Namespace = "")]
public class EchoService
{
    [OperationContract]
    public string Echo(string input)
    {
        return string.Format("ACK from WCF with {0}", input);
    }

}

This does not works. Why? Silverlight knows only consumes ASP.NET compatible (simplified) web services, thus we should add following attribute to the our class attributes collection

[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class EchoService
{

Now, the service is discoverable and accessible by Silverlight. Great news. Now let’s put it into our shared host. Hmm, we got strange error: “Deploying WCF Services: This collection already contains an address with scheme http.” What the hell is it?

This is shared hosting problem. Your host provider uses virtual IP and host addresses and has number of different web services, sitting on the same shared host. How to solve it?

Simple, all you have to do is to specify your own service host factory. Here the example of classes to put into code behind

class SLHostFactory : ServiceHostFactory
{
    protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)
    {
        SLHost customServiceHost =
          new SLHost(serviceType, new Uri("[Your URL goes here]",UriKind.Absolute));
        return customServiceHost;
    }
}

class SLHost : ServiceHost
{
    public SLHost(Type serviceType, params Uri[] baseAddresses)
        : base(serviceType, baseAddresses)
    { }
    protected override void ApplyConfiguration()
    {
        base.ApplyConfiguration();
    }
}

And one attribute into your service tag

Factory="SLHostFactory"

Now it works. So what’s next? Build ASMX web service. This is even simpler

[WebMethod]
public string Echo(string input)
{
    return string.Format("ACK from web service with {0}", input);
}

We done, now either WCF and Web services are accessible from your Silverlight application. So, add Service reference and consume it

Building client side

Inside code behind of your Silverlight project, you should define two proxies – one for Web Service and another for WCF service. Bother services implements the same interface, so it should not be a problem

ServerEcho.EchoServiceClient proxy;
WebServiceEcho.EchoWebServiceSoapClient wsProxy;
private void UserControl_Loaded(object sender, RoutedEventArgs e)
{
    proxy = new ServerEcho.EchoServiceClient();
    proxy.EchoCompleted += new EventHandler<ServerEcho.EchoCompletedEventArgs>(proxy_EchoCompleted);

    wsProxy = new SLGadget.WebServiceEcho.EchoWebServiceSoapClient();
    wsProxy.EchoCompleted += new EventHandler<SLGadget.WebServiceEcho.EchoCompletedEventArgs>(wsProxy_EchoCompleted);
}

Silverlight work only asynchronously, thus you should begin to understand, that synchronous programming is for pussies :) . Consume it

private void WCF_Click(object sender, RoutedEventArgs e)
        {
            proxy.EchoAsync(txt.Text);
        }

        private void WS_Click(object sender, RoutedEventArgs e)
        {
            wsProxy.EchoAsync(txt.Text);
        }

And Update output

void wsProxy_EchoCompleted(object sender, SLGadget.WebServiceEcho.EchoCompletedEventArgs e)
        {
            txt.Text = e.Error == null ? e.Result : (e.Error.InnerException != null ? e.Error.InnerException.ToString() : e.Error.Message);
        }

        void proxy_EchoCompleted(object sender, ServerEcho.EchoCompletedEventArgs e)
        {
            txt.Text = e.Error == null ? e.Result : (e.Error.InnerException != null ? e.Error.InnerException.ToString() : e.Error.Message);
        }

Now let’s run it. What? Another error? Security? Access denied? Of cause you have no crossdomain.xml.

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
   <allow-access-from domain="*" />
</cross-domain-policy>

What? You have it and still getting the same error? Look into sniffer. You application is looking for other file, named clientaccesspolicy.xml. Why? According the documentation, you can use either… Hm, another bug with WCF consuming. Never mind, let’s put it too

<?xml version="1.0" encoding="utf-8"?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from http-request-headers="*">
        <domain uri="*"/>
      </allow-from>
      <grant-to>
        <resource path="/" include-subpaths="true"/>
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>

Very well, now we are ready to run our application. It works! So, the only thing we should do is to pack it into MyGadget.gadget directory and put inside %userprofile%\appdata\local\microsoft\windows sidebar\gadgets together with gadget.xml manifest.

But… It stopped working… What’s the problem?

Very client side networking in Silverlight

The problem is, that SideBar executes it’s gadgets with local path, not with network path. Silverlight cannot use any network provider, when running locally. Why? Actually I do not know (maybe to prevent local applications development). so what to do?

Simple! Microsoft SideBar knows to run cross domain AJAX without any warnings and problems. So why not to use external XmlHttp from JavaScript for network access. Let’s do it

First we should initialize XMLHttpRequest object in JavaSctipt

var xObj;

        function getEchoWCF(text) {

            if(xObj == null) {   
                xObj = new XMLHttpRequest();

                }

            else if(xObj) {

                xObj.abort();

            }

Then create SOAP request to WCF or WebService

var sURL = "[Path yo your service]";

            //Build SOAP

            var sReq = "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"><s:Body><Echo><input>"+text+"</input></Echo></s:Body></s:Envelope>";

            xObj.open("POST", sURL, true);

            xObj.setRequestHeader( "Content-Type", "text/xml; charset=utf-8" );

            xObj.setRequestHeader( "Cache-Control", "no-cache" );

xObj.send(sReq);

After the request created and send we should handle result. So we need an access from HTML page, hosting Silverlight object to Silverlight. Simple. “ScriptableMember – ScriptableType”, remember?

[ScriptableType]

    public partial class Page : UserControl

    {

[ScriptableMember]

        public void UpdateResponse(string result)

        {

Now return the result

xObj.onreadystatechange = function() {

            if (xObj.readyState === 4) {

                if (xObj.status && xObj.status === 200) {   
                    var control = document.getElementById("silverlightControl");

                    control.Content.Page.UpdateResponse(xObj.responseText);

                }

            }

But this is not enough. We also should know to call Javascript from Silverlight… This is really simple

private void JS_Click(object sender, RoutedEventArgs e)

        {

            HtmlPage.Window.Invoke("getEchoWCF", txt.Text);

        }

We done. Now you can pack your Silverlight control, together with hosting HTML and Javascript into windows sidebar gadget and use it even with external network support.

Have a good day and be nice people.

OpenUp Sidebar gadget

OpenUp competition is on the air? Authors of contributed projects are stressed and want to know what’s going on with their pet project on CodePlex.

What can they do about stress? To get it under control and download new gadget, I built to help them to relieve stress. Just look on your side bar and see three top rated projects (by CodePlex)

image

Click on it or drag it out of SideBar to see all submitted projects and it’s rating

image

Take it easy and return to work. You should continue development of your projects.

Download OpenUp gadget >>

Note: this is very first version with number of bugs. Those days I have no time to fix them, so you can either use it “as-is” or fix bugs and resubmit.

Gas Price Windows Vista SideBar gadget – new version is available for download

This post is dedicated to some people in Microsoft and it’s subsidiaries. It begun about year ago, when I developed Gas Price information gadget (do not download it there). Before I started, I sent some personal email to those in MSN, who maintains it’s Auto section. I wait two days and got no response, so wrote this post about HTML scrapping and then I finished the gadget, that uses this technology.

image
© Christopher Robbins

Couple of weeks later, Senior Channel Manager of MSN Marketplace replayed to me. He asked whether I want to convert this gadget to “legal” one by gifting all rights to Microsoft. I asked about my benefits of doing it (my time costs money) and the conversation ended – he even did not responded. I was waiting for “YES” or “NO”, but got only silent.

Year after he mailed me again with warning, that they going to “protect” Auto section in order to prevent unauthorized content grabbing. He asked again about possibility to “legalize” the gadget – I told, that they can do with this gadget whatever they want, so handed it off to MSN team. Nothing happened. No one took care on this.

A month later, I asked again by proposing to allow Windows Vista SideBar referrer too aside with affiliate sites for MSN Auto images, thus the gadget can continue to work and MSN remains protected from other “grabbers”. But he demand to completely remove any reference to MSN from the gadget. The same time I got some proposals of using another data for this very popular gadget and populize other resources instead of very unpopular crappy MSN.

I decided to build new version of the gadget (here you can download) and did it today (my spare time – not work [this is for my manager]). This version even better, then previous one. It contains more information, that updates more frequently. I also includes distance from station and gas stations in Canada. So, this how it looks today

image

As you can see this one is much better and uses Automotive.com information. So what I have to do? Submit it instead of old one, right? This the response, I got from automatic system upon submission.

Your item appears to be either missing a valid signature or a valid certificate. You may also want to check the signature to make sure that it includes the date

Just to make things clear, I signed the code with private signature. They want me to sign it with Trusted Authority. This is very smart request, however I do not want to pay $200-$400 to make their sidebar better! There is neither ROI, nor benefit for me to pay money for something, I’m giving for free to anyone.

Just in case, signing code with certificate, trusted by authority even do not removes regular live gallery end-user warning.

Unverified submission.

Only install applications from developers you trust. This is a third-party application, and it could access your computer’s files, show you objectionable content, or change its behavior at any time.

So why me to pay? Only because I want to be nice to Microsoft and replace my old gadget by new one to serve dozen thousands of people, who using Windows Vista with SideBar and my gadget?

NO WAY! I will not submit it there. I will never contribute anything for free to Windows Vista Live Gallery. They want me (and million of other developers) to submit it to Google or Yahoo? I’ll do it! I’ll force my customers to use 3rd party addons and visit 3rd party websites to get the information they want to get without paying anyone. At least their marketing guys know how to make developer not to suffer from his own good wish.

Thank you and good buy! You want to win web? You just impossible to do it.

Download Gas Price gadget for Windows Vista SideBar >> (it signed with personal certificate, so do it for your own risk :) )

P.S. Next week, I have a meeting with Steve Ballmer and I’m going to ask him all those questions. If you have any questions and want me to ask him, please send it to me or leave a comment.

UPD (18-May): Some issues were fixed (zips starting with 0, negative prices, sorting). You can download new version of the gadget from the same url and update your local version. Great thank to all, who reported issues.

Windows Live Gallery wave 2 update (commercial)

Cool new update come today to Windows Live Gallery. Now you, as developers can sell your gadgets and as customers to buy them. Money tree? Not exactly. Purchasing or selling might be done by using Microsoft Points (those of XBox). Cool feature, that, probably, will increase the amount of available gadgets, by motivating developers to build and sell them. Meanwhile all my gadgets are fee :)

סוד ההצלחה באתר הגדג’טים של ויסטה

בוא אני אסביר לכם איך גדג’טים מכאן מגיעים לכאן (שזה מה שרואים משתמשי ויסטה). האמת שזה נורא פשוט. כל גדג’ט אשר ציונו מעל חצי (2.5) באופן אוטומטי מופיע באתר של ויסטה. מה זה אומר? שאם לא תצביעו בעבור הגדג’ט, האנטישמים יורידו אותו מהאתר (שזה מה שקרה היום). אז יהלה, להצביע (רק אם אתם באמת חושבים הדווחי תנועה זה טוב יהודים!)

חדשות טובות

     מהיום ניתן להוריד את הגדג’ט של מוקד התנועה גם מאתר של Windows Vista. ואל תגידו לי שהם לא תומכים בעברית להלן הקישור. תהנו

Gadgets download

Yesturday, I noticed about interesting problem – how to make download gadget. Seemed stupid? No. Try to upload your gadget to any web server (it might be even apache). While you’ll try to download it you’ll get following in IE and FF. What’s the hell? Why it’s ZIP??? I uploaded .Gadget!

 

You see .ZIP extention just because .Gadget is really .ZIP, so “smart” IE knows to “translate” extention in order to prevent fraud. Very nice, but I want do download and install gadget. As like as I can do in in http://gallery.live.com

How to configure my server to do it. Simple answer is right MIME type. It’s application and it’s zipped, so we can use  application/octet-stream, application/x-compressed or even application/x-msdownload. Let’s try. Just register .gadget type with one of those. In first case you’ll get octet stream :) Obviously. And this looks like that

Bad one. The next x-compressed will return us to previouse state with .ZIP renaming. Let’s see what will be with x-msdownload.

You able to download gadget as requested, but you can not install it (Open->Run) from the web (like in Live.Gallery)

So such thing is not suitable for us. After some digs of my friends from Redmond (from Live team – they are only 3 :) ) I found it. The right MIME type for Vista SideBar Gadget is application/x-windows-gadget. Register .gadget extention with application/x-windows-gadget MIME type and you’ll able to provide your visitors Live.Gallery like installation option for gadgets

Yossi, do it here for us as well :)

Have a nice gadget :)

מוקד התנועה של קול ישראל

מזל טוב, רשות השידור (בפרט מוקד התנועה) מציגים SIDEBAR GADGET של דווחי התנועה. וכך זה נראה

 

מה זה גדג’ט? נורא פשוט – דף HTML שרץ אצלכם בבית עם הרשאות מופרזות. למה? ככה! לדוגמא: CROSS SCRIPTING נהיה אפשרי. לא יפה, אבל נחמד ומשעשע.

איך מתחילים? קודם כל קוראים על הAPI. ואחר כך מקודדים את הHTML שלנו. חשוב לא לשכוח להרשם לארועים ספציפים של SIDEBAR GADGET API כנו DOCK, UNDOCK, SETTINGS CLOSE וכד’. כל הדברים האחרים – שטויות, האמינו לי, זה באמת פשוט. והכי חשוב, אנחנו לא איסתא, לכן מוקד התנועה של קול ישראל אישר רשמי את הגדג’ט.

להוריד את הגדג’ט של מוקד התנועה של קל ישראל

עכשיו אנחנו מחכים לחברה של LIVE TEAM לעלות את הגדג’ט לאתר ולCERTIFICATION

שימו לב! כאשר מורידים את הגדג’ט ב Internet Explorer הוא יורד עם סיומת ZIP, להיות ו”חכמים מאיתנו” מגלים את סוג התוכן. בכדי להתקין אותו תשנו את הסיומת של הקובץ ל.gadget

Recommended

 

Sponsor


Partners

WPF Disciples
Dreamhost
Code Project