-2

I want to build a 3-tiers system for EHS(Electronic Health Record) or EMS(Electronic Medical Record), but since i don't have much time '10 days' i want to take the simplest fastest complete route, so wich platform to use?

  • java SE : I am familiar best with it,i did developed several desktop apps. "my best choice"
  • java EE : I find it really hard to master in a short time. "i really don't want to go this route"
Wug
  • 12,956
  • 4
  • 34
  • 54
user1559104
  • 105
  • 3
  • 10

3 Answers3

2

I'll try to answer you as in a real project, because I think you need an answer, let's forget about the time restriction and let's try to help:

First try to check this about meaning of layer or tier

What's the difference between "Layers" and "Tiers"?

These configurations are available in Java to organize your 3 tiers, I will talk only about the standard ecosystem:

  • Fat client: SWING - EJB - DB
  • Rich client: FX - EJB - DB
  • Web client: JSF - EJB - DB

There will be a single tier for each of these configurations, note however that to have more than 2 tiers you need an application server in the middle to manage the business logic. That let you with less choices that at least use an app server. All of them using EJB, which is part of the Java EE specification.

Maybe you get confused also about thinking that web programming is a must in your application. You have to know that you can connect your Swing client to EJB. That way you can use your skills in JSE (I guess Swing) but using a small subset of the Java EE specification (EJB).

There is also a final consideration, you can have several layers in each of the shown tiers, For instance, you can have in your EJB layer a facade tier and a services tier. You can check the logical ways to organize it in this great book Real World Java EE Patterns Rethinking Best Practices:

regards

Community
  • 1
  • 1
gersonZaragocin
  • 1,122
  • 12
  • 20
  • can i replace EJB with application that use Sockets or RMI ? – user1559104 Aug 31 '12 at 19:52
  • 1
    You could, but why you would do that?, It will take you more time. This, can be to my opinion a fast an easy way: Use Seam framework just to generate the project plumbing and skeleton. In the generated project, use only EJB session beans and only Remote and Stateless to write your business logic. That gives you access to the DB using plain SQL if you are not familiar with JPA. Use Swing to build your client and to access to your business logic if you are more familiar with it. That is what I can advise you from my experience. – gersonZaragocin Aug 31 '12 at 21:00
  • thanks for the answer, i am reading a bunch of stuff about what you just wrote, and it look easy to build my project if i know EJB and the rest. do u know a book or a tutorial about what u wrote ? – user1559104 Aug 31 '12 at 22:08
  • 1
    For Seam Framework work you could try Dan Allen's Seam In Action chapter 2, it will help you with project generator (seam-gen). Remote Stateless Session Beans you could try with Debu Panda's et al. EJB (3.0) in action chapter 2 (Try reading all of it but 2.4). I have connected Swing with JBoss App 6.1 server and it is easy with the client libraries included. Hope this helps. Good luck – gersonZaragocin Aug 31 '12 at 22:29
  • sorry for this late question but i am just running in circles for days and i can't even find a proper guide to build my swing application. do u know off any resources that can help me ? that would be most appreciated. – user1559104 Sep 10 '12 at 12:30
  • I guess you won't find a "one size fits all" guide. That is why i gave you a path in my previous comment. Did you do what I advise already? Which problem did you have following that? – gersonZaragocin Sep 10 '12 at 13:48
  • i did generate ejb and jpa with seam-gen but i can't access them using a simple swing application , most off the example i found on the net give errors, btw i use neatbean with glassfish. – user1559104 Sep 10 '12 at 14:27
  • Please check this: http://stackoverflow.com/questions/3614802/how-can-i-deploy-session-bean-on-another-computer-with-client-jsp-servlet. In that context's answer "client" means your Swing app – gersonZaragocin Sep 10 '12 at 14:47
  • this what i did with seam-gen (seam setup to generate build.properties file , seam create-project generate the project plumbing and skeleton , seam generate to create EJB and JPA Files ) – user1559104 Sep 10 '12 at 15:03
  • maybe i should just build a web client. which technologies u think easy to learn and easy to build ? – user1559104 Sep 10 '12 at 15:37
  • Can you enter to chat right now? – gersonZaragocin Sep 10 '12 at 15:57
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/16506/discussion-between-gersonzaragocin-and-user1559104) – gersonZaragocin Sep 10 '12 at 15:59
1

Since you have a time constraint and you don't know Java EE, it's better you go ahead with Java SE. You can use Swing to build the UI and JDBC to have database connectivity.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Anand
  • 20,708
  • 48
  • 131
  • 198
0

You have to decide that the application you are going to build is a StandAlone desktop application, or an Application that will work on Browser.

If you are developing it for a small organization of 10 to 20 people, who want to use this within their premises, then its well and good to go with Java SE, but if you want this system to be available to outside world with easy access that will work without the probs of installing the client side of the appln on the client machine, then go with Java EE

Kumar Vivek Mitra
  • 33,294
  • 6
  • 48
  • 75
  • it a school project, and since i am more concerns with time i really have can't decide which one to go – user1559104 Aug 31 '12 at 18:33
  • If its school project, and its not a compulsion that it has to be on Java EE, then go with Java SE, using Java EE takes care of the low level networking, synchronization tasks, threading, etc.... Well if you are well versed in Java SE, you can go ahead with it.... cause doing this in Java EE, will atleast take 5 days of solid study, before you start thinking like a Java EE guy... – Kumar Vivek Mitra Aug 31 '12 at 18:37
  • i was thinking the same thing, i will just go with java SE. thanks for the answer – user1559104 Aug 31 '12 at 18:43
  • I believe it is not a choice about JEE or JSE. You can go ahead with JSE alone, but what about txn management, networking, etc? – gersonZaragocin Aug 31 '12 at 19:02