$('someElement')

Tuesday, April 29, 2008

Silverlight About to Gain Some Ground

Obviously, it has been a long time since I have written a blog post. Life is busy. New company, new kid on the way, and some other excuses... ANYWAY, I'm back in the saddle again.

For my first "returning to blogging" post here I just want to comment on the announcement from NBC (covered on ZDNet here).

This is some pretty big news as far as a marketing story. I'm sure plenty of MS haters have plenty to say about it, but I for one commend Microsoft for a wily, and very smart tactic (assuming they had a hand in the decision).

Silverlight is absolutely a powerful platform for rich content on the web. Its capabilities are on par with Flash already, and in a couple ways are superior (3D and integrated CLR which means support for a whole slew of languages). It's cross platform and all that good stuff as well. So they've got a decent product on their hands, and paired with MS's fantastic development tools it could be quite good. There is of course one major problem; there is virtually no market penetration vs. Flash. That is the limiting factor and the reason I would not recommend Silverlight for a typical website project, unless the budget was big enough to include duplicating versions for multiple target platforms (and even then I wouldn't recommend it). As of now it's best suited only for those internal projects or inward facing products where you have control over the deployment platform.

Please take note that I am in no way bashing Flash or Adobe here. A lot of MS haters will see that I am not hating MS and by extension take the leap that I am therefore hating Adobe (or whatever other company is opposing). Microsoft is not nearly as bad as many people make them out to be, and definitely not more so than other big software companies...

Anyway, back to the point. Microsoft is poised, with the NBCOlympics.com deal, to increase their market penetration quite significantly. Yes, some people will just refuse to go there, but those numbers will by dwarfed by far by the number of people that will just go ahead and click the "download now" button (just like we all did at one point for Flash). Flash is still king for rich media on the web for now, but some solid competition will be welcome.

I'll stop here as far as the speculation goes, but I think things could heat up a bit after the Olympics. We shall see, of course, in due time.

-Ryan Gahl
I work as a professional software engineering consultant, specializing in web-based (inter/intra/extranet) applications, Ajax, and C#. My services can be purchased by calling the following number: 1-262-951-6727
I am becoming an expert engineer.

Wednesday, October 10, 2007

Gartner's Predictions Predict Exactly What We've Been Doing... Uncanny!

Today, via my Google Alert, via ZDNet (http://blogs.zdnet.com/BTL/?p=6560), Gartner has published a list of what they view as the top 10 strategic technologies for 2008. #7 is "Web Platforms"... and I think they're right on the money. Especially since we'll be launching our Complete Web Platform in 2008!

The article has this poignant quote:

Longer term, however, Web platforms will be the model for the future. Ultimately everything–infrastructure, information, widgets and business processes–will be delivered as a service. All of these intertwined APIs will give us a acronym: WOA (Web oriented architecture.) “Put this on your radar screen and start with some ‘what if’ models,” says Cearley. These Web platforms will also make mashups more common in the enterprise. In fact, Cearley argues that enterprises will need an architecture just to manage mashups.

Check out the similarities behind the above statement and our platform vision as outlined in my blog post "From Libraries to Platforms". I'd say our vision has once again been validated, which is a Good Thing. What it means for us is that, well, we were right (and not meaning to sound arrogant, but we knew that), but also that the world is starting to agree. That is a Great Thing.

I also read an article this morning in Information Week where they did a poll among CIOs, and the #1 concern in the US today is "Recruiting, developing and retaining IT talent". The article goes on to talk about the looming decline of IT professionals in America because of all the baby boomers retiring and not many kids taking tech courses in college. What I thought was interesting is how the proliferation of the Web Platform, and the hosted infrastructure, and the exposing of intuitive powerful application (mashup) development tools via a browser could be a powerful means to combat that scenario. What I see is that more and more non IT people will be implementing their ideas by themselves, which is already starting to happen anyway, and the role of the "tech" department will change dramatically. We may not find ourselves in quite the poor state that all these doomsday predictions would have us in.

For anyone interested in keeping up with our progress, please subscribe to this blog's RSS feed, and also remember to keep tabs on the platform's official blog (this one here is just my personal blog): WidgetsAndMashups.com.

 

-Ryan Gahl
I work as a professional software engineering consultant, specializing in web-based (inter/intra/extranet) applications, Ajax, and C#. My services can be purchased by calling the following number: 1-262-951-6727
I am becoming an expert engineer.

Friday, September 07, 2007

WebWidgetry(tm)'s New Blogging Platform

The team at Nth Penguin, LLC, of which I am a part, and whom collectively owns the WebWidgetry(tm) and MashupStudio(tm) vision, also owns quite a few premium domains that as mentioned in this post will be utilized for various pieces of our platform.

Today, I'd like to point you towards what will be our new main blogging site: WidgetsAndMashups.com. There are only two posts up there right now, but we will continue to put out more information (and plenty of editorial on the state of the widget/mashup landscape). This is meant to be the main place to find out more information about our work, so is admittedly a bit of a marketing property. That disclaimer out of the way, we promise to be as insightful as possible while increasing your general awareness of who we are and what we're up to :-)

