这篇文章已经过时了吗?现在我应该使用其他应用程序架构方法吗?

发布于 2024-12-20 10:34:54 字数 516 浏览 4 评论 0原文

我想知道下一篇文章今天是否会过时。它写于 2007 年。描述了基于 MVC 架构的 java beans,模仿控制器模型的属性。还对设置的每个属性使用反射。

文章:http://www.oracle.com/technetwork/articles/javase /mvc-136693.html

代码:http://www.multiupload.com/PFSRSU9ELY

  1. 我应该遵循上面的文章还是使用对象方法会更好?将属性保存到模型中的集合中等等...

  2. 我是否应该停止尝试为应用程序创建自己的架构并尝试使用 Spring Framework 或任何其他固件。 ?

I was wondering if the next article could be obsolete today. It was written in 2007. Describes MVC Architecture based java beans mimicking properties of the model to the controller. Also uses reflection for each property setted.

Article: http://www.oracle.com/technetwork/articles/javase/mvc-136693.html

Code: http://www.multiupload.com/PFSRSU9ELY

  1. Should I follow the above article or Would be better to use an object aproach ? keeping the properties into collections within the model and so on...

  2. Should I stop trying to make my own architecture for an application and give a try to Spring Framework or any other fw. ?

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

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

发布评论

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

评论(2

陌上芳菲 2024-12-27 10:34:54

MVC 本身是不会被淘汰的;这是一种设计模式。

本文专门针对 Swing,自 2007 年以来它发生了一些变化,但没有什么会特别否定本文,尽管可能某些类已被更改、调整等。

可能有更简单的方法来实现某些功能,但它演示了在 JSE 6 中的 Swing 应用程序中使用 MVC 的一种方法。

Griffon (基于 Groovy)这样的框架采用抽象级别更进一步,可能更适合现代桌面应用程序开发,但这更多是偏好和便利性的问题。

MVC itself can't be obsoleted; it's a design pattern.

The article specifically targets Swing, which has seen some changes since 2007, but nothing that would specifically negate the article, although perhaps some classes have been changed, tweaked, etc.

There may be easier ways to implement some of the functionality, but it demonstrates one way of using MVC within a Swing app within JSE 6.

Frameworks like Griffon (Groovy-based) take the abstraction level a step further, and might be more appropriate for modern desktop app development, but that's more a matter of preference and convenience.

子栖 2024-12-27 10:34:54

我认为您最好重用现有的一些 MVC 实现解决方案(例如 Spring)。如果您实现自己的解决方案,那么编写这些框架的人们已经遇到了您会发现的问题。我相信您会通过实现自己的 MVC 解决方案学到很多东西,但这是您从中获得的唯一东西。

I think you are better off reusing some of the solutions existing out there for MVC implementation (e.g. Spring). People coding those frameworks already faced issues you will find if you implement your own solution. I am sure you will learn a lot by implementing your own MVC solution, but that's the only thing you will get from it.

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