Guy Burstein's Blog

All about the newest tools and technologies from Microsoft

News

Guy Burstein
Work:
Microsoft Israel, 2 Hapnina st', Raanana
Israel
Email:
Or, use this form.
Guy Burstein The Bu

Disclaimer
Postings are provided 'As Is' with no warranties and confer no rights.

Guy Burstein LinkedIn Profile

TwitterCounter for @bursteg

The Bu

Links

Articles

Blogs I Read

SAVE THE DATE: Developers Academy 4

SAVE THE DATE: Developers Academy 4

Developer Academy 4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PHP בסביבת Windows: חדשות למפתחים

PHP בסביבת Windows: חדשות למפתחים

PHP 5.1.12 שוחררה

PHP בסביבת Windows גירסא 5.1.12 של PHP שוחררה וניתנת להורדה מאתר http://windows.php.net וכמובן דרך ה- Web Platform Installer. בגירסא החדשה מעל ל- 60 תיקוני באגים. פרטים נוספים על הגירסא החדשה ניתן למצוא בהודעה הרשמית על שחרור הגירסא ורשימה מלאה של השינויים ניתן למצוא ב- Change Log.

שוחררה גירסא 1.5 של רכיב FastCGI

צוות הפיתוח של IIS שחרר לאינטרנט גירסא חדשה של FasctCGI Extensions עבור IIS 6.0 ו- IIS 5.1. גירסא זו מבוססת על גירסא 1.0 ומוסיפה מספר חידושים ושיפורים, ביניהם:

  • זיהוי שינויים בקבצי php.ini – ניתן להגדיר את הרכיב להאזין לשינויים בקובץ php.ini וקבצים נוספים ולרענן את ה- Processes שב- Pool בהתאם לשינויים בהגדרות.
  • שינוי הגדרת ה- MaxInstances בזמן אמת – ניתן להגדיר את כמות ה- Processes המקסימלית שתהיה ב- Pool לצורך טיפול בבקשות נכנסות.

פרטים נוספים על הגירסא החדשה ניתן למצוא בהודעה על שחרור הגירסא.

שוחררה גירסא 1.0.1 של WinCache Extension for PHP

צוות הפיתוח של IIS שחרר גירסאת עדכון ל- Windows Cache Extensions for PHP המכילה מספר תיקוני באגים שדווחו על ידי לקוחות. התיקונים, שנבדקו בסביבת Production ע”י GoDaddy.com ו- masterhost.ru שוחררו במסגרת הגירסא.

ניתן למצוא פרטים נוספים על גירסאת העדכון בהודעת שחרור הגירסא, להוריד את העדכון מכאן ואת הקוד מאתר pecl.php.net.

תמיכה ב- Windows Azure נוספה ל- Zend Framework

PHP בסביבת Windowsחברת Zend הכריזה על זמינות גירסא 1.10 של Zend Framework, שבין השיפורים בה, מכילה תמיכה בשירותי הענן של Windows Azure. בעזרת התמיכה הזאת, מפתחים יכולים לפנות בצורה קלה ביותר מתוך אפליקציות PHP לשירותי הענן של Windows Azure לצורך שמירת נתונים, קבצים או לנהל תורים באופן סקלבילי ביותר. פרטים נוספים כאן.

מדריך: יצירת CRUD Application ב- PHP מעל SQL Server בענן

ידעתם שניתן לפתח אפליקציות PHP מעל SQL Server? בעזרת פרוייקט קוד פתוח ניתן לחולל באופן אוטומטי אפליקציה שלמה המבצעת פעולות CRUD (קריאה, כתיבה, עדכון ומחיקה) העובדת מעל SQL Server בארגון או בענן. מדריך מלא כאן.

תהנו!

הכרזה על תוכנית WebsiteSpark בישראל (ווב סייט ספארק)

הכרזה על תוכנית WebsiteSpark בישראל (וובסייט ספארק)

תוכנית WebsiteSpark בישראל ווב סייט ספארק אני שמח להכריז על הפעלת תוכנית WebsiteSpark (וובסייט ספארק) בישראל.

תוכנית וובסייט ספארק בישראל פונה לחברות פיתוח ועיצוב אתרים ולעצמאיים שבונים אפליקציות ואתרים עבור אחרים. היא מאפשרת להם לקבל תוכנות, תמיכה טכנית ומשאבים נוספים ממיקרוסופט למשך שלוש שנים, מאפשרת להם להרחיב את הפעילות העסקית ולבנות פתרונות מדליקים ב- ASP.NET, Silverlight, SharePoint ו- PHP, וכן באפליקציות קוד פתוח שנבנו על גביהם.

מה מספקת תוכנית ווב סייט ספארק?

