Java Vs .Net

dotnettechnocampus

Untitled1576350It is very difficult to rationalize which is better Java or dotNet. Both have their points to back up. Java’s tag line “Write once; Run anywhere.” says just go the way as  provided by me and I assurance, you can run it anywhere and will get the same result, while on opposite dotNet’s tag line “Write in any language; Run on Windows.” says hey!! come and use any language you are comfortable with and I assure you, you will get the same result.

Java facilitates a variety of web servers to run its web application while dot net supports IIS to host Asp.net applications. Not many options are available in case of dotnet.

Java is a programming language while dotnet is a framework which supports multiple languages to run on windows platform.

View original post 57 more words

JSON# – Tutorial #5: Deserialising Complex Objects

Fork on Github
Download the Nuget package

The previous tutorial focused on deserialising simple JSON objects. This tutorial describes the process of deserialising a more complex object using JSON#.

Let’s use the ComplexObject class that we’ve leveraged in earlier tutorials:

Let’s instantiate this with some values, and serialise to JSON. I won’t bloat this post with details on how to serialise, covered in previous posts. Here is our serialised ComplexObject instance:

Notice that we have 2 collections. A simple collection of Doubles, and a more complex collection of ComplexArrayObjects. Let’s start with those.

First, create a new class, ComplexObjectDeserialiser, and implement the required constructor and Deserialise method.

Remember this method from the previous tutorial?

This effectively parses the JSON and loads each element into a NameValueCollection. This is fine for simple properties, however collection-based properties would cause the deserialiser to load each collection-element as…

View original post 229 more words

MVC – Enhanced DropDownListFor – Part #2

Jeremy Lindsay

In Part #1, I described a method signature for the Html.DropDownListFor static HtmlHelper method, which was:

@Html.DropDownListFor(m => m.UserId, m => m.UserNames, m => m.Id, m => m.Name)

In this part. I’ll write more about HtmlHelper extension method code to make this work. That’s how you use it in Razor – but what does this method signature look like in the source code? Each of the lambda expressions in the above method signature is an expression which is represented by Expression<Func<T1, T2>> expr. The first parameter will represent the name of the form field rendered, i.e. what the Id and Name values are for the Html <select> element. The second parameter represents the items in the <select> list. The third parameter is the property in the items from the above list which should be rendered in the value attribute of each of the <option> elements of the <select> list. The fourth parameter is the property in the items from the above list which…

View original post 678 more words

Blog at WordPress.com.

Up ↑