Gillius's Programming

Latest News

View the full Gillius's Programming Blog

By Christopher Piggott | 1 Comment | No TrackBacks

I have been experimenting with GWT using a RESTful (jersey server) backend as its data source.  When deploying both my application and the backend to the same server this worked great, but once the server side was finished I wanted to deploy it to Tomcat on my Amazon EC2 instance, and continue debugging the application using GWT's Developer mode.  This, unfortunately, does not work, due to Same Origin Policy restrictions of virtually all browsers.

The most standard way of circumventing the Same Origin Policy is to use Json with Padding, or JSONP.  The technique in a nutshell is that the server returns a JavaScript function call.  The client thas prepared for this by creating this function in the DOM of the current page in the browser.  The client tells the server "The name of the function is xyzzy" by sending in a query parameter, usually named "callback." This post shows some ways around this issue.

Major GNE Bug in Endian Handling -- March 24, 2012 7:28 PM

A major bug in GNE put HawkNL properly in little endian mode when using NO_NET network type, but any other type such as NL_IP called nlInit after nlEnable(NL_LITTLE_ENDIAN_DATA), which erased this setting. Amazingly, over all these years this error was not caught. I very seriously thought about changing all documentation and having GNE use big endian all the time, but decided to fix the bug and use little endian consistently.

Thanks goes out to Héber Costa Ferreira for finding this problem in GNE/HawkNL and providing suggestions, code, and testing effort to fix this issue.

This change has been commited into GNE SVN as of revision 680. If you are not using the SVN version of GNE, you should, it is much more stable than 0.70 and contains many critical fixes.

Introduction to Groovy -- March 20, 2012 10:29 PM

This Friday, I will be giving a presentation on Groovy at the university where I work (RIT). You can view the presentation online (with extra notes under "speaker notes") or as a PDF and you can view or download the source code for the examples. It is primarily meant for audiences already familar with Java code, but it should be approachable if you know other languages like C#. A description of the talk:

Groovy is a dynamic language for the Java Virtual machine inspired by Python, Ruby, and Smalltalk. After Java, it is the first approved JVM language (via JSR 241). Groovy can be used as a scripting language in a shell environment, a way for applications to provide scripting and extension capabilities, domain specific languages and configuration files, or as the base language for whole applications and frameworks such as Grails (like Ruby on Rails) and Griffon. Due to supporting most Java syntax and ability to integrate with any existing JVM code, Groovy is particularly useful for existing Java developers wanting to leverage dynamic languages while retaining use of the full Java ecosystem.

This talk will cover the following areas:

  • Groovy syntax compared with Java
  • How dynamic calls are implemented
  • Closures
  • Runtime Metaprogramming: how Groovy extends existing Java libraries
  • Compile-time Metaprogramming (AST transformations)
  • Creation of Domain Specific Langauges (DSLs)
  • Code examples where Groovy's features make the strongest impact 

Allegro's Webring

Previous Site :: Ring's Home :: Next Site

Random Site :: Skip Next Site :: List Next 5

DJGPP's Webring

Previous Site :: Ring's Home :: Next Site

Random Site :: Skip Next Site :: List Next 5