RE: Advice Sought for Web Programming
March 26, 2015 at 7:39 pm
(This post was last modified: March 26, 2015 at 8:35 pm by bennyboy.)
If you are already comfortable with C# and VB, then I recommend looking into ASP. This is Microsoft's answer to PHP, and you can use either C# or VB as the code-behind. In fact, you design Web Forms almost exactly the same as you make Windows Forms: drag tools onto a window, double click to autobuild an event handler, etc. However, when you say "client-side," I'm not sure what that means to you: both PHP and ASP are server-side. Yes, you have PHP-GTK, or AJAX controls for ASP, but I wouldn't do that: web pages are SUPPOSED to be mainly processed server side, so that you're not dependent on the speed and capabilities of whatever hardware is viewing your webpage. If you want more power, then I think you'll have to write in Java, or port your app to iOS, Android and Windows.
Okay, so back to PHP vs ASP. I love ASP. It's easy to design a page quickly, and you design your code-behind in either C# or VB using Visual Studio (same drag-and-drop forms design, same way of creating events, same debugging tools). You can use the same .NET libraries you already use: graphics libraries, string builders, etc. Properties are also referred to in the same way. For example, in ASP, to set the text in a textbox, you'll say something like Mybox.Text = "Hello, world," exactly as you already do for Windows programming. Combine ASP with Javascript (Or, easier, jQuery), and you can do pretty much any cool thing you've ever seen a webpage do: hide, show and animate divs using a single line of code, have buttons which do neat stuff clientside, etc. Javascript also gives you access to a client-side timer, so you can play sounds at a regular interval, flash lights, etc. and you can use controls to adjust variables: scale image boxes, etc. Technically, Javascript would probably be powerful enough to write a simple game, though I don't think it would be the best tool for the job.
Anyway, my answer is that if you already like .NET, use it, and supplement it with jQuery. You'll find the web flooded with fanboys for ASP (like me) or fanboys for PHP ("Dude, it's free!"), but in the end, either will get the job done very well. Go with what you know. Also-- check out CSS5. It's pretty sexy.
There IS one major drawback to using ASP: actually getting a server. You will probably have to pay $20 or $40 / month for a Windows server, whereas most free hosting solutions I've seen work with PHP.
Okay, so back to PHP vs ASP. I love ASP. It's easy to design a page quickly, and you design your code-behind in either C# or VB using Visual Studio (same drag-and-drop forms design, same way of creating events, same debugging tools). You can use the same .NET libraries you already use: graphics libraries, string builders, etc. Properties are also referred to in the same way. For example, in ASP, to set the text in a textbox, you'll say something like Mybox.Text = "Hello, world," exactly as you already do for Windows programming. Combine ASP with Javascript (Or, easier, jQuery), and you can do pretty much any cool thing you've ever seen a webpage do: hide, show and animate divs using a single line of code, have buttons which do neat stuff clientside, etc. Javascript also gives you access to a client-side timer, so you can play sounds at a regular interval, flash lights, etc. and you can use controls to adjust variables: scale image boxes, etc. Technically, Javascript would probably be powerful enough to write a simple game, though I don't think it would be the best tool for the job.
Anyway, my answer is that if you already like .NET, use it, and supplement it with jQuery. You'll find the web flooded with fanboys for ASP (like me) or fanboys for PHP ("Dude, it's free!"), but in the end, either will get the job done very well. Go with what you know. Also-- check out CSS5. It's pretty sexy.
There IS one major drawback to using ASP: actually getting a server. You will probably have to pay $20 or $40 / month for a Windows server, whereas most free hosting solutions I've seen work with PHP.