Live data from Hacker News

Frameworks are for hacks, libraries for seeds

sencjw.com

41–50 of 50 posts

Re: Frameworks are for hacks, libraries for seeds

#41
post #30

I wouldn't really trust a Haskell programmer to be able to identify a hack. There are a lot of platitudes here whirling around a central point: Frameworks are more restrictive than libraries. But, omgwtf, that's exactly the point of frameworks - they enforce convention in exchange for faster development. Also, newsflash, any large software project is going to have its own conventions. Okay, so, if you're still follow…

In my personal experience, with any non-trivial application with continued (read as multiple years) of development frameworks tend to get in the way (I want to do this, but the framework wants me to do that even though this is better for my use case).

Building your own "framework" from a good collection of libraries tends to not have this problem. Also, if it does have that problem (this library is getting in my way) you can usually more easily exchange the library for a different one.

Note that developers tend to disagree on the definition of framework. When I say framework i'm saying something like Rails or Django that is a big monolithic thing that your application is built upon.

Re: Frameworks are for hacks, libraries for seeds

#42
post #17
post #11

Earlier quoted context omitted.

You call a library, but a framework calls you. A framework IS the entry point to your application. If you use libraries you write your own entry point.

And there's exceptions to each case. I can see the distinction that people are trying to make here but it's far from a binary one.

[deleted]

Re: Frameworks are for hacks, libraries for seeds

#43

You never needed a framework until recently when you had to deal with the conceptually disjoint modern web and the pile of languages it takes to do anything reasonably complex. We never had to use frameworks when writing against Win32, Swing, iOS, Android, etc. Certainly, there were frameworks -- such as MFC. But they quickly fell out of favor because the structure they imposed wasn't helpful at all. (Way back when,…

Frameworks are not modern inventions.

If you work in a company with 10 different teams that all do different things and all need to develop different applications that work together, you need a framework.

If you want to leverage an existing fully-functioning suite of interoperable function abstractions to extend a small amount of custom behavior in a minimal amount of time, you need a framework.

This whole article is ridiculous because it's essentially comparing using an existing product to developing a new product, and calling the former a hack, and the latter some sort of higher art form.

Also, of course Win32, iOS and Android aren't a framework - they're platforms. You still have to build a framework for the platform. And Swing isn't a framework either, it's a toolkit; you use it to write software for a framework.

Re: Frameworks are for hacks, libraries for seeds

#44
post #17
post #11

Earlier quoted context omitted.

You call a library, but a framework calls you. A framework IS the entry point to your application. If you use libraries you write your own entry point.

And there's exceptions to each case. I can see the distinction that people are trying to make here but it's far from a binary one.

Yes, if a library is implemented in a language which supports closures, the difference between it and a framework starts to vanish.

Re: Frameworks are for hacks, libraries for seeds

#45
post #5

When you're using libraries, you're actually making your own custom framework. Because a framework is basically a set of libraries that work together to help you get to a certain goal. If there's already a framework that helps you get to a certain goal, it can save you a lot of work to use that existing framework instead of making your own. It can also save you a lot of security issues. But if your requirements don't…

>When you're using libraries, you're actually making your own custom framework.

Yeah. Back in the day we called that "writing a program".

Re: Frameworks are for hacks, libraries for seeds

#46
I’ve heard this argument over the years many times. It’s actually a hard discussion to have the more general the terms that are used. What exactly is a “Framework”? When does a library cross the boundary and become a Framework? What is the original author’s definition of “develop software”? That perspective matters here, because if what he’s saying is create a novel solution to a problem that hasn’t been solved before, that is a lot different from creating a webservice that inserts or retrieves some data from a database. Frameworks are essentially just a tool to get the job done. Some are better than others, and they come in all sizes. You really have to get specific to have a discussion like this that makes sense. If I tasked a Java developer with building a webservice that took some information and put in a database, I could reasonably expect them to use some implementation of jax-ws or jax-rs. If used properly those frame works are very powerful and convenient. Most implementations are well documented, and the communities around them are vast and experienced. Assuming the programmer was relatively experienced and had somehow never heard of either of those frameworks, I might expect some kind of servlet solution (arguably still a framework). Now if what the author is saying is that building a webservice isn’t development, that’s a different discussion. Many paths are heavily traveled. Using a Framework if you have to follow one of them is taking advantage of the knowledge gained by a large number of people that have already made the trip.

Re: Frameworks are for hacks, libraries for seeds

#47
post #10

Frameworks are also good in a long run. When a new member on the team starts to work on a project, it is much easier to pick up on some popular framework like Rails than your own one. First, because you can easily find a guy who worked with Rails framework and knows it inside out, unlike yours custom-written one. Second, the whole infrastructure, like regular updates, documentation and community is also a major facto…

Having worked professionally for several companies who had 8 to 10 year old proprietary code bases, I'm a big fan of using frameworks for web development.

If a company isn't going to use a framework, they had better architect and spec out their app with heavy documentation. I would argue this is more for the stability and future of the app and company than it is for ease of hiring purposes.

Without a spec or framework, you run the risk of ending up with various styles of code (often times some really terrible stuff) sprinkled throughout the codebase, constant arguments between devs (as there is no established standard within the code) and a mountain of "tech debt".

Re: Frameworks are for hacks, libraries for seeds

#48

It depends what you're developing. If you develop a product (startup) that will change the world, you spend a lot of time, you put your heart into this product, you should understand every line of code, so you develop a product not framework. If you create site by site every week or day for your clients, you need a framework.

Frameworks are great for startups. Before market fit, they make it easy to quickly build (and tear down) functionality. Afterwards, they make it easy to integrate new members into your team. At either stage, you don't want to spend your time reinventing the wheel or teaching the intricacies of your bespoke wheel to someone else.

Re: Frameworks are for hacks, libraries for seeds

#49
post #17
post #11

Earlier quoted context omitted.

You call a library, but a framework calls you. A framework IS the entry point to your application. If you use libraries you write your own entry point.

And there's exceptions to each case. I can see the distinction that people are trying to make here but it's far from a binary one.

Can you name some of these exceptions?

Re: Frameworks are for hacks, libraries for seeds

#50
post #17

Earlier quoted context omitted.

And there's exceptions to each case. I can see the distinction that people are trying to make here but it's far from a binary one.

Can you name some of these exceptions?

In Flask, you call the framework, then it calls you back etc. It is a minimal framework that you can use as a library along other "plugins" (which are libraries in fact) you like.
Post reply on HN