WP7 (Windows Phone 7) WrapPanel

by Vahid 23. February 2011 16:16

I cannot believe that I spent half day figuring out how to wrap controls in a stackpanle control in WP7 Sad smile 

but anyway I finally came to know that I should use WrapPanel instead of StackPanel. so please don’t make my mistake and download the Silverlight toolkit for WP7 from here and then make a reference to “Microsoft.Phone.Controls.Toolkit.dll” assembly from this address:

C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.0\Toolkit\Nov10\Bin\Microsoft.Phone.Controls.Toolkit.dll

and them import the controls to your page using this command:

xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"

the toolkit has got the following controls which are really savers Winking smile

  • AutoCompleteBox
  • ListPicker
  • LongListSelector
  • Page Transitions
  • GestureService/GestureListener
  • ContextMenu
  • DatePicker
  • TimePicker
  • ToggleSwitch
  • WrapPanel

Tags:

.Net

Windows Server AppFabric

by Vahid 13. February 2011 05:15

if you have been involved in the enterprise application architecture and development, for sure you have also faced the memory constraint when designing the application. the thing is that as soon as you talk about enterprise application –I mean real enterprise application- you are talking about a huge amount of data being processed and traveling between systems.  that’s when you say oops, I need to take care of this, user and my hardware cannot afford these expensive operations each and every time a request comes in. then you start thinking about caching the information somewhere. ok, some out of the box caching –i.e. ASP.net Caching- is there but we are talking about huge amount of data and keeping them on the same server as the application server would be out. and that’s the time you say Valla to keeping the data in a database. you go ahead and do it but as soon as you run the first load test with few thousand concurrent users the “sh..t” word comes out. you see the bottlenecks connecting to database, you see the performance degrade and you see that you have made your business owner to spend some good amount of money for the database licenses but you are not getting the result you were after. exactly at this point of time you would wish that there was a technology to help you out with the situation and if you have heard of Windows Server AppFabric and know it, than you feel how much you are blessed.

as of now Windows Server AppFabric  consists of two components:

  • AppFabric Hosting Services: which I haven’t worked with in any project yet and is not in my focus in this post
  • AppFabric Caching Services: which is the one I have used and appreciate a lot

basically the caching services is exactly what we need in the situations like the one I talked about because:

  • we can keep the data available as long as we want
  • it’s in memory so it’s fast, very fast
  • we don’t need any database licenses
  • it’s easy to learn and worked with
  • if you need extra memory, just need to add an other machine to the nodes
  • the machines don’t need to have powerful processing power, RAM is needed

so I personally believe all of us need to start learning about this technology as it will somehow change the way we architecture our next applications by giving us to handle more data much faster. if you want you get stared with Windows Serve AppFabric, I would suggest to download the free training kit from Microsoft and get started today.

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=7290f7ed-e86b-4114-a452-4f07fa32403d

for quick guide about the installation you can refer to the following link:

http://www.hanselman.com/blog/InstallingConfiguringAndUsingWindowsServerAppFabricAndTheVelocityMemoryCacheIn10Minutes.aspx

Tags:

.Net | Technical

Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format

by Vahid 8. February 2011 11:32

I  had deploying an asp.net application to a windows 2008 64bit server. the application uses odp.net to connect to an oracle database. but when I tried to access it I kept getting an error saying:

Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format”

pulling my hair for sometimes I couldn’t find any logical explanation for this as the dll named ‘Oracle.DataAccess’ was already there in the bin folder. but for some odd reason this was the problem itself. I had to delete the dll from the folder to have the application working.

I don’t have any explanation for this as of now but will update this post as soon as I figure out the cause.

Tags:

.Net | Technical