[Xerte-dev] Re: 1.9 properties

Smith, John J.J.Smith at gcu.ac.uk
Fri Nov 2 10:53:18 GMT 2012


Where we need to proxy content on the server then i agree we make that model non exportable but where we have the ability to push the request back to the client i think we should. I havent actually come across any that can't use jsonp yet although i suspect the wikipedia page and other embeds such as that will need an iframe. In these cases we don't need access to the content, just ti allow the browser to show it.

Regards

John Smith
Learning Technologist
School of Health and Life Sciences

Sent from Samsung Galaxy SII


Pat Lockley <patrick.lockley at googlemail.com> wrote:


 the way i see it, export is a property of a template.

So my new stuff isn't SCORM packaged, as I can't be bothered (have you seen tin can ap BTW)

but some templates will have exportable and non-exportable models - and the more modularised a template becomes, then the more problems you'll have exporting and importing as you might import one model for one project that isn't supported in core?


On Fri, Nov 2, 2012 at 10:29 AM, Julian Tenney <Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk>> wrote:
They could, there are already quite a few that rely on rss_proxy, and it doesn’t come up as an issue too often,

From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>] On Behalf Of Pat Lockley
Sent: 02 November 2012 10:24

To: For Xerte technical developers
Subject: [Xerte-dev] Re: 1.9 properties

each model could have an "exportable" warning?

On Fri, Nov 2, 2012 at 10:20 AM, Julian Tenney <Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk>> wrote:
> In theory, are some models not exportable anyways?
I tend to think so. I tend to agree with Ron that there aren’t that many reasons to have to export SCORM to implement it in a VLE, better to just link back to the object in situ, but that doesn’t work for xampp situations – but then XAMPP is really a way of getting to know the software, rather than a ‘proper’ production tool.

From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>] On Behalf Of Pat Lockley
Sent: 02 November 2012 10:18

To: For Xerte technical developers
Subject: [Xerte-dev] Re: 1.9 properties

in the old days yes, curl rare, but if you have moodle, you have to have curl these days

it'd be better to not assume curl obvious, so we could use "a generic PHP request". No harm in doing both.

In theory, are some models not exportable anyways?

On Fri, Nov 2, 2012 at 10:14 AM, Julian Tenney <Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk>> wrote:
Didn’t we find that not all PHP has curl? We don’t want to make the install any more complicated than it needs to be

From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>] On Behalf Of Pat Lockley
Sent: 02 November 2012 10:03

To: For Xerte technical developers
Subject: [Xerte-dev] Re: 1.9 properties

Would it make sense to write a PHP curl script to bypass the need for JSONP?

On Fri, Nov 2, 2012 at 10:01 AM, Smith, John <J.J.Smith at gcu.ac.uk<mailto:J.J.Smith at gcu.ac.uk>> wrote:
Sorry Fay, I know it’s gonna be a lot more work but I think it will make all the difference.

In terms of what Julian says, most of the common stuff (Narration, etc) is in Xenith.js already so I think the models are as lean as they could be, only thing I think we will need in there other than what is already there is some code to manage JSONP requests since these will be the only way to get external data into xenith due to same domain policy. I’ve already found something that will give us a starting point there also, with some good further reading from Douglas Crockford (and others) who is a well-respected expert in all things javascript. Leave that bit to me though since I’m the main one pushing JSON just now.

http://javascriptweblog.wordpress.com/2010/11/29/json-and-jsonp/

Regards,

John Smith
Learning Technologist
School of Health & Life Sciences
Glasgow Caledonian University

From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>] On Behalf Of Fay Cross
Sent: Friday, November 02, 2012 9:10 AM

To: For Xerte technical developers
Subject: [Xerte-dev] Re: 1.9 properties

I wish I’d done it like this to begin with as I get why it would be better.  Not entirely sure I get how to do it well enough to change stuff quickly though.  I’ll spend some time today looking into it and trying stuff out.


From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Pat Lockley
Sent: 02 November 2012 00:08
To: For Xerte technical developers
Subject: [Xerte-dev] Re: 1.9 properties

I've only ever scoped in plugins for mozilla (they care), but anything that modularises makes sense. Scope seems to be part of this (the php needs it too).

I don't have a preferred approach, or a say, as I am not coding this

On Thu, Nov 1, 2012 at 9:35 PM, Smith, John <J.J.Smith at gcu.ac.uk<mailto:J.J.Smith at gcu.ac.uk>> wrote:
Hi,

