Blog Stats
  • Posts - 9
  • Articles - 2
  • Comments - 4
  • Trackbacks - 18

 

Sunday, April 23, 2006

Back to my old blog

hey people I'm moving back to my old blog, I've got alot of features there than any blogging engine I know.

yalla see you there.

http://bander.blogspirit.com/

 

 

Thursday, March 02, 2006

Back to normal

yep that's right!

I quit my job, started to focus on my self, and discovered that life is too short to keep on pleasing people around you..

Not any more!!! YEAH things are changing now, I'm focusing on Masters, Jordev, and WinFX.. That's it!

Last period was a living hell for me.. I mean it by the mean of the words living hell.

That's all folks, btw try checking this URL: http://www.oprah.com/spiritself/know/pass/ss_know_passion_04_c.jhtml

 

 

Sunday, February 12, 2006

No I'm not dead, I'm totally swampped

Don't you wish that the day will go for 48 hours! I wonder why god made it only 24?
Yeah, I know its a stupid question because devs like us are used to pressure and to be swamped;
this time I wanna share this with you:

 

1)      At BEAT (Company I work with): I have to close 3 projects by the end of this month, not to mention business development and writing proposals.

 

2)      At Jordev: I have to deploy the new site no later than Tuesday

 

3)      At EDC: I have to finalize the EDC CD project, the EDC mobile application, and finalize the FTP hosting for the speakers presentations no later than Today

 

4)      Also At EDC, I have to deliver 4 presentations, 2 are about Business Intelligence regarding our partner ProClarity tools and Microsoft SQL Server 2005 Analysis Services, one about XML Web Services in SQL Server 2005, and the another about Microsoft Visual Studio 2005 Team System.

 

5)      The new masters semester will start next Saturday, and till now I didn’t register for any classes

 

Waaaaaaaaaaaaaaaaaaaaa3, It’s gonna be a crazy week!

 

Wednesday, January 25, 2006

Learning WinFX (Day 1): Building TicTacToe using Windows Presentation Foundation (WPF)

Writting applications using the Longhorn Application Model is not hard at all, It's just a bit different. In the other application models you will be interfacing with Win32 API, but for LH Application Model; you will be using WinFX API. To understand what I'm going to talk about in this tutorial you must have at least a basic knowledge of what is WinFX.If you already have,skip the following defenitions.

  • "Windows Communication Foundation" is the name for Microsoft’s unified programming model for building connected systems, formerly known as code-name "Indigo". It extends the .NET Framework 2.0 with additional APIs for building secure, reliable, transacted Web services that interoperate with non-Microsoft platforms and integrate with existing investments. By combining the functionality of existing Microsoft distributed application technologies (ASMX, .NET Remoting, .NET Enterprise Services, Web Services Enhancements, and System.Messaging), Indigo delivers a single development framework that improves developer productivity and reduces organizations’ time to market.
  • "Windows Presentation Foundation" is the name for Microsoft's unified presentation subsystem for Windows, formerly known as "Avalon". It consists of a display engine and a managed-code framework. "Windows Presentation Foundation" unifies how Windows creates, displays, and manipulates documents, media, and user interface. This enables developers and designers to create visually-stunning, differentiated user experiences that improve customer connection. When delivered, "Windows Presentation Foundation" will become Microsoft's strategic user interface (UI) technology.
  • "Windows Workflow Foundation" is the name for Microsoft's strategic programming model for building workflow enabled applications. It consists of a managed-code framework and designers for Visual Studio .NET. Windows Workflow Foundation includes both system workflow and human workflow. It supports a wide range of scenarios including: workflow within line of business applications, page-flow, document-centric workflow, workflow for service oriented applications and workflow for systems management. The Windows Workflow Foundation developer experience is consistent with existing WinFX technologies and includes support for VB and C#, debugging, a graphical workflow designer and the ability to write your workflow completely in code. Windows Workflow Foundation also provides an extensible model and designer to build custom activities which encapsulate workflow functionality for end-users or for re-use across multiple projects. Windows Workflow Foundation will be used across many future Microsoft products including Office “12”, BizTalk Server and the Microsoft Business Solutions. Most applications can benefit from the asynchronous state management features of the workflow model, the rapid development features of the designer, the potential for end-user flexibility, and the increased visibility into run-time code execution.  

In addition, to be able to write and complie the tutorial, you will need to install the January CTP of WinFX SDKJanuary CTP of WinFX Runtime ComponentsMicrosoft Visual Studio Code Name “Orcas” Community Technology Preview - Development Tools for WinFX (If using Microsoft Visual Studio 2005 RTM), and Mike Swanson's XAML Plugin for Adobe Illustrator CS2 (If you don't have Adobe Illustrator CS2 you can Day 1and start straight from Day 2)

