Do I have to compile to JavaScript? - dart

imagine you wanna build a web project for the public without any JavaScript dependencies, because you just love Dart. Do I have to compile Dart to JavaScript no matter what or is it possible to run Dart VM on server side with some nginx config.

If you have server-side code in Dart, you can run it on the server using the Dart VM - no need to compile to JS here.
Using nginx with server-side Dart might have advantages for some use cases but it is by no means necessary.
For code that is supposed to run in the browser, you need to compile to JS first.

Dart is deployable everywhere, check deployment diagram showing where it runs inside Dart VM and where it runs compiled.

Related

Is vaadin Java UI framework is supported by quarkus framework

I want to use the vaadin UI java framework in my quarkus framework, But I am unsuccessful in that. when I am loading any static resources(CSS, js, etc..) files it is not getting loaded And I guess not even default CSS is getting applied to the UI components, I am new to this framework, If anyone wants to suggest, please.
Here is the sample demo UI project which I am trying to implement.
[https://harshithpawarg#bitbucket.org/harshithpawarg/quarkus_vaadin.git][1]
run Command: $. mvn clean install && mvn compile quarkus:dev -pl ui
Vaadin is working on an integration with Quarkus. The target version is Vaadin 22. They might already have something running on Vaadin 21.
The current work can be seen in the GitHub repository of the extension and the repository of the project base.
Update: Vaadin 22 is released as a non-LTS version and integrates Quarkus.
As far as I know, Vaadin doesn't yet support Quarkus (see https://github.com/vaadin/flow/issues/5485).
However, experimental Quarkus extensions to use Vaadin with Quarkus are available here and here.
Why don’t you make a Quarkus backend and another Java project with Vaadin which communicates via Rest with the backend ?
I was able to get Vaadin 14 (vaadin-demo-business-app) working as native image in production mode using the quarkus-vaadin-lib example.
I did use the native-image-agent to generate the META-INF/native-image json files and added wildcard entries in resource-config.json
{
"resources":[
{"pattern":"META-INF/VAADIN.*"},
{"pattern":"META-INF/resources.*"},
Only dev mode is harder, when running in Quarkus the browser can't resolve the frontend through webpack:// and webpack-internal:// and I do not know how to achieve this.
But this can work as long as you can keep the modules using Vaadin compatible to run as normal war, and compile the end product into a Quarkus+GraalVM executable. Only you can't use Quarkus specific code in the web ui modules then which still makes it all a bit hacky.

Getting Error While Running Appium code through Jenkins but its running fine on local

While Executing the APPIUM code on the local system running fine but when Executing Through Jenkins Job It giving the Error.
It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it is not accessible
I've tried This Link Error : impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found
Most probably you're suffering from a form of a Jar Hell, to wit there is a dependencies conflict due to using Selenium Java Client libraries which are not compatible with the one which Appium has as the transitive dependencies.
If you're managing dependencies manually - make sure that your project classpath matches the above picture, however it's better to go for a dependency management solution like Maven or Gradle and make sure to have only Appium declared as an explicit dependency for your project - and the issue should go away.
Check out Appium - Code Examples - Java for comprehensive information and a sample project you can use as a basis or reference.

How to setup robot framework project for docker parallel testing

Hi I am really new to robot framework and docker so please bear with me.
I have test cases written in robot framework using PyCharm which are executing fine.
I also have grid up and running which contains one firefox and one chrome browser.
I want to run my testcases in parallel on that grid. Every test case on a separate browser side by side. I need help on what changes to make in my project and how to execute them on docker.
Tests run on Grid browsers if we pass the following params to Open Browser keyword:
Open Browser ${URL} ${Browser} ${NONE} http://localhost:4444/wd/hub
I'd suggest trying Selenoid, I use it for paralleled cross-browser run on Docker: https://aerokube.com/selenoid/
I have an idea setup CI with Robot Framework, you can get some information to build it:
https://github.com/dylanops/docker-robot-framework

Define preprocessor variables in docker compose build

I want to make some P/Invoke calls from my ASP.Net Core application and for this I obviously need to determine which platform I'm running on.
The project uses docker and linux containers so there might be only two possible platforms in my example:
Linux (when running the project in docker)
Windows (when running the project without docker)
With the help of Environment.OSVersion.Platform I'm able to detect the platform at runtime, so I can DllImport the necessary dynamic libraries and switch through the Platform values to determine which imported function to execute.
Although this works just fine I really would like to be able to remove this runtime overhead and be able to just wrap parts of my code with #if directives (e.g. #if Docker or #if Windows) to compile just the code I need for the type of deployment I'm doing.
Is there any way to accomplish this in an Asp.Net Core project with docker support?

newbie: lamp stack to dart vm

This is a newbie question, I have not read any dart doc, I just saw the video from Google I/O 2013. My company has webapp using Linux apache mysql php. Say,my aim is to change it using dart vm, but slowly. Maybe I'll write dart, convert it to javascript. My questions:
1. can I replace the php part with dart (convert to js) while still using LAMP ?
2. if the dart vm already installed in a VPS, can client access it using other browsers beside chrome?
Hope this is the right place to ask the question.
Thank you
Yes, you can replace PHP with Dart and run it via Apache. See this article. There are some libraries to also enable connecting to MySQL (like this one).
The Dart VM is unrelated to client access; the Dart VM on the server would only be used for server-side Dart. Client-side Dart is generally converted into JavaScript using dart2js (via pub build) and this will work with all modern browsers.

Resources