3 ms·
Well first, angular is not so great, but that's only one framework. > once you go outside the stuff that comes with the framework, they start to hold you back
by robotkilla 12y ago
Well first, angular is not so great, but that's only one framework.
> once you go outside the stuff that comes with the framework, they start to hold you back more than they help you
If you're talking something like angular, you are correct. If you're talking about something such as Django, not so much.
> nightmare to go into someone else's poorly written framework code and try to maintain it
Try doing it with undocumented custom code.
> especially because frameworks have "magic" where functions are not explicitly invoked
It is your duty to read the source code when all else fails. If you start doing this you will also most likely start seeing a distinct difference between the acceleration of your career vs. your coworkers.
> Every time I've been maintaining someone else's framework code, the project was a mess
you have been working with or following behind poor developers. their custom code would most likely have been equally terrible and rife with bugs.
> I don't see how frameworks are so awesome if so many people use them incorrectly.
So are guns, drugs, genitalia and cars but people use that stuff wrong all the time.
Frameworks are nice for these reasons:
1. they can help you learn how to build your own frameworks
2. they are typically documented (hopefully well-so)
3. the fact that you can identify which mistakes your coworkers made quickly ("oh, they should have used this class, function or file structure because it says so in the docs", vs trying to track down the original dev or read through mountains of source code to figure out what some undocumented thing does).
Edit: i wish i would get told why i'm getting down voted on this rather than just down voted for an unknown reason. Is it the snarky remark that contains the word "genitalia"?
- fsk 12y ago>It is your duty to read the source code when all else fails. Wait? I have to read the source to use a framework? Which is it? Frameworks are awesome because they are well-documented? Frameworks are awesome because you can read the source when you're fighting some obscure bug? The problem with reading the framework source is that, the bits of the framework being used are usually only 1%-5%, so now I'm digging through some mountain to find the tiny bit I'm looking for. If I have a problem with GCC or PHP, I don't (normally) have to read the GCC source or PHP source. Why should I have to read the framework source in order to find out how it works?
- robotkilla 12y ago> Wait? I have to read the source to use a framework? Which is it? Frameworks are awesome because they are well-documented? Frameworks are awesome because you can read the source when you're fighting some obscure bug? Well, I said "when all else fails". If for some reason you are unable to find the answer to the issue you face within the documentation, then as a developer you have to dive into the source code. > now I'm digging through some mountain to find the tiny bit I'm looking for What is the reverse case? Why is custom code different? > If I have a problem with GCC or PHP, I don't (normally) have to read the GCC source or PHP source. Why should I have to read the framework source in order to find out how it works? Correct, but if you have a problem with a PHP website, you typically do open up the website's PHP source code and read it. I don't understand how custom code solves the problem of needing to read source code.
- fsk 12y agoWith custom code, there usually is just enough code to solve the specific problem. With a framework, there's also the code that comes with the framework that this project doesn't use. The framework is a super-generalized solution, and it comes with a lot of code my use case doesn't need, which makes it a lot harder if I need to trace through the framework to find the problem. My boss wants the bug fixed in a couple hours. I can't spend a couple weeks reading the framework source so I can fix the bug. (For the zend form example, I wound up writing my own form instead of reusing what was already there.) If I have a problem with a website written in PHP, I read the PHP source and can fix the problem. If I have a problem with a website written in PHP plus a framework, now I'm expected to read the PHP code PLUS the code for the framework? That's several orders of magnitude more work.
- robotkilla 12y ago> My boss wants the bug fixed in a couple hours. I can't spend a couple weeks reading the framework source so I can fix the bug. Perhaps you feel I am saying that you must exhaustively read the framework's source code to understand it. I am not. You should have the ability to quickly open up your framework of choice's source code, navigate to the portion that contains the relevant bit of info you need and go from there. "going from there" sometimes entails referencing a few base classes or figuring out what the result of some custom methods or functions do. It shouldn't require understanding every line of code of the framework. > now I'm expected to read the PHP code PLUS the code for the framework? Only if the framework's documentation or the internet fail to answer your question faster, yes.