תוכנית WebsiteSpark בישראל מספקת רישיונות תוכנה שניתן להשתמש בהם במשך שלוש שנים. ברגע שחברה / מפתח עצמאי נרשמים ומאושרים, הם יכולים להוריד ולהשתמש באופן מיידי בתוכנות הבאות של Microsoft:

  • 3 רישיונות של Visual Studio 2008 Professional Edition
  • רישיון של Expression Studio 3 (הכולל Expression Blend, Sketchflow ו- Web)
  • 2 רישיונות של Expression Web 3
  • רישיונות ל- 4 מעבדים של Windows Web Server 2008 R2
  • רישיונות ל- 4 מעבדים של SQL Server 2008 Web Edition
  • פנל שליטה DotNetPanel (המאפשר ניהול אתרים מרחוק)

תוכנית WebsiteSpark בישראל ווב סייט ספארק ניתן להשתמש ברישיונות ל- Windows Server ול- SQL Server הן לפיתוח והן לסביבת Production. ניתן לארח באופן עצמאי את השרתים או להשתמש ברישיונות במסגרת התקשרות עם חברה המספקת שירותי אחסון.

נכון להיום, משתתפות בתוכנית בארץ מספר חברות אחסון אתרים, המאפשרות להשתמש ברישיונות הניתנים בתוכנית כדי לקבל דרכן הצעות זולות מאד עבור שרתים ייעודיים (Dedicated Servers) או שרתים וירטואליים (VPS) לאחסון האתרים.

בשבועות הקרובים יצורפו לתוכנית מספר חברות אחסון נוספות.

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

מי יכול להצטרף לתוכנית?

תוכנית WebsiteSpark בישראל פונה למפתחי אינטרנט עצמאיים וחברות קטנות לפיתוח ועיצוב אתרי אינטרנט. שתי הדרישות היחידות להצטרפות לתוכנית הן:

  1. החברה שלכם (או אתם במקרה של עצמאיים) בונים אתרים ואפליקציות Web עבור אחרים.
  2. בחברה שלכם יש כעת פחות מ- 10 עובדים.

אם אתם עומדים בדרישות אלה, אתם יכולים לבקר באתר של WebsiteSpark ולהירשם עוד היום.

התחייבויות מסגרת תוכנית WebsiteSpark

תוכנית WebsiteSpark בישראל ווב סייט ספארקההצטרפות לתוכנית היא בעלות 100 דולר, המשולמים בעת היציאה מהתוכנית בתום שלוש שנים.

בנוסף, על כל חברה המצטרפת לתוכנית להעלות לפחות אתר חדש בתוך שישה חודשים מיום הצטרפותה לתוכנית ולדווח על כך בפורטל ההשתתפות. לאחר העלאת האתר על שרת בישראל, (בדר"כ ע"י עבודה עם אחת מחברות אחסון האתרים שציינתי למעלה) העושה שימוש ברישיונות סביבת הייצור הניתנים במסגרת התוכנית, מביא להופעת החברה שפיתחה אותו בגלרייה, ומגבירה את נוכחותה באינטרנט.

מה קורה לאחר שלוש שנים?

ווב סייט ספארק היא תוכנית לשלוש שנים. אין כל התחייבות להמשיך להשתמש בכל תוכנה שהיא לאחר ששלוש השנים מסתיימות, ואין כל עלות עבור שלוש השנים למעט 100 דולר דמי שימוש בתוכנית שיש לשלם בתום שלוש השנים.

בתום שלוש השנים, משתתפי תוכנית WebsiteSpark בישראל יוכלו לבחור לרכוש את כל התוכנות הכלולות ב- WebsiteSpark במחירים אטרקטיבים המיועדים למשתתפי התוכנית בלבד.

סיכום

תוכנית WebsiteSpark מצטרפת לשתי תוכניות "Spark" המוצלחות שהשקנו בעבר – BizSpark עבור סטראטאפים, ו- DreamSpark עבור סטודנטים.

תוכנית WebsiteSpark מגיעה בזמן שבו האקלים הכלכלי עדיין קשה והיא עוזרת למפתחים ולחברות על ידי פיתוח קשרים עסקיים, הכשרה והתוכנות נדרושות כדי להתחיל ולפתח פתרונות מצליחים מעל פלטפורמת ה- Web של מיקרוסופט.

תוכנית WebsiteSpark בישראל ווב סייט ספארק בקרו ב- http://www.microsoft.com/israel/web כדי ללמוד יותר על פלטפורמת ה- Web של מיקרוסופט וכדי להוריד ולהתקין את ה- Web Platform Installer החדש של מיקרוסופט שהושק לאחרונה, שהופך את תהליך ההתקנה וההגדרה של שרתי אינטרנט ועמדות פיתוח לקל ומהיר הרבה יותר. לאחר מכן תוכלו לעיין, להוריד ולהשתמש באפליקציות קוד פתוח מתוך הגלרייה: Windows Web Application Gallery.