I'm just reading all these emails properly just now and I agree that something has to be done to protect scope. Fay has done a great job creating xenith and all these models and it's the quality of the codebase, how well the whole thing works and meeting all you guys that has made me want to get involved so heavily. But now i'm begining to see areas which could cause problems with scope. Especially now that I've created a few models that use JSONP requests. These work by Padding JSON objects inside a callback function and loading it straight into a <script> tag in the <head>, so all in global scope, as do all the model declarations...

But while each of the different ways you guys have mentioned of achieving this has their merits, I would definitely recommend that we consider the Yahoo JavaScript Module Pattern. This is used by many experienced JavaScript programmers and gives us private and public variables and methods. I would definitely recommend that any interested in developing the xenith code read a GREAT article about it here http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth

I think in for Xenith, this module pattern will allow us to do some great things:

Protect xenith variables and methods
Augmentation (Loose or Tight) to split up Xenith for manageability
Sub-modules - this is where I see the page models sitting

So we'll have something like

var XENITH = (function (my) {
        // code and stuff here
}(XENITH));

Then the models are added like this

XENITH.summary = (function () {

}());

XENITH.table = (function () {

}());

XENITH.rss = (function () {

}());

etc.

Obviously it will be a lot of work to port Fay's code over and to be perfectly honest with you i've only used this a few times and NEVER on a project of this scale this but I definitely think it will benefit the project to do this early on because as more models are added and multiple pages of the same type are added to projects I anticipate there being conflicts that we might struggle to work around.

What does everyone thing? Have any of you seen this before?

Regards,

John Smith | Learning Technologist
Room A251, Govan Mbeki Building | School of Health & Life Sciences | Glasgow Caledonian University
Cowcaddens Road | Glasgow | G4 0BA
________________________________________
From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>] On Behalf Of Fay Cross [Fay.Cross at nottingham.ac.uk<mailto:Fay.Cross at nottingham.ac.uk>]
Sent: 31 October 2012 10:14
To: For Xerte technical developers
Subject: [Xerte-dev] Re: 1.9 properties

No I don't mind

(adds another thing to never ending to do list...)

-----Original Message-----
From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>] On Behalf Of Pat Lockley
Sent: 31 October 2012 10:13
To: For Xerte technical developers
Subject: [Xerte-dev] Re: 1.9 properties

not to nag, happy to help - it's just a nice standard to adopt so in theory stuff doesn't break.

Of course all of the code I wrote in XOT is class based *disappears*

On Wed, Oct 31, 2012 at 10:10 AM, Fay Cross <Fay.Cross at nottingham.ac.uk<mailto:Fay.Cross at nottingham.ac.uk>> wrote:
> Yes, I realised as soon as I sent it I misread it.
>
> It's not all like that (probably should have done so).  Any functions in them are (e.g. every page has a pageChanged function that's called when the page is moved back to e.g. accNav.pageChanged()) but the code run when first set up isn't.
>
>
> -----Original Message-----
> From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>
> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>] On Behalf Of Pat
> Lockley
> Sent: 31 October 2012 10:04
> To: For Xerte technical developers
> Subject: [Xerte-dev] Re: 1.9 properties
>
> cross wires (maybe)
>
> With firefox plugins they force all javascript functions to be inside
> a JS object so
>
> var model = new Object{
>
> modelload:function(){
>
> dostuff();
>
> }
>
> }
>
> so there are no scope conflicts?
>
> On Wed, Oct 31, 2012 at 10:01 AM, Fay Cross <Fay.Cross at nottingham.ac.uk<mailto:Fay.Cross at nottingham.ac.uk>> wrote:
>> Yes, there's a model folder like in the flash version
>>
>> -----Original Message-----
>> From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>
>> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>] On Behalf Of Pat
>> Lockley
>> Sent: 31 October 2012 10:01
>> To: For Xerte technical developers
>> Subject: [Xerte-dev] Re: 1.9 properties
>>
>> is each page model js within it's own object?
>>
>> On Wed, Oct 31, 2012 at 9:49 AM, Fay Cross <Fay.Cross at nottingham.ac.uk<mailto:Fay.Cross at nottingham.ac.uk>> wrote:
>>> Hi John
>>>
>>> Thanks for sending these.  I'll get them on my test version and try them out.
>>>
>>> Apologies if me changing some of the way the main files work last week has messed you about at all.  I changed it so that all the main elements, variables, functions etc. that we don't want to be messed around wi

Glasgow Caledonian University is a registered Scottish charity, number SC021474

Winner: Times Higher Education’s Widening Participation Initiative of the Year 2009 and Herald Society’s Education Initiative of the Year 2009.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html

Winner: Times Higher Education’s Outstanding Support for Early Career Researchers of the Year 2010, GCU as a lead with Universities Scotland partners.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html


More information about the Xerte-dev mailing list