I am not a web programmer, so please excuse my ignorance. When it comes to server side programming, we have plethora of technologies available, such as PHP, ASP.net, JSP and so on.
However, when it comes to client side scripting, I have only heard of JavaScript and AJAX. Maybe you can also include Java Applets, as they run on the client. A relatively new one is also the Google's native client. But are there any more client side technologies which exist and are popular?
AJAX is just a buzzword, it's not a language. Google's Native Client is similar to NSAPI, you can use it to create plugins (it doesn't really count). Google is also pushing a new client-side language called Dart that will probably go nowhere, and old IE versions support VBScript.
So, you have JavaScript, VBScript (sort of) and Dart (sort of).
So far JavaScript is the only ubiquitous client-side technology, as Flash fades away. Google works on Dart language which they expect to make a replacement for JavaScript, and there exist several other less popular things (CoffeeScript, Opa etc). All mentioned ones (starting with Dart) are either run out of browser using their native interpreters or are compiled into JavaScript for client-side use. There also exists GWT, a toolkit that lets you write in Java and compile the code again to JavaScript.
Adobe Flash is very popular ;) and also Activex...
Some of the client side scripting languages are Python, Perl and there's Ruby too etc...But mostly, all server side ones are capable of client side programming.
Related
Hope I'm not being to general but: I have been tasked with the job of "rejuvenating/modernizing" a monolithic Java EE (JSF/CDI/EJB/JPA) app. Since the requirements state that it should support multiple clients, I have split up the code in a server (JAX-RS interfaces) and a client part (not yet done)
The server is pretty straightforward but I'm wondering about the UI part. Nowadays (hope I don't sound too oldskool) various Node JS spin-offs seem to be popular but I'm under the impression that they have the most value to offer in the "scalable server" section. Does the various Angular/React/Node framework have anything to offer for the client if you have something more complex than a single page app?
It appears to be a really hard time to pick a UI technology nowadays. Sure, the server/DB part which contains most of the business logic are pretty future-proof but still, one would like to focus on one UI technology. There are various jQuery-based frameworks like Kendo, Vaadin & co etc. One option would be to stick with JSF + ICEfaces/PrimeFaces and just work with the REST interface. And then there is JavaFX which looks nice but the future looks a bit uncertain.
So. If the backend is not going to be Node JS, does Node JS have anything to offer for the UI part that can't be done more easily with other frameworks and does anyone have other insights on the UI layer in general. Predicting is hard, especially the future ;-)
Node.js is a way to run javascript on the server side, not client side. That said, npm (nodes package manager) or its wrappers (like bower) are quite often used to manage the client side dependencies - which is very useful to have.
Angular and react (among others) are client side javascript ui frameworks to help make writing ui much nicer. Neither depend on the backend being written in node.js and can work with any rest api (or other server side apis) - or no api at all if that backend injects all the data the page needs into the page itself.
Electron, which combines NodeJS and Chromium (render Process).
https://electronjs.org/
Formerly known as atom shell it was created by Github, it is the core of the Atom Editor, VS Code, Slack app, and a ton of “thick client” applications. https://en.m.wikipedia.org/wiki/Fat_client
There are several implementations which allow you to use Node.JS modules on a client-side (ie. web browser). You can then use html/css and call Node.JS modules directly from your DOM which is used to implement UI.
I'm most familiar with NW.js which I've used couple of times. Others would be for example Electron or AppJS
I am reading and seeing that all the major web browsers are removing javascript from their supported languages which I honestly believe is a HUGE and massive mistake as things like Socket.io and jquery are written in javascript and are just 2 of the biggest libraries used. So if javascript is being removed, what is there to replace it? How do I use something like socket.io without any javascript that will natively run in any web browser(hence HTML5)? Is there a getting started guide or reference that can help me get started with sockets in pure HTML5?(Already having issues on Google Chrome with my native javascript coding).
I have an app for Firefox OS, and I would not like to expose any of the source code, even obfuscated source. Is there currently any means to do this? Is this functionality even planned? Also, this app has ALL functionality implemented in the client, so "move the business logic to the server back-end" does not address this issue.
There is no real solution yet, since every web page exposes the JavaScript source code.
Why not trying obfuscate ?
Since JavaScript is executed on the client side, not only in Firefox OS but every other platform too. The possible options are limited to obfuscating with aforementioned transformations or hiding the application logic in server-side code.
You can read more about app source protection from Mozilla official blog here: https://hacks.mozilla.org/2013/12/protecting-your-firefox-os-app-code/
You could write your application logic in C/C++ and protect it by encryption libraries and convert them into JavaScript using, Mozilla’s Emscripten tool which compiles C and C++ to JavaScript: https://github.com/kripken/emscripten/wiki
You're asking "how do I give someone something, and simultaneously take it away?" You can't. This issue hasn't been solved with JS, and neither with native code.
I am currently researching GWT as a means to develop web apps for a future project, and the more I read, the more I like the features it provides. Yet I am not quite sure what features of HTML5 are fully supported. I am more interested in multithreading (the new worker threads that work straight from JavaScript), WebGL rendering through the canvas element and possibly audio.
If these features are not supported yet, does anyone know any good libraries that are somewhat fast / stable for such features, or if it's possible to create custom widgets / wrappers, or a combination of writing code in GWT and pure JavaScript.
I know there are simpler ways of implementing these through various plugins, but I want something which is fully complaint with open web standards, meaning it has to run straight from the browser, without any plugins. That is why GWT seems like the best candidate, it "compiles" straight into JavaScript and uses features only from the official specifications of html.
GWT is ultimately compiled to javascript, so it has all the features of Javascript.
GWT provides classes (Widget, etc..) that wrap javascript/DOM functionality, but this is limited to standard functionality.
You can access all new/non-standard functionality (WebGL, ..) via JSNI. JSNI allows you to call JS, be called by JS and access properties/objects.
So if what you need can be coded in JS it can be coded in GWT via JSNI.
I have a small 2D game engine written in C#, using DirectX. Is it possible to somehow run it in a browser as a plugin? Like for example Flash and others, where you go to a site with a game and it will ask you to install a certain plugin and then you can play the game in the browser, with mouse and keyboard input.
I have searched around for hours and I still don't know what I'm looking for. I have so far primarily focused on Internet Explorer, but there are plugins, addons, extensions, etc I don't know what I need really.
Yes I think it is possible.
For example, I have an HTML page which includes an element like this:
<object id="simpleControl1"
classid="http:RenderTextProject5.dll#RenderTextProject.ScrollableControl"
height="300"
width="300">
</object>
The 'classid' attribute value has the following meaning/syntax:
RenderTextProject5.dll is the filename of a compiled .NET assembly
RenderTextProject.ScrollableControl is the qualified name (namespace plus classname) of a class which subclasses System.Windows.Forms.Control
I can then see the control being rendered in the browser.
I'm using IE (IE8, but it used to work with IE6 too), and I have the .NET framework installed on my machine (but I think I needn't have the RenderTextProject5 assembly installed on the client machine).
There may be some other caveats too (e.g. I needed to run in the Intranet security zone).
See Return of the Rich Client: Code Access Security and Distribution Features in .NET Enhance Client-Side Apps.
Look for Silverlight.. It is maybe not exactly what you need but it is a browser plugin capable of running C# code ;)
There is a relatively new plugin called Unity. It is a bit more complex, as it is a dev/3D authoring environment on its own, but uses C# as its language as far as I know. However I don't know if pure 2D programming is possible (well, may be worked around using ortho 3d?).
The basic version is free to download recently, maybe worth a check.
It is possible to run C# applications in a web browser without using plugins. For example, C# applications can be compiled into JavaScript applications using JSIL.