That's how I find myself conducting my own personal development. The deeper I dive into Ruby, the more I find myself able to hold my own in conversation with my friend the graybeard C++ guy whose been doing it longer than I've been alive. He'll describe something he's trying to do and I'll be able to immediately find an analogue in Ruby. I'll get a sense for how Ruby exists in the general evolution of programming languages and what it tries to solve. The experience makes me more aware of the problems that Ruby tries to solve so that I can use it better.
I see a lot of people who know three or four languages, but don't understand any of them really well or the underlying concepts. Or they'll focus over-heavily on the algorithmic side of the craft and neglect maintainability and readability. I see a lot of Ruby that looks like C.
When I finally do start branching out and learning new languages, it will be on a totally different level. I'll be diving into the entire ecosystem of the language and not just struggling at the surface.
But before that, I want to learn how Rails really works. I think I understand the difference between a library and an application, now I want to understand what a framework is and how one is built and maintained.
I'll short-circuit that one for you right now: you call a library, a framework calls you - it figures out how by some combination of convention and configuration. Libraries put you in control, frameworks make you cede control. You can usually mix and match libraries, whereas you can only use one framework at a time comfortably.
So is jQuery a library or a framework? I've seen it called, and used, both ways. It's not a hard and fast definition, and that's what I mean by "really understanding" something. I want the things I build to be able to be used in any way that it would be useful. It's the fractal landscape at the boundary between the definitions that I'm interested in.
I find myself refactoring code a lot, pulling pieces out and putting them elsewhere. Sometimes I think, "this piece would be better as a gem", or that "this gem needs to be its own application.
When I think about the overall thrust of what I'm doing, I get the sense that I'm building a framework. I need to be able to work web applications into the framework, and the only framework worth really using in this fashion is Rails. But Rails isn't intended to be included as you would a library. I need to understand it better if I'm going to be able to work it into my own framework.
Library - a collection of useful things.
Framework - a collection of things, and a methodology, used to structure your application.
In general, a lot of new, modern frameworks do 'call you' (Inversion of Control). Exmaple: Most PHP frameworks are setup so that you put all your models in one folder, your routes in another, etc. Then the framework itself accepts requests and determines which parts of your code to pass it through, and in what order.
However, you can also have frameworks that don't do IoC. You setup the framework, tell it what to do, tell it how to do it. But you still structure your code around that specific framework's methodology (which is why it's hard to mix 'n' match).
jQuery is an odd thing, because it's not really either of these. It provides lots of useful functions, but it also does so in a way that it replaces a lot of the 'core language features', and causes you to use it across most of your code.
However, I'd still say it's a library (with a very nice syntax) - since it doesn't tell you 'this is how you structure your application'. You can use jQuery how ever you like, and it imposes almost no constraints. Therefore it's not a framework.
I believe that jQuery is neither - it's a collection of tools to assist with programming webpages in whichever paradigm is appropriate for that particular task.
This approach gives the advantage of ceding ultimate control back to the programmer, at the cost of some internal inconsistency.
That's an interesting view. I can't think of jQuery as a tool. I have a collection of tools I use, I find a tool to be quite different from an application, a library, or a framework. Sublime Text is one of my tools. So is git. I also consider Ruby a tool. My laptop is a tool. I have some git-x commands that I've been slowly building on that I use collectively as a tool.
To me a tool is an extension of one's mind or body that goes into all projects that you work on. I can give away an application or a library. I can't give away a tool, or at least, it wouldn't really make sense to. I want to use all my tools to build a project, all my projects to use the same tools. That's why I stick to Ruby rather than bouncing around. I use Coffeescript/jQuery on web projects but I consider it a kludge, though not as much of a kludge as using Opal would be. I'd want Ruby integrated tightly into the browser before I'd prefer it over Javascript. I don't mind Coffeescript because I find that if you stick to a certain convention, Coffeescript is as easy to maintain as Javascript and I prefer the terser syntax.
My ultimate goal would be to be able to hack on all my tools like I hack applications. For example, I'd love to be able to replace Sublime Text with redcar, an editor written in Ruby, I've taken baby steps in that direction with my git scripts. I haven't decided if it would be better to write my own editor though. I'm probably at least a few years from that being able to integrate that into my workflow.
I see a lot of people who know three or four languages, but don't understand any of them really well or the underlying concepts. Or they'll focus over-heavily on the algorithmic side of the craft and neglect maintainability and readability. I see a lot of Ruby that looks like C.
When I finally do start branching out and learning new languages, it will be on a totally different level. I'll be diving into the entire ecosystem of the language and not just struggling at the surface.
But before that, I want to learn how Rails really works. I think I understand the difference between a library and an application, now I want to understand what a framework is and how one is built and maintained.