Stripe, .NET and ASP.NET – The Book

If your website is accepting credit cards and processing payments online then you’ve probably heard about Stripe. Is the simplest and easiest processing gateway to implement from a programmatic standpoint. For the past four years I’ve been using Stripe to process all the payments and subscriptions on my products.

But not only I’m using Stripe to process payments, I’m also using it to provide services to other companies using Stripe by building Tender, an add-on for Stripe that adds emailing of PDF invoices, dunning for failed credit cards payments and subscription metrics. All my products and specially Tender are built using ASP.NET MVC and, because of Tender’s nature, we’ve built a product that’s capable of handling thousands of Stripe transactions per minute, background processing and data manipulation. It’s a very high end product that support mission critical scenarios.

Because of this past experience, I’ve decided to share what I’ve learned from this past four years, and specially with Tender, and and write a book about how to integrate Stripe with ASP.NET which I’m calling: Mastering Stripe Payments with ASP.NET. The book will guide you through on how to build an ASP.NET web application with production ready code that can handle billing for thousands of users in a short time and it doesn’t crash. If processing payments is a big part of your business, then this book is surely for you.

Desktop application marketing – search engine marketing

Search engine optimization is what you do in order to improve and promote your website in order to increase the number of visitors it gets from search engines. You'll really optimize here to get traffic from Google as they handle most of the search queries.

They key thing with search engine traffic is that you’ll get a virtually free incoming stream of prospects to your site that are highly targeted and have an inclination to buy your product as they’re actually searching for something related on the internet. 

Ranking high on Google is a pretty difficult process that involve multiple factors but nobody really knows for certain what those factors are. Google has an internal algorithm to rank pages that to this day nobody knows how it works (and it gets updated fairly frequently to prevent spam).

Even though we really don’t know how the ranking system works, we can do some things that can help:

  • Register your domain: try to register domain as soon as possible and get it indexed on Google as recently created domains rank lower on searches. They basically go into a sandbox until Google knows for sure that your site is legitimate. There’s really no timeline of when the domain will get out of the sandbox but the sooner is in there the faster it’ll be out. You can register the domain and setup the website even if you haven’t started development. Just setup a landing page announcing the new product and collect email addresses for anyone that wishes to be notified when it launches.
  • Do fairly common SEO practices for on page optimization like:
    • Having a title on every page to indicate what is the page about. Every CMS out there should allow to put a title on the page. Make use of it and try to be as descriptive as possible about what the content of the page is about.
    • Have a description using the meta description tag. Also all majors CMS will allow you to do this. For WordPress you can use the Yoast SEO plug-in for editing this kind of fields.
    • Have image descriptions on the alt attribute for image tags. This is also straightforward but sometimes we just forget to add this type of information.
    • Clear urls indicating what the content is about. Avoid having parameters for dynamic rendering or querystrings. Google favors urls that are clean and that mean something to the user when they actually read it.
  • Link building is the next step but avoid at all costs any black hat techniques as this will get you penalized on Google. One way is to build links by providing good and valuable content to users. An example of this can be to create guides, books, infographics or any other form of distributable content that can be shared and linked by others. You can also use this content and do guest articles on other websites about this as they are also looking for people that can help in the creation of content.
  • Create content that is valuable to your market and relevant. This can be as simple as creating a blog and start posting articles related to the problem you’re trying to solve. It’ll help your users but at the same time it’ll help them to find you.

It’s very hard to rank and to be able for Google to notice your site but once you get it to work it can drive a lot of free traffic to your product.

How we made the freemium model work

A lot has been said about the dangers of a freemium plan for startups and new products. Most of these plans basically drain resources at the start of a new business (at a moment when they’re most needed). It also takes a lot of time for staff to handle support requests with customers using the freemium plan because it’s the first time users are experimenting with the product and it’s natural that they need help.

But in our case, we have a different approach. In our product, LicenseSpot, the first available plan is a free. The larger plans vary by the number of activations allowed. The product allows users to protect .net applications, in general, from being illegally copied (pirated) using a license scheme with public/private keys. LicenseSpot takes this one step further by providing online activation.

This first plan has 10 activations included for free and it’s providing lots of value to our customers. But the freemium is also converting customers because:

At some point the plan ends.

With only ten activations allowed, customers can only protect their own products with ten customers (or licenses). After that, they need to upgrade to a paid plan. With this, we take care of the issue about users staying forever in the free plan.

Testing time

With ten activations, users have enough resources to test LicenseSpot. This gives them a sense of how it works. Also allows them to integrate their products with ours.

Because we know testing and integration it’s important, if customers have exhausted the number of activations and need more, we provide an extra ten activations so they can continue with the testing.

Market testing

Also, when customers have reached the allowed ten activations in the free plan, it’s very probable they have paying customers proving their applications will sell. By the time they upgrade, they already have revenue coming in which makes it safe to invest in a better plan.

At this time, this configuration has worked for us pretty good. When we see customers upgrading from the free plan we’re sure they’re already selling the app and have found value using LicenseSpot.

