Sunday, 1 January 2017

Setup Habitat with Sitecore 8.2

First of All Happy New Year!!!

Working with Helix Design Principle using Habitat framework and Sitecore 8.2

So first You need to go through the official documentation https://github.com/Sitecore/Habitat/wiki/01-Getting-Started

Because i am also gone through it and followed all the steps.

Now i am going to explain and put the snapshot step by step that how i setup habitat with sitecore 8.2

Before going to work i would like to tell you guys that please check that do you have all the prerequisites exe and files.

files and exe:

SIM
Sitecore 8.2.zip
MongoDB with created services
NodeJS
VS2015
SQL

And the most important thing is Google access.

Now Let's start

So first Clone the habitat solution project from github repo:

https://github.com/Sitecore/Habitat


and after this goto root directory




and install npm by looking this image



and after install you will see node_modules under root directory




and now it's time to create sitecore instance for habitat as "habitat.dev.local"

so what we did,

we install SIM and if already exist then we start by creating instance like in image



click on next


and now select webform package as required in habitat


and click on next


and now it's ready you can check this with browser by opening url as

        http://habitat.dev.local/


  and once it's done

open visual studio as administrator

and open habitat project that we cloned earlier and now we create sitecore connection for habitat.dev.local


and after filling all the field verify by click on test button

once setup the connection then and once done rebuild the solution



and after this open task runner windows

and then follow the steps and run the task
01-copy-Sitecore-Licence

and then once complete
02-Nuget-restore



and now stop here and before running third task before doing this stop the instance from IIS
once stop then run the third task
03-Publish-All-Projects



after running successfully move to fourth and fifth task 


and now that's it from solution side.

Now goto the IIS and start the site for Habitat again.
and now check the habitat.dev.local/ on the browser



Thanks for your patience and time.
And if you have any issue while setup habitat instance then comment below
It will be great for me to learn something new from you guys
All the Best!!!
And have a great day....

Monday, 14 November 2016

Getting Started with Jasmine

Before Going to start i would like to tell you that you can setup jasmine test framework with three way on your project.

So i am going to start explaining and also show you snapshot and setup jasmine parallely

Way.1
Jasmine Test Framework with Visual Studio :

to begin setup i would like to tell you prerequisite to work with Jasmine

you should have
       Visual Studio 2012 or more
       ASP.NET MVC 5.0
       Jasmine Test Framework


Now make sure that you are going to create .NET 4.5 project  otherwise NuGet package manager will fail during installation process.

Create A Project:

create blank web application project.
and create directory named as App Start, Content, Controllers, Views, Models, Scripts
at root level.

now on top left select third icon View->Other Windows->Package Manager Console

and run this command


Install-Package JasmineTest 





Hey wait guys, don't be hurry because we need to tell server that what to do when we request
which can be we do with creating RouteConfig.cs class inside App Start

and put this code there


public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Jasmine", action = "Run", id = UrlParameter.Optional }
            );
        }
under the class.

And now add Global.aspx to project

and make entry this code under global class
protected void Application_Start(object sender, EventArgs e)
        {
            RouteConfig.RegisterRoutes(RouteTable.Routes);
        }

Now create web.config under views direcotry
and paste the code




<?xml version="1.0"?>
<configuration>
  <configSections>
    <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
      <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
      <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
    </sectionGroup>
  </configSections>

  <system.web.webPages.razor>
    <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <pages pageBaseType="System.Web.Mvc.WebViewPage">
      <namespaces>
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Routing" />
      </namespaces>
    </pages>
  </system.web.webPages.razor>
</configuration>

now run the project