Model Glue Flex

So I finally got a chance to play around with the alpha of Model-Glue Flex and I must say I am rather impressed. I never got a chance to use the ColdFusion version of the framwork, but Model-Glue Flex is an order of magnitude better than the other frameworks I have seen for Flex, namely Cairngorm and Pure-MVC. I have to admit that I have not used Pure-MVC myself, I have just read a few how-to documents and am basic my assumptions on that. That being said, here is my initial reaction to Model-Glue Flex.

The first thing I like about it is there seems to be considerably less “boiler-plate” code to get started. It seems that the guys over at Firemoss attempted to make this as simple as possible, and in doing so they have made a very powerful Event System that doesn’t try to control too much about your application design. I believe that Model-Glue Flex brings to Flex what Fusebox brought to ColdFusion, that is a simple way to handle requests without dictating too much design.

Flex being a stateful environment I think the Model-Glue methodolgy works very well, even more so than ColdFusion. Flex exposes an event system that other frameworks attempted to build upon and enhance, but it seems that Model-Glue Flex is not using this event system and if it does it just uses it to kick off handling of it’s own event/message system. The message is really the key to the power and it comes from the fact you don’t assign listeners to events, but to messages that are dispatched by events. Any event can kick of any number of messages, and two events can kick off the same message. This allows the handling of events to be de-coupled from the dispatching of events which I believe is a flaw in the other systems. When coupled you end up with a 1 to 1 mapping of events to handlers that destroys any benfits that an event system provides for you.

One of the things I didn’t like about the framework was that in the quickstart guide it promotes the use of value objects and a delegate for all of your work. This is what my friend, Brian LeGros, would call a Lightweight architecture. This kind of architecture seems to be a common approach in the Adobe community, and I would like to see a lot more Heavweight approaches. The Ruby Community would call these “Fat Models”. It is the idea that your objects know how to perform actions on themself instead of having “manager” classes to manipulate “beans” or “value objects”.

After realizing seeing the lightweight architecture I felt compelled to re-implement one of the Model-Glue Flex examples using a more Heavyweight approach, and although I haven’t taken the time to do that yet, I think I might in the next couple weeks. An even more interesting idea came next though, and I really hope someone takes this idea and runs with it. The idea was Flex ActiveResource. I have seen a lot of RoR/Flex cross over, and I think this bridge would be even stronger if someone took a look at the Rails ActiveResource implementaiton and made a Flex port, so that implement a Rails RESTful interface was as simple as something like:


  public class User extends ActiveResource {
    public User() {
      setSiteUrl("http://danielroop.com/users");
    }
  }

and then you coulde interact with the object like:


   public var danielroop : User = User.find('first', { where: 'username  = "danielroop"' };

Maybe one day I will take the time to implement this, but I would much rather just be able to take credit for the idea, and have someone else do the hard work of implementing it!

Side project ideas aside, I think Model-Glue Flex is a step in the right direction for Flex frameworks. I hope the beta, and public releases continue to improve and stay as simple and elegant as they are currently.

Posted in programming | Tagged , , | 5 Comments

Orlando User Groups

I just wanted to point out that I added my user group affiliations to the navigation panel. Anyone in the Orlando area, that is interested in Ruby probably already knows about the ORUG. The ORUG is a fairly popular user group run by some good guys, Gregg over at RailsEnvy is the leader of the group.

Now for those of you who read my blog for the ColdFusion/Adobe aspects you would be interested in the newly founded Adobe Users Group Adogo. This was started by a couple guys I work with, Adam Fortuna and Brian LeGros. They are currently in the process of getting Adobe support for the user group, but if you are interested check in to the website and let them know you are interested in the group. It seems like they have a lot of good ideas, to get good creative content at these meetings, and the focus will be anything “developer” related. This means that Flash and Photoshop will be left at the door, and the meetings will focus on technologies like Flex and ColdFusion, specifically coding practices and patterns in these languages.

Besides these two groups I follow numerous feeds, and mailing lists, and if TallyHoh ever goes live you can see all my wonderful feeds. Until then, enjoy the User Groups.

Posted in community | Tagged , , | 1 Comment

About Section

I know everyone who reads this blog has been wondering…Who Is Daniel Roop?. Well let that question be answered, I have finally put up an about section to my blog. It is a second draft, so we will see how I like it. I am sure when Tyler gets back from Puerto Rico he will be the grammar police and tell me everything I did wrong. Until then you have to suffer with my writing ;-).

With the about section comes a new direction for the website. Well, not really such a new direction as accepting what this blog really is to me. That acceptance is that I really need a place to express my thoughts and ideas, both in the programming world, and the real world. So I apologize to anyone who doesn’t care about my politics views, or moral convictions but from now on I will be posting a Developer’s Perspective on the world. This will include anything from Video Games, Movie Reviews, Political Opinions, Thoughts about a recent debate, and probably still a lot of programming advice. I use the word advice loosely it is really my experience I want to share, in the hopes to save someone some hard ache down the road.