Do you know of any other techniques to make freemium plans work?

Doing .NET licensing for free

Today we’ve launched a new site that provides information and free code samples on how to integrate licensing into your .NET application.

The site, .NET Licensing, contains tutorials on how to create key pairs, create license files how to validate the files inside an application.

We’ve also published the source code of an admin application to create the license files and is available on Github for download.

Just visit the site and let me know what you think.

Desktop software is not dead

(This is a cross post from the LicenseSpot blog)

Recently Andy Brice from Successful Software posted a very nice article asking if desktop software is dead.

I personally think that is not dead and that is still very alive. I know inexperienced users that are running installations on their local computers to install their favorite software. And it’s very easy to understand from the user point of view as this the oldest form of applications that we know. The most used software apps, Word, Excel and PowerPoint, are all desktop products.

Continue reading

Having a development framework

When developing software you’ll find yourself sometimes repeating the same lines of code between projects to accomplish similar tasks. When this situation occurs, you probably can build frameworks that can be reused later on projects.

The problem with developing frameworks is that it takes more time to build them and sometimes the project constraints don’t allow investing time in this type of issues.

Frameworks are generally composed of objects and libraries that can be used to extend a new set of objects, removing the need to rewrite code. Also, when changes are needed in these extended objects, is basically simple to add them because the framework handles most of the logic. Also fixing bugs is easier as a fix in the framework, which means all extended objects are fixed.

In our case, we develop all our products and projects on frameworks developed during the years and using freely available ones.

Data layer

Our data layer is completely automated. I really don’t remember the last time we had to write a SQL statement to access the database.

First we started using Gentle.NET that was very powerful at the moment. It allowed us to create tables, views with an easy object representation. It also provided CRUD methods out of the box.

Later we migrated to Enterprise Framework that provided a similar set of features but performance was even better and the possibility to use LINQ gave us a lot of flexibility for writing custom queries. Adding columns to tables is easy as adding the property to the data objects. The whole application then notices the changes and continues working.

The business (or logic) layer

For this one we created a custom framework. We have a set of classes that automatically handles CRUD operations with objects in the data layer. On all our products we have a set of separate objects for logic and data. This gives us lot flexibility when making future changes.

This business layer also includes functionality for getting a list of objects and some basic filtering methods for these objects.

Authentication and authorization

We have a set of classes that handles authentication and authorization at the object level for users. Each object checks by itself if the current user has permissions to perform the selected operation. This verification is even made in relation to the object and user. In essence, is the current object owned by the current user and then can the current user perform the actual operation.

All this is a part of a framework and objects get the functionality by inheriting from the framework objects. No need to code and recode again these validations.

Email handling

We have a container that has all email templates configured and just need to plug it into the application for it to work. We just need to configure the content for the emails and the events the application will respond to for sending the emails (user registered, forgot password, etc.).

All SMTP send and receive is already coded.

Do you think frameworks can help reduce development time?

What ever happened to SDKs?

Does someone still remember what SDKs are? Software Development Kits? They were really popular when new technology was released. They had a bunch of information on how to use the technology, documentation and lots of samples in different scenarios.

Today, because most of new technology is released as web applications, the need for SDKs have diminished. Now websites provide a variety of REST APIs that allow third party developers to connect their applications to these services.

All documentation about these APIs resides on the company’s website. Instructions on how to connect and authenticate are also in documentation pages. Really good tools have been built on Javascript to document these apis so developers can traverse them and better learn.

But very few companies are providing working samples of applications using these REST APIs. Basically, they leave the developer to figure out how to use them from the documentation and then build the application. Wouldn’t it be easier and better to provide SDKs that have working samples of application and pre-built utilities we can use to make development faster? They could also provide these samples in different code languages so they’re available to all developers market.

When we launched LicenseSpot, we provided samples on how to integrate the licensing component into applications but never provided a formal SDK. Since three months ago, we published an SDK with refined samples, in different environments and in multiple languages. Also the SDK includes a component that basically automates the interaction with LicenseSpot and utilities with predefined methods for calling our REST API.

This translated into big success for us. Conversions went up and we started getting more advanced and targeted questions from potential users. Because of this, we now invest more time on making the samples in the SDK better, add more platforms and languages.

It would be great if we could see more of this replicated throughout the industry. It’d increase developer’s productivity dramatically and web application owners would benefit by having more application integrating with their services.

Generating serial numbers and keys in C# and VB.NET

Using serial numbers is the most common way to unlock applications in the market today. Microsoft made that part of our life (us developers and isv) easier using serial keys all over their product lines. This has made final users and customer familiar with the term and how the should use them to activate their applications and that’s why we use them in our .net licensing product LicenseSpot.

One aspect to keep in mind about generating serial numbers is to keep them unique. In the function below we’re using GUIDs to generate serial numbers as we know for sure that they’re unique.

The function basically takes a guid string and just take the desired length for the key. It returns a serial number with the format: XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX.

