• <bdo id='zNrx8'></bdo><ul id='zNrx8'></ul>

    <legend id='zNrx8'><style id='zNrx8'><dir id='zNrx8'><q id='zNrx8'></q></dir></style></legend>

      1. <tfoot id='zNrx8'></tfoot>
        <i id='zNrx8'><tr id='zNrx8'><dt id='zNrx8'><q id='zNrx8'><span id='zNrx8'><b id='zNrx8'><form id='zNrx8'><ins id='zNrx8'></ins><ul id='zNrx8'></ul><sub id='zNrx8'></sub></form><legend id='zNrx8'></legend><bdo id='zNrx8'><pre id='zNrx8'><center id='zNrx8'></center></pre></bdo></b><th id='zNrx8'></th></span></q></dt></tr></i><div id='zNrx8'><tfoot id='zNrx8'></tfoot><dl id='zNrx8'><fieldset id='zNrx8'></fieldset></dl></div>
      2. <small id='zNrx8'></small><noframes id='zNrx8'>

        用于 Web 的 Java 开发

        时间:2023-09-25
      3. <small id='af1fm'></small><noframes id='af1fm'>

          <bdo id='af1fm'></bdo><ul id='af1fm'></ul>
            <tfoot id='af1fm'></tfoot>
            <i id='af1fm'><tr id='af1fm'><dt id='af1fm'><q id='af1fm'><span id='af1fm'><b id='af1fm'><form id='af1fm'><ins id='af1fm'></ins><ul id='af1fm'></ul><sub id='af1fm'></sub></form><legend id='af1fm'></legend><bdo id='af1fm'><pre id='af1fm'><center id='af1fm'></center></pre></bdo></b><th id='af1fm'></th></span></q></dt></tr></i><div id='af1fm'><tfoot id='af1fm'></tfoot><dl id='af1fm'><fieldset id='af1fm'></fieldset></dl></div>

              <tbody id='af1fm'></tbody>

                  <legend id='af1fm'><style id='af1fm'><dir id='af1fm'><q id='af1fm'></q></dir></style></legend>
                  本文介绍了用于 Web 的 Java 开发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我希望开始使用 Java 进行 Web 开发 - 我有一些基本的 Java 知识,所以这不是问题,但是在破译用于 Web 应用程序的各种技术时,我不知所措.

                  I'm looking to start developing for the web using Java - I have some basic Java knowledge, so that's not a problem, but I'm at a loss when it comes to deciphering the various technologies for use in web applications.

                  我有哪些选择?它们是如何工作的?是否有任何类似于 Django/Ruby on Rails 的框架可以用来简化事情?

                  What options are available to me? How do they work? Are there any frameworks similar to Django/Ruby on Rails which I could use to simplify things?

                  任何有助于理解可用内容的链接将不胜感激.

                  Any links which could help with understanding what's available would be much appreciated.

                  推荐答案

                  Java 框架有两种基本风格.一个称为动作"框架,另一个称为组件"框架.

                  Java frameworks come in two basic flavors. One is called the "Action" Framework, the other the "Component" Framework.

                  动作框架专门用于将 HTTP 请求映射到 Java 代码(动作),并将 HTTP 请求绑定到 Java 对象.Servlet 是 Action Framework 中最基本的,也是所有其他框架的基础.

                  Action frameworks specialize on mapping HTTP requests to Java code (actions), and binding HTTP Requests to Java objects. Servlets is the most basic of the Action Frameworks, and is the basic upon all of the others are built.

                  Struts 是最流行的 Action 框架,但我不能凭良心向任何人推荐它.Struts 2 和 Stripes 更现代,并且彼此非常相似.两者的配置都很简单,开箱即用,易于使用,提供了非常好的绑定功能.

                  Struts is the most popular Action framework, but I can't in good conscience recommend it to anyone. Struts 2 and Stripes are more modern, and very similar to each other. Both are light on the configuration and easy to use out of the box, providing very good binding functionality.

                  组件框架专注于 UI,并倾向于促进基于高级 UI 组件(按钮、列表框等)的更多事件驱动架构.这些框架倾向于将来自编码器的实际 HTTP 请求隐藏在几个层下.它们使开发更高级的 UI 变得更加容易..NET 是 Windows 的组件框架.在 Java 上,流行的组件框架是 JSF(一种标准)和 Wicket.

                  Component Frameworks focus on the UI and tend to promote a more event driven architecture based on high level UI components (buttons, list boxes, etc.). The frameworks tend to hide that actual HTTP request from the coder under several layers. They make developing the more advanced UIs much easier. .NET is a component framework for Windows. On Java, the popular component frameworks are JSF (a standard) and Wicket.

                  通常,如果您要创建网站".这更类似于呈现信息(如博客或社区网站),Action 框架工作得更好.这些网站往往更简单,经常被添加书签,需要漂亮的 URL"等.这通常使用 Action 框架更容易做到.

                  As a rule, if you're creating a "web site". that is something more akin to presenting information (like a blog, or a community site), the Action frameworks work better. These sites tend to be simpler, get bookmarked often, require "pretty URLs" etc. This is generally easier to do with an Action framework.

                  组件框架更适合诸如具有大量 UI 元素和复杂工作流程的后台应用程序.您会发现,尤其是使用工具,这些风格的应用程序将使用组件框架更快地组合在一起.但是组件框架有更复杂的请求工作流程,有时依赖隐藏状态、大量的 POST 操作等.很多都有可怕"的 URL,有时会创建难以添加书签的页面.

                  Component frameworks are much better for things like back office applications with lots of UI elements and complicated workflows. You'll find, particularly with tooling, that these style of apps will go together faster using a component framework. But component frameworks have more complicated request workflow, sometimes relying on hidden state, lots of POST actions, etc. Many have "horrible" URLs, and sometimes create pages that are difficult to bookmark.

                  这两个框架都可以用于这两个任务,只是有些框架比其他框架更适合该任务.

                  Both frameworks can be used for both tasks, just some are more suited to the task than others.

                  这些框架都没有直接解决持久性问题,但许多框架具有与 JPA/EJB3 或 Hibernate 紧密配合的扩展模块或惯用语.

                  None of these frameworks directly address persistence, but many have extension modules or idioms that work tightly with JPA/EJB3 or Hibernate.

                  这篇关于用于 Web 的 Java 开发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:你在 Scala/Lift 中开发的经验是什么? 下一篇:你觉得 java.util.logging 足够了吗?

                  相关文章

                  1. <small id='Bl8rF'></small><noframes id='Bl8rF'>

                    <i id='Bl8rF'><tr id='Bl8rF'><dt id='Bl8rF'><q id='Bl8rF'><span id='Bl8rF'><b id='Bl8rF'><form id='Bl8rF'><ins id='Bl8rF'></ins><ul id='Bl8rF'></ul><sub id='Bl8rF'></sub></form><legend id='Bl8rF'></legend><bdo id='Bl8rF'><pre id='Bl8rF'><center id='Bl8rF'></center></pre></bdo></b><th id='Bl8rF'></th></span></q></dt></tr></i><div id='Bl8rF'><tfoot id='Bl8rF'></tfoot><dl id='Bl8rF'><fieldset id='Bl8rF'></fieldset></dl></div>

                    <legend id='Bl8rF'><style id='Bl8rF'><dir id='Bl8rF'><q id='Bl8rF'></q></dir></style></legend>
                      <bdo id='Bl8rF'></bdo><ul id='Bl8rF'></ul>
                  2. <tfoot id='Bl8rF'></tfoot>