I'll be putting a post out pretty soon with more background information, including who we're forming partnerships with, what our model currently is for funding our work, and some other things that some may find interesting. Following that, some posts with technical speak regarding our technology, and (hopefully soon) some demos.

Things are starting to heat up a little bit.

-Ryan Gahl
I work as a professional software engineering consultant, specializing in web-based (inter/intra/extranet) applications, Ajax, and C#. My services can be purchased by calling the following number: 1-262-951-6727
I am becoming an expert engineer.

Wednesday, June 27, 2007

Oracle Presentation Recap

So, last week Friday we took part in an Oracle User Group meeting, in which we presented our vision for the complete web platform (i.e. WebWidgetry(tm) and MashupStudio(tm)). The response was very interesting.

It became apparent to us that the canonical enterprise today is still struggling quite a bit with where to find the value in many of the "Web2.0" concepts and tools. For a lot of people, it comes down to things like governance and security. They are still not quite sure how to manage and support all these potential "custom apps" that would be a result of a world where users are also implementers. The IT department is not ready or willing to cede those responsibilities to a group of people that are not professional developers.

Not only are we faced with the challenge of finding just what problems enterprises have (in general) that a SOA based development and mashup platform can solve, but we as a community must also work diligently to shed light on the value of these concepts. We need to help them understand that it's not about managing the mashups (or custom apps) themselves, but about managing the services used to get the data and the tools used to create the mashups. The community, whether it's the group of users within the organization that find a particular mashup useful or it's the global platform community, can manage their own content as long as you provide controlled access to the data they want and the tools that make it easy. This is already the value proposition for enterprise content management systems. It just so happens that this time, the content is actually content + functionality! We know that's exciting, but now to convince the world...

-Ryan Gahl
I work as a professional software engineering consultant, specializing in web-based (inter/intra/extranet) applications, Ajax, and C#. My services can be purchased by calling the following number: 1-262-951-6727
I am becoming an expert engineer.

Thursday, June 21, 2007

Presenting WebWidgetry at an Oracle User Group

Tomorrow (or today depending on what time I actually get this posted tonight) we will be giving a presentation of our web platform vision at an Oracle User Group meeting. We were invited by a Senior Solution Architect within Oracle, with an aim at eliciting insight from their customers on what they would like to see in such a platform. This will be both an education in market research and public speaking. I'm looking forward to it.

We're planning to start with a slide show (of course), followed by Q&A and a tech demo (time permitting). Oracle is doing quite a bit of quality work in the Web/Enterprise 2.0 arena. But, like most other big application companies, the development requirements are quite intense when it comes time to create anything custom.

As mentioned in my previous post, we are all about making it easy for the people with the ideas (and needs) to be able to actually (for real now) implement their ideas. It will be interesting to see how customers of a suite as large and diverse as the Oracle stack will view some of these concepts, and moreover - to find out just what it is they want in order to fill the hole between having an idea of what they need to achieve their goals and actually getting that idea implemented.

-Ryan Gahl
I work as a professional software engineering consultant, specializing in web-based (inter/intra/extranet) applications, Ajax, and C#. My services can be purchased by calling the following number: 1-262-951-6727
I am becoming an expert engineer.

Monday, June 18, 2007

From Libraries to Platforms

We, as web developers, are living in a maelstrom of innovation today. There are literally hundreds of frameworks and libraries out there for us to choose from. They range from the low level abstractions to the complete deal... from javascript sweetness to tools aimed at people who don't want to learn javascript. What's happening now, though, is we are seeing quite a bit of code and concept overlap. It is very common to find the same components in different frameworks. Novel innovations seem to be coming a little farther apart than they once were. This means the dam is about to break on the next stage (and indeed, the precursors are here already). Enter, the platform.

