Is there any way for ActiveX controls to work on Linux? I'd imagine the answer is no, but just want to be sure.
My company is considering a Linux port of a ASP.NET project (using Mono), but it uses ActiveX controls quite heavily, so we wonder if it's even feasible.
Sorry if the question is dumb!
Even if ActiveX were supported on Linux, you still should not use it, since it is rather alien (as in 'hard to maintain') on that environment.
My advice is to rewrite the entire project with AJAX or flash in such a manner that it will run in any browser on most any platform.
Mono is not ActiveX! Even if you could rewrite using client side mono for activeX, your code would only run if the client machine has a mono installation.
If you're forced to use some third-party ActiveX controls, you can't use them directly on Linux - they expect a certain runtime enviroment thats not trivial to provide (it could be done, but its not viable).
The best thing you can do is to write a small host-program, running in WINE, that loads the controls and provides an alternative interface to them via a IPC mechanism.
As a variation on gf's answer, you could run Mono within Wine on Linux. Mono has some COM Interop support, and Wine supports COM, so in theory this will work.
Whether you want to run Mono atop Wine atop Linux is another matter, as it increases the number of things that can break.
Related
I just wonder what are the similar frameworks and tools for Linux web development.
And can I use Visual Studio to develop websites for Linux Apache? Thanks.
Mono (it supports ASP.NET) and MonoDevelop, I guess.
Web development on Linux isn't specifically tied to one programming language, framework or IDE. More commonly they are related in terms of being Free and Open Source (free as in cost, and also the ability to do what you want with the code).
I loved Visual Studio when we used it for classes, however I haven't quite found a tool that is the same. The only thing near to this would be Eclipse or Netbeans.
In general, many Linux enthusiasts use emacs or vi (or vim) for their editing. At first glance you may not see the power they have, but emacs is definitely a wonderful editor, and vi is very good once you become familiar with it.
For Web programming langauges and frameworks, you have a variety to pick from.
Python is one of the most popular languages to use for Web development. This language has been used by Google, Reddit, Quora and a host of others. Perhaps the most popular framework for Python is Django, and each (Python and Django) have their own following, as well.
Ruby is a wonderfully beautiful langauge, too. Most likely you may have heard of Ruby on Rails, which is a great Web framework allowing you to quickly turn an idea into something actual in no time.
PHP is another popular language, and has the PEAR framework. Many of the online forums that you can buy are written in this language, such as vBulletin and the ever famous phpbb.
In my opinion, it depends on what you want to accomplish. Python and Ruby are great for Web development, as well as non-Web, too.
Ad 1) There are several IDEs. I prefer eclipse, no matter if for html, php, python, c or java.
Ad 2) Yes you can. Create your websites, copy them to your /var/www (or wherever your ww-root) is and you are set.
EDIT: < personal opinion > By the way, I mean there is no thing like "windows web development" and "linux web development". In the end it is of no importance at all on which OS you developped your web application, on which OS the web server runs, which OS the client has or which server- and client-side languages you used (as long as you don't use something certain clients can't provide). You have a web server that communicates via HTTP, HTTPS (or whatever) with clients. This server passes certain data via CGI, lib-apache2-mod-XYZ, WSGI, the interface IIS uses for ASP (or whatever) to executable scripts. These yield a result that the web server then publishes via (fill in arbitrary OSI layer 7 protocol) to the client, no matter what the content: HTML, CSS, images, JSON, you name it. Your operating systems has nothing to do with this.
Not all interfaces are available on all hosting server OS, but you always have a bunch to choose from and what counts is the result in the end. Quidquid agis, prudenter agas et respice finem. < /personal opinion >
There are a ton. You can use mono for ASP.NET that runs on Apache. There are even other languages. PHP, JSP, Djanjo, Ruby on Rails, Node... just to name a few languages/frameworks. There isn't a build of Visual Studio for Linux and you would be hard pressed to set it up to compile Linux assemblies on Windows.
Is it possible? If so, please explain how to do it.
I think you are looking for mono.
You can run most ASP.Net applications on Linux using Mono:
http://www.mono-project.com/ASP.NET
Mono is an open source implementation of (most of) .Net
As other posters have noted, you can use Mono and Apache with mod_mono. I have no idea whether it's robust and feature-rich enough for your needs. (Mono's current implementation of WCF is only skeletal, for example.) So whether it's advisable depends on what you plan on doing. If other people's money is riding on your applications being robust, it's safest to just plonk some money down on a windows server and going full Microsoft.
Update: in the comments, you suggest that price is a concern. In the long run, what you pay for hosting is tiny compared to the costs involved in using inferior software. I'd recommend either using Windows hosting, or using a different development environment altogether if you have a choice. LAMP, Java, Ruby on Rails--each of these are perfectly fine choices, and I'm sure there are many others. But if you are constrained to using .NET for some reason, Microsoft is really the only choice right now for enterprise-quality ASP.NET.
I wouldn't try using Mono. You could use VMware or something but I would try go a different route. You can run a very basic ASP.NET site on Mono; but I mean very basic. If your site is non-trivial, I wouldn't recommend this approach.
It's possible to run ASP.NET on Linux. You should take a look at the Mono project, Mono has an implementation of ASP.NET and ASP.NET AJAX.
You need to use mono and XPS (which is the server that runs the ASP.NET framework on mono). There is a standalone version of XPS and one that works through Apache. That is the best way to serve the files on Linux.
It may be possible with the use of WINE (or something similar, Mono, thats it.) but you will require all the .NET framework so it may be a bit much to setup
I've heard of ASP.NET compiled DLLs which only works on Windows Server, but I would like to know if there are any other compiled server side languages?, maybe even ones for Apache server?
Installation of the runtime shouldn't be a problem because I will have physical access to the Unix/Windows servers, but if it is a CGI plugin its an added benefit since I can install it using only FTP.
Java would be at the head of the list of compiled languages for use with Apache - especially when you get away from Windows.
Also, you can use ASP.NET on non-Windows platforms with Mono.
You can run ASP.NET using Mono and it's mod_mono for Apache
JSP with Tomcat
PHP is compiled at runtime similar to ASP.NET. Or if you want to take the extra step you can use a PHP compiler to pre-compile your PHP (also a capability of ASP.NET).
PHP is not as pleasant to work with as ASP.NET in my opinion, but if I were restricted to Linux it would probably be my choice for its speed, overall popularity and support.
The term "compiled language" doesn't make any sense. A language isn't compiled. A language isn't interpreted. A language just is.
Whether a particular implementation uses a compiler or an interpreter is a trait of the implementation and has nothing to do with the language. Indeed, every language can be implemented with either an interpreter or a compiler. In fact, the vast majority of modern language implementations (CPython, Perl, PHP, YARV, IronRuby, HotSpot, Mono, CLR, TraceMonkey and so on) use both an interpreter and a compiler. HotSpot for example constantly switches between compiler and interpreter depending on which is faster.
So, to answer your question: every language that can access environment variables, read text from stdin and write text to stdout can be used with CGI and thus Apache (and indeed pretty much every webserver on the planet). And every language can be compiled. Therefore, every language can be used in the way you describe.
I would like to experiment with ideas about distributed file synchronization/replication. To make it efficient when the user is working, I would like to implement some kind of daemon to monitor changes in some directory (e.g. /home/user/dirToBeMonitored or c:\docs and setts\user\dirToBeMonitored). So, I could be able to know which filename was added/changed/deleted at every time (or within a reasonable interval).
Is this possible with any high-medium level language?. Do you know some API (and in which language?) to do this?
Thanks.
The APIs are totally different for Windows, Linux, Mac OS X, and any other Unix you can name, it seems. I don't know of any cross-platform library that handles this in a consistent way.
A bonified answer, albeit one that requires a largish library dependency (well-worth it IMO)!
QT provides the QFileSystemwatcher class, which uses the native mechanism of the underlying platform.
Even better, you can use the QT language bindings for Python or Ruby. Here is a simple PyQT4 application which uses QFileSystemWatcher.
Notes
A good reference on on creating deployable PyQT4 apps, especially on OSX but should work for Windows also.
Same solution previously posted here.
Other cross-platform toolkits may also do the trick (for example Gnome's GIO has GFileMonitor, although it is UNIX only and doesn't support OSX's FSEvents mechanism afaik).
In Linux it is called inotify.
And on OS X it's called fsevents. It's an OS-level API, so it's easiest to access from C or C++. It should be accessible from nearly any language, although bindings for your preferred language may not have been written yet.
I have recently gained access to a Mac. I am wondering if anyone has any tips/advice for setting up Mono on a mac for development and execution of ASP.NET? Most resources point to Linux implementations which tend to differ a lot from the way Mac's do things. Any tips or advice would be helpful
To launch the development ASP.NET server, just open a terminal window and run the "xsp2" command from the Mono installation.
The only thing that is missing from the Mono distribution on the Mac compared to Linux is the Apache module, that one you will have to compile yourself if you want to deploy your application in production on OSX.
Since I first worked with mono osx, they've added Cocoa# and ObjC#, but the ASP.NET core was pretty solid (about 3 years ago). You can in fact write web applications according to the Onion book, and port 'em to IIS with little or no difficulty.
Honestly if you want to run ASP.NET you probably don't want to struggle with getting it to run via mono on MacOS. Intel-based Macintoshes can boot Windows, and Apple provides Windows drivers for their various devices as part of Boot Camp.
Alternately you can buy Parallels or VMWare Fusion for less than $100. I use VMWare Fusion. There is also a Mac version of VirtualBox from Sun which is free, though I have never used it.
For MacOS development (not .Net) you really should try Apple's XCode. It is free. It primarily focuses on Objective C though Python, Ruby, and other languages can be used to develop native Mac applications.
Edit 9/22: I'm sorry neither you nor Kev found this a useful answer. Let me try to expand a bit: the Macintosh has a long history of software being ported in from Windows, applying a theme to make the GUI elements look Mac-like but otherwise being content with a minimum cost port. Such software never behaves like a real Mac application: it doesn't respond to AppleEvents, it won't be scriptable, it handles only the cross-platform clipboard formats, etc.
You're free to do whatever you want, including running ASP.NET using mono. If its for your personal use, knock yourself out. However if you're considering it as a way to offer your web-enabled product in a Mac version, I urge you to reconsider. The Mac market has for the most part rejected such products. You'll get some sales, but nothing like you would get for an app which behaves like a native Mac application.
Now, let the down-voting continue.
You can also run ASP.NET via NGINX - easy to install using:
sudo brew install nginx
See installation tutorial: http://www.robertmulley.com/tutorial/nginx-install-and-setup-mac-os-x-mavericks/
See configuration steps for your app: http://www.mono-project.com/docs/web/fastcgi/nginx/
(Note: see my pull request as the fastcgi-mono-server4 should now be used - https://github.com/mono/website/pull/82/files)
Why use Mono on a Mac? Run Parallels, VMWare, or Boot Camp.