Showing posts with label frameworks. Show all posts
Showing posts with label frameworks. Show all posts

Oct 20, 2011

Roslyn compiler as a service

Summary: Roslyn, Microsoft’s project to open up the VB and C# compilers to support ‘compiler as a service’ scenarios, looks to be a post-Visual Studio 2012 deliverable.

Microsoft execs have been tight-lipped when I’ve tried to pin a ship date on “Roslyn,” the Microsoft “compiler as a service project.”

But we now know that Roslyn most likely will be a post-Visual Studio 2012 thing, according to slides and a presentation from Microsoft’s Build conference in September. (Yes, I’m still wading through all the Build information and presentations. There was a lot there.)

A quick Roslyn refresher: The Roslyn effort is about re-architecting the C# and VB compilers to support “compiler as a service” (CaaS) scenarios. Currently, a compiler is a black box; with Roslyn, Microsoft is working on opening it up so that all of the information processed via a compiler is available in application programming interface (API) form.

Here are few slides from the Build session that covered Roslyn, including one that shows an empty circle which seemingly designates the still-unannounced date when Roslyn will be delivered:








(If you’re curious about the codename itself, Roslyn is named for a mining town outside of Seattle that is featured in “Northern Exposure,” according to Microsoft Technical Fellow Anders Hejlsberg.)

Hejlsberg told Build attendees that Microsoft will release a Community Technology Preview (CTP) test build of Roslyn in mid-October this year. He demonstrated Visual Studio Roslyn during his session at Build, and showed off how Microsoft is building APIs — including a syntax tree API, symbol API, binding and flow API and an emit API — that mirror what its compiler pipeline offers. In addition to dogfooding these APIs itself, Microsoft also is going to make them publicly available, allowing others to build their own refactorings and tools using this information, Hejlsberg said.





Microsoft recently made available to testers a developer preview build of its “Visual Studio 11″ suite. (This is the product that will likely be named Visual Studio 2012 when it ships next year.) Microsoft officials are making enhancements to the core languages (VB, C++, C# and F#) in the suite, as well as making JavaScript a “first class citizen,” now that JavaScript is key to writing apps for Windows 8)


Src: zdnet.com

Oct 15, 2011

Welcome to Renee!

Renee is a new Rack-based library for describing web applications. Sinatra delivered a new simple way to think about building web applications. The popularity of Sinatra both as a library and as a concept shows now enduring the concept really was. Sinatra was different from Rails because the entire DSL was lightweight, easy to read and combined routing and actions into a single file. However, let's consider an example from Sinatra to see where we can improve upon this.

Consider:


get '/blog/:id' do
 Blog.get(params[:id])
end

This is not too bad so far. The repetition of :id is a bit un-DRY, but not bad. Let's keep expanding upon this.

get '/blog/:id' do
 Blog.get(params[:id])
end

put '/blog/:id' do
 Blog.get(params[:id]).update_attributes(params)
end

Now, we've retrieved blog in two places. Time to refactor. We'd normally create a before filter, with the same path.


before '/blog/:id' do
 @blog = Blog.get(params[:id])
end

get '/blog/:id' do
 @blog
end

put '/blog/:id' do
 @blog.update_attributes(params)
end


Now we've repeated the same path three times. With Renee, we can describe these kind of ideas in a simple, easy-to-read way. Here is the equivalent in Renee.


path 'blog' do
 var do |id|
 @blog = Blog.get(id)
 get { halt @blog }
 put { @blog.update(request.params); halt :ok}
 end
end


This web library is inspired by Sinatra, but offers an approach more inline with Rack itself, and lets you maximize code-reuse within your application.

Sep 10, 2011

RubyJS

RubyJS translates Ruby code into Javascript code.

NOTE that it executes the Ruby code before it translates it into Javascript.

This has the advantage of being able to (mis-)use all of Ruby's meta-programming tricks in the global scope (i.e. for defining classes and methods, NOT within methods!).

Sep 2, 2011

FUEL PHP - An MVC Framework

The Model-View-Controller pattern is pretty much dominating professional, customer facing website design these days.

FUEL is a simple, flexible, community driven PHP 5.3 web framework based on the best ideas of other frameworks with a fresh start.

Jul 22, 2011

Sugar: A Javascript library for working with native objects.

It is designed to be intuitive, unobtrusive, and let you do more with less code.

It is similar to Prototype in that it adds methods to native Javascript objects. However, it doesn't carry any of the weight of classic browser-oriented frameworks (ajax, DOM manipulation, inheritance, etc.). Sugar is also not interested in adhering to a Ruby based syntax, nor does it have anything to do with Rails. Sugar is Javascript for Javascript developers.

Link: sugarjs.com