public  string GetSerialNumber()
{
	Guid serialGuid = Guid.NewGuid();
	string uniqueSerial = serialGuid.ToString("N");

	string uniqueSerialLength = uniqueSerial.Substring(0, 28).ToUpper();

	char[] serialArray = uniqueSerialLength.ToCharArray();
	string finalSerialNumber = "";

	int j= 0;
	for (int i = 0; i < 28; i++)
	{
		for (j = i; j < 4 + i; j++)
		{
			finalSerialNumber += serialArray[j];
		}
		if (j == 28)
		{
			break;
		}
		else
		{
			i = (j) - 1;
			finalSerialNumber += "-";
		}
	}

	return finalSerialNumber;
}

Below the VB.NET code:

Public Function GetSerialNumber() As String
	Dim serialGuid As Guid = Guid.NewGuid()
	Dim uniqueSerial As String = serialGuid.ToString("N")
	Dim uniqueSerialLength As String = uniqueSerial.Substring(0, 28).ToUpper()

	Dim serialArray As Char() = uniqueSerialLength.ToCharArray()
	Dim finalSerialNumber As String = ""

	Dim j As Integer = 0
	For i As Integer = 0 To 27
		For j = i To 4 + (i - 1)
			finalSerialNumber += serialArray(j)
		Next
		If j = 28 Then
			Exit For
		Else
			i = (j) - 1
			finalSerialNumber += "-"
		End If
	Next


	Return finalSerialNumber
End Function

Why SaaS applications should provide pricing information

Everyday new online services are launched and must of us don’t even notice but a few of them. I’ve found that the majority of these few start with a freemium model or a beta test mode to attract users and subscribers. I don’t find anything wrong with this, but personally, the first thing I do when exploring a new service is to find the pricing page to check if I can afford it.

For me, there’s no personal benefit to subscribe and start using an application day on and day off, configuring the service, entering my data, so when the owners think they have a large customer base, publish the pricing information and I end up without being able to use the application. It has happened to me before. Now, when I can’t find the pricing information, I just don’t sign up and let it pass it by.

Why everyone should you have a pricing model:

Credibility

Even if you need a year for beta testing your product, at least publish how you think the business will make money. It shows potential customers that the company has a plan and also, when the time comes, you’ll know how much you’ll need to pay. Also the company has (or at least has think of) a business model. Most start ups just die because they can’t find the right model to generate cash flow. This gives some kind of assurance to customers.

The right customers

Every potential prospect subscribed has even more probability of becoming a customer when the application exits the beta testing phase. You can increase conversion even more by giving a discount to beta tester for their efforts.

One of the first thing we did with LicenseSpot, our license and software protection service, was to define a pricing and a business model and then built the website and all collateral information. Even though we’re live, any new prospect can check how much the service is worth and if it fits they’re pocket.

Do you provide pricing information on you web applications?

Should there be a partnership or a buyout between mobile operating systems?

A lot has been written about how the top three mobile companies should configure themselves. I’m talking about Apple, Google and RIM. Which one is better and which one is worse, who should die first and who’s second.

I think all those views (although have some degree of veracity in them) are too absolutist in the sense that things are not black and white. But also, it depends on the point of view of each person and their own experience.

All platforms have their own strengths, if they didn’t, neither of them would reach to the place they’re right now. Some value is the end user getting from them.

Here’s what I think in short words:

Blackberry OS

Is the oldest of the big three (even though Windows Mobile has a long history) but that doesn’t make it a looser. Been the oldest brings a lot of experience to the table. One of the biggest and strongest fields of Blackberry is their enterprise market capabilities. It has lots of good features built in that satisfy big companies like the White House. Lots of features has been incorporated into Apple’s iOS trying to get into this market, but adoption has been slow. As I said in the beginning, Blackberry has lots of experience in this field.

Besides been a leader in the enterprise market, Blackberry has fair good market share of the consumer market. This comes by a good reason: there are features that millions of people feel attracted to when buying Blackberry, one of them being the BB Chat. See as this simple and common capability, available on the Internet since its own birth, is one of the top features. Again, experience. I still don’t know why Apple didn’t launch the first day with a feature like this.

Apple iOS

It has a domination of the consumer market. The ease of use makes it a winner between people that have never had a smartphone.

Also, one of the biggest advantages is their App Store that has thousands of good applications. And more coming in with innovative features. This makes it a winner for usability and in the area of solving daily issues.

Adoption in the enterprise market has been slow, advancing a in small steps, but it’s coming.

Android

Also the usability here is a big winner. A fast growing market of applications makes it look interesting against Apple and Blackberry.

The biggest advantage of Android might be their price. As it’s an open source platform, carriers and phone makers don’t have to include royalties in prices bringing the phone’s total cost of ownership down.

Conclusion

I think all three has their own pros and cons. Neither of them should abandon their technologies for adopting the other. They have their own bright spots.

Even more, there could be some partnership between them if they want to consolidate and reduce costs. For example, a partnership between Android and Blackberry could integrate Blackberry enterprise features into Android giving it the experience and technology know how to become a unique platform that combines consumer and business capabilities.

Who you think should partner with who?