Can you give me an advice about MVC client-server? [closed] - java

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm going to create a desktop application (Swing) using the MVC. It will be chat and i have some questions. Which classes should be located on client? (View - its logical) Model? Controller? or both classes should be on the server side?
And which classes have to process my database?

If you are planning to have server-client and database access, this sounds like a typical 3-tier distributed system.
Database - represented as DBMS and located potentially on a separate machine. This should provide easy API for queries and updates from the server.
Server - this is where Model is located, again potentially on a different machine than database. Server however has means of working with the database, ideally via the aforementioned API.
Client - contains View and Controller. View is essentially the UI aspect of the Model located on the server. Controller processes user interaction and sends to the server in the processed (clean) form that the server can understand. This is done to reduce server load. The client has no means of accessing the database directly.
If it's all the same to you, I'd recommend to have a look at JavaFX, its MVC is much easier to implement and just plain simple to work with

Related

Is it possible to register a Domino Server with the Java API or C API? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
We are well on our way to Dockerizing Domino. In fact, we have a Domino Docker running in IBM Cloud (bluemix) that replicates with on prem.
What we want to be able to do is automate the standing up of a Domino server.
In our script, we are thinking of calling a custom program we can build that will use either the C API or Java API to register a new server, deploy a XPages (JSF) application to it, and start the server, replicate over the common user directory (names.nsf) from the master server.
Currently, we started the Domino Container in CentOS in listener mode. We registered the server on prem, and copied over a bunch of files (server.id is one of them) and edited confirmation to manually configure it. We want to automate this process.
Any insights on how this can be better accomplished? any api references you can share to get us most of the way there?
Yes, this is possible. We have done this in Lotusscript using LS2CAPI.
As we are accesing API functions, this is also possible using Java. Not sure, if domino-jna already includes the needed Api calls, but this can be implemented. Take a look at github for Karsten Lehmann and domino-jna.
domino-jna can be used from XPages as well.

Best solution for retrieve and manage phone contacts on server side? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I want to create an android application which retrieve and save phone contacts on server side, then the server-side application have to manage them and find the contacts which have installed the same android application on their phones.
I need some advice for choosing technology stack? Do you know any similar solution?
Which kind of database you recommend? Are graph-based databases (like Neo4J) any good or I just use relational databases?Performance and scalability considerations are very important to me.
Any help would be appreciated.
Thank you.
I suggest you build a prototype. Begin with a server side application with a relational database. Use a DAO layer so you can change the db implemantation later if needed.
Initially, I suppose your requirements are just functionality. So go for it and build something that works. Later on, you can continue with performance and scalability considerations, but when you have reached that point you will have much more experience in what you are trying to built and alternatives you could follow.
Now the modile (Android) app is a different story. I suggest you build an app that sends and retrieves data(contacts) to and from the server to begin with.
Finally, you could download some similar apps and try to replicate their UI.

Will WebSocket achieve what I'm trying to do? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm creating a simple java application made in swing that communicates with a database. Multiple people will be using the application at the same time. As they are able to change things at the same time, if someone for example, adds a new user, and a different person is on that same page, I want the person who did not make the change to be notified that changes were made to the database since they last loaded it.
My lecturer in college advised me that WebSockets would be the way to go to achieve this, however after some reading about WebSockets in Java, it seems it is based to work with web browsers instead of between Java applications.
Can using WebSockets achieve what I am trying? Or, if not, what would be a way to achieve this?
Simple answer is Yes you can achieve what you needed
WebSocket is a communication protocol(#see RFC 6455) & it is not a must to use a Web browser.
You can achieve what you want to do with your app, it is just a matter of writing a custom WebSocket server to facilitate your requirements in your case sending database changes to the other clients(Which is called Server push)
There are several java libraries to get the work done,
netty WebSocket (My favorite)
jWebsocket
Atmosphere
Webbit
Netty WebSocket is a good one to start with and you can find examples in its project to write a custom client and a server

Design an application with multiple request sources: WS(SOAP\REST), MQ, batch [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have to design an application which gets requests from multiple sources like Web service (can be SOAP or REST), online system, Message Queue or some batch job. Application needs to interface with 2 more applications for getting results. I understand that this can be done using microservices. This application needs to be built in Java. I am looking for some framework which can help me with accepting input from multiple sources as mentioned above.
If you want to build a lightweight simple layer (single app) to cater all these requirements, I would recommend using Apache Camel. This single app can listen to rest/soap requests, read from file system, JMS store, database etc. You can even embed it into another application and have all sorts of integration with different data source and excellent and easy to configure routing and transformation engine. Plus the documentation and community is awesome.

When use thick client over thin client? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I need to write a utility program in JAVA that lets the user upload a file(spreadsheet etc.) and display it on the UI and later do some interaction on it and creates a template(flat file) out of it. It's more like mapping one format to another. Should I make a web-app or desktop app(standalone/thick client) for this scenario? What criteria let you decide between the two? I am new to desktop apps, so I am more leaning towards a very simple webapp deployed in tomcat. But I am willing to get my feet wets if it worth the effort to make a thick client instead.
Any tips?
I would decide based on 'who you want to be able to access it'. Also consider things like 'hosting costs' (there are free-tiers but someone can still upload to your endpoint unless you plan on securing it) and if its a webapp then the file will need to be uploaded to the server first before it can be read. (These are extra steps that wouldn't be required by a thick client (desktop) application which could just read directly from the local drive). If this is for a particular person then I think a thick client (desktop) application would be best suited just to avoid the extra hassle of uploading files, securing the web app (from people uploading to your endpoint), hosting fees, bandwidth costs etc. It seems like it would be the best option to write it with a thick client (desktop) application first as less steps are required and you can focus on writing just the load, mapping and display code.

Categories