Archive for the ‘JavaScript Development’ Category

Is It Time for JavaScript to Step Aside for the Next Big ‘Web’ Thing?

Thursday, April 5th, 2012

A group of computer language experts discuss the future of programming, from JavaScript to Google’s new Dart, to the strengths and perils of functional programming at Microsoft’s Lang.Next.

What do you get when you put a group of computer language geeks in one room and ask them about programming? Well, it seems one thing is a general complaint about one of the most popular languages in use today: JavaScript.

At the Lang.Next conference here, a panel of experts discussed everything programming and while they disagreed on several things, they seemed to come to agreement that JavaScript is a gnarly, unforgiving language that is a necessity in today’s world.

The panelists included Microsoft’s Anders Hejlsberg, best known as the creator of Turbo Pascal, Borland’s Delphi and Microsoft’s C#. Martin Odersky, founder, chairman and chief architect at Typesafe and creator of the Scala language was also a part of the panel. Gilad Bracha, creator of the Newspeak programming language and a member of the team building the new Dart language at Google also sat on the panel. And rounding out the panel was Peter Alvaro, a fourth-year computer science Ph.D. student at the University of California at Berkeley and a member of the team building the Bloom programming language for the cloud and other distributed computing systems. Microsoft software architect and language geek Eric Meijer moderated the panel.

Hejlsberg said his goal in building languages and tools is and always has been to make programmers more productive. He noted that while concurrency has been a big thing in the minds of developers for some time, he believes the next big thing is machine learning.

However, Hejlsberg added; “Java used to be cross-platform but is no longer cross-platform; the new cross-platform language in town is JavaScript.”

Goaded by Meijer as to whether it is possible to write big programs in JavaScript, Hejlsberg replied, “Yes, you can, but you can’t maintain them," much to the delight of the crowd that featured several prominent language and tools designers. “I think there are some unmet needs there,” Hejlsberg added.

Bracha immediately piped in saying, “That’s part of why we’re doing Dart. You can write them [large programs in JavaScript]; it’s terribly hard and afterward you’ll be punished.”

Read More:

http://www.eweek.com/c/a/Application-Development/Is-it-Time-for-JavaScript-to-Step-Aside-for-the-Next-Big-Web-Thing-109707/

Did you like this? Share it:

Java Programming, Java Programmers Render Rapid and Robust Solutions

Monday, March 21st, 2011

ava is a modern, stable, object-oriented software development services platform, which supported by a wide variety of operating systems, and applied in various developments including game, utilities and business application development. Its procedures of development are simple and cost effective, and lessen time needed for development. In addition to we can benefit its wide acceptation and usage, secure and reliable solutions.

You can outsource our web programming solutions by hiring an experienced java programmer; commonly it can provide software development, web development and custom web programming. By constantly upholding the highest standards of business ethics and commitment to quality, Java programmers and java developers have practice to acquaint themselves with latest changes and advancements in java technology. As a single-source support for your JAVA development they may provide all kinds of outsourcing service about Java programming.

Rayootech has rich experience in software outsourcing and web development in china. Our Java development team compromises of well-qualified software engineers with experience in Java Script, J2SE, JSP, and J2ME.

To outsource your web development service, please read more in : http://www.techomechina.com

Did you like this? Share it:

JavaScript Controls with WCF and ASP.NET

Wednesday, November 17th, 2010

 

By Peter Vogel, visualstudiomagazine.com

In my last few columns I started to integrate a JavaScript control more sophisticated than the basic jQuery UI controls into an ASP.NET page — something on the order of the ASP.NET GridView ( Working With a Client-Side AJAX Control and Updating Rows with a Client-side Grid ). For an article on using a jQuery UI control, see Doug Gregory’s excellent column in the November issue of Visual Studio Magazine.

My goal was to have all data retrieval and updates to be handled by calling Web services from the browser. I also wanted to do it with the least amount of code and take all the defaults.

For my first cut, I used an ASP.NET 3.5 application that pulled data from a Web service hosted in an asmx file. That almost worked for data retrieval, but my updates only worked if I was using FireFox. However, rather than fiddle with old asmx technology, I wanted to move onto WCF.

I created a new Web application in ASP.NET 4.0 (though I don’t think that makes much difference). I did take advantage of some features of the .NET 4 platform: I removed underscores in my VB code, used auto-implemented properties in my data transfer object, and recreated my middle tier business objects in Entity Framework 4 Again, using Entity Framework isn’t critical to this project: it just let me generate a data layer very quickly.

I copied my HTML and script from my ASP.NET 3.5 unchanged, except for changing the extensions on my services from ".asmx" to ".svc." I added an AJAX-Enabled WCF service to the project and copied my code from my asmx file changing my "WebMethod" attributes to "OperationContract" attributes. Finally, I added the ExtJs JavaScript libraries to my Scripts folder and the ExtJs CSS files to my Styles folder.

In my last column, I discovered that I had to explicitly set the content type of my requests in my ExtJs HttpProxy to indicate that I wanted JSON objects. To talk to my WCF service, I had to set a default header for all of my ExtJS requests to have them use JSON by adding this line to my client-side script:

Ext.lib.Ajax.defaultPostHeader = ‘application/json’;

And the song remained the same: I could retrieve objects from a Web service but not update them. For debugging this kind of problem, I use FireFox because it has the wonderful FireBug add-on for viewing requests and responses to my Web service. I also added this attribute to my WCF class to get error messages sent to the browser:

<ServiceBehavior(IncludeExceptionDetailInFaults:= True)>

Using FireFox + FireBug, I quickly discovered that my JSON objects were going to the server but instead of getting the standard JSON notation (with lots of braces) I was getting encoded text. Fortunately, I know how to turn that feature off: I set the encode option in my client-side JsonWriter to false:

writeCustomer = new Ext.data.JsonWriter({encode: false});

At that point, almost everything started working: I could retrieve multiple records, change multiple rows in the grid, and send multiple objects back to a Web service for updating. However, if I only updated a single row in the grid then my server-side code would fail because I had set up my Web service’s update method to accept an array of objects. Fortunately, I knew how to fix that, also: I set the listful property on my JsonWriter to true, causing it to always send back an array of objects even if only one row had been changed in the grid:

writeCustomer = new Ext.data.JsonWriter({
encode: false,
listful: true});

The final version of my Web service update method looks like this (the "d" in the parameter is required because of the convention used to move JSON objects):

<OperationContract()>
Public Sub UpdateCustomer(ByVal d As CustomerDTO())
Dim nw As New northwndEntities

  For Each cDTO As CustomerDTO In d
   … code to update database…
  Next
  nw.SaveChanges()

End Sub

Finally, I ported my client-side changes back to my previous project to see if I could get the same results with an asmx-based Web service. The answer is, mostly, yes. Adding the listful and encoding options plus rewriting the update Web service method to accept an array of CustomerDTO objects enabled updates. Replacing the explicit headers setting in the HttpProxy with the defaultPostHeader property actually broke the code. Since including the headers setting in the proxy breaks the WCF service, you can’t have one set of client-side code for both asmx and svc files — but, then, why would you want to?

So, next column: ASP.NET MVC: which is where this whole discussion started (and some more).

Did you like this? Share it: