I need to create a JSON service to get and post data from a local and remote http/https server on Linux for my mobile apps. -I'm using MySQL as DB engine-
I tried with Glassfish EJB/JSP (I like Java), but it was a kind of frustrating, due the poor support that my linux development machine (mint 13) has for Oracle Glassfish.
In your opinion, what is the best way to make a remote JSON server on that environment? which alternatives do I have?
If you want to accept and send back JSON, you want a JAX-RS-based service, not a JSP one.
You will most likely use Jersey, RESTEasy, CXF, or similar implementations of the JAX-RS specification.
Sending back JSON from a JAX-RS implementation is trivial; that's what JAX-RS is designed to do. Generally speaking, JSP is used for web applications (where HTML, CSS, images, and JavaScript are returned), while JAX-RS is used for RESTful web services, where JSON, XML, and YAML is returned. You can use JSP to produce JSON, but it is not common.
As far as your overall architecture is concerned, any webserver is fine (Apache, Tomcat, etc.) and you can use either Springframework or a full app server like JBoss or Glassfish. Springframework has its own REST support, but I've used JAX-RS several times with Spring and it works very well. Since you already are using Glassfish, integrating a JAX-RS implementation should be straightforward. This article from Oracle shows you how.
Well, I guess you need to find a good framework where you feel confident.
I use Zend PHP + Doctrine to serve my apps. Why? I just create simple controllers in a good MVC like Zend and use all power from Doctrine to handle queries. Ok, but why? Because I develop quick and neat code on it.
Best
Related
Hello guys (you can skip to summery) I found at some website an API, and I wanted to use it, but the website says that the API is using SOAP/XML and REST/JSON APIs to integrate with other website, so my question here can I use spring boot as an example to integrate with their API, or it most be in Angular and Node.js, because they said they built their demo project on it. However, I think I can replace Angular with react is that right, please correct me if I'm wrong. am I forced to use node or I can replace it with spring boot, since it is REST API and spring boot is?
Summery :
When I hear SOAP/XML and REST/JSON APIs can I use Spring boot to integrate with it, or any technology, or should I use node.js, because they said so?
I am working on a web app which uses JSF. I would like to know that What are best practices and available tools for performing a load test on it.
Application is hosted on glassfish server 3.1.2.2
Depends somewhat on the site you want to test. At work we have a complex RIA, and to test it we have to reproduce user interaction. We use jMeter for this.
It's kind of messy to set up (look at the guides they have) but once this is done it's very flexible and allows you to configure and tweak many things. I particularly like its "proxy" feature where you can proxy your app through jMeter and it records everything so you can play it back later on. Note that for JSF you have to do some tricks with the ViewStateId, so google a "jmeter JSF" guide for how to set this up.
In a previous project I have used RadView WebLOAD to test a JSF site, it enable recording the user scenario and handles correlating the dynamic values.
I would like to develop an AngularJS app with Breeze. I usually use NodeJS with Express but I hear it wont work with Breeze. All the example on breezejs.com use ASP.Net but i am on a mac and you can't run visual studio... What are my options ?
We are releasing a sample later today (in breeze v1.3.0) that shows Breeze talking to an arbitrary web service that could have been written on any platform using any technology.
Obviously, we need more of these examples and as importantly we need to show server side implementations of how one might write these web servivces to best leverage Breeze. But... this is all definitely on our roadmap, and we are actively looking for partners in this process.
I have a Monotouch project that today uses WCF Web Services to get data. Now I want to migrate it in order to start using ASP.NET Web Api Json.
Does anyone know how can I send a viewmodel data from a ASP.NET Web Api and then read it in monotouch?
Thanks for the help in advance.
I think you should read this Xamarin article.
In general, Web API is just standard HTTP passing either XML or JSON back and forth. There is not necessarily a client framework accessing it--you can consume it with raw HttpWebRequests or the equivalent in whichever programming language you are using.
Considering that, your options are:
Use an open-source library to do it (something like RestSharp)
Create the HttpWebRequest calls, and format the XML or JSON for the requests and responses yourself (you can use the .Net BCL to do this or other open source projects)
I tend to do the former, just because I like fine grained control of what is going on. #1 might be easier for you though.
I just realized a JSF (web JavaScript application) that connect to a MongoDB database and generate a report (PDF) thanks to JasperReports Library (so with a .java file).
Is it possible to do the same thing with a web application in CoffeeScript and Node.js? I am really new to this, so I don't know where to start.
For example: Is it possible to run a .java thanks to Node.js or CoffeeScript?
JSF is actually a JavaServer Faces application, not a JavaScript application. JavaScript (which Node.js, CoffeeScript are based on) is not equivalent to Java despite the similarity in names.
If you already have a JSF-based application then you already should have everything you need to create a web-based application. There is no need for Node.js, CoffeeScript, etc.
Go take a look at JSP, Tomcat, etc. to figure out how to render web pages rather than output to PDF and you should be set.
If you want to rewrite your application in javascript and run it on node.js, you should be able to use PDFKit to build the PDFs.
If you only wish to use your existing application and integrate it with a node.js server, I think you would be wise to run them in parallel (or proxy requests to your JSF application through node, in case that makes sense). It's hard to give a better answer unless you can state more clearly what it is you want to accomplish.
Yes, it's possible. You can start / stop / control another process with Node.js - so You can start .java in another process and use it to generate PDF. But ... it may be not very efficient in terms of resource usage, so it's an open question.
Or, you can write a simple worker that will generate PDF from JSON data and use 0MQ or other inter-process communications between Node.js and this Java worker.
He-he, JSF was one of the worst technologies I ever saw (I believe it's still in the same state now as it was in 2007 when I left Java), even dumb JSP and servlets was better...