Virto Commerce – An Enterprise Open Source .NET eCommerce Platform

What is Virto Commerce? Virto Commerce is based on .NET 4.5 with MVC, IoC, EF, AngularJS, etc. Virto

What is Virto Commerce?

 

Virto Commerce is based on .NET 4.5 with MVC, IoC, EF, AngularJS, etc. Virto Commerce in an enterprise level E-commerce product recommended by many eCommerce solution providers. It is said that it is designed in such a way that it will have no need to modify any core source code and it is achieved by using Dependency Injection, Interfaces, Windows Workflow Foundation Activities for business processes. Virto Commerce handles millions of products having some of the features like master and virtual catalogs, separate price lists, multiple stores, advanced template engine, dynamic marketing content, fulfillment centers, multiple product types and many more. Virto Commerce supports Cloud and On Premise hosting types. Virto Commerce has functionality of Dynamic Content thus has ability to market promotions or any other content based on customer context, including geo – location, browse history, order history etc. Flexible Fulfillment module facilitates creation of pick/pack lists of products, accept returns and exchange of products and send shipments.

Statistical analysis

   
Brief Virto Commerce is a platform that provides the tools required to develop a web store or online store with multiple features and functionality.
Holding company It has supporting partners like JBS, niteco, Icube, etc.
Framework Supports Microsoft .NET Framework 4.5 with MVC, EF, Azure, Angular JS
Features
  • On-demand scalability, reliability, and performance ensurance. Server can be deployed world-wide hence flexible access
  • Offers on-premises deployment or a combination of both Azure and on-premises.
  • Images and all are stored on cloud thus, improves response time. Modern UI with latest technologies
  • Scalable hosting by Azure
  • Clean and easy to understand code
  • others as mentioned on their website.
Type E-Commerce website
Supported databases MS SQL Server and Cloud AngularJS based extensible web administration
Programming Language C#
Supported browsers
  • IE
  • Safari
  • Chrome
  • Firefox
  • Opera
  • Safari Mac IOS
Open Source Yes
Price Paid versions are available depending on features. Only primary features for demo is free
Benefits
  • Flexible to create own e-commerce solution.
  • Multiple Store Management
  • Catalog Management
  • Category Management
  • Product Management
  • Support global template
  • product template can be specified per site, per category, per individual product, based on user behavior, per geo location and many more.
Disadvantages Requires high technical expertise to customize the store.
Support The Support for any query or issue is resolved by asking into their community forum.
Awards and recognitions As per cmscritic, Virto Commerce is at second position in category Best E-commerce Software.

Conclusion

Virto Commerce is a robust solution for creating responsive and powerful web portals and webshops with all required features that supports huge data of products and suppliers and is highly recommended by many eCommerce solution providers in India.

 

 

An overview of new features of MVC 6 for MVC Software companies

MVC, Web API and Web pages frameworks is merged into one framework called MVC 6. This is also open s

 

MVC, Web API and Web pages frameworks is merged into one framework called MVC 6. This is also open source framework and cross-platform compatible. This is supported on mono, Mac and Linux. MVC 6 has gained very high popularity among MVC software development companies in India in very short time. The architecture of the newly developed framework, MVC 6 is as below.

 

 

