WebExpress | Web browser in C # and WPF
kandi X-RAY | WebExpress Summary
kandi X-RAY | WebExpress Summary
This is an advanced web browser created in C# WPF.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of WebExpress
WebExpress Key Features
WebExpress Examples and Code Snippets
Community Discussions
Trending Discussions on WebExpress
QUESTION
I am programming a node.js webexpress server that uses pug (jade) to create a website for viewing (revit) files uploaded to autodesk forge.
The webserver uses axios to communicate with forge and allows for logging in, creating and opening a bucket, uploading files and to get the URN for projects that were uploaded to the bucket.
When it comes to setting up the viewer I have examples that use viewerapp being set up locally in the browser. I am however using pug to create the pages and this does not seem to allow for keeping the page with the viewer alive in the browser and only updating it. Otherwise every mouseclick in the browser window would set up a new viewer, which seems both slow and overkill.
The socket library appears to allow for two way communication between webserver and browser but that's a whole new library to learn that I rather would not include if not necessary.
So the first question is if it is even possible to use node.js webexpress and pug to dynamically create a webpage with the forge viewer in it, and buttons that allow for changing views without resending the entire page including setting up the viewer again.
And if so, is there a simpler way to do so than relying on the socket library?
I can of course put all the viewer logic in a javascript file that gets loaded with the page, but I rather not do so if not necessary, as that would expose too much of the javascript and the connection to forge to the end user. I would prefer it if this can be kept on the webserver instead.
I have looked at https://learnforge.autodesk.io/#/viewer/2legged/nodejs and other sample code but this does not seem to answer my question in that the viewer seems to be created and maintained in the browser, not by the node.js webserver.
...ANSWER
Answered 2019-Jan-05 at 04:30So the first question is if it is even possible to use node.js webexpress and pug to dynamically create a webpage with the forge viewer in it, and buttons that allow for changing views without resending the entire page including setting up the viewer again.
For sure. Viewer can be dynamically loaded and unloaded with native JavaScript. See a good read for details here and sample code here. So can the models - see an article here and sample here.
One pitfall you’d want to avoid is to never hide/detach the canvas without unloading the Viewer first. At the time of writing Viewer does not support rendering to a zero-sized canvas, yet.
And if so, is there a simpler way to do so than relying on the socket library?
Unfortunately Viewer does not support server-side rendering just yet, so we are not spoiled with options other than Websocket. And your concern is totally legit, see some great discussion here and here over the security of WebGL. There’s no other rendering engine available for Viewer, and that should maintain unless certain other next-gen tech takes precedence over WebGL (do not see that coming in the foreseeable future though) or for certain WebAssembly library to take precedence over directly calling WebGL, which should take care of code obfuscation to certain extent.
However nothing should stop you from securing your code with proper AAA (Viewer supports API proxy and that should further harden your security measures), as well as these common obfuscation practices to protect your code from abuse.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install WebExpress
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page