First we have to create our scene, we can either draw it easily using Adobe Illustrator CS2 or using Paths in XAML.
I have created the following layout using Adobe Illustrator CS2 then simply used the XAML plugin.

Layout in Illustrator:

If you don't have Illustrator you can simply create it using Paths in XAML, try this code:

<
Window x:Class="Window1"

xmlns="http://schemas.microsoft.com/winfx/avalon/2005"

xmlns:x="http://schemas.microsoft.com/winfx/xaml/2005"

Title="WinFX TicTacToe" Height="513" Width="646">

<Grid>

<Canvas Width="Auto" Height="Auto" Grid.RowSpan="1" Grid.Row="0" Margin="4,5,4,131" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Column="0" Grid.ColumnSpan="1">

<Canvas>

<Path StrokeThickness="1.000000" Stroke="#ff221e1f" StrokeMiterLimit="1.000000" Fill="#fffded9e" Data="F1 M 432.500000,470.500000 L 0.500000,470.500000 L 0.500000,0.500000 L 432.500000,0.500000 L 432.500000,470.500000 Z"/>

<Path StrokeThickness="1.000000" Stroke="#ff221e1f" StrokeMiterLimit="1.000000" Fill="#ffd8e8ba" Data="F1 M 629.500000,469.500000 L 437.500000,469.500000 L 437.500000,49.500000 L 629.500000,49.500000 L 629.500000,469.500000 Z"/>

</Canvas>

<Canvas>

<Path StrokeThickness="4.000000" Stroke="#ff008dae" StrokeMiterLimit="1.000000" Data="F1 M 144.500000,27.500000 L 144.500000,450.500000"/>

<Path StrokeThickness="4.000000" Stroke="#ff008dae" StrokeMiterLimit="1.000000" Data="F1 M 413.000000,159.909668 L 19.000000,160.078125"/>

<Path StrokeThickness="4.000000" Stroke="#ff008dae" StrokeMiterLimit="1.000000" Data="F1 M 273.500000,29.500000 L 273.500000,452.500000"/>

<Path StrokeThickness="4.000000" Stroke="#ff008dae" StrokeMiterLimit="1.000000" Data="F1 M 413.000000,289.910156 L 19.000000,290.078125"/>

</Canvas>

</Canvas>

</Grid>

</Window>

We have the scene, next step will be creating the project. Now go to Microsoft Visual Studio 2005, create a new project and call it “WinFX_TicTacToe”. Notice code name Cider designer, We have 3 tab buttons on the bottom, Design, Xaml, and Source. We will get a full understanding of every tab use in our way into finishing TicTacToe, further more we can notice that we can drag and drop controls into the window, this reminds me of the time were I had to code every thing using XAML! belive me it was a very long process. Back to our tutorial; now goto the Xaml tab and replace the current code with the new code either generated by the plugin or the copied from my blog. Goto back to the Design tab, and yes we have our scene built in XAML, now try it out; hit ctrl + F5.

Now let's drag a TextBlock control and add drop it on the bottom of the green area. Notice that Cider gave us the ability to interact with XAML controls easily, look on the properties panel we have new number of properties and stuff to play with, for now just click on the text property and enetr the following text: “WinFX Tic Tac Toe, Version 1.0 http://geekswithblogs.net/bander”, goto TextAlignment property and select Justify, and finally goto TextWrapping property and select Wrap. Go to the Toolbox and drag an Image control and drop it in the upper right corner of the window. On the Properties panel, click on the Source property and set the value for where your logo resides, for me; it was Jordev's logo. For you guys who don't have Visual Studio, here is the code:

<Window x:Class="Window1"

xmlns="http://schemas.microsoft.com/winfx/avalon/2005"

xmlns:x="http://schemas.microsoft.com/winfx/xaml/2005"

Title="WinFX TicTacToe" Height="513" Width="646">

<Grid>

<Canvas Width="Auto" Height="Auto" Grid.RowSpan="1" Grid.Row="0" Margin="4,5,4,131" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Column="0" Grid.ColumnSpan="1">

<Canvas>

<Path StrokeThickness="1.000000" Stroke="#ff221e1f" StrokeMiterLimit="1.000000" Fill="#fffded9e" Data="F1 M 432.500000,470.500000 L 0.500000,470.500000 L 0.500000,0.500000 L 432.500000,0.500000 L 432.500000,470.500000 Z"/>

