One of my concern about writing Web Apps using non-compiled language (Ruby, PHP, Javascript (server side), etc) is my source code can be copied and modified by another person and then they could sell it, claim it as their own. I'm seeking another language to develop my next project, and find that Go + Revel is quite promising in term of speed and feature (error line, hot code-reload)
The question is, is revel support deployment as binary?
Golang being a compiled language, everything you do with it is a binary.
What is losing you here is the hot-reload functionnality: even with it, you are still using a binary, but Revel is watching the source and compiling it again when needed.
So yes, an application written in Golang with Revel is a binary.
Related
I have explored, does Go support on Micro Controller Unit. Got some info that is TinyGo. Have doubt is TinyGo equivalent to Golang which support in Linux.
The short answer: Yes, when using TinyGo.
The long answer:
As of the time writing TineGo directly supports more than 70 different microcontroller boards. And about 65 different peripheral devices.
TinyGo is a new Compiler, which is written in Go that consumes normal Go code. It also makes use of the LLVM compiler toolchain to be able to emit the binaries needed for microcontrollers.
Using TinyGo you can shrink a simple HelloWorld program from ~1MB binary size to about 480 bytes on an Arduino UNO.
TinyGo has reimplemented large parts of the Go standard libary, but not everything.
Check out this site for more details on the support of std libraries.
IDE Integration:
In order to achieve a nice developer experience, the TinyGo Team does also provide a VSCode Extension, which provides functionality to switch the context to your currently used board. That way the go language server and intellisense etc. are enabled to help you out while coding.
Also Jetbrains is working on a Goland Extension, which provides atleast the same functionality as the VSCode extension, if not even a little bit more.
Summary:
TinyGo is not yet an in place replacement for Go, but you can already build really great things using TinyGo. If you want to start with microcontroller projects and want to use Go then chose TinyGo.
Soon I will be coding the file patcher for my application (check if the files are up-to-date and download newest if not) so its not much to code.
The problem is that I don't want the application users to be forced to use additional libraries like .NET (even though I like to code in vb.net or C#). I keep in mind that the .NET framework is installing together with the Windows but still there are plenty people who somehow doesn't have this framework installed, and thats why I'm looking for the programming language that wont require an additional libraries to run the application.
I haven't got much knowledge about programming in C++/Java but I have some experience with the AutoIT, vb.net, C#.
So the question is, what programming language will be the best for this purpose?
This answer is for "what language is available on any version of Windows without additional requirements". There are many other options for "what I can use to create application that can be xcopy deployed on any version of Windows".
JavaScript is probably your best bet - it is supported on most recent versions of Windows (according to Wikipedia article - Windows Script Host JavaScript available for scripting starting with Windows 98). Allows basic operation with files and HTTP communication - maybe enough for simple patching application.
Next would be native Win32 application, but lack of C++ experience will make it hard.
Freepascal, D and Go — to name a few — are much easier to program than C++ and could be told to produce statically-compiled binaries (not dependent on anything but certain system DLLs).
I, personally, would use the latter as it has all the necessary tools (including HTTP and binary I/O) in its standard library and is super-easy to get started with.
Can GO be used as a scripting language within an application ? I can't find any informations about this: is there a dynamic link library version which could be interfaced from a Windows application with some standard methods such as Compile(), Execute and features such as callbacks, variables sharing etc ?
This might sound strange at first but go with me on this: I think it would be a perfect candidate for a scripting language because it's compile time is so fast....hear me out...
Most scripting languages are interpreted, and so they do not require (or even provide in some cases) compilation. However compiled languages are safer in general because they can catch certain errors at compile time, which is better than, for example, catching a syntax error at runtime.
With Go, the compile time is so speedy that whatever program is running your Go code (e.g. a web server) could hypothetically compile the code on-demand if the code has changed, and otherwise use the compiled version.
Actually if you check out Google App Engine and download their dev web server for Go (https://developers.google.com/appengine/) you'll notice that their web server does exactly this. If you run through their Hello World tutorial for Go you'll notice that if you make changes to your code you won't need to recompile the Go code in order for the changes to take affect.
Go is not a scripting language. Because Go is designed for fast compilation, there have been some attempts to use it as a scripting language. For example,
gorun
GoNow
In theory (and perhaps somewhere out there w/o me knowing), Go can be used as a script language. Just note that it makes as much sense as using e.g. C as a scripting language.
No. Go code cannot be used within a non-Go application unless Go is responsible for starting up the whole app.
I've been playing with Go and GAE using GoClipse for a bit now on my Mac (since they won't run on Windows). Recently I noticed that when I goinstall a package from github it had some problems working. I figured I'd reinstall the whole thing and set it up properly. Go installed nicely, but when it came to integrating the GAE SDK it took me a couple hours of searching and came up with only this article:
http://code.google.com/p/goclipse/wiki/GoClipseAndTheGoogleAppEngine
But since it tell you to move files from the go/scr folder (where goinstall installs packages), I reckon it is not the correct way to set everything up.
Can anyone give me a clear, easy to follow step-by-step guide on how to install both Go and GAE SDK on a Mac?
The short answer is that Go and the GAE SDK do not integrate in the way that (I think) you are looking for. The GAE SDK includes its own version of the Go toolchain that differs in some important ways to the standard tools. Those differences are deep enough that it is unlikely you will derive much utility from trying to unify the two. Here are the big differences:
GAE does not support some packages from the standard lib e.g. "unsafe"
GAE does not support CGO
GAE often lags the main distribution by one or more major versions
You cannot use any binary libraries (go or otherwise) in a GAE project (you need source for everything)
goinstall is not intended for use with GAE projects
Because of this I treat my GAE and non-GAE tools as completely separate. If you're only doing GAE development, you could do without the standard tools altogether.
I'm wondering if there is a way to create a Desktop Application that is essentially a Browser, except that it only runs my Application, doesn't need installation and is a static executable that contains the HTML/Images/CSS/JavaScript packaged into it, with an option to access arbitary embedded resources through JavaScript?
I believe Mozilla/Firefox allows this through their XUL Framework, which is actually used for Applications (see Celtx). However, the last time I looked into it (~3 years ago), it was a horrible experience and overly complicated.
Has this changed? Or is there a WebKit based option?
You should try Chromeless.
.. doesn't need installation and is a static executable that contains the HTML/Images/CSS/JavaScript packaged into it, with an option to access arbitary embedded resources through JavaScript?
Chrome supports .crx files which is essentially a zip file with the resources archived into it. It doesn't technically require installation since it's run on the Chrome browser itself.
I know it's not directly relevant to your question but I think building web apps with HTML5, CSS3 and JavaScript is the way to go. You can even package it and have it install like an app and distribute it via an app store even.
I went with XULRunner in the end. The latest version is much improved over the one I looked at several years ago.
You could use NW.JS:
https://github.com/nwjs/nw.js
NW.js is an app runtime based on Chromium and node.js. You can write
native apps in HTML and JavaScript with NW.js. It also lets you call
Node.js modules directly from the DOM and enables a new way of writing
native applications with all Web technologies.
Basically you create a folder with your entire html app. On Windows, just add 4 files (or more depending on your needs): package.json, nw.exe, nw.pak, and icudtl.dat. When you run nw.exe, your app will launch in a packaged version of chrome with node.js support. You can access the file system using node commands directly from your original html.
The drawbacks: NW adds ~60MB to your application and additional memory overhead.