Rest Client JAVA [closed] - java

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I am trying to create a Java RESTful client to integrate with facebook4j (with a maven directory) but I don't even know where to start. Can you help me to create one or giving tips?
Thanks again!
Best regards,
Julio.

It is highly recommended that you do your own reserach before asking something here. People don't take well users who balantly ask questions expecting the community to do all the hard work for them. They are seen as leechers and instead of helping the community grow are a burden to it. Everytime you make a post where you don't tell the community what you tried, you can expect to be punished.
PS: I suggested an edit to your post to make it better. Hopefully you wont be downvoted so much from now on.
With this out of the way, I found two tutorials that I believe will help you:
https://www.javacodegeeks.com/2012/09/simple-rest-client-in-java.html
http://crunchify.com/how-to-create-restful-java-client-using-apache-httpclient-example/
The consensus here seems to be that you need third party tools, like Apache client, or some other library, but other than that I believe it is manageable.
I hope it helps and that it points you in the right direction regarding REST.
As far as facebook4j goes, I found this official example source:
http://facebook4j.org/en/code-examples.html
But if that is not enough, I also encourage you to read the following questions from StackOverflow:
Getting posts from a page using Facebook4j api
How to login to facebook using Facebook4j

Related

What should be approach to understand a new project [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
If one joins a new project, how should that person approach it if
there is no documentation of the code and program is quite big to understand. Team members are also not that much informative.
Should the person debug the code line by line?But it can be highly time consuming and exhaustive.
There are several options:
Look for manuals. I have seen projects without specification and developer documentation, but had a manual.
Participate in a training, if offered by your company. This may take some time, e.g. the next training is in 2 months.
Run the code and see what it does.
get a tool like NDepend that visualizes the dependencies. By that, find the central modules or classes. Look at those first.
Ask your developer colleagues. If they don't want to tell you, tell them that you need some understanding in order to do your job
If all of the before does not help, ask your boss for help. He should have a plan to get you productive.
The users option would be great, but in all companies I worked for I did not have access to end users as well, since we always worked with partners as intermediate resellers. Contacting the partners is not a good idea, because it might leave a negative impression if you don't know the software.

Need design guidance to develope java spring hibernate web application [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 want to create java web based application using Spring-Hibernate. I know its not difficult to implement the functionality, but i need some help/guidance from the architecture perspective. Can any one suggest me the best design which will cover interfaces,design patterns etc.
Also need which version should i use of spring and hibernate.
The best way to start implementing a web application using the technologies you mentioned is to follow a tutorial from the large variety of tutorials you can find using google.
Another good option is to find a skeleton for an application that someone has created and shared in a source code sharing service like github or bitbucket (check the licenses also). You can check-out the code and have an initial working example you can work on and expand.
If something does not work during these attempts, then please come back here, search if your question is already asked by someone else, and if not place your question with specific code snippets and error messages you may get.
If everything works well and you need advices on different ways to improve performance, your architecture and the software patterns, then come back here also with a specific question, or in some cases you will find codereview more suitable for this kind of questions.
Good luck!

need to deploy web app on server [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 8 years ago.
Improve this question
I need to write a web app from scratch with a date picker that allows user to select date and then queries the database according to thee input provided by the user and displays results. This will be deployed on the companies web servers(they have various apps on a server). However, i have no idea where to start as i have never written a web app before. Also i will need a local test and prod environment set up. Where should i start, what all needs to be included in my classpath. How do i install build tools and configure them?Eventually more people will work on enhancing the app but i first need to get it set up and deployed on prod. This will be written in java.
Cant comment due to low reputation, so i have to post my suggestion as an answer.
As JonK posted, this site is about specific code problems, but i'd suggest you looking into a few things, that might help you with your task.
Choosing from a various possibilities, is a tricky thing, and if i ware you, i would ask at your work with is more common there, so help with problems in development would be near ;)
Spring framework is quite popular and you will find plenty tutorials for it
JSF is a interesting one, and if you will choose this one, at SO, you can look into answers provided by user BalusC. As some one said to me, if Balus has written about something, then it is as he said ;)
Struts is not something that I've tied yet, but it is a choice.
And plenty more, most of them has been mentioned here
But as i said, ask at your work place, what they are using.

Consume OData service from java [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm developing a mobile application. For database communication I want to use my existing way: WCF Data Service (which is an OData service).
I'm not often programming with java, but I thought this will not be a problem. Failed.
My first try was the odata4j library. All the time I got NullPointerExceptions (I tried really small things like getEntities. It took about one hour to recognize that the documentation is outdated and ODataConsumer.create(..) does not longer exist and you need to use ODataJerseyConsumer).
Then I tried to use a class I found in the internet: RestClient which is available here. I did some modification and in the end it was working, but it does not support odata functionallity (queries like $filter, $oderby, ...) and for each request I need a new instance.. so I'm not happy with it.
Then I tried my own implementation with HttpClient and JSONObject classes. It is a lot of code to do things like I want to and it is very uncomfortable.
So the question is: Is there another library you can recommend that I missed? Do you have any hints how to implement my own "OData Consumer library" or do you want me to invest more time into odata4j?
I found myself in a very similar situation just a month ago.
I recommend that you go back to OData4j for Android development. When you run into issues or get confused, post to the OData4j forum. John Spurlock, the create of OData4j, personally responds to almost all of the posts there. When I was having issues (I created a producer, not a consumer), he was VERY patient and prompt in his responses.
OData4j doesn't have the nearly as many tutorials as it should. So take good notes of the steps you go through and then share your expertise afterwards!!
As for iOS development with OData, the best out there is OData4ObjC. Unfortunately, the current version was abandoned about a year ago and therefore doesn't support iOS 6. I've updated the code and samples to work. it can be found here.
Good luck! And let me know how it goes! I'm considering making an Android app that integrates OData also. :)

Interesting open-source APIs (Java) for self-education? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
Which is your top 3 open-source APIs (in Java) you recommend as an example of well-designed piece of art?
That would be code that you had pleasure to browse through and got some insights from it.
Any problem domain acceptable.
Emphasis here is on educational/study quality of code, complexity level - intermediate to top.
Thanks a lot for responses.
I think that google collections is a great place to start. Josh Bloch advised the development of a lot of it, and it's a very well done API. While Spring is great, it's a little hard to know where to start. A good introduction to google collections is "coding in the small with google collections" (I can't post the actual link because of stackoverflow spam filter).
1.Spring
2.Hibernate
Spring - it's a very well written and designed framework. It's a hell of a big bit of software but if want an example of how to build in a modular manner you can't go to fair wrong looking at the spring code base
The sources of the java libraries are well documented.
In my experience the most valuable works include the documentation of desgin decisions, if you see a nice API it would be very interessting what could be the alternatives to that. Unfortunatly this is mostly burried mailing-lists of a project.
Not an external library - but the java.util.concurrent package is very nicely written. The code isn't simple, but it's very well thought out and, in my opinion, has been written brilliantly.

Categories