בהצלחה!

‫ישראלי זכה בתחרות העולמית לפיתוח אפליקציות ל- Windows 7‬

‫ישראלי זכה בתחרות העולמית לפיתוח אפליקציות ל- Windows 7‬

בנימין בונדי לאחר הזכיה בתחרות העולמית

במהלך כנס המפתחים השנתי של מיקרוסופט, שהתקיים לאחרונה בלוס אנג'לס התקיים הגמר העולמי של התחרות Code7 לפיתוח אפליקציות ל- Windows 7. הזוכה הוא בנימין בונדי, בן 24 מחיפה, ארכיטקט תוכנה בחברת פרס-סנס (Press-Sense) מאור עקיבא. מלבד הזמנה לכנס היוקרתי, זכה בונדי בפרס כספי בסך 17,777$.

הראיון המלא שקיימתי עם בנימין בונדי - באתר ניוזגיק.

תהנו!

מפגש בלוגרים: עיצוב והבלוג והצצה לעוד 100 שנים

מפגש בלוגרים: עיצוב והבלוג והצצה לעוד 100 שנים

מפגש בלוגרים: עיצוב והבלוג והצצה לעוד 100 שניםאנו שמחים להזמינכם למפגש הבלוגרים הרבעוני שלנו ולהרים יחד כוסית לכבוד השנה החדשה.

המפגש ייערך ב- 8 לספטמבר במשרדי מיקרוסופט,
רחוב הפנינה 2 רעננה, קומה 0,
בין השעות 17:00 - 20:00.

מה בתוכנית?

17:00-17:45 מינגלינג וכיבוד
   
17:45-18:45   היכן יעבדו אנשי ה-IT בעוד מאה שנים?
דיון על ארגונים, על המהפכה שתשנה את כל מה שאנחנו יודעים על עבודה, ועל בלוגים ומדיה חברתית.

מרצה: ישראל בלכמן, סמנכ"ל אסטרטגיה ב"בלינק", איש מדיה חברתית וסוציולוג חובב.https://twitter.com/israelblechman
   
18:45-19:15  טאצ’ עליז לבלוגר שיעיז
איך לעצב את הבלוג ע”י שימוש ב- CSS

מרצה: אלעד אברון
http://blogs.microsoft.co.il/blogs/Ambious
http://www.twitter.com/Ambious
   
19:15-19:30 עדכונים

 

להרשמה לחצו כאן

אנא אשרו השתתפותכם מראש! לנרשמים תוסדר חניה במקום ללא תשלום.
המפגש לבלוגרים מקהילת הבלוגרים של blogs.microsoft.co.il

נתראה במפגש!

ניפגש מחר בהרצאה First Look at Visual Studio 2010 IDE

ניפגש מחר בהרצאה First Look at Visual Studio 2010 IDE

מחר בבוקר אעביר הרצאה בנושא החידושים ב- Visual Studio 2010 במסגרת יום עיון למפתחים. אני מאד מתרגש לקראת ההרצאה ובטוח שהיא הולכת להיות מעניינת ומהנה!

כמו בכל הרצאה שלי – יהיו משחקים, תחרויות והפעלות לקהל, ואני מזמין את כל מי שמגיע מחר ויש לו חשבון Twitter, להשתמש בתגית vs2010day# במהלך ההרצאה.

First Look at Visual Studio 2010 IDE גיא בטרשטיין

נתראה מחר!

‫10 טיפים וטריקים לשימוש ב- Internet Explorer 8‬

‫10 טיפים וטריקים לשימוש ב- Internet Explorer 8‬

10 טיפים וטריקים לשימוש ב- Internet Explorer 8 אקספלוררלפני כמה חודשים הושקה הגירסא החדשה של הדפדפן Internet Explorer 8, המכילה חידושים המשפרים את חווית הגלישה והופכים אותה לבטוחה יותר ומהירה יותר.

אתמול פורסם ב- Newsgeek מאמר שכתבתי בנושא ‫10 טיפים וטריקים לשימוש ב- Internet Explorer 8‬, ואתם מוזמנים לקרוא ולהינות!

Israel@PDC09 – המשלחת הישראלית לכנס המפתחים בלוס אנג’לס

Israel@PDC09 – המשלחת הישראלית לכנס המפתחים בלוס אנג’לס

Israel@PDC Israel@PDC08 Israel@PDC09

