Thursday, April 5, 2012

REST api

Hello

What is REST ?

  • REST stand for Representional State Transfer.
  • It relies on stateless,client\server,cacheable communication protocol
  • Uses HTTP
  • Restfull applications use HTTP to post data (create/update) , read data (make queries) , and delete data


REST as Lightweight Web Service
Much like Web Services a REST service is :

  • Platform independent i.e. does not care if Windows,Mac,Linux ... is used
  • Language  independent i.e. Java,C#,...
  • Standard based (runs over HTTP)
  • Can easyly be used with firewalls

How simple is REST


To get a user details the follolwing query may be used :
http://www.acme.com/phonebook/UserDetailes/1234

1234 is the requested user id
UserDetailes is the desired info

This is a URL which is sent via HTTP GET request.

More complex REST request


http://www.acme.com/phonebook/UserDetailes?firstName=John&LastName=Doe

Nathan

Tuesday, January 10, 2012

ASP.Net WebMatrix - Simple User Interaction

Hello

http://www.microsoft.com/web/post/web-development-101-part-6-creating-an-add-data-page

Points of interest

  • WebMatrix has GREAT integration with Visual Studio 2010. You can launch VS and debug e.g. cshtml file - really great !!
  • Sending info to the server via browser :
  • HTTP POST is used (check this using Site->Requests)
  • HTML form is used
  • The server must identify the POST verb and process. Here it insert user inputs into a database 



Nathan

Monday, January 9, 2012

ASP.Net WebMatrix - Using Data Base

Hello

http://www.microsoft.com/web/post/web-development-101-part-5-using-data

Points of notice

  • Very nice integration of database in WebMatrix to allow easy database\table creation
  • Reuse of the layout that was done before using Razor and cshtml
  • Very simple access of database using Razor ( http://www.w3schools.com/razor/default.asp)


Nathan

ASP.Net WebMatrix - Using Layouts

Hello

http://www.microsoft.com/web/post/web-development-101-part-4-using-layout


Points of notice

  • cshtml file - HTML + C#\VB code
  • Razor  (layout reuse)
  • Run cshtml file and _PageStart.cshtml is invoked autmatically 

Nathan

Thursday, January 5, 2012

ASP.Net WebMatrix - Getting some styles

Hello

http://www.microsoft.com/web/post/web-development-101-part-3-getting-some-style

What is style ?

  • font , color ...


Contents :

  • Divider
  • Hyperlink
  • Header and footer
  • Page look and feel - CSS
  • Remarks :
  • Note that class Title is NOT related to title , one could use Title1 instead
  •  WebMatrix supports external css file



Nathan

ASP.Net WebMatrix - Create your first Web Page

Hello

http://www.microsoft.com/web/post/web-development-101-part-2-create-your-first-web-page

Comments :

  • Very simple way to create web site
  • A single default.cshtml file is created , run will  launch it :

  • Site->Request : notice the IIS Express error relating to favicon.ico. 


  • Adding the file favicon (use e.g.  http://www.favicon.co.uk/ ) will eliminate the error and you will get web icon
  • It is possible to launch the site using different web browser from within the WebMatrix ! 

Nathan