开发者

Java to create Desktop Application that Syncs with Remote Server [closed]

开发者 https://www.devze.com 2023-03-23 17:15 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

To start off, let me say that i'm ignorant of both Java, JSP and the likes. However, i am thinking of taking a closer look at both Java and web technologies based on Java.

To practice, i was thinking of creating my own very simple version of Evernote. If you are not aware of Evernote, it's actually a company that allows you to save notes on your computer, androi开发者_如何学运维d device or generally any device. These notes are stored in their servers where you login to, in order to sync with them.

It would be nice if somebody could point me to the right direction of how to do that. Is JSP the way to do it ? Any nice online resource/tutorial on how to do such things ?

Ideally, i would be developing both a desktop application to create and show notes and a remote server application to save those notes to, and sync from it.

I have been using php, rails, mysql and such technologies extensively, but i'm kinda new to the Java enterprise quality area. So, if you could give me some valuable guidelines, i would be grateful :) I am not sure that JSP is the best solution either, but i suppose this is how such a system is programmed.

BTW : Just, to clarify. I don't just want to get the application done. I bring this example as an application i would like to code in order to learn the technologies :)


Ok...To start with this let me describe what i understood.

You want to make an app. which is a web application but also runs on desktop. Which syncs with the server.

  • First of all go with Web application. Implement your web app using
    Spring MVC, which is quite good framework on MVC2. Spring is a lightweight framework which provides plug-n-play service component implementation. Refer the link for spring - http://www.springsource.org/ For JSP, JSTL, taglibs please check the following links http://www.tutorialspoint.com/jsp/jsp_standard_tag_library.htm

    http://download.oracle.com/javaee/1.4/tutorial/doc/JSPIntro7.html

    http://www.ibm.com/developerworks/java/tutorials/j-customtags/index.html

    Please start with JSP and then go on Spring MVC. First you need to understand how spring works. Its easy to understand and implement.

    For Database technology, you can use Hibernate (which is ORM, provides direct mapping with Java classes to Database tables) OR go with Spring JDBC Support (Which is DB support by Spring. It also has hibernate support.)

  • Once you are done with the web app, keep in mind that you need some web-services which can be used for sync purpose for your desktop app.

    You can implement your desktop application using Swing (Which is not used much now a days) OR JavaFX (which is a baby you can say, as its very new and still growing)

I think once you have your web application developed in java technologies, you can build your desktop on any language which provides best support for desktop UI.


Wow... lot to learn. JSP is analogous to PHP, frankly. You can script the page. You can do a lot more, up to an including actual Java code in the page. But that's a really bad strategy in practice and results in code that is not easily maintained.

Servlets are essentially Java's answer to CGI (remember Common Gateway Interface?) But to answer "Yes" to the question "Can I create something like Evernotes with Java, Servlets, and JSP" is about as useful as answering that "Yes, you can do it with PHP, Rails, and MySQL."

I think Java gets you closer than the technologies you're used to because Java Applications are more common than PHP or Ruby applications (that is, programs that run on the desktop as opposed to on the web.) Swing is a decent GUI API. I find it easy to use and develop with -- its design just sorta makes sense to me.

You could use the technologies as follows:

  • Servlets for controlling your server side storage piece
  • JSP (or PHP) for providing views to any server side configuration tools
  • Java for gluing all that together
  • Java for developing the actual desktop Notes app (or whatever language you like for desktop development, frankly)
  • MySQL for persistance, JDBC and maybe something like Hibernate to help with that

You could also develop your server-side storage app in Rails or PHP or just about anything else. Maybe that end of things would be better done using technologies you already know. You can always swap out the server-side piece later if you wanted.

You're asking a wide open question. Lots of different directions you could take things. Neat idea; one I've had myself. =)


i'd say the best approach is via a webservice.. here you would sync the notes using a web service & retrieve them at a later time (again using webservices).

since you say (i'm assuming here) that the communication might also be with android you can use Restful services (where soap isn't involved) this would reduce the overall work needed by the device.

some links on webservices & restful webservices

hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消