<Path StrokeThickness="1.000000" Stroke="#ff221e1f" StrokeMiterLimit="1.000000" Fill="#ffd8e8ba" Data="F1 M 629.500000,469.500000 L 437.500000,469.500000 L 437.500000,49.500000 L 629.500000,49.500000 L 629.500000,469.500000 Z"/>

<TextBlock Canvas.Left="446" Canvas.Top="386" Width="176.646666666667" Height="83.66" Name="lblAbout" TextWrapping="Wrap" Text="WinFX Tic Tac Toe, Version 1.0 Written by: Bander Alsharfi, http://geekswithblogs.net/bander" TextAlignment="Left"></TextBlock>

</Canvas>

<Canvas>

<Path StrokeThickness="4.000000" Stroke="#ff008dae" StrokeMiterLimit="1.000000" Data="F1 M 144.500000,27.500000 L 144.500000,450.500000"/>

<Path StrokeThickness="4.000000" Stroke="#ff008dae" StrokeMiterLimit="1.000000" Data="F1 M 413.000000,159.909668 L 19.000000,160.078125"/>

<Path StrokeThickness="4.000000" Stroke="#ff008dae" StrokeMiterLimit="1.000000" Data="F1 M 273.500000,29.500000 L 273.500000,452.500000"/>

<Path StrokeThickness="4.000000" Stroke="#ff008dae" StrokeMiterLimit="1.000000" Data="F1 M 413.000000,289.910156 L 19.000000,290.078125"/>

</Canvas>

</Canvas>

<Image VerticalAlignment="Top" HorizontalAlignment="Right" Grid.Column="0" Grid.ColumnSpan="1" Grid.Row="0" Grid.RowSpan="1" Margin="0,5,4,0" Width="192.65979381443327" Height="44.329896907216494" Name="Image1" Source="file:///C:/Documents and Settings/bander/My Documents/Visual Studio 2005/Projects/WinFX_TicTacToe/jordevlogo.png" />

</Grid>

</Window>

and taraaaaaaaaaaa! We have created our scene, let's try testing it; hit ctrl + F5, It should look like somthing like this:

Can't wait for Day 2 =)

Saturday, January 21, 2006

Binding in XAML

I didn't understand your question well, were you talking about databinding or control binding?
Anyway down below are 2 scenarios to explain basic control binding, If you meant databinding; let me know.

In this scenario we will bind a Rectangle to a Slider control, where the Slider controls the Rectangle's width, so when the Slider's value increases the Rectangle's width increases too.

<Window x:Class="Window1"

xmlns="http://schemas.microsoft.com/winfx/avalon/2005"

xmlns:x="http://schemas.microsoft.com/winfx/xaml/2005"

Title="ControlsBinding"

Width="210"

Height="180"

>

<StackPanel>

<Slider Name="WidthSlider" Maximum="200" Minimum="10" />

<Rectangle Fill="SteelBlue" Height="100" Width="{Binding ElementName=WidthSlider, Path=Value}" />

</StackPanel>

</Window>

Note also that shapes like Rectangle derive from FrameworkElement, which means that they participate in the layout system. The impact is that in the control below, as the Rectangle increases in size, so the ellipse shrinks to fill the remaining avilable space.

<Window x:Class="Window1"

xmlns="http://schemas.microsoft.com/winfx/avalon/2005"

xmlns:x="http://schemas.microsoft.com/winfx/xaml/2005"

Title="Controls Binding"

Width="410"

Height="180"

>

<StackPanel>

<Slider Name="WidthSlider" Maximum="200" Minimum="10" />

<StackPanel Orientation="Horizontal">

<Rectangle Fill="SteelBlue" Height="100" Width="{Binding ElementName=WidthSlider, Path=Value}" />

<Ellipse Fill="Teal" Width="150" Height="100"/>

</StackPanel>

</StackPanel>

</Window>



Windows Vienna is the successor of Windows Vista

NeoWin.com writes about how Windows Blackcomb changed its name to Windows Vienna. Windows Vienna is the successor of the Windows Vista operating system. The new codename was not officially confirmed by Microsoft, however Robert Scoble confirmed the rumour in a Channel9 topic.

"The codename for Blackcomb has changed to 'Vienna'. This does not reflect a big change for us; we have used city code names in the past," a Microsoft spokesperson said in a statement. "These code names are derived from cities/locations in the world known for great 'vistas'. The kinds of places we all want to see, experience and that capture the imagination. Vienna fits with this concept."

source: http://www.windowsvienna.com/

Thursday, January 19, 2006

Last Usergroup Community Night WinFX Demo

Remeber the demo Don and Chris did in one of the MSDN TV shows?

