Deploy client and server separately of mean/ mern stack app - deployment

What would be best practise for Mean/ Mern Stack app to host full stack or use cdn for client side and server side on other platforms.

It's usually best to use CDN's as they will cause your client-side to render faster due to being hosted all over the world.

Related

Best way to connect two servers (Both using JSP tech) to access information stored in one of them?

In a "computer system" there are two web servers that manage independent applications, both using JSP technology. There is a necessity to have access from server A to information stored in server B. In case of interconnection with:
Invocation of a data access service with GET/POST of an URL.
Definition and use of Web services.
Direct integration in Java, with Java RMI.
Which would be the best solution? Why? What are the advantages and disadvantages of each of them?
A solution would be to use REST API on the server from where you need to invoke the information. You might want to use an ajax call or just include contact via iframe.
Get call will be simple and quick to develop and maintain however if it is low latency and high throughput application then you might want to go with Java RMI.

What are web servers and application servers exactly?

Can someone please explain me the exact difference between an application server and a web server. I've researched a lot but didn't quite get a satisfactory answer. Thanks in advance!
Well, according to the (description of the) tags you had associated to your question;
An application server is a software framework dedicated to the efficient execution of procedures (programs, routines, scripts) for supporting the construction of applications. Normally the term refers to Java application servers. When this is the case, the application server behaves like an extended virtual machine for the running applications, handling transparently connections to the database at one side, and connections to the web client at the other.
A web server is a software application that services requests from clients using the Hypertext Transfer Protocol.

Do the isomorphic apps implies back and front stand together?

I've been getting into isomorphic applications development with Angular 2 Universal but there is this thing that i cannot get clear in my head.
My understanding is that keeping back and front sides on different modules is a good practice, but it doesn't seem to be a common pattern when working with MEAN applications.
So, i am about to start a project that could scale and i'd want to implement the server side rendering in a future but i don't know which approach i should go with. Honestly i feel more comfortable keeping both backend and frontend on separate but, if so, will it be possible to implement server-side rendering later on?
Besides, supposing that i duplicate the index.html in both sides, will the server be able to delegate the control to the client when the first server rendering is completed? I mean, i can't imagine how that would that delegation work given the fact that they are not in the same project.
Thanks in advance.
As I understand, you are talking about rendering the UI and this is frontend part of your application, even if you do the pre-rendering work on the server.
This pre-rendering is only optimization, you can keep it in some separate code layer, but I believe that the whole idea of the isomorphic javascript is to re-use the same code on the client and server. This way trying to duplicate code and/or templates is not a good idea (it never is).
If you really want to keep things separated, think on splitting your application into more services:
backend server application - some kind of rest API on top of the database which holds all the business logic (first node.js application)
frontend server application - another node.js application which gets data from API via HTTP requests and does server-side pre-rendering (second node.js application)
frontend - all the code running in browser
This way, initially the "frontend server application" can be simple proxy between the "frontend" and "backend server application".
Later on you can extend it with server-side rendering.
Important note: if you are going to develop application without pre-rendering on the server and add this on a later stage, you need to take into account that not all the browser-side javascript features will work on the server (for example, manipulations with native DOM elements), see the best practices section in angular universal readme.

Is it possible to host a GWT-compiled web application in NodeJS?

Is it possible to host a GWT-compiled web application in NodeJS?
I like NodeJS however there are lots of work already made with GWT for my projects.
Cheers.
On the client side, as #riley-lark said.
You can also use GWT code on the server-side on NodeJS; see https://github.com/cretz/gwt-node and http://code.google.com/p/gwt-exporter/
Yes. GWT is a client-side technology and does not need to interact with your server at all. It is possible to send arbitrary requests to any server and process the feedback.
You won't be able to use GWT-RPC or RequestFactory.

iPhone/iPad apps with backend databases?

We're investigating the iPhone Enterprise Developer Program as a way to develop and distribute in-house apps. Since our backends are all Windows, SQL server and Oracle databases, we have to find out a way to make our data available for the coming in-house apps.
As far as I know that Core Data is mainly based on SQLite as persistent store. I am not sure if there are any APIs available in iPhone SDK for SQL server or Oracle database? Another possibility, or very attractive strategy, is to build our own web-based REST services as CRUD gateway to our databases.
Personally, I prefer to integrate in-house apps with our ASP.NET based web services. I am not sure if this is possible. Are there any examples or documentations about this strategy?
an interesting option is to expose your data from your server using asp.net OData then use this project to generate a client in objective-C to consume your OData service.
As far as I am aware there are no approved API's to access a server based database. The way we do it in our organisation is pretty much the way you are suggesting. In some instances we are using SOAP but typically we just use a custom JSON or XML web service to access the data.
With regards to ASP.NET are you talking about making native iPhone Apps with ASP.NET or getting a native iPhone App to talk to an ASP.NET web service? If its the first then have a look at monotouch (don't know much about it), if its the later then this shouldn't cause issues. Just use NSURLConnection and deal with the resource structure on the App (be it JSON or XML).
The added advantage of using a web service rather than a straight database connection is that you get encryption for free using https.
Hope that helps
There's a product called SUP (Sybase Unwired Platform), it provides a framework to handle access to databases but has the advantage that there doesn't need to be an online access all the time, it stores persistent data locally and then can sync up with the host database using messaging.