1. How to learn a framework fast?
2. To learn a framework, you should grasp the “key” issues. But how to know what is a key issue?
Those two questions are pinned in my head somehow.
Not long ago, I’m investigating MVC model in Spring Framework 3.0. Most of the concept is fine, but I have problems doing the work with Spring 3 annotation config. It just seems all the book out there mention about Spring 2.x syntax, which is “xml configuration”. It’s easy to understand because that Spring 3 just appear and it will take a relative time to make a book available. So my habit about following book guides was discarded aside. I must try to find another source.
According the advice of my seniors, I go to the Spring document & find most of the thing is already here. Enough details, though a bit complex to a not-quite-familiar-with-java coder. I struggle with those concept a bit. But by comparing the document to several examples, finally I got some “working things”, which is great.
But here comes the most complicated part: integrating between frameworks. In one of my projects, I should use Spring combined with Freemarker. I investigate, and luckily enough, find this page which tell me how to use Freemarker macro to perform bindings (it’s not an easy luck).
But WTH, I can’t find a way to use the formCheckboxes! I found no working sample, and I’m not alone.
Dozens people out there can’t find a way to use that macro.
And the solution?
Well, I write my own macros.
It took me quite a time before I relize that simple solution, and curse how stupid I am. Since the end results of freemarker is HTML, who cares if it was rendered by supported macro or customed macro?
When you know what actually happens inside that big system, the answer seems to be natural.
Still remember 2 questions at the beginning of this post?
I must says the truth, that I don’t know the best answer. But I have something that seems to work:
The solution depends on the needs. If you just use the surface of the libraries API as the common “players”, some popular tutorials might be enough. Parsing XML maybe a good example for this issue. With the same reason, I think with beginner, Grails (instead of Spring) is a good start, cause it requires little work to make a full-fledge simple application.
If you want to create a customized & not-so-popular web application, it requires more tons of work. And a solid background is preferable.