Django extensively uses a lot of Python tricks, as you'd expect from such a
Python centric project :)
As such, it's usually worth dissecting for inspiration regularly. I haven't
looked at it in a while actually, but it until a couple years ago it did a
fair bit of both, magic pattern for the plugin side of things, and
metaclasses for... well, practically everything :p

Meta classes get called magic for magic methods and extensive decorator
use, but the pattern is still called Meta Class Pattern.
The Magic Pattern (which is far from formal, you only hear it very
sporadically and only on a couple projects) refers to on-the-fly modules,
and it's usually pitched against registry and plugin patterns alternatives.


On Fri, Oct 18, 2013 at 10:22 AM, Alok Gandhi <alok.gandhi2...@gmail.com>wrote:

> As far as I know Django extensively employs python meta classes for the
> magic stuff. Python Meta Class concept is extremely powerful in case one is
> curious enough to learn it.
>
> Alok.
>
> Sent from my iPhone
>
> On Oct 17, 2013, at 6:22 PM, Raffaele Fragapane <
> raffsxsil...@googlemail.com> wrote:
>
> I'm sure you're used to Maya, where the environment gets cluttered with
> anything and everything you run, in XSI as Steve mentioned you get a clean
> engine every tab, every run.
> Good and bad to it (personally I find it generally more good than bad
> compared to a constantly and unpredictably stale environment and the
> contents of my text editor nuked if I forget to hold down control :p).
>
> If you want something to be available across the board you can simply
> write it, register it as a module, and push it. No need for it to exist as
> a file.
> Django in example uses a lot of really clever module magic, so it's always
> a good inspiration.
> As for what is becoming known as the magic pattern:
> http://www.b-list.org/weblog/2007/dec/03/making-magic/
>
> It's a little bit of work the first time around, but once you get the hang
> of it a template that allows you to dump in, alter, or remove anything from
> a transitional module is pretty easy to produce and will be a good
> investment of your time.
>
>
> On Fri, Oct 18, 2013 at 5:50 AM, Sergio Mucino 
> <sergio.muc...@modusfx.com>wrote:
>
>>  Thanks Stephen. That would work for stuff I want to keep around and
>> re-use, but sometimes, I'm just doing quick-n-dirty work where I would like
>> to define a function, and then be able to call it whenever I want.
>> Use-n-dispose, I guess. I can do that just fine in other apps, but in
>> Softimage, it forces me to keep the function around and copy/paste it to
>> the tab where I will need it, calling it at the end. I don't save it to
>> disk, because I keep changing stuff and redefining it as I go, so my
>> options are limited.
>> Anyway, thanks for confirming my suspicions. Cheers!
>>
>>


-- 
Our users will know fear and cower before our software! Ship it! Ship it
and let them flee like the dogs they are!

Reply via email to