Wednesday, January 2, 2019

Learn Angular 7 from Scratch

What is Angular And Why?

Angular is a framework to build client-side applications. it is great for Single page applications (SPA) developed by Google. it provides built-in features like services, HTTP services, Materials etc.

1. Coming to History :
 it was released in 2010 --> Angular JS
                             2016  --> Angular 2
                             2016  -->  Angular  4 (December)
                             2017  --> Angular   5 (November )
                             2018   --> Angular 6 (May)
                             2018  --> Angular 7 (Oct)

About This Course ?
It is a crash course for all beginners from scratch. before going to this course. the prerequisites are HTML, CSS, Basics of Type Script, Java Scripts and Bootstrap.

2. Environment Setup
  1. Node
  2. Npm
  3. Angular CLI
  4. Text Editor to develop the code (Visual Studio Code (VS Code))
 Node :
 Install the Node JS. go to website select required OS and install it.

 Check the Node JS Version :
  go to command prompt and type as node -v like below
                                            [ C: \ > node -v ]
Npm :
Npm installed automatically while install Node JS. to check the Npm then go to command prompt and type npm -v as below
                                           [ C: \ > npm -v ]
Angular CLI :
Now to go copy the command as shown below and execute it

                                          [npm install -g @angular/cli ]
                                           [ ng -v]  to check version   
Visual studio Code :
 go to visual studio website and download it.  (

3. Create a Angular Project :

 method 1: Go to command prompt type as below
                                         [ ng new helloworld]
                                          [ cd helloworld]
                                          [ ng serve] 
method 2 : Go to View in VS code create a Folder and name it as Angular click on Folder--> Now go to Integrated Terminal
                          type as   [ ng new helloworld]
                                         [ cd helloworld]
                                         [ ng serve] 
All installation and creating project is completed now run the angular application in browser.
Now go to Browser and type localhost:4200
angular app is running in browser.

4. Architecture of Angular

Angular contains the one or more modules. every module contains the one or more components or services. components is nothing but HTML template + Class to control the business logic for render the particular View.
Coming to the services. if you want to re-use the code in different components then services are the best concept. here you can write the business logic for your application.

Coming soooooooooooooooooooooooooooonnnnnnnnnnnn

Read More »

Sunday, December 30, 2018

Viewbag in MVC

Viewbag is used to shares the small amount of data from the controller to view. the Viewbag is a Dynamic type which means no need to typecasting and downcasting. the lifespan of Viewbag is last current HTTP request.

Example :

 namespace Alltechgeeks.Controllers
  public class TestController  : Controller
       IList <Test> testList  = new List<Test>()
                                               new Test(){id=1, name="Murali"},
                                               new Test(){id=2, name="Sathwiq"},
                                               new Test(){id=3, name="Siri"},
                                               new Test(){id=4, name="Krishna"}
           public ActionResult Index()
                  Viewbag.totaltest   = testList.Count();
                   return View();



Go to Index.cshtml page consume the viewbag.totaltest in view

        Total Test : @Viewbag.totaltest

we can assign any number of values and properties to Viewbag.

Read More »

Samsung Galaxy j7 (2018)

samsung galaxy j7 (2018)

  1. Samsung Galaxy j7 was launched in June 2018.
  2. The size of the phone is 5.5 inches touchscreen
  3.  resolution of the Samsung j7 (2018) phone is 720 X 1080 pixels
  4.  OS operating system is Android
  5. Front Cames is 13 MP megapixels
  6. The rare camera is 13 MP megapixels
  7. it released in black color
  8. the aspect ratio is 16:9
  9. the processor is Dual Core
  10. it supports the 3G / 4G / LTE
  11. The accelerometer is enabled: yes
  12. Sim type is Nano Sim
  13. number of sims are 2
  14. Headphones are 3.5 mm
  15. expandable storage is up to 256 GB
Read More »

Bundling in MVC MVC Bundling and minification is a technique to improve the request load time and introduced in MVC 4. bundlings has some following bundle classes in System.Web.Optimization namespace.

  1. ScriptBundle
  2. StyleBundle
  3. DynamicFolderBundle

the above bundles are included in MVC 5 and the namespace is System.Web.Optimization.Bundle.
it is a process of grouping the CSS/javascript files.
the most important of bundling is reduce the number of request from the browsers to the server, while minification reduces the size of requested assets.
Minification reduces the unnecessary white spaces and comments

Without Minification :

 allTechGeeks =function(city){
                                                   //this is comment
                                                   var test = "Hello World" + city ;
                                                   alert(test) ;
After Minification :
  allTechGeeks =function(city){var test = "Hello World" + city ;alert(test) ;}

in without minification, the javascript file has spaces and comments but after minification, we can't find the spaces and comments. So automatically the size of the file reduces but for development needs the without minification. in production minification file is good.

Read More »

Wednesday, December 26, 2018

State Management Techniques in mvc

we can find the 5 types of state management techniques in mvc.
1) View bag
2) View data
3) Temp data
4) Cookies
5) query string
Read More »