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

  • Context: C# 
  • Thread starter Thread starter AliGh
  • Start date Start date
  • Tags Tags
    Php
Click For Summary

Discussion Overview

The discussion revolves around the feasibility and practicality of using C# and PHP together in web development. Participants explore the integration of these two programming languages, their roles in server-side and client-side development, and the challenges that may arise when combining them in projects.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • Some participants suggest that the ease of using C# and PHP together depends on the specific task and the coder's expertise.
  • One participant describes a scenario where PHP handles back-end web page generation while C# processes data and interacts with client or server systems, indicating a complementary relationship.
  • Another participant notes that switching between languages is straightforward if one understands how to call code from different languages, mentioning the role of shared libraries and linkers in this process.
  • There is a claim that C# and PHP cannot be developed together in a single program, as both are server-side technologies, while HTML/CSS can be mixed for client-side design.
  • One participant expresses a preference for PHP due to local server support issues for ASP.NET, highlighting practical considerations for web development.
  • A participant reflects on their experience with ASP.NET, noting differences in code structure compared to C# used in console applications.

Areas of Agreement / Disagreement

Participants express differing views on the compatibility of C# and PHP in web development. While some see potential for integration, others assert that they cannot be used together in a single program. The discussion remains unresolved regarding the best practices for using these languages in tandem.

Contextual Notes

Some claims depend on specific definitions of "working together," and there are unresolved questions about the practical limitations of integrating server-side technologies.

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 ?
 
Technology news 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
 

Similar threads

  • · Replies 187 ·
7
Replies
187
Views
11K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
9
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 22 ·
Replies
22
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 18 ·
Replies
18
Views
4K
  • · Replies 15 ·
Replies
15
Views
4K