[Xerte-dev] Re: 1.9 properties
Pat Lockley
patrick.lockley at googlemail.com
Fri Nov 2 10:17:45 GMT 2012
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> 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] *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> 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] *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<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> 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 [
> xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Fay Cross [
> 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] 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>
> 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] 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>
> 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] 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>
> 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 with on
> accident by naming something the same in a page model now begin with 'x_'.
> It looks like you've used this version in making these models so hopefully
> it didn't affect you too much. I wouldn't have thought there'd be anything
> else big changing in the xenith.js file now that would mean changing all
> the model pages.
> >>>
> >>> You mentioned that you might look at the connector pages at some
> point. From talking to Johnathan who wrote the original Flash versions
> they all have some common functions in them (e.g. functions that find the
> page with the correct page id). As the same code will be used in several
> page models then the best place for this is probably the xenith.js file so
> we're not repeating the same code in multiple page model files. I'm happy
> for you to add anything in there that's needed.
> >>>
> >>> Thanks again for the work you've done so far - I certainly didn't
> expect that a couple of weeks after the AGM someone who hadn't contributed
> anything before would have got involved so quickly!
> >>>
> >>> Fay
> >>>
> >>> -----Original Message-----
> >>> From: xerte-dev-bounces at lists.nottingham.ac.uk
> >>> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of
> >>> Smith, John
> >>> Sent: 30 October 2012 19:44
> >>> To: For Xerte technical developers
> >>> Subject: [Xerte-dev] Re: 1.9 properties
> >>>
> >>> Hi Fay,
> >>>
> >>> That makes sense now. I've attached the delicious.html and the
> youtuberss.html models for now while I work on the textDrawing.html and
> youtube.html ones, I hope they get your approval, given the quality of the
> rest of your code...
> >>>
> >>> A caveat is that the delicious.html one doesn't actually work but
> that's because the JSON API tag feed appears to be broken. According to
> their dev pages here (http://delicious.com/developers#title1), this url
> should return a JSONP object of the first 10 search results for 'cuillin',
> wrapped in test():
> >>>
> >>> http://feeds.delicious.com/v2/json/tag/cuillin?callback=test&count=1
> >>> 0
> >>>
> >>> Now it was working yesterday but just died today and now only returns:
> test([]) for any tag... strange. Have tried contacting them but still no
> reply. Commit it anyway and when it starts working again I'll fix any
> errors that crop up. I've still not checked out any of the other options
> although i've included an equivalent if else statement to that in the
> equivalent rlm. Will test these also when I get access to a more
> comprehensive data.xml file...
> >>>
> >>> 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
> >>> [xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Fay Cross
> >>> [Fay.Cross at nottingham.ac.uk]
> >>> Sent: 30 October 2012 09:48
> >>> To: For Xerte technical developers
> >>> Subject: [Xerte-dev] Re: 1.9 properties
> >>>
> >>> You're right, the Html5 stuff really needs to be in the other svn. I
> think I was just reluctant to do this before as I didn't want a new
> Toolkits zip to be made which included it until there was a way to properly
> access the html5 versions of projects.
> >>>
> >>> Thanks for looking at some of the outstanding pages that need doing,
> that's really useful, could you send them to me please if you can't commit
> them.
> >>> ________________________________________
> >>> From: xerte-dev-bounces at lists.nottingham.ac.uk
> >>> [xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Smith, John
> >>> [J.J.Smith at gcu.ac.uk]
> >>> Sent: 29 October 2012 16:49
> >>> To: For Xerte technical developers
> >>> Subject: [Xerte-dev] Re: 1.9 properties
> >>>
> >>> Hi,
> >>>
> >>> I know I'm new here but personally I think that JSON export would at
> >>> least be as useful if not more useful as XML, especially when
> >>> working in a JavaScript environment like the HTML5 engine. (see next
> >>> part)
> >>>
> >>> Incidentally, not sure if I only have commit access to XOT since XERTE
> desktop is being treated as almost dead in the water but the Xenith code
> i'm working on is part of the XERTE trunk, not XOT. My interest is just now
> is getting the HTML5 engine mature enough to use in anger. Over the weekend
> i've done the following HTML5 engine models:
> >>>
> >>> delicious (95% ready) - had to use JSONP request because of same
> origin policy
> >>> youtuberss (95% ready) - have use new JSONC request
> >>> textDrawing (<50%) - don't have a sufficient test file for this
> model and the XOT Jisc site won't save the image or let me add pictures
> just now... need to get XOT installed locally or use usb version
> temporarily (anyone help out with a test XML stub for this model??) Oh and
> the screenshot shows the freehand done using pixel <divs> for non canvas
> compatibility
> >>> youtube (~80% ready) - just a guess as only a few sizing issues
> >>>
> >>> Attached some screenshots for those who want to see.
> >>>
> >>> I'ml definitely interested in working on the connector pages soon
> though and tying this altogether as we want a "mobile" compatible (read
> iPad) RLO repository of some fashion by the end of the academic year.
> >>>
> >>> 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
> >>> [xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Pat Lockley
> >>> [patrick.lockley at googlemail.com]
> >>> Sent: 29 October 2012 13:25
> >>> To: For Xerte technical developers
> >>> Subject: [Xerte-dev] Re: 1.9 properties
> >>>
> >>> Also, would JSON export be more useful / as useful as XML export?
> >>>
> >>> On Mon, Oct 29, 2012 at 1:24 PM, Pat Lockley <
> patrick.lockley at googlemail.com> wrote:
> >>>> WordPress has a theme supports function, so I am thinking of having
> >>>> a list to indicate the tabs per template, or something similar
> >>>>
> >>>> On Mon, Oct 29, 2012 at 1:15 PM, Ron Mitchell <
> ronm at mitchellmedia.co.uk> wrote:
> >>>>> 1, 2 & 3
> >>>>> Personally I don't think it's a necessity that the same tabs exist
> >>>>> for all templates but I suspect it's easier to just display a
> >>>>> message like 'This property is not relevant to this template' than
> >>>>> it is to change the code to dynamically change tabs based on the
> template in use.
> >>>>>
> >>>>> 4
> >>>>> Increase the properties window size and display 'This property is
> >>>>> not relevant to this template' for Xerte templates?
> >>>>>
> >>>>> Just my quick thoughts...
> >>>>> Ron
> >>>>>
> >>>>> -----Original Message-----
> >>>>> From: xerte-dev-bounces at lists.nottingham.ac.uk
> >>>>> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Pat
> >>>>> Lockley
> >>>>> Sent: 29 October 2012 12:48
> >>>>> To: For Xerte technical developers
> >>>>> Subject: [Xerte-dev] 1.9 properties
> >>>>>
> >>>>> Hello,
> >>>>>
> >>>>> On the properties panel there are several options which are sort
> >>>>> of xerte specific - XML and media and quota for example.
> >>>>>
> >>>>> Some of the new templates aren't XML, so XML makes no sense - and
> >>>>> the media and quota code is very xerte specific.
> >>>>>
> >>>>> Would people think
> >>>>>
> >>>>> 1) all off these options should exist for all templates?
> >>>>> 2) should tabs exist even if the functionality doesn't?
> >>>>> 3) what sort of message should it say
> >>>>> 4) what if I have scope for an extra tab?
> >>>>> _______________________________________________
> >>>>> Xerte-dev mailing list
> >>>>> Xerte-dev at lists.nottingham.ac.uk
> >>>>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
> >>>>>
> >>>>> This message and any attachment are intended solely for the
> >>>>> addressee and may contain confidential information. If you have
> received this message in
> >>>>> error, please send it back to me, and immediately delete it.
> Please do not
> >>>>> use, copy or disclose the information contained in this message or
> >>>>> in any attachment. Any views or opinions expressed by the author
> >>>>> of this email do not necessarily reflect the views of the University
> of Nottingham.
> >>>>>
> >>>>> This message has been checked for viruses but the contents of an
> >>>>> attachment may still contain software viruses which could damage
> your computer system:
> >>>>> you are advised to perform your own checks. Email communications
> >>>>> with the University of Nottingham may be monitored as permitted by
> UK legislation.
> >>>>>
> >>>>>
> >>>>>
> >>>>> _______________________________________________
> >>>>> Xerte-dev mailing list
> >>>>> Xerte-dev at lists.nottingham.ac.uk
> >>>>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
> >>>
> >>> _______________________________________________
> >>> Xerte-dev mailing list
> >>> Xerte-dev at lists.nottingham.ac.uk
> >>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
> >>>
> >>> 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
> >>> ,
> >>> 6
> >>> 219,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
> >>> ,
> >>> 1
> >>> 5691,en.html
> >>>
> >>> _______________________________________________
> >>> Xerte-dev mailing list
> >>> Xerte-dev at lists.nottingham.ac.uk
> >>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
> >>>
> >>> 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
> >>> ,
> >>> 6
> >>> 219,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
> >>> ,
> >>> 1
> >>> 5691,en.html
> >>>
> >>> _______________________________________________
> >>> Xerte-dev mailing list
> >>> Xerte-dev at lists.nottingham.ac.uk
> >>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
> >>
> >> _______________________________________________
> >> Xerte-dev mailing list
> >> Xerte-dev at lists.nottingham.ac.uk
> >> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
> >>
> >> _______________________________________________
> >> Xerte-dev mailing list
> >> Xerte-dev at lists.nottingham.ac.uk
> >> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
> >
> > _______________________________________________
> > Xerte-dev mailing list
> > Xerte-dev at lists.nottingham.ac.uk
> > http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
> >
> > _______________________________________________
> > Xerte-dev mailing list
> > Xerte-dev at lists.nottingham.ac.uk
> > http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
> 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
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev****
>
> ****
>
> ****
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it. Please do not
> use, copy or disclose the information contained in this message or in any
> attachment. Any views or opinions expressed by the author of this email do
> not necessarily reflect the views of the University of Nottingham. ****
>
> This message has been checked for viruses but the contents of an
> attachment may still contain software viruses which could damage your
> computer system: you are advised to perform your own checks. Email
> communications with the University of Nottingham may be monitored as
> permitted by UK legislation. ****
>
>
> 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
> ****
>
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it. Please do
> not use, copy or disclose the information contained in this message or in
> any attachment. Any views or opinions expressed by the author of this
> email do not necessarily reflect the views of the University of Nottingham.
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
>
> ****
>
> ** **
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it. Please do
> not use, copy or disclose the information contained in this message or in
> any attachment. Any views or opinions expressed by the author of this
> email do not necessarily reflect the views of the University of Nottingham.
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20121102/3ba45fc7/attachment-0001.html>
More information about the Xerte-dev
mailing list