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

First Tip On SharePoint 2010

by Vahid 29. December 2010 15:14

recently I got involved in a SharePoint project. I am not a SharePoint pro but I have the opportunity to work with some of best SharePoint professionals so I am learning as I go.

I thought it would be useful to share what I learn. although some of them maybe basic but I am sure they would help somebody out there who is just picking up on SharePoint.

So first tip would be on working with CSS files. you when I wanted to change something in CSS I was doing this stupid work of doing the changes and publishing the site/web part to see the result. because of the size of the project this was a time consuming task. but Mr. Z suggested a trick to work on the css file and change them in place where the changes would reflect without deployment.

here is the trick. Go to you 14 hive folder. it should be at the following address on your computer

C:\Program Files\Common files\Microsoft Shared\Web Server Extensions\14

in the 14 hive find the css folder and in the folder find the css file you want to work on. open the file with you desired css editor and start editing the file. once done just save it and refresh you browser. boom here you go seeing the changes without deploying the file.

but remember to copy and paste the content of the css file into your development copy in visual studio when you are done with changes.

Tags:

.Net | Learning resource | Technical

Top 8 Mobile OS for last 12 months

by Vahid 28. October 2010 05:59

Tags:

Tools

بد شانس ترين نسل تاريخ ايران ما هستيم

by Vahid 8. October 2010 15:08
  • تو نوزاديمون شير خشک ناياب شده بود
  • تو بچگيمون هم دوران جنگ بود
  • دوران تحصيلمون هم هر چي طرح بود رو ما امتحان کردن… نظام قديم، نظام جديد، نظام خيلي جديد
  • زمان سربازیمون ، جنگ شد .....
  • رسيديم دانشگاه سهميه بندي ها شروع شد
  • فارغ التحصيل شديم، به خاطر زياد بودن جمعيت کار پيدا نشد
  • ماشين خريديم، بنزين سهميه بندي شد
  • رفتيم زن بگيريم، طلا و سکه گرون شد
  • رفتيم خارج، رکود اقتصاد جهاني شد
  • گفتيم خوب، حالا برمي گرديم ايران، مملکتمون قاراشميش شد
  • .

.

.

بارالها! ما حال نداريم به راه راست هدايت شويم، خودت راه راست را به سوي ما کج کن!

کپی رایت این نوشته به دوست گرامی دکتر علی مربوط می شود.

Tags:

Personal | Persian

do we use silverlight when HTML 5 is out?

by Vahid 2. September 2010 05:26
This has been a question for me for sometimes. Although i knew silverlight is the future but i could never form a concrete answer to why silverlight is the future. till i came across the following blog post by the silverlight team. Make sure you read the post since it's written what is in most of our minds but cannot stated in words.

http://team.silverlight.net/announcement/the-future-of-silverlight

 

Tags:

.Net | Technical

T4 to rescue and save you time

by Vahid 11. June 2010 05:56

till yesterday i had never used T4 for a real problem solving. i knew what it is but i did not know how great and easy it is.

in my current scenario i have a database table which contains options available for each property of 30 available properties of items to be added to the system. the table has almost 500 records.  in the item registration page i had to create a structure like this for each property:

<div id="div1" runat="server" class="row">
<asp:Label ID="SmartLabel13" runat="server" AssociatedControlID="" Text="Title of the property"></asp:Label>
<asp:DropDown ID="SmartDropDown1" runat="server">
<asp:ListItem Selected="True" Text="-----------" Value="">
<asp:ListItem Selected="True" Text="option 1" Value="option 1 value">
<asp:ListItem Selected="True" Text="option 2" Value="option 2 value">
.
.
.
.
<asp:ListItem Selected="True" Text="option n" Value="option n value">
</asp:ListItem>
</asp:DropDown>
</div>

creating 50 of these snippet and adding almost 12 list item for each of them along with setting the control names and property title and also AssociatedControlID of each would have taken me at least a day. i thought i could benefit from T4(Text Template Transformation Toolkit which is used for code generation) to save myself some time. so i started creating a T4 file to do this and vala… 15 minutes later i had it done. i have to say that, it was the first time that i actually was using T4. i cannot believe how easy it is to use it. the following few lines of code saved me at least a day by generating around 1000 lines of code:

