Can C# and PHP be used together for web development?

  • Context: C# 
  • Thread starter Thread starter AliGh
  • Start date Start date
  • Tags Tags
    Php
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 2K views
AliGh
Messages
64
Reaction score
1
It has been a few weeks since i started practicing programming seriously . I am kind of new to object-oriented programming
I have been working with C# till now . I have started working with php now and playing with web languages (css , html , javascript)
How many languages have you worked with together ?
Is it easy working with these two together ?
 
on Phys.org
AliGh said:
[...]
Is it easy working with these two together ?
Difficult level I think is depending on both the specific task and the coder's know-hows. A lot of real world applications use these two languages. For example, you can build a web page with PHP which will play its part in the site's back-end technology (via n-tier or n-layer architecture, or simply so-called MVC design pattern); not so long later your company needs to build an underlying system to process and access client or server computer systems to bring back the data to the PHP site and to display them in response to user's requests; PHP can't do this so much as can C#. So the C# guy enters the picture and works as the core processor.This occurs exactly the same to other web applications based on Java that also use other typed, mainstream languages like C# or/and C/C++ simultaneously.
 
  • Like
Likes   Reactions: AliGh
Working together how? If you mean writing some code in one language and some code in another and having them just launching each other as programs, yeah that's easy. I know probably a dozen languages, and in practice I only really use C, C++, PHP, I have no issue switching back and forth between them.

If you mean calling code written in different languages from within other code... it's easy if you know what you are doing. You can define a standardized set of code pointers that can be called. Any program you use is actually not one set of code, it can be hundreds of different little "programs" called shared libraries. As long as you have programming headers for the library, you can use it in any language, or you can even make your own header if you know the format. It's the LINKER that actually makes these connections, not the programming language's compiler.
 
  • Like
Likes   Reactions: AliGh and Greg Bernhardt
C#.NET and PHP are both server side technologies. You can develop a program in one, but not both together. HTML/CSS are for client side design which is why you can mix with the server side technology.
 
  • Like
Likes   Reactions: elusiveshame and AliGh
Greg Bernhardt said:
C#.NET and PHP are both server side technologies. You can develop a program in one, but not both together. HTML/CSS are for client side design which is why you can mix with the server side technology.
I was thinking about making some money designing website not much though and since it is rare to find a server which supports ASP.Net here unless its government or something php would be a better option .

With C# in the other hand you can make windows , windowsphone , android and IOS applications.

When working with visual studios i made a ASP.Net projects i was looking into its pages and i saw codes like <asp: > it wasnt like the C# i used in console and windows form applications