TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Is it bad to dislike using frameworks so much?

14 pointsby chromiumalmost 14 years ago
Hello HN,<p>I've been programming web applications since I was 13 years old. I love doing it, but lately, something's been bothering me. Up to this point, the entirety of my server-side programming has been done in PHP. I learned web development with basic PHP and MySQL, and now work as an entrepreneur in my own company, using that combination.<p>However, lately, I've been bored with PHP. Each time I make a website, I feel like I'm reinventing the wheel when I write new code for things like user authentification or account systems. I keep looking at Ruby on Rails tutorials, and salivating at the beautiful syntax and elegant, DRY expressions. I love the <i>idea</i> of using Rails, as a modern MVC framework that lets me get things done quicker and doesn't require me to re-invent the wheel.<p>The problem is, every time I start using frameworks like Rails, and create my first "Hello World" application, I am dissatisfied. It works- I can list, create, edit, and delete objects that I've specified in the code. However, it just doesn't feel right, because <i>I don't understand how the framework is doing it's thing</i>. What is being compiled into what when I run the app on the server? When Rails "magic" happens, what is really going on? If there's an error, how on earth will I know how to fix it?<p>-I feel like since I didn't code the framework from scratch, I can't use it because I don't truly understand how it works.-<p>Is this a justified sentiment, or am I just too used to working with PHP? Does anybody else feel this way?<p>Thanks for any answers you can give me, I really appreciate it.

10 comments

grovulentalmost 14 years ago
In every aspect of your life you are using tools that you don't understand or couldn't build yourself. So the question is - how far down the stack of life should you go? And as far as I've learnt in this life the answer always seems to be:<p>as far as you need to.<p>Which of course - is no answer at all. How far you need to go down the stack depends on what you're trying to achieve - the particular stack you're working on, the difficulty of acquiring the skills... and so on.<p>Perhaps your anxiety comes from the fact that when using a framework that you don't understand you don't know how to fix stuff when things go wrong - when your app needs to scale... etc. I guess you have to try to make an assessment of the risks you face in this respect. Perhaps do research on apps similar to yours and the technologies they used.<p>But in general - much of the comments I've read here on HN about scaling and whatnot seem to suggest that it's something that you can only learn to deal with by living through it since every application scales differently.<p>I don't know - I use Django and haven't faced these problems. I choose not to fret about what might happen because there is too much to worry about in the here and now.
评论 #2763071 未加载
lysolalmost 14 years ago
I think you should write a micro-framework. I feel the same way about ORM. It's completely irrational on my part because I'm extremely comfortable writing absurd numbers of joins using crazy criteria for my day-to-day at work, and have some cognitive dissonance because here I am, about to let a library do all the heavy lifting for me.<p>The end result is in order for me to accept ORMs I had to know the pattern. To know the pattern, I had to write a simple ORM layer on my own. It wasn't pretty, it wasn't as good as SQLAlchemy, by far, but it gave me enough insight to appreciate them, and to know when to use them. By all means, keep using CGI, but leave it to the small projects.<p>And yes, you're too used to PHP. Branch out, it's more fun.
评论 #2766367 未加载
评论 #2763126 未加载
damoncalialmost 14 years ago
It's not bad, but it will slow you down tremendously if you learn how every framework or library you use works. It's a psychological barrier - just as you (probably - I'm going on the odds here) don't really know how a processor works, you really don't <i>need</i> to know how a framework works.<p>By all means, dig around in the frameworks, but treat that activity like the hobby that it is.
Khaoalmost 14 years ago
As an example, would you drive a car if you didn't build it from scratch? What if you buy it and it <i>just works</i>?<p>This is the way I feel with frameworks. At first I always wanted to code everything myself but I couldn't achieve anything because it was too much work. Then I started making websites on top of a CMS (I used CMSMadeSimple but anything will do really). It could do everything I wanted and really quickly, and at some point if there was something that I couldn't do in the CMS or there was a bug, I could easily dig in the source code and fix it myself. Just like a car, you can pop the hood and play around with the stuff inside, but since it's already built and working you shouldn't have to play inside it too much.
MattBearmanalmost 14 years ago
I was like you, so I eased myself into it, ie:<p>Raw PHP -&#62; CodeIgniter (PHP) -&#62; CakePHP -&#62; Ruby on Rails<p>The reason this worked for me is that the CodeIngniter MVC Framework is so lightweight, well documented and well written that you CAN understand what's going on behind the scenes just be reading the source code.<p>In fact CodeIgniter is still my most used combination for web apps, CakePHP is a weapon of choice for bigger projects or when I want complex ACL and/or the kind of automatically linked MVC structure that Cake provides.<p>I'm still relatively n00b at RoR, but I suspect that will replace Cake in my arsenal once I'm better with it.<p>Hope this helps you.
sylvain_almost 14 years ago
I completely understand your desire to know how the 'magic' works. But the good thing with open source frameworks is that you just have to checkout the sources and see how things are working internally.<p>If it's too complicated at the beginning you can start by trying to develop your own micro framework to get more confidence with this and then retry understanding how the magic works.
isleyaardvarkalmost 14 years ago
Scale may be a factor. If you're working on a large web project, you're too busy implementing and taking advantage of what the framework has to offer. When you're just doing "Hello World", it's overkill. You wonder what's going on under the hood because there's not much else to look at at that size.
ippislalmost 14 years ago
There's a similar question in stack overflow <a href="http://stackoverflow.com/questions/203288/how-does-ruby-on-rails-work" rel="nofollow">http://stackoverflow.com/questions/203288/how-does-ruby-on-r...</a><p>The top answer give book recommendations and tools to understand rails.
clark-kentalmost 14 years ago
I think your answer will be to go deeper into the Ruby language. You will find out its not really magic, it's just the way Ruby's metaprogramming works. You will appreciate Rails more after mastering Ruby.
mericalmost 14 years ago
You can look at django instead, I heard it hides less details from the developer than rails.