השבוע נפתחה ההרשמה ל- Professional Developer Conference שיתקיים בלוס אנג’לס בין ה- 17 ל- 19 בנובמבר. למי שלא מכיר, PDC הוא כנס עולמי שמיקרוסופט מקיימת מדי שנה / שנתיים ובו היא חושפת את חזונה הטכנולוגי לשנים הקרובות ומפתיעה בהכרזות מרעישות ביותר. רק לשם קבלת מושג, ב- PDC03 הוצגו הטכנולוגיות Avalon ו- Indigo שבשנת 2006 זכו להיות חלק מ- .Net Framework 3.0 ולהקרא WCF ו- WPF. ב- PDC05 הוצג לראשונה הרעיון של LINQ שיצא עם Visual Studio 2008, ובשנה שעברה נחשפו לראשונה Windows 7 ו- Windows Azure.

רשימה ראשונית של 30 הרצאות לכנס הקרוב פורסמה, ואפשר למצוא שם הרצאות על העתיד של Visual Studio, Silverlight, Sharepoint 2010 וכו’, ומנסיוני, ההפתעות הגדולות נחשפות רק בהרצאות המליאה של הכנס.

כמו בשנה שעברה, גם לקראת הכנס הנוכחי מתארגנת במיקרוסופט ישראל משלחת בשם Israel@PDC, המאגדת את כל הנציגים הישראלים הנוסעים לכנס. המשלחת נועדה לחבר בין הנציגים, לשתף ביניהם חווית מכנסים קודמים ולשתף טיפים כדי להפיק את המקסימום מהכנס. במהלך האירוע מקיימת המשלחת גם סעודה חגיגית ואיך אפשר בלי תמונה.

Israel@PDC

ההרשמה לכנס PDC, ולנרשמים עד ה- 15 בספטמבר ניתנת הנחה של 500$. אם אתם נוסעים לכנס בבקשה צרו איתי קשר, ואם אתם יודעים על מישהו שנוסע לכנס, בבקשה תגידו לו שיצור איתי קשר גם הוא כדי להיות חלק מהמשלחת ולהצטרף לחגיגה!

למי שלא נוסע, תמיד תוכלו להתעדכן בטוויטר על כל מה שאנשים כותבים על PDC09.

כמה פוסטים שגדי כתב על PDC08 ותמיד כיף לקרוא:

תהנו!

Seadragon – לשתף תמונות באיכות גבוהה (או - מי היה יהודה הלוי?)

Seadragon – לשתף תמונות באיכות גבוהה (או - מי היה יהודה הלוי?)

אחת הבעיות באתר שיתוף התמונות היא שהם מציגים תמונות באיכות בינונית בלבד. גם כדי לקצר את משך הזמן שלוקח להוריד תמונה וגם כדי שהתמונה תיכנס בגודל דף באינטרנט ללא צורך בגלילה של הדף.

אבל מה אם אני בכל זאת רוצה לשתף תמונה באיכות גבוהה, שלמשתמשים לא יקח הרבה זמן לצפות בה, שהיא תיכנס בגודל של דף אינטרנט אבל בנוסף תאפשר גם Zoom In לצפייה בפרטים הקטנים?

בדיוק בשביל זה אני אשתמש ב- Seadragon – שירות שיתוף תמונות חדש של מיקרוסופט.

לדוגמא, נניח שיש לי תמונה שכרגע נמצאת ב- Flickr, תמונה שצילמתי בשיטוט האחרון שלי עם המצלמה בתל אביב. כאשר העליתי אותה ל- Flickr, האתר יצר מספר עותקים של התמונה שלי ואחסן אותן בנפרד, ואני יכול לבחור באיזה גודל אני מעוניין לצפות.

Seadragon שיתוף תמונות

אני אבחר את הלינק לתמונה באיכות המירבית, אעתיק אותו ל- Seadragon, ואלחץ על Create.

האתר יעתיק את התמונה וימיר אותה לפורמט Deep Zoom. בסיום, אני אקבל את התמונה שלי באתר ואוכל לבצע Zoom In עמוק כדי לראות את הפרטים הקטנים. למשל – מי היה יהודה הלוי? (רמז: התשובה בתמונה)

ניתן עם לעשות Embed של התמונה בתוך דף אינטרנט, כפי שעשיתי כאן:

שיתוף נעים!

Windows 7: Create .Net Flickr Federated Search Connector

Windows 7: Create .Net Flickr Federated Search Connector

Windows 7 makes searching for content much easier with Federated Search. In this post I’ll talk about how to how to create a Flickr Federated Search Providers in .Net.

Windows 7 .Net Flickr Federated Search Connector Provider C# .osdx 

Before We Start

Windows 7 .Net Flickr Federated Search Connector Provider C# .osdx This sample uses Flickr API through Flickr.Net. In order to build your own version of this Flickr Federated Search Connector:

Create a new ASP.Net Web Application

Create a new ASP.Net Web Application with Visual Studio.

Windows 7 .Net Flickr Federated Search Connector Provider C# .osdx

Windows 7 .Net Flickr Federated Search Connector Provider C# .osdxAdd the Flickr.Net project (called FlickrNet.csproj) to your solution, and add a reference to it from your web application.

