When starting a programming project, it’s important to consider whether the framework you’re going to use can provide all the necessary functionality to develop your software requirements. Below are some elements you should consider to make the best decision.
We can consider the choice of our framework based on certain external and internal factors that can give us a better idea.
1. Internal factors
We will consider internal factors to be all those that determine the programming method of our software system. The internal factors considered are:
| Factor | Description |
|---|---|
| Knowledge or experience | Have you considered how much you know about frameworks or testing? About programming languages? Or even object-orientation? |
| The maturity of the framework | Is it constantly maintained and updated? Does it quickly meet technical needs? |
| Tools developed | It's not so essential if you have good overall experience. Here we'll consider: Are there good linters? Does the IDE or editor have auto-completion support? |
| Dependency Manager | It's an extremely valuable asset when considering whether or not to use a framework. If you don't have a dependency manager that integrates with your framework, integrating dependencies can be costly in terms of time and effort. |
| Language speed and runtime environment | If you think your website requires a lot of processing, this is a good factor to consider. However, the functionality and maturity that a language or framework can offer you outweighs speed. |
1.1. Knowledge or experience
Without a doubt, this is the most important factor of all. Knowledge or experience in tools, styles, methodologies, and techniques defines the maintainability of programming and completely determines whether or not it is necessary to use frameworks to build your system.
In experience, it’s worth noting that frameworks are governed by architectural development models or patterns to achieve long-term, maintainable and scalable developments. If you understand the model on which it is built, you will also better understand the use of the frameworks that run it, which differ only in configuration details and the language or runtime environment.
1.2. The maturity of the framework
It’s important to check if the framework is constantly being improved. If it’s proprietary, they usually offer more consulting and support than you’d like.
If, on the other hand, the framework is free, you should consider constantly updating it and scaling it based on Long-Term Support (LTS) versions of your framework to keep up with the support and issues that the framework community can offer. On the other hand, some free frameworks also offer the option of paying for development consulting.
1.3. Tools developed
This isn’t a big issue to consider if you’re using proprietary frameworks, since tool support is usually very active, with fairly short response times and easy resolution.
On the other hand, if the framework is free, you should consider the tools surrounding the framework, not just the framework itself, such as:
- Linters: These are tools that help detect code smell, or code that generally corresponds to serious problems in the system. They also help us detect good programming practices.
- Documentation: Some frameworks lack adequate documentation to accomplish what you want to do, so you need to rely on the community around the tool to verify if it has been developed in a way that addresses your limitation.
- The IDE: This is the most interactive tool for developers and can offer quite useful tools, such as generating constructors, accessors, and mutators, code autocompletion, and even dependency management and execution environments for your code. Again, if your framework is proprietary, the IDE will automate many of these tasks. If, on the other hand, your framework is open source, you may not have these tools, or they may be difficult to configure. However, this isn’t essential to accomplish what you need, but it can save you a lot of time. I’ll give you an example: you have a list of any class, and you want to add an object to this list, but you don’t know how to do it in the particular language. The first thing that might come to mind is typing
.addand letting autocompletion show the alternatives and parameters needed for this function, saving you time on queries without interrupting the development process you’re doing. - Type validators: Development languages like Python, JavaScript, and PHP are dynamically typed, where the interpreter or compiler deduces the data type based on the assigned value, which increases the languages’ execution time. To keep your code more organized, there are statically typed code validators like mypy or type declarations to enforce type validation in functions.
1.4. El gestor de dependencias
This is one of the most important variables to consider when choosing your framework. The dependency manager may be the most important choice, since your system will be heavily coupled with this tool. To this end, I’ll provide several examples that illustrate the differences between dependency managers across frameworks, or even between languages:
In Python, for example, we have pip, which is limited to the following actions:
- Install the dependency in your virtual environment
- Place the dependencies in a file where each dependency has the format
<dependency>=<version> - Learn the necessary pip commands to automatically install or update dependencies in your virtual environment.
In Java, complexity can increase. If we use Maven as a dependency management tool, it focuses on the pom.xml file, whose structure changes drastically compared to Pip. Writing commands in an XML structure makes the commands for configuring dependencies more comprehensive.
In C++, we have cmake, where there are different ways to obtain dependencies, which must be compiled first. The compilation method defines the linking and installation of the software, among many other details to consider, as they can affect system performance. Therefore, dependency management in this language takes a significant amount of time to configure. Not to mention that in C, we must rely exclusively on Make, where dependency linking is generally done by specifying .o and .a compiled versions.
1.5. Language speed and runtime environment
Lenguajes como Java o Python son lenguajes lentos en ejecución, sin embargo, proveen una gran funcionalidad o poder de expresividad para lograr las funcionalidades necesarias para desarrollar nuestro sistema. Por otra parte, lenguajes como javascript, php, c++ y c son lenguajes de ejecución rápida, unos más rápidos que otros. El caso de php ha sido interesante, hasta la versión 5, la ejecución ha sido lenta, sin embargo, la ejecución ha mejorado mucho respecto a la versión 7 en adelante.
Así mismo, es necesario conocer elementos como los entornos de ejecución y los requerimientos necesarios para correr tu aplicación. Verifica los entornos que requiere tu framework para correr, como nodejs, servidores como nginx, apache, jboss, wildfly entre otros. Dependiendo de las versiones de los entornos pueden aumentar considerablemente la ejecución de instrucciones y, en el contexto de los frameworks, si no son instrucciones muy complejas, puede que el framework no te permita ejecutar estad funciones rápidamente.
2. External factors
Now we’ll talk about the external factors in software development using frameworks. Below, we’ll see a table summarizing the internal factors.
| Factor | Description |
|---|---|
| Host | If you're developing web services, does the host offer the speed necessary to support your system? If your target audience isn't in your country, will they have a suitable experience using your product? Is it a shared or dedicated host? Does it allow you to configure the necessary settings? |
| Your hardware resources | If you're working with other types of applications that don't require a host, evaluate the resources you have available, if necessary, and whether they're compatible with your development and whether the framework can run comfortably. |
| The learning curve | If you're just starting out in programming, the learning curve can be a determining factor in the development of your project. |
| Speed of development | Do you need rapid application development, focusing exclusively on business logic? Or do you have enough time to learn how frameworks work from scratch? |
2.1. Host
Is the host important when considering a framework? What are you talking about?
Yes, indeed, host characteristics can make it difficult to run frameworks, especially if you use ones with such extensive and mature functionality as Springboot. In Java, RAM management isn’t a very well-utilized component.
Your system may run on your PC without any noticeable slowdowns because it has a PC and operating system optimized for development. However, your host may not allocate the same resources and features to scale your development, so it’s advisable to consider these factors before deciding whether to use a framework.
2.2. Your hardware resources
This is linked to the previous subsection. However, this is for developments that don’t require configuration on a host, such as desktop applications or video games.
Using different frameworks to develop these applications can result in significant processing delays. For example, using GTK or wxWidgets, which are classic desktop-native window management libraries, is not the same as using Electron, which consumes significant resources. Therefore, it is necessary to analyze the possibilities available for developing these applications.
2.3. The learning curve
This can be a significant factor if you’re just starting to explore this world. This is mainly due to a lack of understanding of basic concepts, such as how to make the most of the paradigm you’re using, especially if it’s object-oriented, so you know how to leverage elements such as inheritance, polymorphism, function overloading, operator overloading, lambda functions, and others.
Then, it’s necessary to understand how certain design patterns and architectural styles work, such as the model-view-controller style, which is the most popular for building web development frameworks, and to understand what the components that contain these tools refer to.
2.4. The speed of development
Development speed is influenced by several factors that we could consider when defining the speed at which features are generated. Below are some factors that influence development speed, in addition to those mentioned above:
- The type of language: There are significant differences between programming languages, including whether they are compiled or interpreted. Go is one of these compiled languages, which requires time to transform a high-level language into binary code in order to increase execution speed. On the other hand, languages like Python, JavaScript, and PHP are interpreted languages, which allow for faster testing, but with a decrease in execution speed.
- The expressiveness of the language: Python, for example, is a very expressive language. It allows complex operations such as loops and callables to be performed in a few lines of development, complying with defensive programming recommendations and facilitating unit testing during development. Languages like C++, with its new standards and the Boost library integrated into its new standards, and Java, with its new versions from 7 onward, allow for greater expressiveness with lambda functions and iterators.
- Language typing: Languages such as Python, Javascript and PHP do not have strong typing, or the interpreter itself deduces the data type of the assigned variables, which reduces execution time by assigning this function to the interpreter.
These details are essential when considering using a framework, as they determine whether your applications can be developed quickly.
3. Conclusions
Many factors need to be considered when deciding whether to use a framework or not. Frameworks reuse software architectural design patterns to reduce development complexity, allowing companies or individuals to focus exclusively on developing the necessary business logic.
In this post, we explore whether a framework is necessary or not. Regarding which framework to use, it’s even necessary to consider more elements to make an informed decision.
If, on the other hand, you’re not interested in delving into a framework and would like to develop one, let us know in the comments.
If you liked the content and would like to stay up to date with our posts, subscribe to the social media channels we manage in the footer. Also, if you think we’ve omitted something or would like us to delve deeper into a specific topic, please let us know in the comments.