Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Merging php and dot.net websites 1

Status
Not open for further replies.

LonnieJohnson

Programmer
Apr 16, 2001
2,628
US
Does anyone have any references or resources they can point me to that can help me figure out how to run php and dot.net together in one application?

I have two web apps that we use in our company and we would like to merge them. I have seen conversation stating that it is possible but would like some concise examples or put in touch with someone that has achieved it.

Thanks.

ProDev, Builders of Affordable Software Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
why is it difficult? php pages (*.php) will be handled by php and asp pages by .net. they automatically co-exist.

unless you are planning to use .net controls inside a php page? or php generated content inside an asp page? that sounds messy but could be done perhaps via internal web calls or use of system level functions. doesn't sound like a sensible way to go though.

put some more meat on the bones of the questions and we may be able to come up with something more solid.
 
Thanks jpadie and feherke for responding so quickly.

jpadie, I have no clue as to the level of difficulty. Basically that is what I am asking. We have two separate applications that we use for clinical purposes in a behavioral health environment. They are similar but have a lot of different functionality. One is PHP and one is Asp.net. We are refactoring both. Our management team asked that we merge them into one product. We feel it would be faster to keep the separate technologies but want to put them into one solution.

Just looking for someone that has done that for some tips on challenges and paths to take.

Thanks again,

ProDev, Builders of Affordable Software Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
I believe this is the important bit:

Our management team asked that we merge them into one product

What exactly does that mean? Do you want to recreate the ASP application using PHP code? Or viceversa?

Or do you think you wan to have both run from the same web page?

What exactly is then end objective here?

You can have a launch website that can have links to either App and they should happily live on the same server and even folders and paths.

If what you want is to rewrite the one of them into code for the other language, that may prove a bit more tedious.
Or integrate code from one into the other, that may very well not be possible without translating it.

What should the end product be exactly? A PHP based App that has features from both? An ASP based App in the same vein? A website that simply links to both?








----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
They don't really care what the underlying technology is or what platform it is run on. We have some duplication of functionality between the two but a lot of different stuff as well. We developed the Asp.net system years ago. A few years after that we acquired a company that had the php product and we liked what it did so we kept it. After about 6 years of having two products it was decided that we only have one. both the originals developers of each app work here so we are tasked with coming together and making one. We would like to have a blended app if possible as one team learning completely what the other team does technologically we see as a challenge. We figured if we kept both then it would be a cross training of the two teams as we merged them both into one new solution.

ProDev, Builders of Affordable Software Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
that sounds like a recipe for disaster. decide on a technology. take into account the skills your company have, the cost of getting those skills externally and the ease of development. Equally figure in the hardware needs and software licensing requirements.

then make a choice

then refactor.

 
I have to a agree with jpadie.

Even if successfully combining both would only get you the worst of both worlds not the best.

The most this solution could ever achieve is to become a front-page article on
Even if something can be done it does not mean is should be done

A Maintenance contract is essential, not a Luxury.
Do things on the cheap & it will cost you dear
 
I am no way an expert on the issue and I appreciate your passionate feedback. I was only going on an older blog that I saw where some individuals were successful at it and was looking for more recent examples. See this link


I also heard at a conference a gentleman from Cerner say they have multiple technologies including dot net and open source in one solution. I figured since they were a giant in their industry that it that it had been achieved other places as well.

Thanks again for your expert feedback on the subject.

ProDev, Builders of Affordable Software Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
I'd have to agree as well. Either pick a language, or you're bound to have a messy amalgam that will be very complex to maintain.

The article you quote just says that both tools can run on the same website yes, but would be separate from each other.

You could have to access them like: and
This is not combining code, this is simply making two types of server side code be able to run independently of each other on the same website. But you would not be mixing ASP code with PHP in any way.





----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
what is entirely acceptable in some circumstances is to use different back end technologies for non customer facing tasks. so you can have php sitting there talking to a customer and then fire off a process (say to join the customer to a registration system) via perl. you could do this natively in php, but if you already have that back-end piece factored in perl/python whatever, with nice error handling then that's sensible to reuse until you want to refactor. but these are single discrete processes that may act as interfaces to legacy/corporate systems. another example might be whipping up a php page to join someone to an active directory. the page could gather the user information and then fire off a process using COM objects to subscribe the user to the AD.

this is very different to using mixed technologies to generate a customer facing page. it's difficult enough using a mix of js/html and php. don't make your life harder than it needs to be.

what the linked stackoverflow thread discusses is just having some pages as asp and some as php. there's no problem with that at all either. they will coexist happily as IIS will just work out which engine to pass the request to. No problem there technically.

But it's a nightmare to support. Consider something as simple as changing a database schema. once done you have to chase down the usages in both .Net and php. that's two different skill sets and chunks of time arising from one change. then you have to chase down the usage of that output in both languages etc. So as a migration strategy; that seems plausible. Decide on a technology; freeze any change that impacts both systems; run both webapps side by side via IIS (there are ways of doing so with apache but since you're on expensive windoze boxes anyway, stick with IIS for the time being) and gradually refactor to the target language. that way you can pass off the muck of having two competing technologies as a solid migration strategy.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top