In my quest to create a workable, multithreaded websocket server for a browser-based HTML5 game, I invariably came to the decision of what language to work with. I had grown very rusty with Java, since I worked with it years ago now, and never made anything that large or complex with it anyway. So the re-learning process was hard and slow, and I kept being amazed at how different it was from C# and .NET, which I really got in to after leaving Java. So I made the decision to instead change to .NET, knowing this would basically mean my server would be locked to Microsoft operating systems, but could allow me to use my previous knowledge to become productive faster.
But in the past I had basically been using .NET based on 2.0 (Visual Studio 2005). Even though I had used 3.5 (VS 2008), I never really bothered to learn what seemed like the trivial enhancements the language had added. But now I made the decision to get fully caught up to all of the features of .NET 4.0 (and some I missed in 3.5), and I can say that they are not only useful, but actually groundbreaking.
C# has traditionally been seen as a clone of Java, but I really think it has become much more than that. LINQ is revolutionary, and I think the idea will spread into other languages after some time. Much of programming deals in obtaining and acting on various sources of data to get it into the final form you want so you can work with it. It was an absolutely brilliant idea to create a semi-SQL language that works within the language itself that can query arrays, collections, streams and more. What used to take 70+ lines of repetitive data fumbling can now be done in 2 or 3 lines of concise SQL-like querying. Unlike many of the past enhancements to .NET, this is a seriously major extension to the language that could be used several times a day by almost any .NET developer to make their life much better. At first I didn't understand why almost all of the new language features in .NET 3.5 were created to support LINQ (anonymous methods, lambda expressions, implicit typing, extension methods, etc.), but now I get it.
Multithreading also gets a huge enhancement in the form of the TPL in .NET 4 (an acronym for Task Parallel Library). Previously in .NET (and Java and a handful of other enlightened languages), the developer had to deal with threads themselves and much of their low-level intrinsic details (although the situation is much worse in some other languages, such as C++). TPL changes that, as now developers work with tasks, which are units of work that the developer wants to run concurrently. It delivers on the promise of a managed-code form of threads, since the developer works in terms of what they want to have done, instead of planning their whole application around how to handle all of the issues of multithreading. It is a breath of fresh air, and I know it is going to help me in my projects.
I truly believe that the last 2 versions of C# and .NET have moved C# into its own, and I would say that its connection to Java is now only historical and superficial. The world of .NET is huge, and there is more to know about it than probably any other language/platform that I know of, but it is well worth the time to learn it. It is turning previously repetitive, unworkable and difficult programming tasks into pleasures to work with, and...even making them fun!
C# and .NET 4.0
All development related reviews. Engines, Tutorials, books, ect.
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Return to “Development Related”
Jump to
- General
- ↳ Announcements and Site Discussion
- ↳ News
- ↳ Say Hello
- ↳ Off-Topic
- ↳ Reviews
- ↳ Development Related
- ↳ Misc
- Developer's Corner
- ↳ General Development
- ↳ Game Design
- ↳ Resources
- ↳ Recruitment
- Game Development
- ↳ Beginner Help and Support
- ↳ Advanced Help and Support
- ↳ Programs/Assets/Libs/Open Source/Ect...
- ↳ Coding
- Show Off
- ↳ Project Showoff Tier I
- ↳ Project Showoff Tier II
- ↳ WebSite
- ↳ Art Showoff
- ↳ Members Games
- ↳ Main Empire Special
- ↳ General
- ↳ Development
- ↳ Off-Topic
- ↳ Bad Touch Studios
- ↳ Nitewing Gaming
- ↳ Fabled Kingdoms of Nizinia
- ↳ Announcements
- ↳ Development
- ↳ General
- ↳ Maze
- ↳ General
- ↳ Development
- ↳ Media
- ↳ Forsaken Sanctum 4.0
- ↳ General
- ↳ Contests
- ↳ Bugs and suggestions
- ↳ Forum Game
- ↳ Cavern Crawl
- ↳ Planetary Wars
- ↳ General
- ↳ Development
- Dot World Maker
- ↳ General
- ↳ Source Discussion
- New Worlds Engine
- ↳ General
- ↳ NWE Project Showoff
- KWM - Kal's world maker engine and NEAB
- ↳ Announcements
- ↳ KWM
- ↳ NEAB
- Tutorials
- ↳ Tutorials
- ↳ Epiales's Blender Tutorials
- ↳ Youtube Tutorials
- ↳ Browser Based MMO 2.0
- ↳ Real Time Browser Based MMO
- ↳ Older Browser MMO Videos
- ↳ Browser based RTS Videos
- ↳ C# Tutorials Videos
- ↳ Impact and Node/Socket.io
- ↳ Advanced MMO Framework
- ↳ Node For beginners
- ↳ Zester's Video Tutorials
- ↳ HallsNode
- ↳ Ticket System 2.0
- ↳ Code Sharing
- ↳ Hall's Games
- TMMOKit
- ↳ Help and Guides
- ↳ General
- Engine Discussion
- ↳ HTML5/Web Engines
- ↳ MMO Makers
- ↳ 3d Engines
- ↳ 2D engines
- ↳ Unity 3d
- ↳ General Unity
- ↳ Art and Assets
- ↳ Scripting/Coding
- Simple PBBG Engine
- ↳ Updates
- ↳ General
- Test