Category: Programming

PowerPoint Wiimote Presenter

Posted on 10:18pm 3/01/2008 by Bruno Silva in Games, Programming, Utilities

Wiimote

After some months willing to buy a Wiimote to try it in my PC, a couple of hours on front of a Wii gaming console convinced me to do finally buy it. After all, now I have some friends with whom I can play using my Wiimote! :-)

Some time ago I wrote a library to the Xbox 360 GamePad (based on XNA 2.0) and a demo which included a PowerPoint add-in to control presentations (targeting Office 2007). Since my GamePad was wired it was just a demo with no real-life usage.

Now I’ve done the same thing with my Wiimote. Based on the Managed Library for Nintendo’s Wiimote available at Codeplex.com, I made a simple (and uncompleted) library that raises events when each pressed/released button state changes. I’ve re-written the PowerPoint add-in to use the Wiimote. Now I finally have a presentation wireless controller (other than my mouse ;) ).

All the presentation control is achieved using the buttons, but if you quickly move the Wiimote you also move to the next slide. This physics-based control was just a test, is not really necessary. Clicking a button is much simpler than using a movement to move forward. It is just a geek trick.

Download the Wiimote Presenter add-in.

Download the add-in source code.

Flex Camp @ Lisbon - Part 3

Posted on 5:52pm 2/20/2008 by Bruno Silva in Adobe, Programming, Software, Web

Adobe Labs

I forgot to mention one important upcoming Adobe tool that will help a lot the designing/developing workflow.It is called Adobe Thermo. It is another point of view in MXML files manipulation, that is used in Flex applications. Thermo stand for Flex Builder as Microsoft Expression Blend stands for Visual Studio. It allows designers to create prototypes that fit perfectly the design they made, and then developers can add behavior without screwing up the design.

What is BlazeDS?

It is an open-source Java-based web server technology that allows using Remoting and Messaging services with Flex. A Release Candidate is available for download. It communicates using AMF (Action Message Format) natively supported by Flex (after all it is a format developed by Adobe). AMF serializes and de-serializes data in a binary format. According to what was said during Flex Camp this format has a great performance when compared to SOAP/XML. The messages must be shorter, since it is binary and not text-based.

Some BlazeDS functionalities:

  • RPC (Remote Procedure Call) such as Web Services, Remoting, REST
  • Messaging (Publish/Subscriber architecture)
  • Web proxy (it helps to solve cross-domain security restrictions while working with Flash)
  • Support for AJAX clients
  • Support for clustering (for scalability)
  • Is is a Adapters-based system, which allows to develop custom modules that are coupled to BlazeDS

What is Adobe LiveCycle Data Services?

It is a super-set of BlazeDS. This software is payed and adds some functionality to BrazeDS. It has the capability to deal with data conflicts, can compile source to swf on-the-fly and generate PDF files on the server-side.

What is AMFPHP?

It is a PHP library that allows to use Flash Remoting with PHP as the server-side technology. I’ll just quote a more complete description from the official website.

(…) AMFPHP allows thin client applications built in languages such as Flash, Flex, and AIR to communicate directly with PHP class objectsPHP developers can leverage their PHP experience in server side code development by connecting to data sources such as web-services, databases, and business applications and return that data to the client. Client applications can also offload cpu intensive methods to PHP services and wait for the result set for presentation to the user. AMF allows for native data types and complex object mapping between the client and the server. (…)”

It is pretty straight forward to use. I really liked the demonstration.

As I have said before this was a great event. I’m looking forward to start playing around with Flex. I’m downloading Flex Builder 3 “as I speak “.

Flex Camp @ Lisbon - Part 2

Posted on 9:41am 2/20/2008 by Bruno Silva in Adobe, Programming, Software, Web

Flex Camp @ Lisboa

How to Develop with Adobe Flex/Air?

The current Flex version in the streets is Adobe Flex 2. Adobe Flex 3 is almost out, though. In Flex Camp they talked about Adobe Flex 3. But the brochure that was given to the audience talked about version 2. :)

There is a beta version of the Flex SDK on Adobe Labs. Altough you can do a terrific job programming Flex applications using notepad, maybe it is not such a good idea. Al least concerning to productivity.

Flex Buider is the IDE meant to help developers while programming in Flex. It is based in Eclipse, so It is familiar to many developers. I was glad to know that Adobe gives free licenses on Flex Builder to educational purposes. So, students and teachers, go for it!

While working with Flex you will need to program in ActionScript 3.0. From what I’ve heard it is pretty nice, since it is objected-oriented. Now you can develop using your favorite best-practices and design patterns based on this paradigm.

Some of the functionalities are Scaffolding (generating a basic data management application based on a database schema), component theming (eg. text input, radio buttons, buttons, drop-down lists, etc) using some tools like Adobe Photoshop or Fireworks. It has some nice wizards what allow you to easily do things such as connecting to a web service, and generate an wrapper based on the WSDL definition.

Flex Builder has some Profiling functionality that allows you to track down and correct performance issues.

While demonstrating Flex Builder the speaker gave some tips about decreasing the overall size of the swf files generated by Flex. In Flex Builder you can create several modules that correspond to different swf files. This way you can re-use these component and light-weight the main swf file. When you create a Flex application it is compiled including the Flex runtime library. You can choose to load the runtime from an external swf. This way you can use caching of swf to optimize traffic usage.