Add the Flickr API and Secret Key’s to your web.config in the AppSettings section:

<appSettings>

  <add key="flickr_api_key" value="923422ab4225345dfgdb777daf46"/>

  <add key="flickr_secret" value="aa8b23fsdfhyc3beda"/>

</appSettings>

Create the Flickr Search Provider

The following provider will be executed by the Windows Explorer client using HTTP GET, and will receive several parameters from it:

http://localhost:52903/Search.aspx?q=TechEdIsrael2008&start=1&count=20

It will perform the search against Flickr, and return the response as RSS.

<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">

  <channel>

    <title>Flickr Search Results</title>

    <item>

      <title>IMG_0134c</title>

      <link>http://farm4.static.flickr.com/3100/2682983091_7cea404dc4_m.jpg</link>

      <description>show shadow dance techedisrael2008</description>

      <pubDate>Sun, 20 Jul 2008 01:47:25 GMT</pubDate>

      <media:content url="http://farm4.static.flickr.com/3100/2682983091_7cea404dc4_b.jpg"
                     type="image/jpeg" height="333" width="500" />

      <media:thumbnail url="http://farm4.static.flickr.com/3100/2_7cea404dc4_t.jpg" />

    </item>

    <item>

      ...

    </item>

  </channel>

</rss>

Create a new Web Form called Search.aspx.

To make it easier to test the response, right click the web application, and open the Properties window. Go to the Web pane, select Search.aspx as the start page and provide the query parameters:

Windows 7 .Net Flickr Federated Search Connector Provider C# .osdx

In the page markup, add a new asp:Repeater control that will define the template for each item in the response:

<asp:Repeater runat="server" ID="itemsRepeater">

</asp:Repeater>

In the page code behind, implement the logic that uses Flickr.Net to search for photos and bind the result to the repeater control:

protected void Page_Load(object sender, EventArgs e)

{

  string flickrApiKey = WebConfigurationManager.AppSettings["flickr_api_key"];

  string flickrSecret = WebConfigurationManager.AppSettings["flickr_secret"];

 

  string searchTerm = Request.QueryString["q"];

  int startPage = int.Parse(Request.QueryString["start"]);

  int count = int.Parse(Request.QueryString["count"]);

 

  Flickr flickr = new Flickr();

  flickr.ApiKey = flickrApiKey;

  flickr.ApiSecret = flickrSecret;

  Photos photos = flickr.PhotosSearch(null, "", 0, searchTerm,
                      DateTime.MinValue, DateTime.MinValue, 0,
                      count, startPage, PhotoSearchExtras.All);

 

  this.itemsRepeater.DataSource = photos.PhotoCollection;

  this.itemsRepeater.DataBind();

}

In the code above I first grab the API and secret key’s from the configuration file and then, I extract the parameters from the query string. I create a new instance of the Flickr object, and perform the actual search for photos, providing the page number and the number of items in each page. Finally, I bind the returned photo collection the the repeater control.

Replace the html header and footer with RSS header and footer in Search.aspx.

Before:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Search.aspx.cs" Inherits="FlickrFederatedSearch.Search" %>

 

<head runat="server">

  <title></title>

</head>

<body>

  <form id="form1" runat="server">

  <div>

    <asp:Repeater runat="server" ID="itemsRepeater">

    </asp:Repeater>

  </div>

  </form>

</body>

</html>

After:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Search.aspx.cs" Inherits="FlickrFederatedSearch.Search" %>

 

<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">

  <channel>

    <title>Flickr Search Results</title>

    <asp:Repeater runat="server" ID="itemsRepeater">

    </asp:Repeater>

  </channel>

</rss>

Set the ItemTemplate of the Repeater control to display the photos data according to the output format:

<asp:Repeater runat="server" ID="itemsRepeater">

  <ItemTemplate>

    <item>

      <title><%# Eval("Title") %></title>

      <link><%# Eval("SmallUrl")%></link>

      <description><%# Eval("CleanTags")%></description>

      <pubDate>

        <asp:Literal runat="server"

         text='<%# ((FlickrNet.Photo)Container.DataItem).DateTaken.ToString("R") %>' />

      </pubDate>

      <media:content url='<%# Eval("LargeUrl")%>' type="image/jpeg" />

      <media:thumbnail url='<%# Eval("ThumbnailUrl")%>' />

    </item>

  </ItemTemplate>

</asp:Repeater>

Run the application. The browser should navigate to Search.aspx passing all the relevant query parameters. The response should be an RSS feed that contains items per photos found.

Creating the Flickr Federated Search Connector

Add a new Xml file to the project and name it FlickrFederatedSearch.osdx (stands for OpenSearch Description Xml). This file contains the data that Windows Explorer needs to order to perform the search against the search service.