I am sure I will change this direction in another two months, but seeing as how I have a readership of…me… I don’t think it will be that big of a deal.

Posted in Life | Tagged , | Leave a comment

Syntax Sugar

I have been doing a lot of reading lately about MDSD and DSLs and I have to admit the ideas they suggest are rather seductive. I don’t mean that in a negative way, I simple mean the end goal of these two techniques are to bring the developer closer to solving the problem domain in an appropriate language. Being a rails developer in my spare time I have already been introduced to numerous DSLs with out even knowing it. Some may argue that rails itself is a DSL but based on the research I have done, the big pushers of DSL believe that rails is actually a collection of DSLs. For instance ActiveRecord is a DSL for expressing actions in a persistence domain, and ActionPack is a DSL for expressing how you want a request to be routed and processed.

After reading an article by Martin Fowler I realized that there are two different approaches to creating a DSL. He refers to these two different approaches as internal and external DSLs. An internal DSL is one that can be expressed in the native language of the environment in which you are working (e.g. ruby), and external DSLs are languages that must be “compiled” to a parent language before being executed. You will typically see external DSLs in Java, C#, or most non-scripting language environment.

The main advantage to internal DSLs is there is no additional logic that needs to be written in order to start working/writing your very own DSL. The reason why ruby and basically all other scripting languages are so great for writing DSLs is because they are founded on the notion of having syntax sugar. What I mean by that is they have multiple ways to express the same statement. In the olden days this was frowned upon, and I am sure many Java and C++ developers will cringe at the idea of writing an if statement 4-5 different ways. They might tell you “You should always write it the same way so that everyone is writing there code, and can interpret it the same way”. The problem with this is you are writing your code in some weird syntax to increase readability, when you could just be writing what you mean. Let me stop jabbering and give some examples:

hotels.each do |hotel|
  if ( hotel == selected_hotel ) {
    hotel.reserve()
  }
end

Everyone who understands enumerates and if blocks should understand what is going one here. But you could also right this statement like this:

hotels.each do |hotel|
  if hotel == selected_hotel
    hotel.reserve()
end

more importantly you could write it like this:

hotels.each do |hotel|
  if hotel == selected_hotel == hotel.reserve()
end

and if you wanted to, you could write it like this:

hotels.each do |hotel|
  hotel.reserve if hotel == selected_hotel
end

Now from a developer stand point I am sure all of these make sense except maybe the last one. But to someone who hasn’t written any code before the line:

  hotel.reserve if hotel == selected_hotel

will make perfect sense. That is the purpose of syntax sugar and DSLs.

Now for good measure I am going to throw in an example to help a co-worker out…who will remain nameless. One of the nicer features of Ruby is the unless construct. Now in simple terms

unless == if not

but to give an example:

print 'The select hotel is not available' if not hotel.available?

is the same as saying:

print 'The select hotel is not available' unless hotel.available?

I hope these examples make sense, and nameless co-worker, I hope this helps you understand the unless construct.

Posted in languages, programming | Tagged , , , | 1 Comment

Banana Pudding…Yum!!!

I just want to make a quick and dirty post congratulating a co-worker of mine on the launch of his first independent project. The project is Ataraxis Pudding and it is:

“Pudding is a simple visual collaboration tool. You upload images and invite people to review, comment on, and approve your work.”

I helped Michael with some of his initial beta testing, although, I don’t think I was his target audience as I am not a design or graphical person. The software works very intuitively and is a solid 1.0 release. Basically, the designer uploads his graphic then allows his client to see the content. As each party looks at the piece they can comment back and forth until a final product is created. Once the client is happy with the piece the approve button should be selected and a record of the approval is documented for the designers records. Each image is versioned as the process moves forward so if you ever need to go back and see why you made a comment or change you can easily click back through the history of the piece.

The product seems to be geared towards smaller independent designers, but I could see this as a package-able product that Michael could bundle and sell to enterprise who don’t feel comfortable uploading there copyrighted or trademarked images to an independent third party. Overall the feel of pudding is straight forward, Michael has put a lot of time and energy into making sure the user experience is as good as he can make it. I know this because just two weeks ago he decided to completely change the level of control each user has, and completely shift the paradigm of designer/client to a much more collaborative model.

The application is written in rails, which is always exciting and written her in my home town of Orlando, FL. Go East Coast Developers, the West Coast gets all the attention when it comes to web 2.0 and cool development shops, it is exciting to see something coming out of this side of the country where the VC isn’t flowing like water.