Flash and Flex are meant to complement each other. Adobe Flash CS3 has the capability to export your Flash animations to the MXML format that is used by Flex. This way you can use Flash elements in your Flex applications, and even access these elements via Action Script to manipulate them. These Flash elements can have a code-behind file. This way you have a class that represents that element, where you can add meta-data and behavior (just like while developing in .NET using Visual Studio).

It is also possible to have embed Flex applications in your Flash animations. This allows you to easily integrate a form in your flash-based website, for instance. In Flex Camp one of the speakers showed some demos to show us that Flex can be used along with different flash movies that are compiled to different versions of Flash Player, and even communicate with those legacy applications/movies.

In the next (and last) post about Flex Camp @ Lisboa I will talk about server side (back-end) technologies working with Flex. Including web services, Flash Remoting and integrating Flex with PHP. Later tonight!

Flex Camp @ Lisbon - Part 1

Posted on 10:46pm 2/19/2008 by Bruno Silva in Adobe, Programming, Software, Web

Flex Camp @ Lisboa

“Flex Camp is a series of conferences designed to help you understand more about Adobe Flex and Adobe AIR.”

And it was a really good conference. I have a whole new perspective at this emerging Adobe technology. This event in Lisbon (ISCTE University) was an initiative of RIApt (Portuguese Community of Rich Internet Applications)
It all starts with a simple question.

What is RIA?

Rich Internet Applications are part of the evolution of the world wide web. It started with Text-based UI and Mainframes, evolved to Integrated Media UI and client/server architectures, and now we are daily dealing with RIA in web applications.

People expect a great user experience while navigating over the web and using distributed applications that are part of a networked and global world.

What is Flex?

Flex is an open-source cross-platform/browser framework brought to the world by Adobe to produce RIA. The output applications donw with Flex are .swf files which can be viewed in any browser with a Flash Player up-to-date plugin. It is based in XML (the format is called MXML. It is pretty similar to XAML used by Microsoft (or the other way around :-P )

Flex allows you to use SOAP, HTTP/S, REST among other technologies/protocols. A great advantage of this technology when compared, for instance, to Silverlight (to what else could I compare it?…) it is the fact that a lot of people already support flash-based websites in their browsers. And it is already completely cross-platform (I’m still waiting for Moonlight to say the same about Silverlight).

There were a lot of demonstrations of some Flex applications. Some of them pretty great.

http://www.picnik.com - Online Photo editor. Nice, but I prefer Splashup.

http://www.buzzword.com - A reaaaaally amazing online document processor. Are you thinking about Google Docs? Just forget about it. This one has a real interface. RIA style :D . Astonishing! You can even save your files as Word 2007 documents (or as an usual .doc file). Give it a try.

http://sliderocket.com - Online slide show presentation composer (an online Powerpoint, lol). It is nice, but I don’t think that is as useful as buzzword. When I create a presentation I often use a lot of images and sometimes large pictures. Uploading them to a web server to use them in the presentation takes a lot of time. The waiting time for uploading and downloading the presentation for editing is not very effective. I think that in text processing this kind of issue is not such a problem. A presentation typically is more visual and occupies much more space.

http://remix.mtv.com - an online video editing tool. Pretty nice, I wasn’t paying that much attention during this demo. Sorry…

What is Air?

Air is a platform for Desktop RIA. This means that you can have an application based on Flex/Flash running as a desktop application. It can give you a great user experience. It is also cross-platform. Since it runs as a local application, it can do much more that an web-based application. A lot of the security issues that can be problematic when talking about a web-browser environment are dropped.

Air has an API that allows you to work with I/O, Networking, Clipboard actions, integrate with other typical operating systems features, etc. All you can do with a regular desktop application can be done with Air (or so they say).

Some sample applications:

Adobe Media Player - just another media player…. It was used to show us the HD support of Flex during this conference.

Google Analytics Suite - Google Analytics shaped in a fancy Air application. It can generate PDF reports!

Twhirl - this one was not presented during Flex Camp, but I use it a lot. :P It is a Twitter client.

This post was about what were these technologies and some examples of real life applications.

Next post will be about development with Flex/Air. Stay tuned. ;)

Visual Studio Color Schemes

Posted on 11:41pm 2/16/2008 by Bruno Silva in .NET, Programming

Visual Studio Color Schemes

Nowadays we are used to customize a lot of the software we use by applying theming and skinning along with other settings. This kind of customization is present in the operating systems, messaging applications, web applications, etc.

Well, when it comes to development environments it is also possible to do that, and many people do.

Take a look at this blog where you can find several color schemes that can be used in Visual Studio. Just code with the colors that make you comfortable, or as your boss would demand: productive. :-P

These kind of setting can be imported/exported in the Tools menu in both Visual Studio 2005 and 2008.

Visual Studio Import Settings

Vertigo: Video.Show

Posted on 9:52pm 2/12/2008 by Bruno Silva in Open Source, Programming, Silverlight, Web

Some time ago I talked about Slide.Show. A slide show web application made with Silverlight.

Now the same company has published Video.Show. It is an open-source video sharing portal system based on Silverlight.

Video.Show

Learn more about features in their website. The source code is available at Codeplex. Unfortunately I think that Video.Show it much more unstable than Slide.Show. If you interact with it before the whole page is loaded, you get some Javascript errors. The live demo is a little slow too.

Video.Show

© Bruno Silva | Powered by Wordpress