<?xml version="1.0" encoding="utf-8" ?>

<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">

  <ShortName>Flickr Federated Search</ShortName>

  <Url type="application/rss+xml"
      
template="http://.../Search.aspx?q={searchTerms}&amp;start={startPage}
&amp;count={count}" />

</OpenSearchDescription>

Notice in the above xml that the parameters are taken from some predefined names ({searchTerms}, {count} etc.), and the ampersands (&) are Html encoded.

Right click the .osdx file, and select Open With.

Windows 7 .Net Flickr Federated Search Connector Provider C# .osdx

 
In the Open With dialog, select Windows Explorer.

Windows 7 .Net Flickr Federated Search Connector Provider C# .osdx

In the Add Search Connector dialog, click Add.

image

Now, Flickr Federated Search appears in the Favorites section in Windows 7 Explorer and you can use it for searching items.

 Windows 7 .Net Flickr Federated Search Connector Provider C# .osdx

Summary

In this post I’ve talked about how to create a Flickr Federated Search Connector for Windows 7 in .Net. The above provider provides basic features and can be enhanced with more capabilities described in the Windows 7 Federated Search Provider Implementer’s Guide.

Enjoy!

Windows 7: Register a New File Associations

Windows 7: Register a New File Associations

Windows 7: Register a New File Associations

Windows 7: Register a New File Associations Lets say I have a standard Windows Forms application that works with .guy file types (which is nothing but a text file):

This application can be launched from the command line with a file name as an argument:

> TextFilesViewer.exe SampleFile.guy

In this case, the application displays the file contents in the multiline textbox above:

private void ViewerForm_Load(object sender, EventArgs e)

{

  string[] args = Environment.GetCommandLineArgs();

  if (args.Length > 1)

  {

    string[] lines = File.ReadAllLines(args[1]);

    this.txtFileContents.Lines = lines;

  }

}

Since this application is the only application that knows how to work with .guy files, we would like to associate this file type with my application.

Windows 7: Register a New File Associations

In order to do that, add a reference to the RegistrationHelper sample. This is an exe that performs the actual registration of the file association and needs to be run with admin privileges. It can be found as a sample project in the WindowsAPICodePack\Samples\Shell\TaskbarDemo\CS\RegistrationHelper folderer

After you have added the reference you should add another file from the samples folder - RegistrationHelper.cs which is found in the WindowsAPICodePack\Samples\Shell\TaskbarDemo\CS\TaskbarDemo\ folder.
This file exposes several static methods that invoke the helper as another process with admin privileges.

private void registerFileTypeToolStripMenuItem_Click(object sender, EventArgs e)

{

  string appId = "TextFilesViewer";

 

  RegistrationHelper.RegisterFileAssociations(

    appId,

    false,

    appId,

    string.Format("{0} %1", Assembly.GetExecutingAssembly().Location),

    ".guy");

}

Notice that one of the parameters of RegistrationHelper.RegisterFileAssociations() method is the Application ID which is set to a meaningful name. I’ll talk more on the Application ID in later posts to understand its impact on additional features.

Windows 7: Register a New File AssociationsWhen the user tries to associate the file type, RegistratioinHelper will require admin privileges. If User Account Control (UAC) is enabled on your machine, you will be prompted to allow the registration utility to modify the registry.

After the registration completes, you can double click and .guy files in your machine, and the TextFilesViwer application will be launched to display its content.

Enjoy!

Getting Started with Windows 7 Development Through Windows API Code Pack

Getting Started with Windows 7 Development Through Windows API Code Pack

Windows API Code PackWindows API Code Pack 

Windows 7 is said to be a great operating system, much more secure, faster and productive than its predecessors. As with every version of Windows, it also contains a huge amount of new features exposed for developers as API’s, unfortunately, as unmanaged code. The Windows SDK team is working on a project called Windows API Code Pack which provides managed wrappers for Windows API’s.

Downloading the Windows API Code Pack, you’ll get a Zip file containing both the Windows API Code Pack Source and Samples. In the next few posts I’ll explore the new features of the new OS and provide the managed ways to leverage them from your applications using the above source and samples.

Enjoy!

How to build a Simple IE8 Accelerator

How to build a Simple IE8 Accelerator

This post is a step by step guide for building IE8 Accelerators.

A Short Introduction to IE8 Accelerators

Accelerators are used to make the user more productive while surfing the net, by:

How to build a Simple IE8 Accelerator 1. Speeding up the process of getting additional information about a meaningful string (address, stock quote, a product, a twitter account name, etc). In this sample

2. Allowing user to perform a quick action on a selected text.

From a technical perspective, Accelerators define 2 actions: Preview and Execute. When the user selects some text and hover over an accelerator, the Preview action is being performed - the selected text is sent to a defined url, that returns a 320x240 web page with a preview of the data.
When the user clicks the Accelerator, the Execute action is performed and the browser navigates to a page passing it the selected text as a parameter.

