I think using a framework can help with the maintenance of the software. Let me use the one that is usually used as a negative example in hacker circles: Spring. Spring has a steep learning curve. Spring feels like too much magic. Spring makes simple things look complicated and hard to understand. Spring is large. On the other hand: I don't care about making extremely simple things more complicated. In the enterprise…
Using a framework will harm the maintenance of your software
311–320 of 550 posts
Re: Using a framework will harm the maintenance of your software
#312Earlier quoted context omitted.
If library is deprecated. You replace the library. If framework is deprecated. You give up the project or rewrite 'everything' to use another framework because essentially your project is build on it. That's the difference. If you make abstract to make it suitable to port to another framework. Then you are writing yet another framework on the top of a framework. In my opinion, it's even worse.
In my experience, I lack the talent for truly graphic swearing that would be required to adequately communicate just how much worse it is. Wrapping frameworks is like throwing water on a grease fire. Or maybe like someone else throwing water on the grease fire while you're standing inside the splash radius. The only way to win is not to play, but the best way to minimize the damage if you can't avoid it entirely is t…
They end up with code like
class Command
def initialize(a)
@a = a
end
def run
s = Service.new(@a)
s.do_something
s.do_something_else
end
end
Command.new("a").run
which is funny when I think that in Elixir I would write Command.run("a") and there isn't a good reason for using OO in this case, except that Ruby is very object oriented. Anyway, their code is quite separated from Rails except for the calls to ActiveRecord, but that could be ActiveRecord without Rails.Re: Using a framework will harm the maintenance of your software
#313Earlier quoted context omitted.
That maybe true but what happens when people, including yourself, switch teams? At some point we all wade through someone else’s mess. Hell, even your own mess revisited after a period of time is unpleasant. The more you can do to make your software predictable and boring the less unpleasant it will be for everyone.
I actually got to a point where I don't mind my own code. Even code I wrote years ago feels natural to me when I revisit it. And about the switching teams part. I much rather take over code that is written for our specific use cases than trying to wrap my head around some huge generic framework.
Re: Using a framework will harm the maintenance of your software
#314Earlier quoted context omitted.
I started using a framework for a task at work, was immediately tripped up by an obvious stupid bug in the config files, reported it and it was closed because "too many people already depend on this behaviour". So now I've in-sourced other companies legacy and taken on a huge liability in depending on the evolution of undefined number of other organisations and their code bases. And even worse when these frameworks a…
Build everything in-house or be beholden to some dude going backpacking is a false dichotomy. It'd be like saying I always make my own food from scratch — have you seen the state of the burger van down on the corner? You can't trust food made by others. All frameworks aren't created equal — as with any tooling, you choose something based on the features of the framework but also the longevity, reputation and ecosyste…
Re: Using a framework will harm the maintenance of your software
#315Earlier quoted context omitted.
> Not all software has an implied framework within it. Most Unix command-line utilities do not, for example, with only a few exceptions, and discounting the C standard library as something worthy of the label “framework”. The C standard library is exactly that though, a framework for writing UNIX command line tools :) (for anything else it's much less useful)
A library is not a framework. You can write framework-free apps while using libraries (in fact, most do - not wanting to be burdened with a framework doesn't mean you have to write all functionality yourself). A framework is either about inversion of control (it calls your code, e.g. you write web request controller logic, and it sets up the infrastructure for calling your controllers), and/or a set of ways to struct…
Ok, I'm throwing together the CRT and standard lib here, but in the end both are parts of the "UNIX command line tools framework" which is supposed to provide a programming environment to easily extend the UNIX shell with your own commands.
Re: Using a framework will harm the maintenance of your software
#316Earlier quoted context omitted.
Done Rails my entire career. It scales more than you think if you’re willing to throw some hardware at it and avoid turning your controllers and models into logic layer soup. What kills scaling is inexperienced developers doing what I just mentioned. Also, ActiveRecord is not your friend at scale. It’s wonderful in small amounts, but callbacks and memory overhead will kill you. You really need to learn SQL to avoid d…
To be fair, any framework scales if you throw hardware at it and stop using the slow bits.
Re: Using a framework will harm the maintenance of your software
#317It seems that there are mostly 2 types of devs: - those that use tools, learn them and master in them, - those that always want to create their own tools, and will usually oppose adopting and learning existing ones. I belong to the first type. I love frameworks because they give publicly available documentation that plenty of people contribute to - so my project will have access to all of it even if I'm gone. Another…
I belong to the second type. I believe it's a great asset to have in business. Most often less code means shorter development time and cheaper maintenance. People knowing a framework will often use it for everything. Instead looking at the problem and find the easiest solution to it offers great time to marked. I've proudly deleted more code than I've written at work.
Re: Using a framework will harm the maintenance of your software
#318Earlier quoted context omitted.
> Not all software has an implied framework within it. Most Unix command-line utilities do not, for example, with only a few exceptions, and discounting the C standard library as something worthy of the label “framework”. The C standard library is exactly that though, a framework for writing UNIX command line tools :) (for anything else it's much less useful)
> The C standard library is exactly that though, a framework for writing UNIX command line tools :) It doesn't fit the term as used in the article at all, though, in that it doesn't dictate the overall program's flow of control.
shell => CRT => main(argc, argv) => exit code => shell
(to me, the CRT and C standard lib are not strictly separate, although that's debatable of course)Re: Using a framework will harm the maintenance of your software
#319Without a framework whats the alternative? Roll your own everything...?
Re: Using a framework will harm the maintenance of your software
#320Write small, well tested services in the easiest to use framework you can find. If the service becomes hard to maintain then replace it. This should be a simple job guided by the tests.