<#@ template language="C#" debug="True" #>
<#@ output extension="txt" #>
<#@ assembly name="System.Core" #>
<#@ assembly name="System.Data" #>
<#@ import namespace="System" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="System.Diagnostics" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Collections" #>
<#@ import namespace="System.Collections.Generic" #> 
<#@ import namespace="System.Data.SqlClient" #>
<#
string catName=string.Empty;
int i=50;
System.Data.SqlClient.SqlConnection cn=new  System.Data.SqlClient.SqlConnection("data source=.\\sqlexpress;integrated security=true;database=Irizzle");
SqlCommand cmd=new SqlCommand("select * from IRZ.Lookupvalues order by Category",cn);
cn.Open();
SqlDataReader dr=cmd.ExecuteReader();
while(dr.Read())
{    
if(catName==dr["Category"].ToString())
{#>
<asp:ListItem Text="<#= dr["Name"].ToString()#>" Value="<#= dr["Code"].ToString()#>" />
<#}
else
{
if(catName!=string.Empty){#>
</Irizzle:SmartDropDown>
</div>
<#}#>
<div id="div<#= dr["Category"].ToString()#>" runat="server" class="row">
<label for="drp<#= dr["Category"].ToString()#>"><#= dr["Title"].ToString()#></label>
<Irizzle:SmartDropDown ID="drp<#= dr["Category"].ToString()#>" runat="server">
<asp:ListItem Selected="True" Text="-----------" Value=""/>
<asp:ListItem Text="<#= dr["Name"].ToString()#>" Value="<#= dr["Code"].ToString()#>" />
<#}
catName=dr["Category"].ToString();
#>        
<#    i++;}
dr.Close();
cn.Close();
#>
</Irizzle:SmartDropDown>
</div>

i am sure T4 can save you and your companies hell lot of time. what i am wondering about is why not so many people talk about this great feature.

Tags: , ,

.Net | Technical

Have you heard about .LESS which Improves CSS

by Vahid 21. April 2010 08:57

 

If you are also involved in web development as part of your day to day job(sure most of us are), you know that dealing with css is inevitable. css is so important that everybody has to consider it; from the application architects to graphic designers.

Recently in the following blog post i read about .LESS library which was totally new but interesting for me. 

".LESS is a free, open-source port of Ruby's LESS library. LESS (and .LESS, by extension) is a parser that allows web developers to create style sheets using new and improved language features, including variables, operations, mixins, and nested rules. Behind the scenes, .LESS converts the enhanced CSS rules into standard CSS rules. This conversion can happen automatically and on-demand through the use of an HTTP Handler, or done manually as part of the build process. Moreover, .LESS can be configured to automatically minify the resulting CSS, saving bandwidth and making the end user's experience a snappier one. "  

If you want to know about .LESS for css, you can go through the same blog post which I went through:

http://www.4guysfromrolla.com/articles/030310-1.aspx

 

Tags: ,

Technical | Tools

Waht is new in silverlight 4.0

by Vahid 21. April 2010 05:39

i have found a perfect blog post from mr. tim heuer on new features in silverlight 4.0. it's definitely worth going through his post.

http://timheuer.com/blog/archive/2009/11/18/whats-new-in-silverlight-4-complete-guide-new-features.aspx

Tags:

.Net | Learning resource | Technical

Resize partitions in windows vista/7

by Vahid 17. March 2010 17:51

i finally found the free software to resize i mean enlarze my C drive partition without reinstalling the os. This Free Partition Manager--EASEUS Partition Master Home Edition is a partition magic alternative and partition management freeware. With its help, you can resize/move, copy, create, delete, format, hide, explore hard disk drive partitions. To extend system partition, have better disk space management, settle low disk space problem! The most attractive feature is it can resize/move partition without destroying data. This free partition manager is an ALL-IN-ONE partition solution and disk management utility. It allows you to extend partition (especially for system drive), manage disk space easily, settle low disk space problem under Windows 2000/XP/Vista/Windows 7 (Only for 32 bit). The most popular hard disk management functions are brought together with powerful data protection including: Partition Manager, Partition Recovery Wizard and Disk & Partition Copy Wizard.

you can get it from here and i think we should thank them to provide this as a free software.

http://www.partition-tool.com/personal.htm

Tags: ,

Tools