To build IE8 Accelerators, we have several steps to do:

  1. Building an Accelerator Page
  2. Defining the Accelerator OpenService Xml
  3. Registering the Accelerator with IE8
  4. Using the Accelerator

To make sure this guide is generic enough for every Accelerator you may think of and not just for Twitter profiles, I am leaving the twitter logic to the last part of this post.

1. Building an Accelerator Page

Create a new ASP.Net Web Application in Visual Studio 2008 or open an existing one.

Add a new Web Form for the Accelerator Preview. In the page code behind, extract the query string parameters write them to the Response object:

protected void Page_Load(object sender, EventArgs e)

{

  foreach (string param in Request.QueryString.AllKeys)

  {

    Response.Write(param + " = " + Request.QueryString[param] + "<br />");

  }

}

Test the page: Navigate to the accelerator’s url, and add several parameters. For example:

http://localhost:16319/ShowTwitterUser.aspx?data1=guy&data2=burstein

How to build a Simple IE8 Accelerator  

Defining the Accelerator OpenService Xml

In order to register the Accelerator with a user’s browser, we have to create an xml file with the details of the Accelerator.

Add an Xml file to the web application that defines the Accelerators metadata required by the browser.

<openServiceDescription
     
xmlns=http://www.microsoft.com/schemas/openservicedescription/1.0>

  <homepageUrl>http://www.bursteg.net/</homepageUrl>

  <display>

    <name>Twitter Profile Accelerator</name>

    <icon>http://www.twitter.com/favicon.ico</icon>

  </display>

  <activity category="Define">

    <activityAction context="selection">

      <preview action="http://www.bursteg.net/Twitter/ShowTwitterUser.aspx">

        <parameter name="selection" value="{selection}" />

      </preview>

      <execute action="http://www.bursteg.net/Twitter/ShowTwitterUser.aspx">

        <parameter name="documentUrl" value="{documentUrl}" />

        <parameter name="documentTitle" value="{documentTitle}" />

        <parameter name="documentDomain" value="{documentDomain}" />

        <parameter name="documentHost" value="{documentHost}" />

        <parameter name="selection" value="{selection}" />

      </execute>

    </activityAction>

  </activity>

</openServiceDescription>

Few things to notice in the Accelerator Xml:

1. There is some meta data about the accelerator such as homepage Url and the display name and icon.

2. The Activity node defines a category to which this accelerator belongs to. There are some default categories like Map, Translate, Blog etc, but users can manage their categories using the Manage Add-ons Dialog.

3. As described earlier, the accelerator defines 2 actions, preview and execute, each defines a Url to call to when clicked / previewed, and several parameters to pass to the target page.

Register the Accelerator with the User’s Browser

In a page of your chose (for example Default.aspx) add a button that registers the accelerator when clicked:

<input id="btnRegister" type="button" value="Add Accelerator to IE8" 
      onclick="BLOCKED SCRIPTwindow.external.AddService('TwitterProfileAccelerator.xml');" />

How to build a Simple IE8 Accelerator

When the user clicks on the above button, a dialog pops us asking his permission to add this accelerator to his browser, and whether to make it the default accelerator in its category.

How to build a Simple IE8 Accelerator

Using the Accelerator

After the user has added the accelerator to his browser he can start using it. Select some text and the accelerator box will appear next to it. Click on it add hover over the new accelerator. This should make an HTTP request to the accelerator page passing it the text you have selected.

How to build a Simple IE8 Accelerator

If you click on the accelerator, IE8 will open the target page in a new tab passing it the selected text and additional information as defined in the accelerator xml.

How to build a Simple IE8 Accelerator

Summary

In this pot I took the steps needed to build an accelerator. You can follow them you build your own accelerators and add additional logic to provide more interaction with your uses.

Enjoy!

Posted: Jun 29 2009, 01:08 PM by Guy Burstein | with 6 comment(s)
תגים:,
חיפוש מוצרים באתר זאפ עם Internet Explorer 8

חיפוש מוצרים באתר זאפ עם Internet Explorer 8

חיפוש מוצרים באתר זאפ עם Internet Explorer 8אתמול קיבלתי מייל מחבר שלי:

“לא תאמין – היום חברה שלי ואני חוגגים שנה יחד, ואני מחפש לה מתנה. אני חייב לצאת גדול כי היא קנתה לי Xbox !!!”

אני לא יודע מה התגובה הראשונה שלכם כשאתה קוראים את מה שחבר שלי כתב לי, אבל הדבר הראשון שעלה לי לראש זה – בואו נראה כמה באמת החברה שלו השקיעה…
אז כדי לדעת כמה בימינו אלה עולה Xbox, סביר להניח שהייתי פותח טאב חדש, גולש לאתר השוואת המחירים – זאפ ומבצע חיפוש למחרוזת Xbox כדי לראות כמה הוא עולה.