In my last WinFX presentation one of the attendees asked me during the break to build the same simple app that Don and Chris built; honstly I was happy to know that people in Jordan are watching MSDN TV, in addition he gave me an idea in what to demo about! to tell the truth I didn't plan a demo scenario, I was relying on the feedback from the attendees.

Down below is the source code:

<Window x:Class="Window1"

xmlns="http://schemas.microsoft.com/winfx/avalon/2005"

xmlns:x="http://schemas.microsoft.com/winfx/xaml/2005"

Title="Hello Geeks with blogs"

Width="640"

Height="480"

>

<Canvas>

<MediaElement Source="C:\JordevWinFXCN\Bliss.avi" Opacity="0.7"/>

<StackPanel Orientation="Horizontal">

<StackPanel.LayoutTransform>

<TransformGroup>

<ScaleTransform ScaleX="2" ScaleY="2" />

<RotateTransform Angle="30" />

</TransformGroup>

</StackPanel.LayoutTransform>

<TextBox Width="2in" Height="30" Name="txtbxMyName" Background="#44ffffff"></TextBox>

<Button Width="120" Height="40" Name="btnSayHello" Click="SayHello" Background="#44000000">Push me I'm clean</Button>

</StackPanel>

</Canvas>

</Window>

The only problem that I faced was the RepeateCount property, in the December CTP; it just disappered! I went home and searched the whole SDK documentation but now results...

Running ASP.NET 2.0 Webparts over Sharepoint Portal Server 2003

Windows SharePoint Services SP2 does support the .NET Framework 2.0, CLR 2.0 and ASP.NET 2.0; therefore you can build ASP.NET 2.0 Web Parts using Visual Studio 2005 and deploy them on Windows SharePoint Services SP2; however, this process is not as straight-forward as it sounds here!

To leverage ASP.NET 2.0 Web Parts in Windows SharePoint Services, a wrapper Web Part must be written to make the ASP.NET 2.0 Web Part appear to be a Windows SharePoint Services Web Part. After this is done, your ASP.NET 2.0 Web Part should function normally within your Windows SharePoint Services pages. Wrapper Web Parts will not be required in the next version of Windows SharePoint Services or the next version of SharePoint Portal Server (code named Office "12" SharePoint Servers), which both natively support ASP.NET 2.0. For wrapper Web Parts, you might want to investigate http://www.smartpart.info/default.aspx. You can grab the latest version of SmartPart (called Son of SmartPart) off of GotDotNet at http://www.gotdotnet.com/workspaces/releases/viewuploads.aspx?id=6cfaabc8-db4d-41c3-8a88-3f974a7d0abe. This SmartPart should allow you to contain ASP.NET 2.0 Web Parts on WSS SP2 sites inside Web Part Zones J – I suggest you give it a shot!

However, SharePoint Portal Server 2003 SP2 DOES NOT support .NET Framework 2.0. However, the next major release of SPS will be fully based on ASP.NET 2.0 and will make use of its many features.

This article would shed more light on the new features in WSS SP2 and would also give more info on how to configure WSS SP2 to support .NET Framework 2.0.

My opinion around the matter is this: 

  • If you need to deploy the Web Parts on SPS 2003 then it’s best to continue building native .NET Framework 1.1 Web Parts until the next major release of SPS is out.
  • If some features in ASP.NET 2.0 Web Parts are necessary for your application at this time, and you can afford to deploy the Web Parts on Windows SharePoint Services instead of the full-fledged SPS (i.e. a case where the enterprise features of SPS are not needed), then you can build ASP.NET 2.0 Web Parts and deploy on WSS SP2 as described above.

Finally, I would suggest that for Enterprise-Level Portals you continue to use SharePoint Portal Server 2003 SP2 and build native Web Parts on .NET Framework 1.1 like you would normally do until the next major release is out.

Wednesday, January 18, 2006

Outstanding WinFX Presentation Yesterday!

Yesterday's presentation went great!

Attendees liked WinFX and I bet some went home; downloaded the SDK and spent the whole night playing with it...
One thing I keep noticing in presentations; Introductory slides are always boring! most of the attendees were not that focus and some were trying to keep up but just couldn't! you know the slides were you start spraying marketing stuff all over the place about what a cool decade it was, what a great job Microsoft is doing, or what magazines are writting, etc. on the other hand the demo was outstanding, they seemed to enjoy it and I got tons and tons of questions, we were supposed to finish at 8:30 but for some reason we finished at 9:10! I started to like my role in Jordev much more =)

If you are curios about AJAX; you have to attend the next community night, one of you devs will presnet it for 10 minutes!
so if you are planning to be that dev, i suggest visiting the following link: http://channel9.msdn.com/ShowPost.aspx?PostID=153374#153374

 

 

Copyright © Bander Alsharfi