New features in MVC 6

  • System.Web.Dll dependency removed

    Removed the dependency of System.Web.Dll from MVC6 because it consumes 30k of memory per request and response, whereas MVC 6 only requires 2k of memory per request and the response consumes very small memory.

  • Single based Controller for MVC and Web API

    In MVC 6, there is only one Controller base class for both MVC and Web API Controller that is Microsoft.AspNet.Mvc.Controller. Controller class System.Web.MVC.Controller for MVC and  System.Web.Http.ApiController for web API are merged into one class.

    MVC 6 controllers return an IActionResult. When used as an MVC controller, the IActionResult is a view. When used as a Web API controller, the IActionResult is data such as a list of students etc. The same controller can have actions that return both views and data.

    In MVC 6, both MVC controllers and Web API controllers use the same routes. MVC software developer can use either convention-based routes or attribute routes and they apply to all controllers in a project.

  • Supports other hosts in addition to IIS
    One can host MVC5 on an IIS server and can be run on top of an ASP.NET Pipeline. On the other hand, MVC 6 is self-hosted and uses flexible pipeline that one can control completely over the components that are part of the pipeline.

  • Environment based configuration system

    The configuration system provides an environment to easily deploy the application on the cloud. An application works just like a configuration provider. It helps in retrieving the value from the various configuration sources like XML file. So now MVC software programmers do not need to depend on just Web.config.

  • New Roslyn Compiler
    Using the Roslyn Compiler, it automatically compiles the application code. MVC Programmer can edit a code file and can see the changes by refreshing the browser without stopping or rebuilding the project.

  • Cloud-optimized Applications
    MVC 6 is a part of ASP.NET 5 that is designed for cloud-optimized applications. It automatically picks the correct version of the library runtime when MVC is deployed to the cloud and session state and caching gets adjusted depending upon hosting environment.

  • Dependency injection
    Using the IServiceProvider interface, ASP.NET software programmer can easily add its own dependency injection container. One can replace the default implementation with his own container.

  • Supports OWIN
    We have complete control over the composable pipeline in MVC 6 applications. MVC 6 supports the OWIN abstraction.

  • Everything is packaged with NuGet
    The unit of reference in MVC 6 application is nuget package and not assembly unlike the previous version. Programmer just needs to add main nuget package and all the dependent nuget packages are added automatically by the framework.

  • Side-by-side deployment
    One can upload dependencies to the bin directory without affecting other apps on same server.

  • New JSON based project structure
    MVC 6 contains global.json,config.json,project.json for different-different Configuration.

 

Important components of an MVC6 application

  • Global.json
    It contains solution-level settings and project-to-project references.

  • src folder
    Source code for our web application.

  • Wwwroot
    This folder contains static files and all other files that web app serves directly to the clients, including HTML, CSS, and Image and JavaScript files.

  • Config.Json
    This file contains the application configuration in various places. MVC Programmer can define its application configuration, not just this file. Using the configuration value providers the correct configuration values are picked. There is no need to be concerned about how to connect to various sources to get the confutation value.

 

 

 

 Following code snippet explains how to add a connection string in the Config.json file.

Project.json

The “project.json” file serves as the new project file (.csproj/.vbproj).This file contains the project dependencies as well as the build information. This also contains the commands used by the application. Dependencies like loading external JavaScript library like jQuery, Knockout.js.

Project.json file provides intellisense for the available packages when developer adds or edits dependencies. All packages that one has added from this file are automatically pulled from NuGet and when one removes packages it automatically gets removed from project reference.

Startup.cs 
It is an entry point for the application. This file is used to define the environment for the application, e.g. Using MVC, Entity Framework, etc. By default the host looks for a Startup class with a Configure method that takes IApplicationBuilder as a parameter.

Defining the Request Pipeline
the Startup.cs contains a startup method.

The above code snippet creates an object of configuration class. We are adding the config.json and Environment variables as the source of configuration values. Also we can add other configuration sources that our application requires.

 Our application can fetch configuration values from different configuration sources as there are configuration value providers for different sources .So application does n't need to be concerned about the different sources of configuration. This is one reason that MVC 6 applications can be easily moved to cloud.

Code snippet to add the MVC framework in the pipeline

The code above is same as the old MVC for defining routes, except that the UseMvc method is used to setup the routes.

The AddMvc() basically adds the dependencies needed for MVC 6.

Understanding Controller in MVC 6

In MVC 6 the application does not need to be derived from the controller class. In controller there are many default functionalities. Most of the time one needs to derive from the controller class, but if one does not need access to all of the functionally provided by the controller class, one can define its own controller class.

Understanding Views in MVC 6

In MVC 6 view, developers have been provided with new attributes for Model binding. HTML Helper methods are used for generating UI elements like : @Html.EditorFor and Model binding are removed.

 

MVC 6 New Attribute

  • Asp-controller: Provides Controller Name
  • Asp-action : Provides Action Name of Controller class.
  • Asp-for : This attribute is used for Model Binding
  • Asp-validation-for :  This attribute is used for Model validation
  • Asp-validation-summary : This attribute is used to display the validation summary.

 

Managing culture issues in .NET programming, a headache for programmer – TimeZone Object

A time zone is a region on Earth with uniform standard time (UT) and have a legally defined borders

Software outsourcing companies India

 

A time zone is a region on Earth with uniform standard time (UT) and have a legally defined borders which coincide with the border of country or some subdivision for commercial, legal and social purposes. 15 longitudinal degrees, the time changes by one hour. Thus, there are 24 time zones in the world. Over the period, local governments of various countries have altered, accepted or rejected GMT (Greenwich Mean Time) as they saw fit per their country’s requirements.

