Looking for LAMP equivalent to ASP.NET - asp.net

We have a fairly large system involving multiple applications running on Windows, written in .NET. These include a number of web applications using ASP.NET.
We have a number of unrelated web applications written in LAMP - Linux/Apache/MySQL/Php.
The greatest advantage we've seen in ASP.NET is the ease with which code can be shared between web applications, win-form applications, windows console applications, and windows services. We have signficant code in .NET assemblies that are shared across all of these environments.
Apache/Php has some significant advantages over ASP.NET as a web programming environment, but if there is anything in it that is equivalent to .NET when it comes to integrating code that is shared across non-web applications, I'm unaware of it.
So I'm asking. Are there any technologies that provide the same sort of easy and seamless integration of shared code modules between Apache/Php and non-web applications?

The only environment with most of what you are asking for is Java.
Take the same code, stick it in a swing app, servlet, applet, heck even throw it in a mobile device, it'll work. JDBC should be a nice abstraction over most databases, so you're clear in that area.
Other than that, requesting something similar over the LAMP stack is something I believe does not exist at the moment.

Not that I know of, but I do know that Mono has a runtime module that can be plugged into Apache, effectively running an ASP.NET application under it. See here on the blog on how to do this.
Edit: As per Robert's comment, the link on that blog is broken! Here's the official link to sourceforge.net. Sorry!
Hope this helps,
Best regards,
Tom.

Related

.Net and Java EE approaches when it comes to "Application Servers"

Disclaimer : This is a general question regarding App Servers, not a specific programming question. If this is not the right forum for it please redirect me to the right place.
I have equal experience in both Java & .Net technologies, and I have the impression that the approaches are radically different when it comes to Application Servers. In the Java World, App Servers cover a broad range of services and features, whereas .Net has IIS (very roughly equivalent to Apache/Tomcat) in one hand, and Windows OS itself to handle some specific tasks (Services for Examples), plus the .Net framework itself consisting in different boutique modules.
This may explain why Java Application Servers may appear somehow "massive" to a regular .Net developer, as much of the load managed by the App Servers in Java EE is an integrated part of Windows Server OS itself.
The usual issues seem to be tackled very differently between the two platforms, making it hard to really compare the features offered by any Java EE App Servers to a .Net Architecture, on a side-by-side basis.
Is this vision roughly correct or am I missing something ?
Sorry in advance if my question is not clear enough, but you I hope you get the idea.

VB6 and ASP.NET interoperability

I am supporting an ASP.NET app, which is installed on a web server and a VB6 app installed on a different app server. There is code duplication in the VB6 app and the ASP.NET app. I want to use some of the code in the ASP.NET app in VB6. I believe I have three options:
Expose the required functionality in an ASP.NET web service. The VB6 app will consume the web service.
Rewrite a small section of the vb6 app in .NET and extend the asp.net app. This will eliminate some of the code duplication.
Setup a class library for the ASP.NET app. Install the vb6 app on the web server. Expose the required functionality from the class library in a type library.
Which option is best? I believe option 2 is best.
Option 1. That leaves your shared, already-tested code on the most modern platform.
This is very hard to answer, as it varies for each company and each situation.
As a general rule, I'm very much in favor of using web services where possible, especially if multiple applications are using the same logic for the following reasons:
If I have to change the logic, I can do it in one place and fix all apps that depend on it
The same can be said for database connection strings, etc.
A bug fix can also often be fixed in one place.
I've had difficulties with a particular database that I need to deal with, where the vendor's updates tend to break their .NET adapter. Twice I had to modify/recompile a ton of apps to resolve this. Since then, we made it a policy to connect to that DB only via web services, so I'll only need to update one app in the future.
When developing mobile apps, the simple fact that we already had all our code in web services makes it that much easier to write apps that are strictly UI and leaving the business/database access logic as-is in existing web services.
All of those are pretty much "Standard" arguments for the SOA approach.
All things considered, my first recommendation, not knowing your specifics would be option #1.
There is a fourth option - a total rewrite of the VB6 app, if it's feasible, and if you can convince those who control the budgets and time allotment. Even with that, you can use the Service Oriented Architecture and split much of the logic into web services.

Web Matrix: should I use it if I am already well versed in VS?

