ASP.NET e-commerce wars: dashCommerce vs. nopCommerce

SAMPATH DASSANAYAKE    MAR 23

At Deesea we are keen to use and promote Open Source solutions in our client projects. When our clients wanted shopping carts we used to build them from scratch. We built them from scratch because in the process of building them we experimented with emerging technologies and techniques. After we built quite a few, we were tired of re-inventing the wheel. After all, we had explored all we needed to explore.

Dorian, our founder, figured that the best way to go about it was to master an Open Source shopping cart application and also eventually contribute to its development. That way, we would benefit from the work the community has done and would be using and promoting an Open Source project and would be able to give back to the community as well.

Putting your weight behind an Open Source project is a risky task. It becomes even riskier when there are many competing projects in the same space. If you put your weight behind an inactive or badly developed solution, the whole purpose of going for Open Source will be lost. In such a case you’d be better off developing or using your own solutions, and when it came to shopping carts, we had a few.

Here I am going to record the thought process that was behind our choice and also share our evaluations of the solutions that are out there.

Technology

Since Deesea is a .NET shop, the solution had to be built on .NET technologies. We are a progressive development house, so we would prefer a solution that was developed using the latest technologies such as ASP.NET MVC. We are also big fans of a few other platform level Open Source tools such as nHibernate and nUnit. So if the solutions were built using any of these technologies, we would have loved it even more.

Unfortunately there weren’t any that filled our criteria 100%. But there are quite a few .NET Open Source shopping carts

While searching for ASP.NET based shopping carts, there are a few options.

  • nopCommerce
  • dashCommerce (was dead and now resurrected)
  • ASP.NET Store Front
  • Commerce Starter Kit (predecessor to dashCommerce)
  • The Beer House

The challenge before us was to find the most mature, stable, production ready shopping cart, that was feature rich, easily extendable and boasted of an active community. When evaluated against this criteria, the first two solutions really stood out.

We were compelled to leave out ASP.NET Storefront due to the fact that Rob Conary has not done a release to it in over an year and the last application that he was referring to in his blog posts were significantly different from the released source. And there seems to be no direction in sight except for his explanation that a team over at MS was doing significant modifications to the solution and it will be released eventually. This scared us in a way as a project that MS worked on internally is bound to be built on 100% MS technologies and leave out other open source options. While we have nothing against MS technologies we wanted to go with a solution that would be open to embedding the best of breed technologies.

Features

Features of shopping carts are sometimes very subtle. Most shopping carts will have the basic features of a shopping cart and a check out process. It is the little nitty gritties of these, that you tend to miss on the first round, that get you by the neck during implementations.

The following is a summary feature comparison. This has been put together by the feature matrixes that are published in each solutions web sites and consists only of the features we evaluated initially. We will do a more thorough evaluation against requirements of each project.

Feature dashCommerce nopCommerce
Product / Catalog Features    
Unlimited categories check check
Unlimited manufacturers check check
Products belonging to multiple categories check check
Multiple product attributes check check
Multiple Product Images check check
Multiple Product Descriptors / Product Specifications check check
Support for KIT products   check
Support for Downloadable Products   check
Multi-Currency Support   check
Ability to promote products (sale/featured/new)   check
Product Inventory Tracking check check
SEO – customize meta tags for products/catalog   check
     
Cart/Checkout/Order Management    
Configurable Taxes (by Country, State) check check
Integration with third party Tax calculators check check
Configurable Shipping Rates (weight & state, country) check check
Integration with Shipment Providers (UPS, FedEx, DHL ,USPS) check check
Integration with Payment Processors (PayPal, Auth.NET,  2CO, etc) check check
Include/Exempt Shipping from Tax   check
Include Tax in Price   check
Email order notifications check check
Shipment Tracking check  
Refunds/Partial Refunds check  
     
Marketing/Promotions    
Affiliate programs   check
Polls / Blog / News   check
Latest Products   check
Product Reviews check check
Recently viewed products   check
Discounts   check
Coupons check check
Free Shipping   check
     
General / Skinning / Extending    
Ability to Skin the application via Master Page/CSS check check
CMS/Blog check check
RSS Feeds for Product Catalog/Content/Blog   check
Search engine friendly URL’s / URL Re-writing   check
Multi-Lingual check check
     

