DCSIMG
yairs

yairs

דוגמאות קוד - Web Developer Comunity - דצמבר 2010

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

  • Entity Framework 4.0
  • WCF WebHttp Binding with ASP.NET AJAX
  • JQuery Templates

אפשר להוריד את דוגמאות הקוד מכאן

Dev Academy 4

 

הסתיים לו "Dev Academy 4"  ואני כל כולי כבר בהכנות לסדר הפסח. התגובות להרצאה בכנס היו מעולות וגם אני נהניתי מאד מהקהל ומתהליך ההכנה לכנס. תהליך ההכנה כולל בחירת הנושא, איסוף מידע מכל מקורות האפשריים, הכרות מעמיקה עם ספריות וגרסאות שהשתחררו בימים האחרונים ממש, הגדרת המסר המרכזי שאותו רוצים להעביר, תכנון ובנית Demo   מתאים, חזרות, מדידת זמנים ותיקונים. נתבקשתי ע"י מיקרוסופט להציג את WF4.0   ללא התיחסות ל Workflows Services  . הכותרת שבחרתי להרצאה היא  "WF 4.0 Asynchronous Programming" . אני עוסק ב Workflows  כבר תקופה ארוכה. גרסת  2010 לא הביאה רעיון חדש אבל הפנים והגוף  החדשים לגמרי של 4.0 WF מאפשרים לימוד ויסום הרעיונות ביתר קלות. בהרצאה זאת בחרתי להמחיש את היחודיות והכח הפנימי שטמון בארכיטקטורת ה Workflows  הלא הוא היכולת להריץ קריאות אסינכרוניות עם זמן תגובה ארוך במיוחד. למשל: הפעלת קריאה לשרות מסוים ולפונקציה שאמורה להחזיר נתון מסוים או לשלוח הודעת callback   לכשהתהליך יסתיים. הכל טוב וידוע רק שבישומים מסוימים הזמן הנדרש (בין שליחת הבקשה לקבלת התשובה)  יכול לקחת גם מספר דקות או שבועות או בכלל. מודל רגיל של Request\Response  לא יעשה את העבודה ומודל הודעות חד כיווניות דורש טיפול בהודעות כדי לבדוק מאיין באה ההודעה ולאן פנייה מועדות. לעומת זאת, או בנוסף, מנגנון הWorkflows , בשיטוף עם מסד נתונים מתאים, יעצור את זרימת הקוד אחרי הבקשה, יסמן אותו (Bookmark) ויוריד את כל המופע מהזכרון לתוך מסד הנתונים. לבסוף, וללא הגבלת זמן, כשתגיע תשובה מהשרות יבנה המופע מחדש וימשיך ליזרום בקוד הלאה החל מהמקום שבו סומן לו לעצור קודם לכן.   אפשר לצפות בהקלטת ההרצאה ולהוריד את דוגמאות הקוד מכאן

עדכון ושדרוג "Advance Enterprise .Net Application"

שלום למפתחים

קורס "Advance Enterprise .Net Application" עובר עדכון ושדרוג
  • Ado.Net Entity framework -- EF
       יועבר בגרסת 4.0 ולא בגרסת 3.5 המקורית לנוכח השיפורים המשמעותיים שהוכנסו בגרסה זאת
  • LinqToSQL --  יורד מרשימת הנושאים מאותה סיבה
  • Distributed Caching -- Velocity
       יועבר תחת Windows Server App Fabric
  • Workflow Foundation -- WF
       יועבר תחת Windows Server App Fabric
  • Workflow Foundation -- WF
       יועבר בגרסת 4.0 לנוכח השיפורים המשמעותיים שהוכנסו בגרסה זאת
  • LinQ & CSharp -- חידושים בשפה
       יועברו תוך כדי התנסות עם תכני הקורס האחרים ולא כנושא עצמאי בלתי תלוי
אני יעביר את הקורס במכללת הייטק, הרצליה, בשבוע של 14 לפברואר. הקורס בן 5 ימים יכיל את התכנים הבאים:
Topics:
  • 3 Days - Windows Communication Foundation (WCF)
    • WCF 3.5 (from the ground up…rapid learning)
    • Advance WCF 3.5 (exploring selected WCF behavior extensions)
    • New Features for WCF 4.0
  • 1 Day - ADO.Net Entity Framework (EF)
    • Object Relational Mapping (understanding ORM)
    • ADO.Net Entity Framework 3.5 (EF Architecture)
    • New Features / Fixes for Entity Framework 4.0 (hands-on practice)
  • 1 Day – Introduction to Windows Server AppFabric
    • Caching (Distributed Cache, "Velocity")
    • Workflow management (WF 4.0)
    • Service management (…WCF & WF)
