lynda fundamentals of web development

SMTP is for sending mail and POP is for receiving mail, that’s why its called Post Office Protocol. RTP is real time Protocol for VOIP and audio and video

types of servers are : Web Servers, FTP Servers, Mail servers etc.

www is SubDomain, a folder in the http server (in parallel to FTP or Video) where the sites are hosted.
asc is Domain
com is Top Level Domain

when new site is registered the client’s local ISP DNS Server would not have the entry for it, and so it passes it to Root Name server that fwd’s it to the .com Name server

Note that DNS is a distributed database so there is no replication of all domains everywhere. when u get response, Local DNS server caches the domain to make retrieval faster the next time around

W3C released XHTML 1.0 and 2.0 post HTML 4.0. WHATWG released HTML 5.0

DTD Stand for both Document type Definition and Document type Decleration (<doctype>)
Document type Definition is machine redable file for parsing any doc
Document type Decleration is a way for you to declare the type of your doc, like the version of HTML etc. <!DOCTYPE HTML> is how you declare HTML 5 doc

CSS Can be in seperate file, or as tag or attribute in HTML

CSS style/ css rules is : Selector + Decleration : p{font: as;color: #ffff}

JPGs (support millions of colors ) are compressed each time they’re saved so don’t keep them as source images

GIFis 256 colors, and support transerrency and animation.use for logo , It is lossy

PNG (portabke n/w graphics) are lossless and support millions of colors

PHP is Hy[ertext Prepressor. is free, works on Apache and with free mySQL

JSP is for java


Adobe Coldfusion. Coldfusion server is not free

use progressive enhancwment… not graceful degradation

when hosting on sghared host ie seerver shared by many sites makre syure ur neighnors are noyt nbad or google will block it use axandra free reverse ip lookup for this shared hosting siytes

register domai n on multiple top leve l domains like .com and org so that users fon’t have to rememger and are redirected to right site no matter


registry company for regisrering is cheaper than hosting company
u shoul;d own the domain

have primary and sec name eservers

how to prevent code check in to git if unit tests fail

A pre-commit hook is a piece of code/script you tell your SCM tool to run after you type `bzr/git/svn commit` but before it actually commits your new code. A pre-commit hook can do just about anything, and with ours we run our unit tests and if they fail, we abort the commit.

This :

says that using the commit hook is bogus as anyone can delete it and then commit code.

The best way is to use a build and test remote server that triggers a build and runs the test script everytime code is pushed to the repo.

I am using Teamcity, so can Teamcity run jasmine and protractor tests for angular code?

3 .

SQLExpress Lessons

SQLExpress Lessons

  1. To connect to your own DB use just the server name
  2. To connect to other person’s DB use IP/Hostname,Port
  3. Connection string for SQL Express (for it to work in VS 2012,13 replace .\ SQLEXPRESS with (LocalDB)\v11.0):


<add name=”ProductServiceContext” connectionString=”Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|ProductServiceContext-20131021111706.mdf;Initial Catalog=ProductServiceContext-20131021111706;Integrated Security=True;MultipleActiveResultSets=True;User Instance=True” providerName=”System.Data.SqlClient” />-


  1. entity framework code first migrations with sqlexpress 2008
    1. sd
  2. One way to see what SQL services are available on your machine is to go to the Package Manager Console in Visual Studio and execute the following command (also showing the output below): PM> Get-Service | Where-Object {$_.Name -like ‘*SQL*’}
  3. Since LocalDb is a user process and not a service, you won’t see it listed in the output of the Get-Service command above. You can, however, run SqlLocalDb.exe from the package manager console (or the command line) to see if LocalDb is installed. > SqlLocalDb info
  4. The connection string can always be found from when you connect to the server using server explorer. There in advanced menu, it shows the string in the end of the form
  5. SQLExpress of VS 2010 has been replaced by SQL Server Local DB. To connect to it from server explorer use Server Name as (LocalDB)\v11.0 andthen explore it
  6. For SQL Server 2008 with win auth use connection string:

<connectionStrings>    <add name=”ProductServiceContext” connectionString=”Data Source=MIAPGKHEMATARWD;Database=ProductService;Trusted_Connection=True” providerName=”System.Data.SqlClient” />





Entity Framework 6 lessons


  1. 1st run: Enable-Migrations
  2. Check what all servers are up: Get-Service | Where-Object {$_.Name -like ‘*SQL*’}
    1. Note that this will not show SQL Express Local DB
  3. Make sure that the connection string is correct
  4. Then run: Add-Migration
  5. Then run: Update-Database
  6. If the class (Model) structure gets changed: The Designer Code for this migration file includes a snapshot of your current Code First model. This snapshot is used to calculate the changes to your model when you scaffold the next migration. If you make additional changes to your model that you want to include in this migration, then you can re-scaffold it by running ‘Add-Migration SQL Server’ again.
  7. Connect to the DB using server explorer and check the data



Another way to find the right connection string:  or



<defaultConnectionFactory type=”System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework”>


<parameter value=”v11.0″ />




<provider invariantName=”System.Data.SqlClient” type=”System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer” />






<defaultConnectionFactory type=”System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089″>



<provider invariantName=”System.Data.SqlClient” type=”System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer” />





I have used Windows Auth for my Database and so now I’m getting error:

Cannot open database “ProductService” requested by the login. The login failed.

Login failed for user ‘IIS APPPOOL\DefaultAppPool

I have kept windows auth enabled for my site in IIS 7.5

Tried this:

Worked like a charm




see: Using Orleans to Build Halo 4’s Distributed Cloud Services in Azure

Project “Orleans” enables scenarios that are difficult to productively implement using current technologies, complementing solutions like SignalR and WebAPI. Gaming, Internet of Things, social networks, and other scenarios with complex and dynamic relationships are particularly well suited for this model. : Download the samples

What is TPL ( Task Parallel Library) and how it differs from threads (c# interview questions) ?

SEE: and


  1. Threads have processor affinity, but TPL Tasks encapsulate MULTI CORE Execution
  2. TPL Automatically does Thread Pooling

BONUS: yield: