Thursday, October 7, 2010

Web Matrix

Hello friends,
                     I am introducing the web matrix in this post. Web matrix is a tool to build websites.It includes IIS( web development Web Server).ASP.NET (a Web Framework) and Microsoft SQL Server (Compact Edition). This is the era where every one prefers  DYNAMIC WebPages than STATIC WebPages and also ASYNCHRONOUS WebServices.To support all these,the best tool which i think is a Web Matrix.This tool also allows you to host it on some web server and also allows you to perform SEO(Search Engine Optimization) of your websites.This post tells you how to get started with Web Matrix and how to create websites


1) First download the Web matrix from the below link:
     

 http://www.microsoft.com/web/webmatrix/default.aspx?wt.mc_id=soc-in-wag-msp-srikiran 


 This link will direct you to run the Wpilauncher.Once you run it you will find the below screen.

  
 You can either customize to install even other Web Platform tools or simply click install which will install the Web Matix.

2) Once you install the Web Matrix open it from Start Menu and this screen will appear.
  
    The start screen will show four different choices.My Sites ---- It contains those sites which you have already created.Site From Gallery ---- This will direct you to Web Gallery(Open source webSite Templates).Site From Template ---- This allows u to create a website from scratch. Site From Folder ---- To choose the site from already existing folder.


3) Choose Site From Template to get started with it and click on EmptySite ,name it. After this you will see this screen.
4) In the screen you will find four different workspaces at the bottom left corner.Those are  Site,Files,Databases and Reports.
a) Site Workspace: This contains the Settings information about your websites such as URL,Port,SSL etc.
b) Files Workspace: In this you can code your websites using HTML,CSS,JavaScript,RazorCode Using ASP.Net.
c)Databases Workspace: In this you can create a database where you can store your Websites Data.You can also access this data from your website and can perform various operations on it.
d)Reports Workspace:This allows you to run SEO reports for your website.


5) After Knowing something about the webmatix lets now create a Sample Website . So now go the Files workspace and click on Add a file to your site and the following screen will appear.




Here you can add any type of file like HTML, Txt, Aspx etc.Lets add one CSHTML file.(A CSHTML page is a special type of page in WebMatrix that can contain the usual contents of a web page, such as HTML and JavaScript code, and that can also contain code for programming web pages.) to our website.


6) Now add the following code to your file: @Twitter.Profile("Sachin_rt"); (I will tell about this code little later in this post.)


    Now save this page and click on Run and you will be able to see the following page on your website.




   You will able to see my Twitterfeeds on the webpage.See how simple it is to see the twitter feeds using a single line of code. 

By the way i have to discuss about the code @Twitter.Profile("Your twitter username"); 
The above code is called Helpers.
Helpers allow you to accomplish complex tasks with a single line of code. ASP.NET has a whole collection of helpers. 
Helpers are present in Razor Syntax.Razor Syntax is used to Write a server code in your website.Razor syntax is built upon ASP.NET code which inturn based on .NET Framework.

To know more about the helpers and Razor Syntax see mypost


I have modified the above code like below so that it takes the username as input and gives the TwitterFeeds of a person.

                                                                                         
                                                                                       

Now I am Publishing this site using Publish button on the Ribbon.
So finally the site is http://20196gwbv4.adhostbeta.com/Demo/twitterfeeds.


This is end of this post.Try the Web Matrix if you are really passionate about Creating your websites.I will post some advanced things about web matrix some latter time.




Feel free to post a comment and questions. 


Byee,



No comments:

Post a Comment