使用 Java EE 设计模式的示例 Java EE 项目

发布于 2024-08-11 18:17:11 字数 262 浏览 6 评论 0原文

对于.Net,微软/其他公司提供了很多项目,通过这些项目可以了解如何在现实项目中实现模式等。

我正在寻找适用于 Java EE 的示例(除了 Sun 提供的示例之外):http:// /java.sun.com/javaee/reference/code/)。我正在寻找更复杂的。可能正在使用 JSF/Spring/Struts

For .Net there are lots of projects that Microsoft/others provide via which one can learn how patterns etc. are implemented in real life projects.

I am looking for ones for Java EE (apart from the samples that Sun provides on:http://java.sun.com/javaee/reference/code/). Am looking for more complex ones. May be using JSF/Spring/Struts

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

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

发布评论

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

评论(5

岁月静好 2024-08-18 18:17:11

Sun 提供了蓝图(以及著名的 Pet Store 和 Adventure Builder 应用程序),其中显示模式以及如何使用 Java EE API 实现它们。关于 Java PetStore 2.0

Java Pet Store 2.0 是在 Java EE 5 上构建 AJAX Web 应用程序的参考应用程序。它演示了如何将 AJAX 与 Java 结合使用、构建支持 AJAX 的 JSF 组件库、使用 Java Persistence API、应用 MVC 和其他设计模式的蓝图在 AJAX Web 应用程序中,使用混搭(例如 Google 地图服务)进行宠物位置特定搜索,使用 PayPal 服务进行购买,使用 RSS 提要作为数据源等等。

请注意,对于 Java EE 5 之前的版本,我真的不认为人们应该将它们视为最佳/良好实践的代表,而只能将其视为技术展示。 Java EE 5 使事情变得更好。

不过,您也应该看看 Spring 的 PetStore 示例应用程序(如果我没记错的话,它说明了 iBATIS 集成)。这绝对值得一试。

您可能会找到其他示例,例如这个(以及许多其他示例,只需 google 即可) “Java PetStore”)。

Sun provides BluePrints (with the famous Pet Store and the Adventure Builder applications) that show patterns and how they can be implemented using Java EE APIs. About the Java PetStore 2.0:

The Java Pet Store 2.0 is the reference application for building AJAX web applications on Java EE 5. It illustrates BluePrints for using AJAX with Java, building AJAX-enabled JSF component libraries, using Java Persistence APIs, applying MVC and other design patterns in an AJAX web app, using Mashups such as Google Maps service for location specific searches of pets and PayPal service for purchases, using an RSS feed as a data source, and lots more.

Note that for versions prior to Java EE 5, I really don't think one should consider them as representative of best/good practices but only as technology showcases. Java EE 5 has made things much better.

Still, you should have a look at Spring's PetStore sample application (which illustrates iBATIS integration if I remember well) too. It's definitely worth the check.

And you may found others samples like this one (and many others, just google for "Java PetStore").

水波映月 2024-08-18 18:17:11

有好几个。一种可能是 AppFuse 项目。它为您提供了一些选项来选择框架并查看生成的完整应用程序。您可以从这里开始

There are several. One possibility is the AppFuse project. It gives you some options to choose frameworks and see a full app generated. You can start here.

倒带 2024-08-18 18:17:11

Java Pet Store 演示是一个使用 JSF 的参考应用程序。它在页面底部引用,但隐藏在底部。这个项目以及 Java BluePrints 项目是关于大型项目中的模式的很好的参考。

The Java Pet Store demo is a reference application using JSF. It's referenced on the page at the bottom, but it's hidden away at the bottom. This, and the Java BluePrints project, are a good reference about patterns in a decent sized project.

油焖大侠 2024-08-18 18:17:11

我正在撰写一系列文章,使用具体示例来解决 Java EE 应用程序设计和实现问题。为了实现,它将使用 Spring、Hibernate 和 MySql。但是,这些想法非常通用,可以应用于任何技术。
在此处输入链接说明

I am writing a series of articles, addressing Java EE application design and implementation, using a concrete example. For the implementation, it will use Spring, Hibernate and MySql. But, the ideas are quite general that can be applied with any technology.
enter link description here

风筝在阴天搁浅。 2024-08-18 18:17:11

您可以从 Javaone 2013 此处。它有一个链接,您可以在其中下载示例并随着教程的进展对其进行改进。它使用 JSF 作为其用户界面,使用 javascriptJSONWebsocket 端点RESTful 进行通信 网络服务等

You can find a sample project of a 3-tier Java EE 7 web application (an application that allows users to view movie listings and make reservations) from Javaone 2013 here. It has a link where you can download the sample and improve on it as the tutorial progresses. It uses JSF for its user interface, javascript and JSON to communicate with a Websocket endpoint, RESTful web services etc.

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