Conclusion

We pretty much concluded that nopCommerce is the way to go. But we are not going to ignore dashCommerce. We are a little uneasy that it suddenly disappeared, along with the forums and releases and the source for a while, but we hope all that is in the past and that dashCommerce will start to thrive again.  While dashCommerce was gone, nopCommerce kept on growing and it’s exhaustive feature list is a testament to the constant upgrades it has gone though. Also, nopCommerce has the strength of nopSolutions behind them, although we are not clear how big they are or how many developers they have dedicated to developing nopCommerce.

One thing we would love to see is if any of these solutions have plans to go MVC anytime soon. This is not very clear but based on their and their creators blogs, it seems dashCommerce maybe making some headway towards this. I for one, would love to contribute to any of these projects if they choose to go MVC!

Finally, if you agree or have comments on anything mentioned above, please feel free to comment.

Embed Dynamic Bing Maps with Javascript

DORIAN COLLIER    MAR 10

We were recently asked to add dynamic Bing maps into a website. "No problem" we said - having no clue of the heartache that lay ahead. After beating our head against the wall for a while we eventually figured out how to use javascript to add Bing maps into a webpage, and we thought we'd share.

WHY BING

Before we begin, let's explore why we might want to use Bing maps instead of Google maps.

  1. Bing has more accurate results (according to our client - a luxury real estate company)
  2. Bing maps looks better (again, according to our client)
  3. Bing maps have more features (you guessed it - our client said so)

THE PROBLEM