The platforms, as opposed to the frameworks and libraries, will be complete end-to-end development, collaboration, integration, publishing/distribution, searching, and monetization engines. The truly good ones will be easy and powerful enough to enable a level of user created content never before seen, or imagined. The truly great ones will do so while being secure, and will see enterprise adoption relatively early. From people at home, to that famous "line of business" person, everyone will be equipped to implement their ideas.

The content will be in the form of compelling functionality mixed with compelling data and wrapped in nice looking - and yes compelling - presentation. Moreover, these widgets will be like mutable little Lego(tm) blocks. You will be able to extend them, and plug them together to create new, larger, or specialized versions and re-publish as your own. The incredibly awesome platform will enable this re-authoring, and will be seamless. It will wrap licensing automation, making sure the "mashup engineers" get their fair share for being innovators (doing something that the original author never imagined), and that the original author gets their fair share for, well, being the original author. Creating value for the community you're in will be rewarded.

The true web platform will transcend server-centric vs. client-centric programming models. Developers (or rather, idea implementers) on this new breed of platform will be doing web-centric development. Processing, storage, database, hosting and deployment concerns will all be abstracted away to a "pluggable provider model" that will be as easy to change as checking a box. The ideas and the communities that arise around those ideas are what will matter. The implementations will be largely interchangeable, and most certainly extensible.

The complete platform will provide an infrastructure on which to build upon. It will include a widget to widget communication system, and here's the catch: that communication system will work the same for widgets within the same page (or application space) as well as for widgets being used in completely different contexts, in different applications, on different computers, in different parts of the world, and across spans of time. This messaging will be orchestrated, secure and reliable.

That brings me to the disclaimer: I have special insider knowledge of this whole platform direction because I am part of the team that has been designing one of them. It has been this effort over the past 2 years, on top of meeting the ongoing and demanding needs of our clients, that has largely kept me from blogging about these ideas. But now I feel the time has come to let the world know what we've been up to.

Look forward to hearing more about our company, the partnerships we're forging, the technology we've developed and are evolving, and the ideas we will be implementing. You will be able to start seeing little pieces coming out from the following domains (some are parked for now, but expect to see more news in the coming months).

The platforms are coming, and ours will be:

  • www.WebWidgetry.com - We will be putting the front end community discovery and sharing tools here (think YouTube, but for solutions/widgets/ideas/services/mashups/creations/etc...)
  • www.MashupStudio.com - You will be able to author, collaborate, find, integrate, publish, license, develop, test, share and use creations here.
  • www.WidgetsAndMashups.com - The blogs of our team members (including a new location for this blog of course), as well as the discussion forums and other communication tools will be located here.
  • www.EnterpriseWidgets.com - Enterprises will be able to access reliable, secure tools here to leverage this new platform with both ease of use and ease of mind.
  • www.QAMachine.com - You will be able to submit your "idea implementations" here, where a community of testers will put it through the tests. It will come out the other side donning a shiny certification and rating, proving that it conforms to a set of standards for security, performance and reliability.
  • www.GlobalServiceBus.com - No platform will be complete without the ability to connect pieces together outside the normal confines of an "application". We will expose the best principles of the enterprise service bus, but at the global level, and intuitively.

-Ryan Gahl
I work as a professional software engineering consultant, specializing in web-based (inter/intra/extranet) applications, Ajax, and C#. My services can be purchased by calling the following number: 1-262-951-6727
I am becoming an expert engineer.

Thursday, March 29, 2007

EventPublisher: custom events a la pub/sub using prototype.js

Look at this: two blog posts in as many weeks. Maybe I can do this after all :-)

Ok, so I'm kind of building up to a post I have in mind for a little later where I'll explore, in-depth, my simple approaches to implementing classical underpinnings in javascript (including a discussion on the many benefits of doing so). My previous post speaks to one of the fundamental things that would be on any seasoned OO dev's checklist: a robust inheritance model. This week I'll be sharing another of those fundamental checklist items, which is a robust event model (meaning class level custom events, not the already available DOM events like "click" and "mouseover").

Also, in a later post I'll share why I'm stuck on prototype.js as the basis for my code. For now I'll assume that you either already love it and use it, are interested in using it, or can make the connection from what I share here to your library of choice if you are using one of the other ones (and of course there are many options for what I'll call the "Javascript Abstraction Provider" layer besides just prototype.js).

