To Code or Not to CodePosted by Itay Herskovits on Dec 08, 2014
When developing a front-end for an existing application, one of the first questions that often arises is “How should we build this?” Choosing to write custom code to solve a problem can give you a lot of flexibility in the end product, but ultimately will end up causing a lot of money and time for development and ongoing support. In some cases, it makes more sense to try to abstract the development process as much as possible, minimizing the amount of code to be written. In this article we will look at a number of ways to approach building an application on top of existing data, and why you might choose one over the other. We’ll also touch upon the related front-end code, particularly looking at cases where a directive-driven approach like AngularJS can be used efficiently and effectively.
For web development, there are options that fit each comfort level when it comes to programming. Our first option, then, starts with little-to-no programming required. Sites like www.wix.com allow you to build your website with zero programming whatsoever, allowing you to use graphical editing tools to design the look and feel of your website, as well as the data store on the back-end where possible. Many hosting providers offer tools of this type, and with varying degrees of complexity.
These solutions can be excellent if your site is relatively small or the data you are representing is non-complex, but ultimately these sites will all have issues when it comes to representing complex functionality. These applications are usually not designed to sit on top of a database, meaning that tying your application’s database to the interface will entail some custom code development. Additionally, depending on the service, the underlying source code of the front end pages may prove challenging to modify, making something like transitioning to Angular a challenge to achieve.
Freeing Up the Front End
Moving a level down, we encounter services that mask the back-end portions of the application behind an API. These tools allow you to focus entirely on front-end development, using Angular for the display of data obtained from a REST API provided by the service you select. Providers like Parse, Backand and Firebase offer this service, building off an existing data store to provide an access point to your data from any location or application.
If you are looking to exclusively develop the front end of the application yourself, and let another party handle the back end of your application entirely. However, you are also subject to the limitations of the provider that you select – depending on how the provider is structured their offering could be as simple as a REST API directly translated from your database, or they could allow custom component development. However, in most cases the front-end will be the only thing you are able to completely customize.
Providing the Full Stack
Achieving true customizability is often achieved by using a full-stack approach. This requires developing a back-end using an Object Relational Mapper (ORM) tool, like Rails. This gives you the most flexibility in manipulating the underlying data store, and while many frameworks offer tools to ease the development of front-end display pages, proper attention to developing a REST API allows you to use tools like AngularJS and Bootstrap to develop a consistent and modern display quickly.
The downsides to this approach are two-fold. First, and less obvious, is that you must have a development team that can develop the REST API according to interface desired for the existing data. This can be a process that can take weeks, if not months, to accomplish – and at the end you only have the back-end completed. The more obvious downside, though, is that you need to cover all of the infrastructure – hosting, scaling, security, and so on – entirely in-house. This can greatly increase implementation costs, as well as introduce a recurring cost for maintenance.
Merging the Approaches
One more option exists, and that is using a tool that can both integrate with your existing data – providing a REST API – and minimize back-end development while allowing for true customizability. One tool that allows for this approach is Django – it provides basic ORM capability, a ready-made administrative interface to your data, and the option to use either the built-in display functionality or use a REST back-end to drive an Angular front-end. The downside to this is the same as the full stack approach with some mitigation; your team will likely save on development time, but all of the hosting, security, and maintenance must still be done in-house.
Another option with this approach is a Backend-as-a-Service provider like Backand. Backand takes your existing database and generates a management front-end in minutes as opposed to weeks, and all of the back end components – scaling the database, securing access, and hosting the code – are managed externally. Backand also dynamically gives you an ORM and builds a REST API based on your data, providing you with an easy interface for the front-end of your application to work with. This approach allows for the lowest-cost solution with the best rate of productivity. While you sacrifice some back-end flexibility, a lot of this can be mitigated with the available tools for developing custom components.
To summarize, the choice of platform ultimately comes down to how complex you feel your application may be. If you’re willing to sacrifice nearly all flexibility so that you do not need to write any code for your project, a tool like Wix might be worth looking into. However, when looking at ways to apply Angular to presenting your data you’ll often have many options to select from. Your choice will depend on the discriminating factors in your development organization such as expertise with the platform, available budget for both development and infrastructure, existing functionality, knowledge of your team, and any number of other factors that can influence the choice of platform. Ultimately the best approach to take when developing a web application is the approach that best fits your organization’s needs.
Build your Angular app and connect it to any database with Backand today. – Get started now.