Custom software that deals with varying time zone and date time calculations are prone to errors if asp.net software companies do not deal with TimeZone and DateTime properly with accuracy. Managing TimeZone and DateTime objects is challenging job for .NET developers in asp.net software companies.
 

What is TimeZone Object?

TimeZone object in .NET framework represents the current local time zone.

A time zone is a geographical region in which the same standard time is used. Programmer (Software Developer) can use the TimeZone class of .NET Framework to retrieve information about the current time zone and to convert local time to Coordinated Universal Time (UTC) or vice versa. Inheritance hierarchy is System.Object - > System.TimeZone.

Below is the syntax to get the local time zone and based on that the current Coordinated Universal Time (UTC) is retrieved.

TimeZone {localZone} = TimeZone.CurrentTimeZone;

DateTime {currentUTC} = localZone.ToUniversalTime( currentDate );

The format of the date and time string in time zone will be ISO-8601 as shown below.

2016-10-13T10:20:20.20Z 

Date: YYYY-MM-dd, Time: hh:mm:ss.ms, Time zone: Z for UTC

There is lot of flexibility in the ISO-8601 format for example, we could have easily replaced the ‘Z’ at the end with a proper time zone offset like -0530 (India).
 

Why is it difficult to manage?

Many systems are dependent on keeping accurate time. The problem arises when time changes due to daylight savings like moving the clock forward or backwards. Software applications are so dumb that they don’t understand such human actions!
 

Common mistakes by programmers

Issue arises when Time zone gets changed

Let us understand this by an illustration. Assume that the customer’s main business is out of USA and their servers are hosted in France. The customer has their employees spread across multiple countries (ex: India, Indonesia, Japan and Canada).

Converting date and time string values back and forth between different cultures normally causes an issue in software applications and break them.

Solution: During implementation, when you are referring to an exact time, persist the time according to a unified standard that is not affected by daylight savings or any such actions. (GMT and UTC are equivalent with this regard, but it is preferred to use the term UTC. Notice that UTC is also known as Zulu or Z time.)

Architecture for the solution looks as shown in the below picture, showing what date time format is passed between different layers.

                               Software outsourcing companies India

 

Developers are advised to apply some basic rules between multiple layers.

  • Database: Everything that goes in and out is going to be UTC
  • Server: Everything that goes in and out is going to be UTC
  • The client (front-end) : Everything that goes in and out is going to be UTC

The time zone offsets are not always an integer number of hours (for example, Nepal uses UTC+05:45, Indian Standard Time is UTC+05:30).
 

Conclusion:

TimeZone objects are challenging to manage and have potential to drive technical team crazy and insane. Proactive approach and following best practices can help programmers and asp.net software development companies to combat these challenges.

  • Timestamps are suggested to be stored in UTC
  • Date and time math should be performed using library
  • Standard time offset should be used 

Managing culture issues in .NET programming, a headache for programmer – DateTime object

Programming is fun and gives the sense of accomplishments to programmers and developers. First it is

Software outsourcing companies India

 

Programming is fun and gives the sense of accomplishments to programmers and developers. First it is due to sheer joy of creation and solving business problems. As the child takes pride in mud pie, so the programmers and asp.net software companies do enjoy building things and solving the business problems.  Programming sounds easy however it requires a hell lot of thinking, thinking and thinking. Common areas programmer fall prey for are handling different culture issues in programming. There are various scenarios that one needs to address while developing application for multiple or different cultures. Some of the areas are:

  • Handling Date-Time values
  • Ideal solution for handling time zone.
  • String operations
  • Handling numeric values


What is DateTime Object?

DateTime object is used to express a date and time of the day in programming. This is used to perform calculation and comparisons of DateTime instance of same time zone.

There are different ways to instantiate a DateTime object.

  • DateTime {Name of class} = new DateTime(2016, 10, 10, 5, 05, 05) ;

    This is a DateTime constructor that is called to create a date with specific year, month, day, hour, minute and second.

  • DateTime {Name 1} = DateTime.Now;

    DateTime {Name 2} = DateTime.Utc;

    DateTime {Name 3} = DateTime.Today;

    Assigns the current date and time, the current (Coordinated Universal Time) UTC date and time and current date to the three new variables.

  • string {string name} = “10/10/2016 5:30:53 AM”

    DateTime {date name} = DateTime.Parse(dateString,

    System.Globalization.CultureInfo.InvariantCulture);

    This parses a date string and converts it to a DateTime value. The Parse, ParseExact, TryParse, and TryParseExact methods are used to convert string to its equivalent date and time values.