For now, on to EventPublisher.

Why the need?


To put it simply: a robust class level custom event model is a critical component to creating a scalable, maintainable foundation for any application development platform. I talk to seasoned "old-line" engineers and consultants fairly frequently who still, to this day, dismiss serious javascript development for the same reasons almost everyone did before we all recently became a lot smarter [a lot of us anyway]. That is, they still think of scripts with disdain, fearing the spaghetti messes that usually resulted from the mish mashing approaches of yore. "Javascript is not maintainable" they still tell me. "It's messy... it doesn't scale well... it's not well suited for team development" - I still hear this stuff. Clearly, we still have a great deal of misinformed people out there.

So, the basis for my whole educational series on this blog, which started last week, and my answer to those people still not wanting to learn how to write javascript for whatever old reason, is this: "Javascript is the language of the web document. Learn it, buddy. It's expressive, powerful and malleable. Here are some ways to maintain its expressive, dynamic nature while enabling scalable, maintainable, collaborative, object oriented application development."

The code


I first wrote EventPublisher about a year and a half ago, and first posted it to the Ruby on Rails Spinoffs mailing list just over a year ago (btw, this is the official [unofficial] support list for the prototype.js library, it's not just for RoR users). That original version can be found here, and a quick walk through can be found here.

Since that version, I have adopted a slightly different object model, which I touched on near the end of my post last week. So naturally I modified the EventPublisher class to take advantage of that.

Here is the new code:

EventPublisher = Class.create();
EventPublisher.prototype = {
/**
* @constructor
*/
initialize: function() {
//private variables
var allEvents = {}; // cache object

//public instance methods
/**
* Attaches a {handler} function to the publisher's {eventName} event for execution upon the event firing
* @param {String} eventName
* @param {Function} handler
* @param {Boolean} asynchFlag [optional] Defaults to false if omitted. Indicates whether to execute {handler} asynchronously (true) or not (false).
*/
this.attachEventHandler = function(eventName, handler) {
eventName = eventName + "_evt"; // appending _evt to event name to avoid collisions
// using an event cache array to track all handlers for proper cleanup
if (allEvents[eventName] == null)
allEvents[eventName] = [];
//create a custom object containing the handler method and the asynch flag
var asynchVar = arguments.length > 2 ? arguments[2] : false;
var handlerObj = {
method: handler,
asynch: asynchVar
};
allEvents[eventName].push(handlerObj);
};

/**
* Removes a single handler from a specific event
* @param {String} eventName The event name to clear the handler from
* @param {Function} handler A reference to the handler function to un-register from the event
*/
this.removeEventHandler = function(eventName, handler) {
eventName = eventName + "_evt"; // appending _evt to event name to avoid collisions
if (allEvents[eventName] != null)
allEvents[eventName] = allEvents[eventName].reject(function(obj) { return obj.method == handler; });
};

/**
* Removes all handlers from a single event
* @param {String} eventName The event name to clear handlers from
*/
this.clearEventHandlers = function(eventName) {
eventName = eventName + "_evt"; // appending _evt to event name to avoid collisions
allEvents[eventName] = null;
};

/**
* Removes all handlers from ALL events
*/
this.clearAllEventHandlers = function() {
allEvents = {};
};

/**
* Fires the event {eventName}, resulting in all registered handlers to be executed.
* @param {String} eventName The name of the event to fire
* @params {Object} args [optional] Any object, will be passed into the handler function as the only argument
*/
this.fireEvent = function(eventName) {
var evtName = eventName + "_evt"; // appending _evt to event name to avoid collisions
if (allEvents[evtName] != null) {
var len = allEvents[evtName].length; //optimization
for (var i = 0; i < len; i++) {
try {
if (arguments.length > 1) {
if (allEvents[evtName][i].asynch) {
var eventArgs = arguments[1];
var method = allEvents[evtName][i].method.bind(this);
setTimeout(function() { method(eventArgs) }.bind(this), 10);
}
else
allEvents[evtName][i].method(arguments[1]);
} else {
if (allEvents[evtName][i].asynch) {
var eventHandler = allEvents[evtName][i].method;
setTimeout(eventHandler, 1);
}
else if (allEvents && allEvents[evtName] && allEvents[evtName][i] && allEvents[evtName][i].method)
allEvents[evtName][i].method();
}
} catch (e) {
if (this.id)
{
alert("error: error in " + this.id + ".fireEvent():\n\nevent name: " + eventName + "\n\nerror message: " + e.message);
}
else
alert("error: error in [unknown object].fireEvent():\n\nevent name: " + eventName + "\n\nerror message: " + e.message);
}
}
}
};
}
};

My reasons for defining classes as above (defining instance only members within the constructor) are, again, explained in last week's post.

Creating a global event dispatcher object


Ok, now we have the EventPublisher class as a tool in our box. How to put it to use. The first way is to create an instance of it that is accessible at the global level:

var globalEvents = new EventPublisher();

...which all your other objects will be able to use to publish and subscribe to global application-level events:

someClass = Class.create();
someClass.prototype = {
initialize: function() {
this.name = "Foo";

//do some stuff...

//something happened that might be interesting at a global level
globalEvents.fireEvent( "someEvent", {name: this.name} );
}
};

anotherClass = Class.create();
anotherClass.prototype = {
initialize: function() {
//private methods
function someEventHappened(args) {
alert(args.name);
}

//this class is interested in knowing whenever "someEvent" happens
globalEvents.attachEventHandler( "someEvent", someEventHappened );
}
};

var testSub = new anotherClass();
var testPub = new someClass();

On that last line, when the someClass instance is created and it fires the global "someEvent" event, the anotherClass instance "hears" it and the registered handler is executed, resulting in "Foo" being alerted.

Some notes about event arguments (and javascript object notation)


Notice above that the 2nd argument to the .fireEvent() method allows you to pass arguments. The arguments are in the form of a plain old javascript object. For anyone that may be reading this that is still a little new to javascript, I just wanted to take a brief moment to explain this. The syntax I used above: "{name: this.name}", created what's known as an anonymous object. The object had 1 property "name" with the value of this.name ("Foo" in our case). The syntax I used is also frequently referred to as "object notation" or "javascript object notation". The term "javascript object notation" is also known as JSON, although usually people use that acronym when referring to using it as a data transfer format during Ajax operations (more on JSON can be found on Douglas Crockford's json.org, and of course on Wikipedia).

