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.