Live data from Hacker News

“Don’t Reinvent the Wheel, Use a Framework” They All Say

mogosselin.com

1–10 of 94 posts

Re: “Don’t Reinvent the Wheel, Use a Framework” They All Say

#2
There seems to be this puritanical view that beginners should always learn a low-level language because it's good for the soul or something. Which is bollocks. To take the Java example because I'm more familiar with it, if I want to develop a simple Web application with a single form in Java, yes I absolutely do want to install Spring, Spring MVC and Hibernate. If I'm doing this to learn Java with a view towards using it in larger applications, it makes sense to learn the stack I'm going to use for those larger applications. If I'm writing the app for its own sake, those frameworks still let me code much faster, and in a less error-prone way, than if I were using raw servlets or something. And what's the cost? A few tens of megabytes of libraries on the server? Who the hell cares?

Re: “Don’t Reinvent the Wheel, Use a Framework” They All Say

#3
Yeah, while I support the Learn to Code movement, it is dismaying to see so much of it focused on frameworks, i.e. basically Ruby on Rails. It's a simple play for monetary desire, I know, so to tell a novice, "Well, if you get a strong understanding of Ruby and programming in general, learning Rails is pretty straightforward"...is just going to confuse and frustrate them because they've heard about how it's Rails that brings in the money, so why not skip the middleman (Ruby)?

Web frameworks consist of a lot of things besides pure programming. And these beginners barely understand programming...hell, they barely understand basic file systems that don't involve folder icons. And so all of this stuff...databases, MVC design, object-oriented concepts, dev ops, debugging...oh, and the entire world of front-end design...is thrown at them in such a way that there is no way they can decouple what are mostly orthogonal concepts.

It'd be fine if these beginners couldn't write a optimized SQL query in place of ActiveRecord...that'd be perfectly fine to work with. But I'm talking about a much deeper level of confusion. I once worked with a Rails self-learner and he wanted to throw up a single web page, with a sortable table that had a trivial number of rows (i.e. the data could all fit on one page without being cumbersome)...he could not, for the life of him, figure out how to do that in such a way that didn't involve creating a new Rails project and deploying it to Heroku.

It's not that I'm against teaching frameworks...it's just that for beginners, it seems like a very convoluted way to do so, and one that could be very unproductive in the end.

Re: “Don’t Reinvent the Wheel, Use a Framework” They All Say

#4
Most people starting without a framework are going to make a bunch of errors, which is OK up to the point where they are collecting cash for work which is broken or fragile. It's definitely not OK when their app contains other people's data and they are writing all kinds of security bugs they didn't even imagine possible.

Re: “Don’t Reinvent the Wheel, Use a Framework” They All Say

#6
Framework is a development platform which generally contains tools, libraries and architectures etc. So you can't say Wordpress is a development platform. Wordpress is just a CMS, nothing more.

> The problem is to always tell beginners (or let them think this is a good idea) to start with a framework / cms because “you shouldn’t reinvent the wheel”.

Learning a CMS and Framework are not same. Learning CMS is user stuff, but learning a framework is a developer stuff.

> When they should use a framework:

> When they need security features (login, session management, etc.). It’s often a bad idea for beginners (and even experts) to write code related to those areas and use it in a live application. But you still should know the language basics.

You can't provide security by learning a language basics. You should read books, articles about web security (independent to the language)

> 1. Customization can be difficult in complex code.

> Take for instance Liferay. Liferay is a big web development platform. If you want to start a membership site...

Your example is not a framework.

> 2. Debugging is usually more difficult when using frameworks.

> Frameworks are good at throwing unreadable meaningless errors.

Are you sure you have used a framework before ?

tl;dr Framework and CMS (or portal) are not same stuff.

Re: “Don’t Reinvent the Wheel, Use a Framework” They All Say

#7
Well, take what I say with a grain of salt since I cannot call myself a programmer, but you can’t mix it all. Take Flask, I mean, who the hell wants to do url routing? Flask does that for you. Take sqlalchemy, who the hell wants to create an orm? It’s nice to learn the basics, to understand python well and to understand web development foundamentals like “salted”/hashed passwords etc. But don’t tell me I should have started from an even lower level, at some point you have to throw some abstraction. Maybe a good idea would be to teach a micro and a macro framework and not just the macro? Or maybe at the end this is not such a problem anyway?

Re: “Don’t Reinvent the Wheel, Use a Framework” They All Say

#8
post #3

Yeah, while I support the Learn to Code movement, it is dismaying to see so much of it focused on frameworks, i.e. basically Ruby on Rails. It's a simple play for monetary desire, I know, so to tell a novice, "Well, if you get a strong understanding of Ruby and programming in general, learning Rails is pretty straightforward"...is just going to confuse and frustrate them because they've heard about how it's Rails tha…

As someone who is learning Ruby in order to get started in web development, would a DSL like Sinatra be a better place to begin instead of Rails?

Re: “Don’t Reinvent the Wheel, Use a Framework” They All Say

#9
post #7

Well, take what I say with a grain of salt since I cannot call myself a programmer, but you can’t mix it all. Take Flask, I mean, who the hell wants to do url routing? Flask does that for you. Take sqlalchemy, who the hell wants to create an orm? It’s nice to learn the basics, to understand python well and to understand web development foundamentals like “salted”/hashed passwords etc. But don’t tell me I should have…

Flask and SQLAlchemy were my first thought when reading this guy's take on "don't learn a framework". Very succinct, simple ways to take the drudgery out of building a backend.

This guy's article reminds me of the guy who did that "Programming is Terrible" talk on Youtube, where he was describing an anecdote about the fellow who decided he'd build everything from scratch because he'd understand it better. That's kind of dumb - programmers have spent the better part of the last 50 years solving hard problems to get to the point where we are now. Why do we have to rehash their hard problems when there are still tons more hard problems we could be applying ourselves to?

Re: “Don’t Reinvent the Wheel, Use a Framework” They All Say

#10
I disagree with this article, almost entirely for the list of reasons given right at the end of it.

Good development practices and project structure, generally good code examples, fewer bugs and tested code and re-using code are all very important things in any development, and frameworks all help with that.

If you are starting some of your very first web development, I'd encourage you to play around with some low level Node.js HTTP stuff, or even write a web server in another language, to get a feel for how the request/response model, HTTP header/body sections, etc, all work.

But after that basic introduction, dive into a framework and learn it well. The projects I know that were developed 'without a framework' are more often than not poorly structured, poorly documented, and difficult for new developers to learn their way around, precisely for the reasons given at the end of the article.

If you evaluate frameworks for your use-case, and realise there isn't one that suits you well, then by all means, go and make your own, but don't just make your application - make a framework for your application, and then use the framework, it will result it much better structure and better software engineering practice.

Post reply on HN