Comments (1)
Hi @apiraino,
In my opinion, the main problem when using a framework is inappropriate coupling. Every time that you let a framework make a decision for you, that decision is hardly reversible. Evolvability is a great asset when developing a complex application, but to evolve you need to make reversible choices.
Every framework will help you with some kind of problem, but the help comes with a tradeoff. And to understand what are the tradeoffs of technical decisions is one of the purposes of this movement.
So, when we use a framework because we accept the tradeoffs we try to stick with an approach that we call "Defend from frameworks". You can translate it with "using Frameworks responsibly". This example should make clear what I mean. This is a standard AngularJS controller.
app.factory(‘getUsers’,[‘$http’,function($http){
return $http.get(‘api/v1/users’);
});
app.controller(‘home’,[
‘$scope’,
‘getUsers’,
function(
$scope,
getUsers){
getUsers().then(function(response){
$scope.users = response.data;
});
}]);
As you can see we're using the standard $http
service to make XHR requests. Today we have the fetch
: a standard API to make XHR requests. The code will change like this. Using fetch the code will look like this:
users.js
export default function(){
return fetch(‘api/v1/users’).then(function (response) {
return response.json();
});
};
Controller
import getUsers from ‘./getUsers’;
app.controller(‘home’,[
‘$scope’,
function(
$scope){
getUsers().then(function(users){
$scope.users = users;
});
}]);
So as you can see I'm not using $http
here. Doing that I probably reduced the coupling between my business logic and the framework, making my application more evolvable.
This is what I mean when I say "using Frameworks responsibly". Use them when it's useful, but never forget tradeoffs.
from manifesto.
Related Issues (20)
- What Frameworkless is not? HOT 3
- Practical approaches to creating and scaling frameworkless applications HOT 6
- When do guidelines for a frameworkless approach become a framework? HOT 5
- Better name? HOT 3
- Why GPLv3 License. HOT 1
- about `lack of knowledge regarding technical debt` HOT 1
- How to sign the manifesto? HOT 3
- Visual Identity HOT 3
- what does "frameworkless" means for a designer? HOT 1
- "abuse of the use of frameworks" HOT 11
- "make deliberate tech decisions." HOT 3
- The meaning is not so clear in these passages HOT 7
- Mindful Decision HOT 4
- Link to Awesome Frameworkless? HOT 5
- Should I use raw web components? HOT 6
- English translations for Quest HOT 2
- Ui-editor - a tool that generates framework code HOT 1
- Frameworks increase technical debt the more they try to impose on your design HOT 3
- Best Practice Guidelines for Javascript Applications? HOT 2
- Google Drive link is broken
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from manifesto.