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.
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've found this nice article about the "injected Way", but the author never finished it :
http://hightechstartups.blogspot.ch/2012/05/different-way-of-developing-browser.html
I would like a bare bone cross browser extension, without any 3rd party extensions or framework (to be as light as possible and not dependant on a 3rd party) that would load Jquery and a JS from a distant server and the ability to load it before or after the page is fully loaded.
I've read a lot of topics about the subject, but since IE10, Chrome 26 and FF20 are out with their new cross-link limitations, i was wondering if somebody had ressources, source code or tutorial about the following requirements :
I need :
Cross browser extension supporting (IE 8+ or 9+ worse case, Chrome
26+, FF20+, Safari)
Ability to inject a single JS hosted on another server. Inserts a script tag that references a javascript file in the head of the HTML
page and then be executed
Not be dependant on a third party extension (greasmonkey) or framework (Kango, Crossrider)
Ability to load before or after the page is fully loaded
This method allows me to customise the browser extension depending on the user's location and it also avoid having updates as the JS is updated on each page refresh.
I'm aware of the downsides, but i would like to achieve this.
I'm aware of cross browser framework like Kango or crossrider, but both don't fit me needs.
The closest example i could find is this How can I run a <script> tag that I just inserted dynamically from a BHO
but it only covers IE and as i got very little Csharp experience, i would like to see a full example to understand it properly and learn from example.
I would LOVE to have a few examples, even if it's not cross-browser (IE being the worst part for me).
Thanks a lot for your support !
Update1:
About Kango and Crossrider, Kango is 2000$ if you want to use IE and for Crossrider you're required to be distributed and monetized by them.
I've managed to code for IE and Chrome, but i was looking for an "elegant" way and figured it was the best place to ask given the level of knowledge of people on this site.
For the installer i currently use NSIS, but i'll test Wix too.
Finally i guess the only way for me would be to learn C++ and .net to get it to work with IE, but if anyone could provide more source code it would be great to test speed and compatibility and discuss here what's the best solution.
Why do Kango or Crossrider not fit your needs? Both frameworks allow you to manipulate the page's DOM (which is what you want):
Kango: Adding content script
Crossrider: documentation, example code
If you want to code your own solution, take a look at the relevant documentation:
Content scripts (Chrome)
The Page mod Jetpack API (Firefox)
Injected scrips (Safari)
Injected scripts (Opera)
Internet Explorer does not natively support extensions. It took me about 80 hours to create a stable and reliable IE extension which supports cross-site AJAX, a (preference) storage method and injection of scripts as early as possible in any frames based on its URL. I developed and tested the extension with Visual Express 2010 on Windows XP and Windows 7, for IE 8-10 (the extension might work on IE6/7, but I decided to not support these ancient and rarely used browsers).
First, I wrote an extension in C# based on LiveReloadIEExtension (a sample IE extension, which in turn is based on this Stack Overflow answer - see also this blog post). It was functional, but it required .NET 4, lacked support of frames, and it's relatively slow.
So, I decided to write an IE extension from scratch in C++. A good starting point is available at http://www.wischik.com/lu/programmer/bho.html: Sample code for C++ BHO, which changes the document's background based on key/mouse events. I've also learned a lot by looking at other code samples on CodeProject, topics on the MSDN forums, questions and answers on Stack Overflow, lots of other blogs, and the MSDN documentation:
DWebBrowserEvents2 interface lists several events which you use to find an appropriate injection point.
Scripting Object Interfaces (MSHTML) lists even more interfaces. You'll be mainly interested in the iHTMLDocument, iHTMLDocument2, ... interfaces.
After creating the IE extension, you want to deploy it of course. I used Wix toolset to create a MSI.
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.
I am developing a Java EE based web application. We have a very limited time to come up with a alpha version and trying to decide on a web framework to use. It has to be something easy to learn but powerful. Standard JSP/Servlet is not an option here due to the time it takes for the development. Appreciate if anyone could advice. Current options are Wicket and GWT. (JSF is also an option)
Wicket is component-based and comes with a bunch of standard components (like pagination, auto-complete, data grids, form handling etc.). If you want to create a standard panel (with the possibility for easy re-use) just create your HTML fragment to use a template (with wicket:id attributes wherever you want to bind dynamic content or sub-components) and a corresponding Java file. Furthermore, you can attach specific CSS and JS files.
In my opinion, Wicket development is good value (functionality) for money. And you get a lot of built-in AJAX functionality without even writing (not reading) any JS. E.g., change the model for a component, attach the component to an AjaxRequestTarget and the panel is automagically repainted via DOM manipulation.
For a quick overview and intro I recommend Wicket in Action by Dashorst & Hillenius. (And don't miss out on other great resources.)
Everything depends on your application. I don't have experience with Wicket, not much with JSF. I have big experience with GWT.
GWT is good if your application has to be mostly dynamic. In GWT you can change everything on the page not even calling the server. GWT is compiled to Javascript. On the other hand, if you have big project, it is quite frustrating if your application in development starts few minutes, because it has a lot of code to compile to Javascript. My opinion: it is not good for big projects.
If you don't need to change your pages so much client-side, I would use JSF2 (or Wicket, if I knew it).
Have a look at this comparison of Wicket and GWT, this may help you decide for yourself:
Wicket and GWT compared with code
I am looking for solutions for 3D visualizations in web browsers.
For now I just need to do research about this topic, i.e. I need to know how many solutions exist and which of these are good and why?
Thanks
Brief overview of 3D on the web:
VRML. An HTML-style markup language for 3D models that was supposed to be the amazing cyberspace future of the web, back when we still thought what the web needed to be popular was just to totally change everything about it. We were idiots. VRML is all but dead.
Java. JVMs from 1.3 can run the Java3D engine in applets. With the decline in prevalence of desktop Java I have yet to see this in the wild.
Flash. 3D-primitive support in Flash 10; libraries that hack it in earlier Flash versions, and provide higher-level engine features. (Papervision, Sandy et al.) This is how the majority of in-browser 3D is done today.
CSS. WebKit provides a perspective transform feature to CSS, which has been proposed for standardisation. Won't offer anything like full 3D engine features of course, but the capability to integrate with HTML content in the page is interesting.
O3D. Google's experimental 3D engine browser plugin.
WebGL. Proposed binding of standard OpenGL to JavaScript and HTML5 canvas. Of interest in that you can use it in plain JavaScript with no plugins, but it's pretty low-level. Currently only available in in-development browser snapshots.
Others. There are gaming 3D engines that have been packaged into a plugin, eg. Unity, and a few sundry proprietary-format model viewer plugins.
Open standard webgl,
if you are prepared to download a plugin - lots and lots
Nothing immediately leaps out for maps, a good place to start is opensourcegis,
Unity3D is a game engine that is (relatively) easy to use and builds to multiple platforms including the web (provided you install a plugin).
http://unity3d.com/
X3DOM is plug-in free, supports a lot of X3D (not prototypes) and is written in web browser javascript (where you can do all the prototype stuff you like). Cobweb is an ES6 JavaScript library which supports VRML2 (except collisions last I checked). Cobweb is plug-in free and runs in firefox. Both of these tools are written in WebGL. You may have to convert your event code to X3D. In x3dom, you may have to call x3dom.reload() if you load elements (X3D and Scene) programmatically.