לפרטים נוספים אפשר להתעדכן באתר של מכללת היטק או לפנות אלי באימייל yair@wsdl.org.il

יום טוב לכולם

קורס חדש - Advance Enterprise .NET Development

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

       הקורס יטפל בכל השכבות שמאחורי שכבת ה Web, WinForm, Silverlight, WPF, GUI

       הקורס יטפל בכל מה שמפתח צריך לדעת כדי לפתח אפליקצית .Net  חזקה ויציבה.

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

אספתי את עצמי, את 12 שנות נסיוני בתחום, את התגובות שאני מקבל מצוותי הפיתוח וזה מה שיצא.

קורס חדש  Advance Enterprise .NET Development (Microsoft .Net 3.5)

 מחזור ראשון, מסופסד ע"י מיקרוסופט, יתקיים במכללת היטק בע"ה בסוף פברואר.

 בשעה טובה ומוצלחת.

 

 

2009 is a good time to reinforce your Workflow Foundation - Part 1

The following “Workflow Foundation” articles are aimed for Software architects and developers that want to find out what is the big promise held inside Windows Workflow Foundation (WF), how this technology can help them design and write a better solutions and when is the right time to move in? Well, you are probably all heard about the Microsoft’s Windows Workflow Foundation (WF) that was released back on November 2006 as part of .Net 3.0. A year later on October 2007 Microsoft has indicated that workflows are going to be a cornerstone of the future Service Oriented Architecture platform. A year later at PDC October 2008, we all got to see the proof looking into the 2010 bits showing clearly that most investment and innovation is taking place in the Workflow Foundation area. Workflows, like traditional programs, allow you to coordinate work but have some important differences.
  • Workflows can handle long running work by persisting to a durable store, such as a database, when idle and loading again once there is work to do
  • An instance of a workflow can be modified dynamically while running in the event that new conditions require the workflow to behave differently than it did when it was created
  • Workflows are a declarative way of writing programs by linking together pre-defined activities rather than an imperative programming model of writing lines of code
  • Workflows allow you to declare business rules that are separated from your code making it easier for you to modify them in the future
  • Workflows support different styles of systems with sequential and state machine workflows
In this article I would like to focus on the first feature described as “Workflows can handle long running work by persisting to a durable store…….”To understand the above feature lets first look into the following three programming tasks. ·         Synchronous programming.·         Asynchronous programming.·         Truly Asynchronous programming (Messaging).Every programmer knows how to write lines of code that runs synchronously one line after the other.  The second task, Asynchronous programming, is also an easy task while working in a managed code environment like Microsoft .Net Or J2EE. All you need to know is how to generate new threads how to synchronize them, maintain handlers and work with critical sections and deadlocks. However, Truly Asynchronous programming (messaging) is much more difficult task and here is where WF comes to the rescue. To better understand this lets look into the following scenario.You need to design and implement an application that will collect information from services that some or all of them my need a “long time” to response. You do not want to keep your program state in memory while waiting for service functions to callback.  Asynchronous programming will not really solve the problem as you continue to wait in memory just on another thread. Your problem is the time-out exception you may get and/or the resources being wasted while waiting for the service functions to complete and call back.  The solution for this problem is known as “Truly Asynchronous Programming” or “messaging”. In practice, you may want to modify the service functions to return nothing (VOID). An advance scenario will make sure that a message is sent “one way” to the service without waiting for any result or callback (unless there is an error in the transport).  After calling the one way function (sending a message) you may want to release the state from memory and turn it idle so it is available for any other need. Then, after a while, the service you called is ready with results to be sent to you. A response message is calling in your program and wakes it up from its idle mode. At this point you need to know who is calling you, where the specific state is kept, how to serialize it, and is it still relevant at all. The good point is that now you may set the time-out according to the business needs ranging from seconds to months. The time-out is no longer a problem you need to solve.  Remember, working with messaging in a truly-asynchronous fashion is not necessarily slower than using Request-Response function calls.  The enterprise world is already using this architecture for a long lone time.  Workflow Foundation makes it easier to use this powerful architecture having one design to handle short term as well as long term responses. On February 8 and 9, 2009, I will give a two days course on the “Windows Workflow Foundation”. The course will take place at Hi-Tech College.  The course will run according to the official Microsoft curriculum and in addition to it we will practice scenarios like the one discussed in this article. Sample code will be published soon.... Part 2.Thanks,