I will stop rambling about stuff I probably can’t articulate as well as Michael has already done on his marketing site so go checkout Project Pudding to get the scoop.

Posted in community | Tagged , , , | 1 Comment

cffeud

Congratulations ColdFusion!!! Maybe it is because I have not been actively following the ColdFusion until lately, or maybe they are becoming a real thriving community, but today marks a historic landmark. The invention of the cffeud tag. This tag has been first seen used between an up and coming coldfusion star and the established ruling class. Below you will see example syntax:

Syntax


<cfset teamLegros = "Brian LeGros" />
<cfset teamWoodaldi = "Matt Woodward,Brian Rinaldi" />

<cffeud team1="#teamLegros#" team2="#teamWoodaldi#">
  <cfround>
    <cfpoint>cf.objective() 2007 : OO Architecture Back to Front</cfpoint>
    <cfrebuttle>Matt Woodward</cfrebuttle>
  </cfround>

  <cfround>
    <cfpoint>cf.objective() 2007 : Introduction to Aspect Oriented Programming with ColdSpring</cfpoint>
    <cfrebuttle>Brian Rinaldi</cfrebuttle>
  </cfround>

  <cfround>
    <cfpoint>Sometimes a title isn’t enough</cfpoint>
    <cfrebuttle>Outstanding</cfrebuttle>
  </cfround>
</cffeud>

Score Sheet

Based on the current state of the feud, I would say the score breaks down something like this:

1 Point (Brian LeGros):
for creating a blog, and contributing.
1 Point (Brian LeGros):
Expressing his opinion on topics he heard. Regardless of whether he is correct or not, he is stimulating the community.
1 Point (Matt Woodward):
Extending an explanation to Brian LeGros’s concerns
1000000 Point (Brian Rinaldi):
Using the 1337 word @$$ in a professional post.
1 Point (Brian LeGros):
accepting criticism from the powers that be, with an open mind, by rebutting, and not cowering away to the established way of doing things.

Final Score

So as you see after the scores are tallied you end up with this:

Team LeGros: 3 Points
Team Woodaldi: 1000001 Points

Unfortunately Team LeGros grossly under performed in this showing, but we will keep an eye on him to see how this inaugural cffued turns out.

Posted in community | Tagged | 5 Comments

DHH and Fowler on RIA

Scott Hanselman caught up with DHH and Martin Fowler at railsconf and started a discussion on RIA and where it fits into web applications. I believe in my previous article I was a little more open minded about the topic, but these two bring up some very interesting and valid points.

DHH and Fowler believe that HTML needs some work, but to give a blank canvas is a bad idea. By blank canvas they are referring to giving a developer an environment where they constantly have to reinvent the proverbial wheel, for instance a text box. In HTML it is coded and interpreted the same way across the board. So not only does the developer not need to develop a text box, the end user also gets a uniform experience when he interacts with a text box across multiple web sites.

DHH then goes on to discuss how constraints are a good thing. He brings up Rails and how it encourages developers to conform to good practices. Fowler agreed, that new developers aren’t required to follow the Rails conventions, but the code does not smell right if you don’t. They contrast this against environments like Flash, and Silverlight, where the community is still very immature, and these constraints don’t yet exist. To take it a step farther, they do not even have uniform inputs to interact with the user, whereas HTML has this out of the box. It didn’t seem like they thought it would always be this way, but they are committed to the open HTML standard. Being at an Adobe shop myself I believe that until recently Flash has been focussed on visual candy and with the introduction of Flex they are starting to spend time on the application development side of programming.

Somehow this got into a discussion on how the Rails community seems strongly anti-Microsoft. This was an interesting discussion, and even the topic of JRuby came up. Neither DHH or Fowler seemed against the mean evil Sun corporation merging with Rails because they have a less-evil track record than Microsoft when it comes to the open-source community.

Even though the title was a little misleading because RIA was only the first 15 minutes of the Podcast, it was a good listen. I mean how could listening to a Dane, and an Englishman explain anything go wrong.

Posted in languages, programming | Tagged , | Leave a comment

Dragon Ball, Starcraft, Team Fotress Oh MY!!!

I realize I was trying to make the focus of this blog development. Most developers however have a gaming side in them, so with the recent influx of great gaming news I felt I needed to post a few things.

Dragon Ball Z: Budokai Tenkaichi 3