עם Internet Explorer 8, זה הרבה יותר פשוט. כאשר מסמנים טקסט כלשהו באינטרנט, פתאום מופיע הלחצן הכחול הזה:

חיפוש מוצרים באתר זאפ עם Internet Explorer 8

שכאשר לוחצים עליו, נפתחת רשימה של Accelerators (או בעברית – מאיצי גלישה) שמאפשרים לי להפעיל כל מיני שירותים על הטקסט שסימנתי. לדוגמא, אני יכול להפעיל את ה- Accelerator של חיפוש פריטים בזאפ ולקבל את התוצאה הבאה:

חיפוש מוצרים באתר זאפ עם Internet Explorer 8

ה- Accelerator פונה לאתר זאפ, ומציג לי את הפריטים שעונים לשם Xbox עם התמונה שלהם, טווחי המחירים ומידע נוסף. ובשביל לקבל את כל זה הייתי צריך בסך הכל לסמן טקסט ולהפעיל Accelerator. הרבה יותר פשוט מקודם!

אם גם אתם רוצים להוסיף את ה- Accelerator של חיפוש פריטים בזאפ ל- Explorer שלכם, תוכלו לעשות את זה מתוך גלריית ההרחבות של Internet Explorer 8 שמכילה עוד הרבה הרחבות שפותחו ע”י אתרים מובילים בארץ. את כל ההרחבות של אתר זאפ תוכלו למצוא כאן.

בהמשך אספר על עוד הרחבות ל- Internet Explorer 8 שפותחו בארץ…

תהנו!

Getting Started with jQuery in Visual Studio 2008

Getting Started with jQuery in Visual Studio 2008

jQuery IntellSense in Visual Studio 2008

In this post I’ll talk about adding jQuery IntellSense in Visual Studio 2008, and how to add jQuery to a simple Web Application inside Visual Studio 2008.

jQuery IntelliSense in Visual Studio 2008 - KB946581

In order to use jQuery in Visual Studio 2008 with IntelliSence a hotfix for Visual Studio 2008 must be installed:

  1. Download the hotfix from Connect
  2. Run the executable and extract its contents to a folder in your hard drive.
  3. Make sure all instances of Visual Studio 2008 are closed, and run VS90-KB946581.exe from the above folder.

Download the Latest jQuery Library + Documentation

To use jQuery in Visual Studio 2008, and enjoy its IntelliSense, you should download 2 javascript files. One contains the actual jQuery library, and the second contains the library with documentation for Visual Studio 2008 to display its IntelliSense.

  1. Go to jQuery Official Download Page
  2. Scroll down and find the Current Release section.
  3. Download the Uncompressed version (jquery-1.2.6.js) and the documentation for Visual Studio (jquery-1.2.6-vsdoc.js).

Using jQuery in a Visual Studio 2008 Web Application

jQuery IntelliSense in Visual Studio 2008 - KB946581In a new Web Application or inside an existing one, add the jQuery scripts into a certain folder.

In a web page (or a master page), add a reference to the jQuery library:

<head runat="server">

  <title>jQuery Sample</title>

 

  <script src="scripts/jquery-1.2.6.js"
          type="text/javascript" ></script>

 

</head>

Then, in any javascript function you can start using jQuery functions and enjoy the IntelliSense in Visual Studio 2008.

jQuery IntelliSense in Visual Studio 2008 - KB946581

A Simple Example of Using jQuery Functions

For example, Assuming that you have a page with the following content in it:

<form id="form1" runat="server">

<div>

  <input type="text" class="inputs" id="txtName"
         value="Enter Text Here" />

  <input type="button" class="inputs" id="btnSubmit"
         value="Click Me" onclick="handleButtonClick();" />

</div>

</form>

This form contains a single textbox followed by a button.

jQuery IntelliSense in Visual Studio 2008 - KB946581

The handleButtonClick() function handles the button onclick event.

<script type="text/javascript">

  function handleButtonClick() {

  }

</script>

The way jQuery works is by selecting DOM elements and then doing something with them, such as executing a function or applying some properties. For example:

<script type="text/javascript">

  function handleButtonClick() {

    $("#txtName").css("border", "solid 2px red");

  }

</script>

The above method uses the selector function $ to select DOM elements (in this case – a single element with id = txtName) and to apply a style property of a red border. Running this page and clicking the button results in this output:

jQuery IntelliSense in Visual Studio 2008 - KB946581

Summary

In this post I talked about the steps you should follow in order to use jQuery in Visual Studio 2008 with InstelliSense support. Then, we used jQuery in a simple web application.

More Posts Next page »