Ramblings

April 16, 2008

Pay as you go web hosting

Filed under: cool, dev, hosting, lowcost — michaelangela @ 10:08 pm

Interesting concept. They don’t work with long running processes like Django or Web2py, but it could be good for static files and regular scripts.

NearlyFreeSpeech.NET FAQ

What happens if I get slashdotted?

A
“major slashdotting” of a site hosted on our service will cost you (on
average) less than $10, one time. The best part about that is that as
soon as it’s over, your costs go back to normal, but you’ll save any usage-based discount
resulting from the traffic burst. There’s no higher-tier pricing to get
permanently pushed into, and we won’t cancel you for having something
to say that people actually want to hear.

This happens to one of our members about once a week, so you can bet
we know how to handle it. Or rather, our systems do. Our load-adaptive
clustering technology is at its best when handling demand surges, and
our pricing is at its best when you’d prefer not to be billed based on
a 1% event the other 99% of the time.

More on MVC

Filed under: dev, education, flex, mvc — michaelangela @ 4:31 am

Going to have to do some more reading here later… Joes’ article “An architectural blueprint for Flex applications” was probably the first thing I tried to chew through to understand MVC, Cairngorm, and “separating concerns” while building an app in Flex. Model adapters and view mediators look like something I have been wrapping my head around. And so… more reading here later. :-)

joeberkovitz.com » The MVCS Architecture and ReviewTube Example Application

Use of Model Adapters. Very often, the raw information in a Model is not what a View needs to show, and using Flex data bindings to drive the View from the Model becomes extremely awkward. …snip… In such situations, and even in simpler ones, it’s often better to build a special “model adapter” that both exposes this modified view of the underlying Model, and which also listens to change events from that model, dispatching change events of its own when its “adapted” properties change in response.

Use of View Mediators. Another important pattern not illustrated by ReviewTube is the use of Mediators, in which View/View and Controller/View interactions are handled by separate objects that “decouple” these objects from knowledge of each other. …snip… Another type of example is one in which a View is fairly generic in nature and some intermediate processing of its events is required to figure out how and when to invoke the proper Controller operations based on user interaction with that View.

SWFObject 2.0, SWFAddress 2.1, Flex 3 and getting the starting path

Filed under: deep-linking, flex, swfaddress, swfobject, tip — michaelangela @ 4:19 am

I have a test project running with Flex 3 and SWFAddress 2.1 and SWFObject 1.5. It worked but I noticed that SWFObject was updated to 2.0 and SWFAddress is supposed to work with it. So I upgraded. And getting the first initial URL stopped working. Couldn’t figure it out. Then I saw this:

joeberkovitz.com » UrlKit 0.70 with various fixes and Flex 3 Support on Google Code

One possible caveat is that you must pass a unique object ID to SWFObject for the / tag (this ID is the second arg to the SWFObject constructor). Hope this helps — let me know if you’re still stuck and I’ll try and post something.

In my SWFObject 1.5 code, I wasn’t setting the attributes. SWFObject 2.0 is more strict about it. So after changing this:

var attributes = {};

to this:

var attributes = {};
attributes.id = "content";
attributes.name = "content";

It worked. The actual swfobject call is like so:

swfobject.embedSWF("path/to/app.swf", "content", "100%", "100%", "9.0.0", "path/to/expressinstall.swf", flashvars, params, attributes);

Hope that helps someone out there! Oh yes, thanks to Joe for mentioning the caveat as well. :-)

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.