Gamespot today announced that Atari will be producing the next installment of Dragon Ball Z: Budokai Tenkaichi 3 for the Wii and Playstation 2. I have Dragon Ball Z: Budokai 2 for the Playstation 2, as well as Dragon Ball Z: Budokai Tenkaichi 2 for the Wii and I absolutely love this game. Tenkaichi 2 for the Wii brings the fighting genre to a whole new level with gestured based attacks. For the Dragon Ball universe this makes so much sense, and it seems other fighting games are taking that approach for there Wii release as well, namely Mortal Combat Armageddon. I am excited at the update to the already spectacular game, mostly because of the already mentioned update to the cast. Atarai said there will be 20 new never before playable characters. They mentioned Nail, King Cold, and King Vegeta, all of which should be very fun to play, but I hope they include some old Dragon Ball characters as well, like Chibi Chi-Chi, King Piccolo, and any of the Red Ribbon members. I will also keep my fingers crossed for online-play since it is the one thing I believe this game is really missing out on.

Starcraft II

How long has this game been coming? Well apparently 4 years according to sources at Gamasutra. At least it has been secretly developed for four years. I am so excited about this game. They have announced a focus on fast games, in contrast to the long skirmishes Warcraft III promotes. The events take place 4 years after the end of Brood Wars. Most importantly, Jim Raynor is still around. It always surprises me that I am usually just as interested in the story that Blizzard puts together, as I am the game. I am curious how Kerrigan is doing leading her brood, and what has happened to the dark templar? Were they able to successfully re-integrate into Protoss life? In any event check out Blizzard and Starcraft2.com for great screen shots, and unit descriptions for the revealed units so far. The Starcraft 2 page on Gamespot also seems to be accumulating quite a bit of information about the exciting upcoming release.

Team Fortress 2

Well I had to come up with a third game to make my title work so I figured I would include this awesome trailer for the upcoming Team Fortress game on the new Source engine. The game will be launched along side Half-Life 2: Episode 2 and Portals.

Posted in gaming | Leave a comment

Hi I’m RubyOnRails

They guys over at Rails Envy have put together some pretty funny spots in the spirit of the I’m a Mac ads that apple has been publishing.

I have met these guys at my local RUG, which Greg, the RubyOnRails Guy, leads. I haven’t been devote at following there blogs, but I will probably be adding it to my TallyHoh feeds soon.

So far #3 is my favorite:

Posted in community | Tagged , , | Leave a comment

Web 3.0: Enter the Bling

It seems that the Internet is gearing up for the next experience revolution. We all remember sites from the Web 0.5 era. These sites typically were thrown together as fan pages or small information sites about some topic. Then we moved into Web 1.0 with sites like eBay and Amazon. I believe at that point we could begin referring to web sites as web applications.

After the web matured into a usable beast in the 1.0 era, people began taking time tackling the user experience problem. Sometime during this transition Shockwave and Flash hit the scene. At the time people believed they could use Flash to make rich web applications and, at the time, they failed. There were several issues with the approach including non-familiar controls, load times, and installation of third-party code.

Although Flash proved to be a great tool at the time for making fun Flash games, web applications stayed in the realm of web standards. The web moved on, and many attempts were made at making a rich experience, most notably DHTML. Even though it was really cool, it never really took off as a new site norm. It was however half of the equation for the technologies behind AJAX. Oh, how I hate AJAX and I am not talking about the cleaner or the mountain, I am talking about the acronym AJAX. The acronym stands for Asynchronous JavaScript And XML. AJAX the technology can be expressed with a simple equation:


AJAX = DHTML + XmlHttpRequest

AJAX has spawned the Web 2.0 era, and brought us great applications like Flickr and GMail. There are other elements to the Web 2.0 movement, but I think a big portion is the rich experience that the user is getting.

So what is Web 3.0? When I started writing this article, I was going to tell you that common runtimes would take over Web 3.0. I believed this because of the recent introduction of Adobe Flex to make it easier for developers to create and maintain Flash applications. Also the recent interest of many other big players in the common runtime market, namely, Silverlight from Microsoft, JavaFX from Sun, and the open source Open Laszlo.

I do believe that these proprietary common runtimes will play an important part in the future of the web, but I think they will be a subset of applications, and still not the norm. I believe that web standard applications will still dominate the web because of searchability, accessibility, and portability. However, I believe there will be a third player in the next realization of the web: web-aware applications like iTunes. Until now, these applications have been few and far between, but, with new runtimes popping up to allow for traditional web developers to make the switch to desktop applications, I believe you will see more and more web-aware applications. The two runtimes I am aware of are Apollo from Adobe and Slingshot from Joyent.

So what does this all mean? Well I believe sites based on data and the exchange of information will stay in the realm of web standards to encourage cooperation and exchange of data. I believe web applications, like bank software, eBay, and Flickr will go in one of two directions depending on the user experience they want to accomplish. In most cases I believe it will be a combination of the two. For instance Flickr will use some sort of web interface, and also an upload tool written using Apollo, or Slingshot.

To the end-user this means a much better experience, but hopefully not at the cost of the exchange of information, which is really the essence of what makes the Internet great.

Posted in community, theory | Tagged | 2 Comments