I have been reading a bit about Web Matrix, I like the simpleness of it. But should I even bother if I am already using VS2010 pro? I was thinking maybe for small clients that want a simple site with a blog it may make things quicker? Is it worth looking more into?
And if I do make a simple site with wordpress with web matrix, I should still be able to host it on an apache server, even though web matrix is a microsoft product?
thanks!
The question could use some tweaking. You're asking which IDE to use, but you you really mean simple - (Web Pages and or Packages like WordPress) vs complex - traditional ASP.Net (Web Forms and or MVC).
That said, Microsoft is acknowledging the various minimalist movements going on in their community. People are rejecting the idea that the complexity of the ASP.Net, WCF, IoC, DDD is necessary in every project.
Out of this movement you see projects like OpenRasta and OWIN are pushing for simpler servers and services. While projects like Nancy look to simplify the application stack. And dapper and massive both are attempts to simplify data access.
Microsoft's answers to this are asp.net web pages, supporting php, and things like WCF Web API.
For your own direction, you need to decide if the benefit of having a simpler option is worth the effort of learning multiple frameworks (say web pages for simple and mvc for complex), or if you want to only know one framework and pay a productivity penalty when putting the proverbial square peg in a round hole.
WebMatrix is about the programming framework rather than the IDE. You can use VS to create WebMatrix sites, which has several benefits over the WebMatrix IDE including Intellisense. In fact if you open a site in the WebMatrix IDE and have VS installed you will get an "Open in Visual Studio" icon on the toolbar.
I would definitely recommend using WebMatrix for smaller sites.

ASP.Net portable server

I'm trying to start on a new project to help enrich my asp.net knowledge, since I'm not completely satisfied with what my class is teaching me. From my (very little) experience with Rails, I recall every application containing its own development web server. Say I were trying to create a local-only application, but I want it to run in a web browser (Therefore ASP.Net). Are there any options in terms of being able to distribute an application and have it launch its own, or just not require IIS/VS/Apache-mono?
You may want to look into aspNETserve. It sounds like it would fit your needs. I haven't worked on it recently, so it probably has some rough edges.
On the plus side its all open source, and if you are just getting started with ASP.NET it would be a real eye opener on how the internals of the ASP.NET lifecycle operate.
The simple answer is that you need a web server to run the application. It cannot run without one.
If we're talking demo purposes or you don't require that many features of a web server there are redistributable web-servers that you can include with your setup package.
Like Alex mentioned the most popular one seems to be Cassini.
I'm assuming that you want to run the site on the same machine you are developing it on.
Visual Studio 2005 and up allows you to run the site from VS itself if you want to view it locally on your development machine.
To my understanding Visual Web Developer allows you to do the same as well.
Visual Web Developer
You can use the cassini web server. Please note that those are different redistributable:
http://www.asp.net/Downloads/archived/cassini/
http://ultidev.com/products/Cassini/
I'm not really certain why you would want to develop a web application (with all the difficulties it entails, due to the fact that you are dealing with a stateless connection to an unknown client machine), but then run the entire thing on the client machine.
Surely it makes more sense to develop a WinForms application?
Follow this guide to setup IIS on your PC to run ASP.NET apps:
http://www.geekpedia.com/tutorial25_Setting-up-your-ASPNET-server-IIS.html

Are there any real limitations in Mono regarding ASP.NET?

I am a junior developer, doing my last year at college. I'm mostly asp.net oriented and even have a part time job coding in that language. I am interested on converting to linux and since visual studio is unsupported write my code in Mono.
Are there any notable limitations in Mono that I should be aware of (regarding ASP.NET)?
According to the Mono website:
Mono's ASP.Net does not implement the
following features:
Precompiled Websites
Webparts APIs.
Also most if not all 3rd party ASP.Net controls are not compatible with Mono unless otherwise specified. ComponentArt controls for example are not usable in Mono. However, there's no reason to think that this won't change as Mono gains popularity. ComponentArts has already mentioned that they are considering adding support in the future.
I'd say the biggest thing you lose is IIS. ASP.net and IIS were very deeply linked. Many of the advantages from ASP.net come from the utilization of hosting features in IIS. The biggest one I can name is the ability of HTTP.sys to directly respond to a request in kernel mode if the page is in cache. This means that the socket open is responded to immediately and can allow for orders of magnitude more hits to your webserver.
Its a bit of an edge case but Microsoft's Web Service Enhancements are not supported on Mono. I ran into this problem trying to get some WSE services working on Mono.
Regarding web services there are two very good open-source alternatives: ServiceStack.Net (using it) and NANCY.
These area a lot easier implement, use and maintain, IMHO, than services built on top of WCF.

Resources