开发者

how do you learn a framework?

I am fairly new to the programming world . I work with web applications in Java . I am learning struts2 / hibernate / spring .

I am thinking , instead of reading hibernate from the tutorials , it's good to read the complete source code . Basically I am planning to learn the complete framework code , to understand how caching is implemented , how transactions are handled , how multiple threads are handled etc.

Have anyone of you done this kind of thing before ? My intention is , if we know one particular framework in and out , then it will be very helpful f开发者_开发百科or designing applications .


The best way is the simplest way: Build something! Start small, but treat it like an incremental, iterative exercise and add features that cover all the aspects of the framework you want to cover. Peruse as many books, blogs, and Stack Overflow entries as possible to learn more from people who've actually used the framework before and apply what you learn. It's the best way to learn a full stack framework!


You learn a framework and programming like you learn to do most anything else well: spend a lot of time on it. See this question and its answers and its duplicates. Keep reading, learning and experimenting. Start to build small projects. You're on the right track, keep at it.


Diving straight in framework code isn't a great starting point. Here is how you should progress:

  • Think of a project you'd like to work on related to the framework i.e. project idea
  • Failing to satisfy point 1, just follow the examples in the official documentation and try to get your hands wet with things
  • Help out folks on the IRC/forums since this would surely force you to dive deeper than the normal stuff
  • Look into bug reports and try to make sense of things. Can you understand the problem in consideration? If no, you might want to look into the "developers getting started guide" for that project.

But, I'd just like to point out that though knowing a framework inside out from a code view point might be a nice thing, it certainly isn't a requirement to effectively use a framework. That's the entire point of using a framework (apart from reinventing the wheel that is :>).


For beginning understanding on how a framework solves your problem, you often need an example that is much less than the fully featured framework. Since all of your examples cover web presentation to differing degrees, I suggest "Bitter Java" by Bruce Tate. It does an excellent example of presenting a very poorly written web application, and then reworking it to improve it. It will give you a good understanding of the MV2 architecture, on which most modern frameworks are based.

The frameworks are merely the "improved versions" made reusable by asking you to provide your "plug-in content components".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