Webware and Rich Internet Applications
30 Jul
One of the most exciting thing in Ruby and Ruby frameworks like Rails and Merb is Behavior Driven Development framework - RSpec. Generally BDD provides new quality in testing and documenting our code. RSpec is a brilliant example of Ruby possibilities, I mean DSL ( Domain Specific Language ). But like I said last time DSLs aren’t only Ruby but also (or maybe more) Smalltalk. We know that “Smalltalk can do nothing but build domain specific languages”, so it’s natural that we should have something like RSpec in our Smalltalk world, and we have ! It called SSpec. Of course you probably say that we have SUnit which is satisfactory, and you’re right. What is more SUnit is excellent and like everything in my favorit Squeak outstanding integrated with it. But it’s still TDD, and what we need here is BDD - next generation of testing family. So if you want to try it, go to the www.squeaksource.com/SSpec/ and download it, helpfuly will be also SSpec documentation which you can download here:
http://daveastels.com/files/sspec_manual.pdf
http://daveastels.com/files/sSpec_QuickRef.pdf
SSpec is maybe not so active and popular like RSpec but really interesting, so if you want to try BDD testing in your Smalltalk project you should use it ![]()
23 Jul
Some time ago I wrote here about Tamarin and some tricks we can use with it. Like I said it’s amazing and gives us outstanding possibilities. You can read more about it here. But generally until now it was only theory without working examples. Today I found someting interesting called DigiMix. “Digimix is a Flex application that runs on an audio engine that allows you to mix multi-track CD quality audio (16 bit - 44.1 kHz) in the browser with many of the features that are found in modern day desktop digital audio workstations (DAW’s) including an effects engine, volume automation, clip editing, time stretching / syncing, and bouncing to disk.” You can find more description also on InsideRia article. Sounds normal but it isn’t, why ? Because application like this takes a lot of calculations (audio, audio converting) and in “normal way” (without AVM2/Tamarin) would have been impossibly slow and non-responsive. However, fortunately, new AVM2/Tamarin can makes this app workable, it works excellent. They said this is a next generation of RIA applications, and I agree completely with them. So now imagine what will be possible a few years from now with Flash Player 10, AVM2/Tamarin ! Here is a demonstration of DigiMix:
But there are also other interesting projects in scripting World. For example SquirrelFish - it’s new, fast JavaScript engine for WebKit. Another fancy thing is Processing.js it’s made by John Resig, he has ported the Processing visualization language to JavaScript, using the Canvas element. You can see basic demos here. If you want someting for creating interactive fiction, here it is: Parchment - Javascript based interpreter for the Z-Machine created by Atul Varma. Outside of Mozilla, there are such interesting projects as Objective-J and Sprout Core. And of course if you haven’t yet tried AS3Wrapper you have to do it now ! AS3Wrapper is a Javascript library, compatible with IE and Firefox, that can pull the contents of the Flash virtual machine into Javascript. Now you can see what power we have
have fun.
21 Jul
FlashDevelop is an open source project, created for AS2, AS3 and HaXe developers to make their lives easier. It’s an IDE which can be a good alternative for a Flex Builder from adobe. The main advantage is that it’s free! It’s also a lot lighter and you can use it to builde ActionScript 2 projects, ActionScript 3 projects (Flex 2 and 3, AIR) and even HaXe projects! It has a code autocompleter, panels for presenting errors, warnings and tasks. It’s very like Flex Builder, but it doesn’t have visual editor - but I think it’s not a problem for more advantage users who uses only code editor. Also if you need to find a help, you will have to use adobe on-line livedocs. If you are thinking about buying FlexBuilder, you should try FlashDevelop in the first place. It’s a beta version and it’s still far far away behind FB, but in most cases it has everything you need!
For persons who are interested in PureMVC, here is a short tutorial how use it with FlashDevelop.
20 Jul
I have been watching what’s going on in web 2.0 world last time, and it’s just simple insane ! So many portals Facebook, Twitter, Digg, Flickr, etc… There are so many sites that I don’t know even where I have account and where not. But now they are going to coperate, like Twitter with Facebook, MyBlogLog which combines all platforms together. This is great idea - join all Web 2.0 stuff together, but also a big problem. Why ? Because now an application consuming user data must write-in direct support for each API for every service it requires, which usually requires a lot of development effort in terms of protocol and format support, maintenance of each API integration and other issues such as uptime and availability. Sounds terrible and it really is, fortunately now we have Gnip ! With Gnip, developers can write once for the Gnip API and gain access to user data for a number of supported publishing services.
“The goal of Gnip is to serve as a web services proxy to enable consuming services to easily access user data from a variety of sources.“.
On the publishing side Gnip supports formats such as standard RSS, Atom or XMPP.
Generally interesting thing and again we can see global trend to cooperation between services which is nice ![]()
19 Jul
This is very useful site: www.uiresourcecenter.com , you can find there many free articles and White Papers written by industry leaders about user interface design and rich Internet applications (RIAs). It is maybe one of the most important thing in web development - user interfaces, even if you create applications in Seaside, Rails or something incredible fancy, without good UI it will be still rubbish and useless. So go there and make your user interfaces properly ![]()
19 Jul
We’re talking here about Adobe Flex/Air rather than about Silverlight, it is generally because we’re working with Adobe products now. But it’s nececary to find out also different ways of creating RIA applications and this way can be a Silverlight, so read some interesting article about it. I found Serge Jespers (Adobe platform evangelist) review of his Silverlight training course and this is maybe you should read.
16 Jul
Last time there are many implementations of languages in pure Java. I wrote last time here about JRuby which is on other hand very powerful solution. All these JSomething implementations are not without sense because Java has still enormous capabilities and thousands, milions libraries in any context of use. So imagine what brings you Ruby flexibility with Java enterprise. There are of course other implementations like Jython, now in 2.2.1 version. But thing that determined me to write this post is what I found last time - JSqueak, and now here is my question: it is necessary to implement everything in Java ? To understand general problem of Java and Dynamic Languages you should read this great article: Dynamic Languages - The FUD Continues…. Here is short a short excerpt from this article:
“The simple truth is that for web applications dynamic approaches are massively more productive. Take a look at Seaside (Smalltalk), Grails (groovy) or Rails (Ruby) and its clear that Java has nothing to compare. The DSLs provided by these languages make web development a cinch. Productivity improvements of 2-3 times is not uncommon. This translates to a reduced time to market, and better responsiveness to business needs.”
“The domains where Java makes sense are shrinking. Given the performance of dynamic languages nowadays and the ability to inter-operate with high performance system languages like C++, I see Java and C# being squeezed.”
I agree with author completly ! So nevertheless if JRuby or Jython are great, projects like JSqueak are for me interesting only from academic or educational point of view. It is so because Squeak are desperately pretty, I mean it’s so simple and powerfull, small and considered. So why takes it from brilliant Smalltalk to big, heavy Java ? Of course all these projects are very important because we need to still trying new concepts to find appropriate solutions. But question is - is Java keyword still necessary to talk about enterprise, good solutions ? Probably not.
11 Jul
Today I’ve been thinking about beauty of Smalltalk, about how productive we can be with Squeak or Seaside. Of course everone has a different opinion about productivity and efficiency. For me it means that I don’t need to worry about nothing else but only logical aspect of some programming problem, I mean - code at the speed of thought. It’s more a pragmatic, practical way of thinking but it works. Today we have many outstanding frameworks, languages, but even if you choose my favorit Ruby on Rails you have to still answer on several questions:
This is only the top of the iceberg. You haven’t these problems with Squeak or Seaside, you have one image and there is everything - version controll, IDE, debugger (great debbuger!), editors. What is more, you can save your image and copy to other computer in one move and it still works , it’s so simple. For me Seaside or Squeak is something like an iPod, you have only features which are really important nothing else. One small shiny button which gives you unlimited possibilities :).
But back to my topic DSL (domain-specific language) with Smalltalk, it’s really iteresting because I was always talking here about Ruby and power which gives us. For example BNL (Business Natural Languages) or of course simple stunnig Ruby DSL example - RSpec. But .. again things still could be better, Ruby is great to build DSL although Smalltalk is even better. Smalltalk seems much more a notation, we can simple say “that can do nothing but build domain specific languages.” - sentence from really good onsmalltalk blog. Why it is so ? “Ruby isn’t object oriented at the level Smalltalk is, is still falls back to procedural constructs and special syntax for many things. Smalltalk, is pure, objects all the way down, at every level, even the simplest and most common domain specific language of all, predicate logic. When you create a domain specific language in Smalltalk, your code never looks different than code provided by the compiler writer himself, it’s one syntax to rule them all.”. There is also an interesting podcast called Smalltalk is a DSL. DSLs have always been part of the Smalltalk farbic - “Code should read like a conversation“. Sounds nifty and it really is, Smalltalk is so elegant in all these things and this elegance is in my opinion simple way to create great programs.
Another thing is Metaprogramming, discipline in which Smalltalk always wins. Here is a good example of metaprogramming from Randal Schwartz’s blog:
“You can even create anonymous classes and give them behavior, then instantiate them.”
| myClass myInstance | myClass := Behavior new. "create anon behavior" myClass compile: 'theAnswer ^42'. "add a method for instances" myInstance := myClass new. "create an instance" Transcript show: myInstance theAnswer; cr. "shows 42"
Look also at SOUL(The Smalltalk Open Unification Language). If we are in “Meta World” there is another interesting thing in smalltalk called Magritte - fully dynamic meta-description framework.
So generally as we can see Smalltalk is very very flexible and powerful language in which we can solve all our problems in very elegant and simple way.
10 Jul
Some time ago I wrote article about Tamarin and AVM2 here. But now I also found something interesting about general ActionScript 3.0 performance and different ways to improve it. Here are interesting documents about these two problems:
ActionScript 3.0 and Performance Tuning
If you also want to find interesting things like this check dispatchEvent() site (New York Flash community) There are many good articles about ActionScript, Flash and Flex.
6 Jul
This is the one of the most exciting topic in web development in my opinion. Why ? It’s because Adobe Flex gives us amazing flexible tool for creating RIA interfaces. I mean we can be very productive in creating very very usable and beautiful interfaces for our applications, and what is more it is can’t be even compared to Ajax capabilities. Ok, this is frontend but what about backend ? Here we have another cool and productive stuff in this category - Ruby on Rails. Of course you can now say “ohh now he said that NXD is easier way, that Seaside is great and the only way, and now he’s talking about Rails again” - yes, but everything depends on what problems we have to solve. If it’s unnecessary to implement extremely difficult business logic I prefer NXD (native xml databse) and Flex. But Rails destination is exactly to solve these difficult problems. On other hand sometimes also there is no need to use something so powerfull like Flex - in this case, my favorit is now Seaside and some Ajax stuff like YUI or Prototype and Script.aculo.us So generally how many solutions we know, so many problems we can solve properly.
Back to Flex and Rails, last time I found sth called Flexible Rails: Flex 3 on Rails 2 this is one of the series Dzone Refcardz. But to be honest it’s not outstanting help, there is about 8 pages of pdf lecture. Best start of using Flex and Rails is to read Peter Armstrong’s book Flexible Rails (Flex 3 on Rails 2). I’ve read this book and it’s really good, unfortunately based on Cairngorm framework (rubbish). If the author had mentioned about PureMVC there, it could be simple outstanding. There is a couple examples of different ways of communication between Flex and Rails. First he’s talking about REST in Rails so XML way. Later there is an example of AMF format but with RubyAMF (open source flash remoting gateway for rails) which is much faster than WebORB and easier to use. But there are other solutions e.g. Flex Dynamic Scaffolding for Ruby on Rails, here is also screencast and project site. Interesting is also Ruboss framework but I haven’t tried it yet. From their page ” The goal of the Ruboss Framework is to automate much of the plumbing necessary to use Adobe Flex and Adobe AIR with Ruby on Rails. The Ruboss Framework brings the design principles and productivity of Rails to Flex development, and makes integration with RESTful Rails controllers as simple as possible.” See also announcing enterprise flexible rails book.
Generally Flex and Rails gives a lot of fun and profit in web developing, so try it and have fun ![]()
5 Jul
Another really interesting video from Adobe TV demonstrating some of features related to designer/developer workflow that will be coming in Flex 4 and Thermo. There we can see how easy will be creating custom components and generally design of our apps. Like I said some time ago there is no need to use Degrafa (Declarative Graphics Framework for Flex). “If you imagine Thermo writing all the MXML code he types, you can imagine just how powerful Designers are going to be in the next generation of Flex development.” - sounds nifty huh ?
Now developing RIA apps in Adobe FLex 4 will be even more exciting than now, so we can only waiting for new Flex verion. Here is a small version of Adobe TV oryginal video, which you can find at this link.