I developed an Electron application few weeks ago with the framework AngularJS (used to make the client side). Today, I would like to convert this desktop application to a classic Web App.
The actual client-server communication is made with Electron's IPC channels. But it has to be replaced by something else. However, I don't really know what is the best way to replace them for the communication between my new Node.js server and the HTML pages (the same ones, always made with AngularJS).
I think there is a way to create new ipcMain and ipcRenderer modules to adapt them to the communication between a server and a client. But my skills in JavaScript are not good enought to do it. Does someone know how to make this adaptation, or maybe have a better idea ?
Thanks
A pretty general question. I would use http://socket.io/
Related
I am a computer science student in my senior year at my local university. I recently was hired on as an intern to create a mobile web application. The mobile web application is very simple; it needs to interface with a data base to both give a full data base view for an administrator and for end users to fill out a simple survey. I have never done anything in web development before, so I did a little research and the tools that kept coming up where html, css, java script, and php. However, I also ran into other tools with different applications, like AJAX with Jquery, HTML5, and micrsofts asp.net. I have a basic understanding of html and css, but I haven't committed to a development platform yet. I wanted some advice on which one to choose, based on the following criteria:
1) I want to develop a website that is device neutral. So I want it to work well on both desktops and mobile devices.
2) No one knows the future, but I would like to use the development platform that is likely to become or remain the standard in the future.
3) It needs to be available as a part of a standard server platform for a typical web host
4) It needs to be able to dynamically generate web content and interface with an SQL data base.
I would really appreciate some advice, input, ect. I don't know if I will pursue a career in web development, but sense I already have to learn at least one development platform, I figure I might as well learn the right one.
Thank you for any advice and input.
If you don't have a web developer background and don't want to spend time learning it thoroughly, I would recommend using Google's GWT. It provides you with all the tools to implement your application purely in Java, without caring too much about the front end. As the whole thing's in Java, all the SQL handling can be done there, with the results sent to the front end.
Then, you can add built-in elements (flexible tables, panels, buttons, images, etc.) to the app, again, using Java only. You can get some CSS templates from the web and apply the styles without any HTML knowledge at all.
Once ready, you can compile the whole thing into JavaScript, with several permutations of the code compatible with most of the modern browsers. Then all you have to do is to deploy these generated JavaScript and HTML files onto your HTTP server and enjoy :) You can also touch the HTML directly if you have something that can't be applied through GWT but in the case of a simple webapp this won't be the case...
I'm working on a project that uses Node.js as server and the client is a webapp developed using Ext JS 4.2.
The communication protocol relies on the Socket.io library.
I was trying to integrate the socket.io communication in my webapp in a way that is as much as possible polished and compliant to the Ext JS 4's MVC.
The first idea I had was to have a class that was looking like THIS that basically has all the socket.io callbacks which will get the needed Ext JS elements and set the received data to them.
However i saw that ExtJS 4 introduces the concept of Proxy and Stores and I was thinking if what I need can be achieved using these functionalities (I'm a beginner with extjs 4).
Long story made short: What's in your opinion the best practice to handle this scenario? Also: even if it's possible to achieve what I need with proxies/stores, will it be easier and at the same time a good pratice using them in this case or the callbacks way is fine enough?
Any other solution is welcomed.
I am trying to write a Help Desk Application.
The problem I am facing is how to put up a chat like communication between the REST service and my application. I am confused and a rookie as well.
All I know is GET(URI) and POST(URI) methods from which I get the XML.
Can anyone guide me in the right direction?
REST is probably not the best architectural style to build a chat application. You should look at protocols like XMPP and AMQP. They are much more suited to this two-way communication model.
You simply need to write a REST client in C#/.NET
WPF has nothing to do with your question. The post/get uri's will get you the data that needs to be presented. How it is presented is what you deal with using WPF, but the REST part itself is independent of any language/platform.
I need to build both a website and a mobile site (starting from scratch). The website will include a registration/login, user upload, and sharing feature. I would like to have all of these features available in the mobile site as well. Any recommendations on the best starting approach would be appreciated. For example, should I create the website from start to finish before even starting to think about the mobile site.
Thanks
If you design your server side code correctly, you should be able to use those components no matter where the client is. You would just have to write a thin wrapper for each different interaction type, e.g. xml vs json.
Its hard to say more without knowing exactly what you are doing, and how many people you have working on this? You can finish the desktop version before you start the mobile, but you don't have to. Depending on team size/skill you could develop both concurrently...
Background:
I have basically no experience in Silverlight, i was asked to start reading up on the tech and provide some insight for client which may want to rebuild the UI of their .Net Desktop application in silverlight. So my experience is what i have been able to google (which surprisingly is not easy) and the few tutorials i have done.
I am aware Silverlight could use ASMX Web Service , WCF Services or REST to do communications with the server.
Question:
Are there any other official or non-official mothods of communication anyone knows of?
Thank you in advance,
David
Start here:
http://msdn.microsoft.com/en-us/library/dd470099(VS.95).aspx
http://videos.visitmix.com/MIX08/T13
http://videos.visitmix.com/MIX09/T42F
I am somewhat biased having worked on the technology :), but I would urge you to consider WCF.
This method gives you great usability: It literally takes a few minutes to "Add New... Silverlight-enabled WCF Service" to your project and have everything up-and-running. In Silverlight 3, this uses a very performant binary XML protocol under the covers, which can be easily switched to regular text XML for debuging with just a 2-line config change. And it integrates nicely with most authentication models that you would want (see the security section in the doc link above).
Of course, you can roll-your-own communication using HttpWebRequest, WebClient, or even sockets. Using WebClient is probably best if you want to go with REST on the server. Keep in mind that some things that are normally possible in REST (such as using PUT and DELETE HTTP verbs) are not possible in browser plugins such as Flash and Silverlight due to browser restrictions.
Finally, there's .NET RIA Services. It's a bit too heavy-weight for some scenarios and doesn't have some of the WCF features (like binary and duplex), but it's more than just a way to communicate with the server: It gives you a whole perscriptive framework for building SL apps with server-side data, and gives you a lot of nice features like validation, paging, etc. for free.