Yair Siwek

"Velocity" Distributed Cache - המטמון המבוזר של מיקרוסופט

כנס DevAcademy3 היסתיים לו בהצלחה. נהניתי מאד לפגוש פנים מוכרות וחדשות ולהרצות על המטמון המבוזר " Distributed Cache" של מיקרוסופט הידוע בשם הקוד”Velocity” . זאת טכנולוגיה חדשה שמשפרת ביצועים (performance and latency), זמינות (Availability)ויכולת התרחבות (Scalability)  של אפליקציות מסוגים שונים ובשכבות שונות. אפשר לראות ולשמוע את ההרצאה שלי כאן , להוריד את המצגות מכאן ולקבל את קוד ההדגמה מכאן.

ההדגמה שבחרתי לכתוב מחליפה את  השימוש ASP.NET  Caching API  ב Velocity -  Distributed Caching בצורה פשוטה ומידית. הרצת הדוגמא על מספר שרתי WEB מראה כיצד מתאפשר לאפליקציה להנות ממטמון המשותף ולא לבנות על המטמון האישי בלבד כפי שהיה קודם. ובמילים פשוטות אם אני נדרש להעמיד מספר שרתים (במקרה זה שרתי WEB) אחד ליד השני ב CLUSTER אז עכשיו אני יכול לאפשר לכל השרתים לעשות שימוש במקור מידע אחד. היתרון הוא שמקור זה בנוי ממספר שרתים שיודעים להעתיק ולשמר את המידע בינם לבין עצמם כך שלא איבדתי את הזמינות ושיפרתי את הביצועים. 

 בהרצאה גם הצגתי יכולות מדהימות של  Velocity לשלוף מידע מהמטמון לפי סימוניםTags  או לפי שאילתות LINQ.

 velocity מתוכננת לרוץ בפלטפורמות ושפות רבות ומגווונות.

בע"ה בקרוב אני אכתוב על הארכיטקטורה הפנימית של  Velocity והשימוש בטכנולוגיה שמפותחת עבור SqlServices

 

חג חנוכה שמח.

באנו חושך לגרש בידינו אור ואש
כל אחד הוא אור קטן וכולנו אור איתן

הנני כאן !

בס"ד

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

אני יועץ ומרצה בנושאי פיתוח בסביבת WCF | .Net | XML Web Services | | Biz Talk. לא הייתי מקוון זה זמן מה.

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

לפני שנה, ממש יום לפני חג החנוכה, התחתנתי ואלו לי נישואין שניים. באותו מעמד מקודש קיבלתי על עצמי את התפקידים הנדרשים מהאיש במשפחה ובנוסף קיבלתי על עצמי גם כיפה וציצית ומאז אני דוס גם בחיצוניות. אני מנוהל ע"י אשתי וריבונו של עולם אבל הפלא ופלא אני מרגיש חופשי ומשוחרר יותר מאי פעם. הכיצד? טוב, זאת מערכת הפעלה שרק חלקה כתוב ב Open Source אבל החלקים הפנימיים שלה מוסתרים ובכוונה תחילה. זה העניין כאן, "הכול בידי שמיים חוץ מיראת שמיים". אני רק בתחילת הדרך ויודע ממש מעט אבל אני מגלה בהתרגשות בכל יום מחדש שיש כאן מערכת אמיתית שתומכת לאחור ובאופן מושלם! ומכיוון שהתרגלנו לחשוב שאין דבר כזה אז כנראה שזאת אכן מערכת שלא נכתבה בידי אדם. טוב, נחזור לעניינים ארציים, ובאהבה, כי להבנתי, זה בדיוק מה שאנחנו אמורים לעשות. לחיות את עולם המציאות כאן למטה ולקדש אותו. לעבוד באהבה רגליים על הקרקע וראש בעננים. ממש כמו סולם יעקוב.

בתקופה הקרובה, נעמיד את הבלוג החדש הזה לניסיון, אני אשחרר, בלי נדר, רשימות בנושאים טכנולוגיים מעניינים ובדרגות קושי שונות. נכנס לנושאים מתקדמים מעולם הWeb Services , WCF)) Windows Communication Foundations, ונושאים מעניינים אחרים. מעולם ה 3.5 אז להתראות בקרוב