Page 1 of 2

Adventures in ASP.NET

Posted: Wed May 19, 2010 8:19 am
by Jackolantern
I took a bit of a break from PHP coding to get more comfortable with ASP.NET. I was looking into possibly using it to create a basic PBBG. However, I have come to the conclusion that it would be much more difficult to use for an RPG than PHP.

ASP.NET is a great web platform. I was already quite familiar with C#, but if someone doesn't know how to use it, it could take a long time to first get up to speed with C# or VB.NET, and then learn the details of ASP.NET. However, it is an extremely powerful platform for enterprise applications. Master Pages is a great templating feature for webpage layouts that I wish was in PHP. The server control model can save tons of time as well, since you only have to add one ASP.NET element to the page, and it is rendered by the ASP.NET engine using one or more HTML elements, automatic Javascript code, etc. to render the element just right. ASP.NET AJAX also simplifies AJAX and Javascript development by freeing up the developer from dealing with browser differences.

With all of these pluses, I ran into some serious trouble trying to use ASP.NET for a web game. It is very hard to drop down into dynamic page writing, because ASP.NET works on a higher level. For enterprise applications where the form is static, and the data is dynamic, this works great, and really unclutters the page. I would use ASP.NET in a heartbeat over PHP for such tasks. But when both the form of the page and the data is dynamic, ASP.NET just isn't the easiest tool to use for the task. Instead of being able to make decisions in your HTML while rendering the page like PHP does, you have to create Page objects in your code, create instances of new ASP.NET elements and then use methods of the Page object to programmaticly add those ASP.NET elements to the page, and intersperse that with Placeholder objects which must be injected with text through C# code for all non-server control elements. Then it takes quite a bit more code to correctly arrange these dynamic elements on the page. This is quite a bit more work versus PHP. Making an entire PBBG (which uses tons of both dynamic page layouts and dynamic data) would be a nightmare in ASP.NET.

I hope maybe this has been helpful for anyone interested in using ASP.NET for browser-based RPGs.

Re: Adventures in ASP.NET

Posted: Wed May 19, 2010 12:19 pm
by hallsofvallhalla
you hit it right on the head. I did the same about 8 months ago when I started using ASP at work. Found it is not to kewl for games. They ended up making me do excel VBA coding more so I did not get a chance to get pro with it.

Re: Adventures in ASP.NET

Posted: Wed May 19, 2010 7:59 pm
by Jackolantern
Do you mean ASP or ASP.NET? They are actually completely unrelated ;)

Re: Adventures in ASP.NET

Posted: Thu May 20, 2010 12:23 am
by hallsofvallhalla
ASP.NET

Re: Adventures in ASP.NET

Posted: Sun Aug 01, 2010 5:02 pm
by Baseball435
What exactly is asp.net used for?

Re: Adventures in ASP.NET

Posted: Sun Aug 01, 2010 6:11 pm
by Jackolantern
Web development. Same as PHP, but it uses a different development model and has different features. It also runs on the Microsoft .NET platform.

Re: Adventures in ASP.NET

Posted: Sun Aug 01, 2010 8:20 pm
by Baseball435
Oohh is it a hard language to learn?

Re: Adventures in ASP.NET

Posted: Sun Aug 01, 2010 8:46 pm
by Jackolantern
It is much more complex than PHP or Javascript. It can be used with any .NET language, although almost all ASP.NET developers use either Visual C# or Visual Basic.NET. ASP.NET is technically much more powerful than PHP, but the power comes at a price of having 3 - 5x the learning curve. Also the underlying languages are full object-oriented, with some complex details such as generics, indexers, inheritance, delegates, events, etc. You really can't use a .NET language unless you fully understand object-oriented programming concepts such as inheritance, encapsulation and polymorphism.

The .NET languages are easier to learn how to use well than, say, C++, but much more difficult than PHP.

Re: Adventures in ASP.NET

Posted: Sun Aug 01, 2010 9:39 pm
by Baseball435
Ohhhh ok I see. I probably won't worry about learning that

Re: Adventures in ASP.NET

Posted: Mon Aug 02, 2010 3:19 pm
by hallsofvallhalla
also if you web server is linux you cannot use asp.net. Like all my hosting is done from a linux server so it keeps me from going very far with asp.net other than what I do at work.