Why is it difficult to manage?

It is difficult to manage DateTime when we are performing calculation or comparison on DateTime object which are from different time zones.  Managing DateTime object of two different time zones is one of the challenging job c# software companies consider.  Common difficulties for software programmers in managing DateTime are below.

  • Comparison or calculation of DateTime object of two different time zones

    If one DateTime object contains machine local date/time and another object contains server date/time and suppose server is dealing with French time zone.

    Comparison on DateTime object may not yield a correct value in this case. Calculations like add date/time/days/ year also do not return accurate values and throws unexpected calculation errors.

    Solution is to have a date representation in Universal format (GMT) always – this may not be practical though in all cases. When date representation is in universal format, every day has fixed length and there are no time-zone offsets to deal with that makes it easy to perform any calculations or comparison.

    While performing any calculation between dates, it is recommended by asp.net software companies to convert the local time value to universal time first and then perform the calculations and convert back to achieve desired accuracy. Following is an illustration of conversin.

    DateTime {name} = DateTime.Parse("Oct 03, 2016 12:00:00 PM").ToUniversalTime();

    date = date.AddHours(3.0).ToLocalTime();

  • Converting DateTime value of machine time zone or date in string format to DateTime value of other time zone is difficult to handle for developers.

    Here, solution is to call the ‘Parse’ and ‘ToString()’ only after setting CultureInfo to CultureInfo.InvariantCulture. The invariant culture is culture-insensitive; it is associated with the English language but not with any country/region.

    string {DateInString} = "5/1/2008 8:30:52 AM";
    DateTime {date} = DateTime.Parse(dateString, System.Globalization.CultureInfo.InvariantCulture);

    This technique ensures that the underlying time and date values do not change when the date is read or written by developers from different cultures.


Common mistakes by programmers

Following are common mistakes while dealing with DateTime objects.

  • Dealing with ‘Now’

    ‘Now’ method is commonly used to get the current time. The value returned by the ‘Now’ method is in the current machine time-zone context and cannot be treated as an immutable value.

    Converting times to be stored or sent between machines into UTC (Universal Time) is common practice using following method.

    DateTime {date} = DateTime.Now.ToUniversalTime();

    Resulted value would be off by an hour if called during extra hour occurring during the daylight saving.

    Solution is to use ‘UTCNow’

    Instead, call the DateTime.UtcNow function directly. This code will always have the proper 24-hour-day perspective, and then be safely converted to local time.

    DateTime {timeval} = DateTime.UtcNow;

  • Not using ‘InvariantCulture’ with DateTime

    While dealing with parses method to convert it string date value to DateTime value, it considers machine culture. Issue arises when a developer has an application that runs in any of the culture and have date time conversion in the app.

    For example, application has a DateTime picker to show a date with the specific format. In code behind parses a string date to DateTime value using following code snippet.

    string {dateString} = "10/1/2016 8:30:52 AM";

    DateTime {date} = DateTime.Parse(dateString);

    This scenario will generate an unexpected error while dealing with different culture.

    Solution is to use ‘InvariantCulture’ method. The following example uses the invariant culture to persist a DateTime value as a string.

    //Parse the stored string.

    DateTime {dt} = DateTime.Parse("Thur, 1 October 2016 20:34:16 GMT", CultureInfo.InvariantCulture);

    It is also easy to parse the string and display its value by using the formatting conventions of the French (France) culture.

    // create a French (France) CultureInfo object.

    CultureInfo {frFr} = new CultureInfo("fr-FR");

    // Displays the date formatted for the "fr-FR" culture.

    MessageBox.Show("Date formatted for the " + frFr.Name + " culture: " + dt.ToString("f", frFr));

    // Output: Date formatted for the fr-FR culture: mardi 1 octobre 2016 20:34:16

    The Parse, ParseExact, TryParse, and TryParseExact methods are used to convert string to its equivalent date and time value.

    You can also use DateTime.TryParse Method (String, DateTime) that converts the specified string representation of a date and time to its DateTime equivalent and returns a value that indicates whether the conversion succeeded and does not throw an exception if the conversion fails.

Conclusion

  • Developer should understand that DateTIme comparison and calculation are correct and meaningful if they are representation of points of time of same time zone perspective.
  • In general, it is recommended to use a Universal (GMT) time value if possible so that one gets the required accuracy.
  • Always parses string date to DateTime value with using ‘InvariantCulture’ when dealing with different culture for DateTime format.