someClass's arguments object for the fired event could have been written in any of the following semantically identical ways:

//using js's Object primitive
var args = new Object();
args.name = this.name;
globalEvents.fireEvent( "someEvent", args );

//assigning to a variable using object notation
var args = {name: this.name};
globalEvents.fireEvent( "someEvent", args );

//creating an anonymous object inline (the original version)
globalEvents.fireEvent( "someEvent", {name: this.name} );

Subclassing EventPublisher for class-level event notification


NOTE: The code example below assumes that we are using the inheritance model from my previous post.

Ok, now we have a global event dispatcher, but what if our events are not really interesting at a global level? For any class that needs to fire instance level events, simply inherit from EventPublisher:

class1 = Class.create();
Object.inherit(class1, EventPublisher);
Object.extend(class1.prototype, {
initialize: function() {
//base class construction
this.base();

//instance methods
this.doSomething = function () {
//something happened...
this.fireEvent( "somethingHappened" );
};
}
});

var test = new class1();
//listen
test.attachEventHandler( "somethingHappened", function () { alert("IT HAPPENED!!!"); } );

//make the event fire
test.doSomething();

I hope you are getting the gist. Now any object, or any code for that matter, that can see the "test" instance can listen for its events to fire, and then take action. I will leave it at that for now, and explore some more complicated event pub/sub scenarios in future posts as I continue to discuss the implementation of classical underpinnings in the dynamic javascript language.

Summary


So at this point in the game, we're armed with both a robust inheritance model and a robust event model. These are two of the big items on the checklist for implementing a truly powerful application platform. One which is scalable, maintainable, is well suited to team development, and is fun to work with. Really, using the bits from this post, my last post, and of course prototype.js itself, you should have all you need to get started. The rest of the posts in this series will discuss the general approach, explore some of the merits of prototype.js, and build on what I've already shared. The end result is going to be a full scale, yet lightweight, flexible platform, which you will be able to use to create some really solid web applications that will live long happy lives.

-Ryan Gahl
I work as a professional software engineering consultant, specializing in web-based (inter/intra/extranet) applications, Ajax, and C#. My services can be purchased by calling the following number: 1-262-951-6727
I am becoming an expert engineer.