应用架构设计问题 [英] Application Architecture Design Question

查看:105
本文介绍了应用架构设计问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Architects/Experts,

在设计基于Java/J2EE Web的应用程序时,我需要您的建议.这是它的特征:

1.纯粹面向数据库的应用程序(具有10个表).该数据库是Oracle.
2.三种不同类型的界面/屏幕:
2.1 WebSphere Portlet(6个界面/屏幕)
2.2手持设备(5个接口/屏幕)
2.3 Web应用程序(17个界面/屏幕)
3.很少有屏幕只是使用Crystal Reports构建的报告.
4.没有太多的业务逻辑.

现在我担心的是:

1.我应该使用2层还是3层的体系结构?
2.我应该使用struts/jsf(MVC)的框架?如果有的话还是应该在没有任何框架的情况下进行基于POJO的简单编程.
3.最大的问题是打包,我的意思是我不想为我要开发的每种三种不同类型的接口复制业务和数据库层.您认为EJB是公开DB/业务层的好选择吗?我该如何处理?
4.我应该使用诸如sitemash之类的任何特定框架作为表示层吗?
5.我应该为数据库层JPA/Hibernate使用任何特定的框架还是应该使用简单的JDBC?

欢迎任何意见/建议...

BR
SC

Hello Architects/Experts,

I need your suggestions in designing a Java/J2EE web based application. Here are its characteristics:

1. Purely database oriented application (with 10 tables). The database is Oracle.
2. Three different types of interfaces/screens:
2.1 WebSphere Portlets (6 Interfaces/Screens)
2.2 Handheld Device (5 Interfaces/Screens)
2.3 Web Application (17 Interfaces/Screens)
3. Few of the screens are just report which will be built using Crystal Reports.
4. There isn''t much business logic involved.

Now my concerns are:

1. Which architecture should I go for 2 tier or 3 tier?
2. Which frameworks should I use struts/jsf (MVC)? If any? Or should I go for simple POJO based programming without any framework.
3. The biggest concern is packaging, I mean I don''t want to replicate the business and database layer for each three different types of interfaces I want to develop. Do you think EJB will be good option to expose DB/Business layer? How should I handle this?
4. Should I use any specific framework like sitemash for presentation layer?
5. Should I use any specific framework for database layer JPA/Hibernate or should I use simple JDBC?

Any comments/suggestions are welcome...

BR
SC

推荐答案

在设计体系结构时,始终牢记内聚和耦合.内聚力越高,耦合度越低. UI和访问层之间的依赖性应该最小.
请记住,三层和三层是两个不同的东西. 3层是物理上分离部署在不同服务器上的层,而3层是项目(UI,DAL和BAL)的逻辑分离.

根据您的详细信息,您具有琐碎的业务逻辑,可以选择2层体系结构.在您可以拥有2个单独的服务器的情况下,请使用2层体系结构.

MVC绝对是将UI从其模型中分离出来的绝妙概念,但代码编写起来并不复杂.规划一种易于维护的设计方法.

其余的Java开发人员会告诉您我是.NET开发人员:)
While designing the architecture always keep in mind Cohesion and coupling. Higher be the cohesion and lower the coupling. The dependency between the UI and access layer(s) should be minimal.
Remember, 3 tier and 3 layer are two different things. 3tier is physical separation of layers that are deployed on different servers, whereas 3 layer are logical separation of project (UI, DAL, and BAL).

As per your details, you have trivial business logic, you can go for 2 layered architecture. In can you have 2 separate server, go for 2 tier architecture.

MVC is definitely a great concept of separating UI from its Model but is little complex to code. Plan an design method that will be easier for maintenance.

Rest Java developers will tell you as I am a .NET developer :)


这篇关于应用架构设计问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