Java EE 后端有哪些前端技术

发布于 2024-11-05 01:42:48 字数 105 浏览 4 评论 0原文

Web 开发中有如此多的语言,有时我会很困惑该学习和开始使用哪一种。我喜欢 Java,但不喜欢 JSP 进行演示,有没有最适合 Java/Java EE 后端进行 Web 应用程序开发的前端技术?

There are so many languages in web development that sometime I get confused which one to learn and start with. I like Java, but dont like JSP for presentation, are there any front-end technologies that best suits with Java/Java EE backend for web application development?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

蓝眼泪 2024-11-12 01:42:48

最近的 JavaEE 版本中推广的 Web 层技术是 JSF。它的视图使用facelets 而不是JSP。

不过,带有 JSTL 的 JSP 相当不错,我不认为有理由放弃它。您可以将它与任何 Web 框架一起使用,例如 spring-mvc、struts 或其他具有不同渲染技术的框架(例如 GWT、Vaadin、Wicket 等)。

The web-layer technology that is promoted in recent JavaEE versions is JSF. It uses facelets instead of JSP for its views.

JSP with JSTL is pretty fine though, I don't see a reason to drop it. You can use it with any web framework, like spring-mvc, struts, or other frameworks with different rendering technologies like GWT, Vaadin, Wicket, etc.

腻橙味 2024-11-12 01:42:48

对于大多数事情,这取决于您的项目需要什么。以下是您可能会发现有用的两种强大的网络技术。

Vaadin(前端和后端集成为纯 Java)

对于丰富的 AJAX 密集型应用程序 Vaadin 非常适合。

优点:
- UI组件和后端bean之间复杂交互的快速开发
- 纯Java解决方案,无需担心创建标记或维护大量javascript文件
- 良好的文档
- 许多开箱即用且通过开源社区提供的强大组件

缺点:
- 理解各个组件可能需要一个陡峭的学习曲线
- 扩展/更改某些功能(例如 UI 表如何从数据源检索数据)可能非常困难
- 如果您的应用程序需要高度可扩展,请记住此框架是有状态的
- 处理浏览器上的后退按钮和动态 URL 是额外的工作

Spring MVC(前端是 JSP 或 HTML,后端是 Spring MVC)

如果您想保持完全控制和可扩展性,带或不带 JSP 的 Spring MVC 都是你最好的选择。这是一个很好的hello world,并且该网站上提供了更多 spring mvc 教程。

优点:

  • 主要依赖于开放标准
  • 高度可扩展
  • 有助于在代码中实施适当的 MVC
  • RESTful 框架,使开发人员能够轻松处理动态 URL 并单独处理 GET/POST
  • 通过创建 HTML/CSS/JS 保留完全控制

    <块引用>

    注意:对于 HTML/CSS/JS 解决方案,我建议从 Zurb FoundationTwitter Bootstrap 之类的东西开始。与从头开始相比,这将节省大量时间。下载最新版本并将其导入到您的 webapp 文件夹中,以快速提升您的项目。

Disadvantages:
- Managing AJAX calls can become challenging on large applications
- A more indepth knowledge of HTML/CSS/JS will be required (compared to Vaadin)

With most things it depends on what your project requires. Here are two powerful web techologies you may find useful.

Vaadin (Front and backend integrated as pure Java)

For rich, AJAX heavy applications Vaadin can be a great fit.

Advantages:
- Rapid development for complex interaction between UI components and backend beans
- Pure Java solution, no need to worry about creating markup or maintaining massive javascript files
- Good documentation
- Many powerful components out of the box and through the open source community

Disadvantages:
- There can be a steep learning curve to understand the various components
- Extending/changing some features (such as how a UI table retrieves data from a data source) can be very difficult
- If your application needs to be highly scalable, keep in mind this framework is stateful
- Handling back button on browser and dynamic URLs is extra work

Spring MVC (Front is JSP or HTML, backend is Spring MVC)

If you want to maintain total control and scalability, Spring MVC with or without JSP is your best bet. Here's a good hello world and more spring mvc tutorials are available on that site.

Advantages:

  • Relies primarily on open standards
  • Highly scalable
  • Helps enforce proper MVC in your code
  • RESTful framework, allows the developer to easily handle dynamic URLS and GET/POST separately
  • Retain total control by creating the HTML/CSS/JS

    Note: For a HTML/CSS/JS solution, I recommend starting with something like Zurb Foundation or Twitter Bootstrap. It will save a lot of time compared to starting from scratch. Download the latest and import it into your webapp folder to get a quick boost on your project.

Disadvantages:
- Managing AJAX calls can become challenging on large applications
- A more indepth knowledge of HTML/CSS/JS will be required (compared to Vaadin)

清旖 2024-11-12 01:42:48

我认为 Spring MVC 与 ExtJS 是最好的选择,因为 ExtJS MVC 确实使代码可读且易于管理。同样,Spring MVC 的 IC 也将使开发人员的生活变得更轻松。我建议研究一下 Play 框架。 Play for java 很好,但如果你想深入挖掘,那么显然它会给你带来困难,因为它主要是为 Scala 开发的。

I think Spring MVC with ExtJS is the best option as ExtJS MVC really make the code readable and easy to manage. Similarly, IC of spring MVC will also make life easier for developer. I would recommend to look into Play framework. Play for java is good but if you want to dig more then obviously it will give you hard time as it mainly developed for Scala.

纵情客 2024-11-12 01:42:48

根据您要编写的前端类型,有多种选择。如果您能接受款式和型号,可以看看SmartGWT。如果您想要更像 GMail 的体验,普通的 GWT 2.2 就相当不错了。

Depending of the front end type you want to write, there are several options. If you can accept the style and model, have a look at SmartGWT. if you want a more GMail-like experience plain GWT 2.2 is pretty nice.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文