newbie: lamp stack to dart vm - dart

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.

Related

Is IntelliJ's support for Dockerized Python environments compatible with Python running on a Windows container?

My Python project is very windows-centric, we want the benefits of containers but we can't give up Windows just yet.
I'd like to be able to use the Dockerized remote python interpreter feature that comes with IntelliJ. This works flawlessly with Python running on a standard Linux container, but appears to work not at all for Python running on a Windows container.
I've built a new image based on a standard Microsoft Server core image. I've installed Miniconda, bootstrapped a Python environment and verified that I can start an interactive Python session from the command prompt.
Whenever I try to set this up I get an error message: "Can't retrieve image ID from build stream". This occurs at the moment when IntelliJ would have normally detected the python interpreter and it's installed libraries.
I also tried giving the full path for the interpreter: c:\miniconda\envs\htp\python.exe
I've never seen any mention that this works in the documentation, but nor have I seen any mention that it does not work. I totally accept that Windows Containers are an oddity, so it's entirely possible that IntelliJ's remote-Python feature was never tested on Python running in Windows containers.
So, has anybody got this feature working with Python running on a Windows container yet? Is there any reason to believe that it does or does not work?
Regrettably, it is not supported yet. Please vote for the feature request https://youtrack.jetbrains.com/issue/PY-45222 in order to increase its priority.

Ucma 4.0 / 5.0 on NanoServer or Windows Server Core?

I want to use ucma API on windows container.But I want to know, can I host the API on nano server or windows server core?
I searched ucma documents but I didn't find any information about containers.
According to requirements, it seems to work only with Windows Server 2016 and Windows server 2012.
So I was able to get a UCMA application to start/register and even accept a call running on a server core container, but it took some doing. The runtime needs to be installed in the container image, which needed to be done manually. You also need to provision the app using the container host's details, and get the cert into the container.
The place where it all breaks down though is with media-if your app needs to play/record prompts for calls, you can't do it from server core. Container or not, the OS is missing the runtime for WMA, and from what I've found, it can't be installed.
For what it's worth, the SFB team doesn't even support UCMA on server core, let alone core on a container, so you're dealing with a couple of layers of "not supported" stuff.
UCMA applications will work fine on Windows Server Core as long as your application doesn't have any UI.
Nano Server I'm not sure.
As far as I know, Nano Server only runs 64-bit applications. UCMA application can run in 64 fine but what I don't know is what .net framework is supported on nano server. If it supports the full .net framework, it may work.
I don't think you will know unless you try it yourself and see if it works or not.

Do I have to compile to JavaScript?

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.

How to bundle Electron application and windows service together?

I am very new with electron application. I need some help with election installation.
I have an Electron desktop application and a windows service.
I can start and stop my pre installed services by using sudo-prompt package.
I am creating windows installer by using electron-winstaller package.
But I want to bundle my windows service along with my electron application. My requirement is when I install my electron package then it should install my service also, when I uninstall my package then that service should be uninstalled.
Please help me out. Any clue, Any suggestions will be appreciated.
If you think this should be achieved with something else then please do suggest me.
Electron's windows installer packager strikes me a specific case tool that would likely hit limitations in scenarios like this. I would use a general case tool instead such as the Free and Open Source Windows Installer XML Toolset aka WiX. I would also use with that another FOSS application called Industrial Strength Windows Installer XML aka IsWiX.
WiX allows you to describe and build MSI databases using an XML/XSD domain specific language. It supports MSBuild for easy integration with your CI/CD pipeline. IsWiX* is a set of project templates and graphical designers that provide an opinionated project structuring (scaffolding) and greatly speeds up the learning curve and implementation. For example, this installer you describe could be done without writing a single line of XML.
For more information see: https://github.com/iswix-llc/iswix-tutorials
The desktop-application and windows-service tutorials should** show you everything you need to know to author this installer. Basically follow the desktop-application all the way through and then skip to the final portion of the windows-service tutorial where you define the windows service.
I'm the maintainer of IsWiX
** This assumes your service exe is a proper Windows service that interfaces with the windows service control manager. If it's really just a console app that runs as a service you will need to include a program such as srvany.exe. This will require one line of hand crafted XML to extended the service definition in the registry with the proper command line value to be passed to your exe. An example can be found here: Wix installer to replace INSTSRV and SRVANY for user defined service installation

How do I access Linux binaries from Windows when using WSL?

I'm experimenting with the new Windows Subsystem for Linux as a way to develop Rails applications in Windows. I have WSL installed and I have Ruby in it but how do I use that Ruby from a Windows GUI application, specifically, RubyMine:
This is so I can easily start rails, run tests, etc.
If anyone is wondering how this can be done at this time with the latest version of Ruby, there is a WSL connector for the remote repo of ruby.
[Update 2020-10-30]
Updating the response below as a lot has changed and improved since my initial reply in 2017 😜
The awesome team at JetBrains have enabled RubyMine to talk to WSL via SSH and to use the "remote" Ruby interpreter, and even debug Ruby code running in WSL! :)
Also, in Windows 10 1903, WSL provides the ability to access Linux distros' filesystems from Windows via the \\wsl$\ pseudo-UNC path.
In Windows 10 2004, WSL added a Linux icon to File Explorer making it easier to discover this pseudo-UNC path.
So, in Windows 10 >= 1903, Windows apps, editors, IDEs, etc. can also access files stored in, for example, \\wsl$\Ubuntu\...!
👉 Notes:
Accessing files in Linux via \\wsl$\... will be slower than accessing files locally because file IO requests have to be marshalled back and forth via a 9P fileserver. If you intend on accessing files intensively, we recommend storing the files in the filesystem closest to whatever you'll be using to access those files most intensively.
Thus ... while you can access files directly via the pseudo-path, using WSL integrations built-in to tools like RubyMine, VSCode, Visual Studio, etc. should be preferred if available.

Resources