Sunday, January 31, 2016

ASP.NET MVC web application : How to Read CSV File


Introduction

This article shows you two methods to read data from CSV (Comma Separated File) file:
  • First method: Reading CSV file without any specific library
  • Second method: Reading CSV File using LinqToCsv lib

Using the Code

Before we begin the explanation of example, let's know about CSV file.

a) CSV File

A Comma Separated File stores tabular data (text, number) in plain text each line of file is a record, and each record consists of many fields separated by delimiter (',' , ';' , etc.).
Example of CSV content:

Names,Dates
Name 1,12/12/2015
Name 2,12/11/2015

ASP.NET MVC web application : How to Read Excel File


Introduction

This Article shows you some easy methods to read data from an Excel file:
  • First method: using ExcelDataReader
  • Second method: using LinqToExcel

Before we begin the explanation of examples, let's know about Excel file.

a) Brief Description of Excel File


Microsoft Excel File is a spreadsheet developed by Microsoft. Its features are calculation, graphic tools, and micro programming language using Visual Basic for Application (VBA).
Example of an Excel file data is shown below:




ASP.NET MVC web application : Dynamic Content Load, using jQuery AJAX


Introduction

Loading dynamic web page is very easy using JQuery and Ajax.
In this article we will detailled the mechanisme adopted to load dynamic HTML data in web Page with Asynchronous mode thanks to Ajax.

Background

This article may be useful for intermediate developers who have some basics in HTML, Ajax, JQuery, JavaScript, Entity Framework, C# and ASP.NET MVC.

I) Operation Process

In this section we will good explain the mechanism adopted to implement a such process.
Before we start speak about the process, i want to do a reminder about MVC pattern and Ajax concept.

AngularJS : Create a Web Site using AngularJS, ASP.NET MVC, Web API - PART 1: Introduction

PLAN

Introduction

The purpose of this series of articles is to explain how we can create an ASP.NET MVC app, using Angularjs framework.
At the beginning of this article, we will talk about the overall architecture of the application, then we will define what will be the prerequisite for better comprehension of different steps of creation a web site that is a mixture of ASP.NET MVC technology and AngularJs.

Using the Code

I) Global Architecture

The following diagram gives an overall view of application and illustrates the various exchange between modules.



 

  

AngularJS : Create a web site using Angular JS, ASP.net MVC, web api - PART 2 : Conception


PLAN


Introduction

In this chapter we will define the model of the database, and start its implementation all using the syntax SQLServer and the Entity Framework ORM.

Using the code

I) DataBase Diagram

Our web site is ECommerce application, that include two actors :

1) Consumer

Is our customer, once his registered, he will have access to his space, across which he can browse product details, add product to shopping cart, send a command and show his commands status.

2) Administrator

he have a possibility to administer the dataBase through : management of product table and Commands table. the management of Command Table consists of changing the state of command to be 'Received', 'Processing' or 'Finish'.

the following DataBase Diagram, explains better the relation between Consumer and Administrator.


 

AngularJS : Create a web site using Angular JS, ASP.net MVC, web api - PART 3 : Coding Server side


PLAN

Introduction

now we will define our  services which acts as intermediary between Client and DataBase.

Using the code

I) Exchange between client and server

the different requests that can be sent from client to server, can be described as follow :
1) userExist : verify if  login and password passed as parameters belong an existing user in EC_User table or not.

AngularJS : Create a web site using Angular JS, ASP.net MVC, web api - PART 4 : Coding client side


PLAN

Introduction

In this article we will implement the client side using angularjs.

Using the code

I) Project tree

the client project tree is constituted by three parts :
1) Controllers folder : contains the declaration of controllers.
2) Services folder  : has the declaration of custom services related to each controllers.
2) View : contains html pages and a js file that contains the initialization of different module and routes.
the following picture,  can more explain the organisation of our project  :


General : CRUD application using AngularJs, NodeJs, MongoDB - Part 3 : implementation of client side


Plan


Introduction

In this chapter we will begin the coding of client side using angularjs framework.

Using the code

I) Project tree

the client project tree is constituted by three parts :
1) Controllers folder : contains the declaration of controllers.
2) Services folder  : has the declaration of custom services related to each controllers.
2) View : contains html pages and a js file that contains the initialization of different module and routes.
the following picture,  can more explain the organisation of our project  :