After a quick web search I thought that I would be able to use Bing's built in "Embed In A Webpage" feature. Wrong! I quickly discovered that it doesn't allow for dynamic addresses. In fact, the only to display dynamic addresses is to pass the latatude and longitude of the location. (click here to learn more about Bing's Build in Embed a Map feature)

Next I tried using the Bing Maps SDK to get the map. After a little time, and a little javascript, I got it to work. Yes!!...wait...NO!! This map displayed correctly, but it uses funky little PushPins created by some designer in the mid 90s. This will not do. We're modern web developers right? We create modern websites, and these fugly pushpins just will not do. Nothing but the best, right!??

THE SOLUTION

The answer is to use the Bing Maps SDK to get the longitute and latitude of the address, and then insert that into the code from Bing's Emed a Map feature. It works great!! We created the original solution in ASP.NET MVC, but I converted it to pure javascript so that you can use it on any platform.

Click here to view the demo
Click here to download the files

Enjoy!!

Building and managing virtual teams

DORIAN COLLIER    MAR 08

We opened our doors in 2009 with the intent to build a world class virtual team of hot-shot asp.net web developers. We've done quite well over the past year and have completed projects for household names and mom-and-pop shops alike.

That said, it hasn't been easy. Through this blog I intend to share some of the lessons we've learned along the way. I'm here to share what I've learned about finding and hiring the best talent around the globe, managing a remote workforce, and communicating effectively across great distances and time zones.

If you're interested in learning more, please subscribe to our RSS feed, or email us to be added to our upcoming newsletter. Also, feel free to add comments letting me know what topics you're most interested in.

New way to send fancy template emails in ASP.NET MVC

SAMPATH DASSANAYAKE    MAR 01

In most web applications there are needs to send emails to users. And most of the time, these emails have to resemble the look and the feel of the web site, keeping the web site's branding and theme in the email messages as well.

On a recent web application that we were working on there were several emails that needed to be be sent and the client had done designs for the emails. The actual emails that were sent had to fill these templates with the users data and be sent out. These emails resembled the web pages that the user would see on the site.

After searching for the best way to send out templated emails, this is the solution we came up with. We wanted a solution that would stick to the MVC architecture that the site was using.

We created a Controller named EmailController. For each email that needed to be sent, we created an ActionResult method. Each ActionResult had a corresponding View. In this view we placed the HTML for the email template, and populated this View though the data passed to it by the ActionResult. Then using screen scraping, required method would populate the View, scrape the HTML and place it on the body of the email and send it out.

The application structure looked like the following. For brevity I have omitted the rest of the files in the application file structure and showing only the files related to sending the emails.

  • <Models>
  • <Controllers>
    • AccountController.cs
    • EmailController.cs
  • <Views>
    • WelcomeEmail.aspx

Let's consider the Welcome Email. The EmailController.cs will have the following ActionResult.

   1: public ActionResult WelcomeEmail(int id) {
   2:     if (Request.IsAuthenticated == false)
   3:         return View("AccessDenied");
   4:  
   5:     User u = new UserRepository().Get(HttpContext.User.Identity.Name);
   6:     if (u != null) {
   7:         ViewData["email"] = u.Email;
   8:         ViewData["pss"] = u.Password
   9:     }
  10:     return View();
  11: }
  12:  

This method first checks if the request is authenticated, which means the current users is logged in. Then it retrieves the user from the UserRepository by the user name saved in the HTTPContext and populates the ViewData fields for email and password.

The WelcomeEmail.aspx page is a ASPX page which is designed using a Table HTML layout with inline CSS. The reason for using a table layout is when it comes to emails the most assured way to ensure that your email will display as intended is to use the HTML table based layout. Some email clients will not render the DIV's as intended. Also, the CSS has to be inline as most email clients tend to ignore the references to external CSS files.

Then on the Account Controller, which is the actual controller that handles the user registration, we call the WelcomeEmail ActionResult.

   1: [AcceptVerbs(HttpVerbs.Post)]
   2:  
   3: public ActionResult Register(User user) {
   4:  
   5:     // Validate inputs and create the User Account
   6:  
   7:     //Add an Auth Cookie
   8:  
   9:     //Send email
  10:  
  11:     string subject = "Welcome To Our Site";
  12:  
  13:     Helpers.Email.SendTemplatedEmail(
  14:         System.Configuration.ConfigurationManager.AppSettings["emailAddress"], 
  15:         user.Email, 
  16:         subject, 
  17:         Url.Action("WelcomeEmail", "Email", 0, "http") + "/" +u.UserID);
  18:  
  19:     Return View();
  20:  
  21: }
  22:  

The actual email sending is handled by a Helper Method.

   1: public static void SendTemplatedEmail(string from, 
   2:                                     string to, 
   3:                                     string subject, 
   4:                                     string templatePath){   
   5:  
   6:     MailMessage mm = new MailMessage(from, to);   
   7:     mm.Subject = subject;   
   8:     mm.Body = GetEmailBody(templatePath);   
   9:     
  10:     if (mm.Body != "") {  
  11:         mm.IsBodyHtml = true;  
  12:         SmtpClient smtp = new SmtpClient();  
  13:         smtp.Send(mm);  
  14:     }  
  15: }
  16:  
  17: public static string GetEmailBody(string templatePath){
  18:      System.Net.WebClient objWebClient = new System.Net.WebClient();
  19:      byte[] aRequestedHTML = null;  
  20:      string strRequestedHTML = null;
  21:  
  22:      aRequestedHTML = objWebClient.DownloadData(templatePath);
  23:      System.Text.UTF8Encoding objUTF8 = new System.Text.UTF8Encoding();     
  24:      strRequestedHTML = objUTF8.GetString(aRequestedHTML);
  25:  
  26:      return strRequestedHTML;
  27: }
 
The SendTemplateEmail method calls GetEmailBody method to scrape the HTML from the View. This line objWebClient.DownloadData(templatePath) when executed actually loads the View passed to it in the templatePath variable and passes the HTML which we encode and extract as HTML. Then this extracted HTML is set on the email body and the email is sent.

Welcome to new Deesea Blog

ADMINISTRATOR    MAR 01

Today, along with the new site design we have launched the corporate blog for Deesea.com. We are hoping to use this blog to share the exiting things that we are doing. Also we will use the blog as a platform to share our knowledge of the cutting edge technologies that we are using. 

We are huge fans of open source projects and we encourage our staff members to actively participate in the development of open source solutions. Keeping in line with this, this blog itself is published using the Open Source BlogEngine.NET blogging engine. And we will share our knowledge of blogging using BlogEngine.NET though this blog.

In each of the Open Source projects that we use, we will be sharing the lessons we learned through this blog. 

 

Widget Twitter not found.

Root element is missing.X